diff --git a/doc/source/composites.rst b/doc/source/composites.rst index 9f6f1d3d03..001e43fd9e 100644 --- a/doc/source/composites.rst +++ b/doc/source/composites.rst @@ -371,9 +371,9 @@ can be applied in the following way:: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: VIS006 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VIS008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - IR_108 standard_name: overview @@ -384,7 +384,9 @@ Here we see two changes: 2. a list of modifiers attached to the dictionary defining the channel The modifier above is a built-in that normalizes the Solar zenith -angle to Sun being directly at the zenith. +angle to Sun being directly at the zenith following the Li and Shibata +(2006, :doi:`10.1175/JAS3682.1`) parameterization that reduces over-correction at high Solar +zenith angles. More examples can be found in Satpy source code directory `satpy/etc/composites `_. diff --git a/doc/source/dev_guide/custom_reader.rst b/doc/source/dev_guide/custom_reader.rst index 0475e07144..363cb9983a 100644 --- a/doc/source/dev_guide/custom_reader.rst +++ b/doc/source/dev_guide/custom_reader.rst @@ -218,7 +218,8 @@ Parameters you can define for example are: when it is returned by the file handler. Only a few of these have been standardized across Satpy, but are based on the names of the modifiers configured in the "composites" YAML files. Examples include - ``sunz_corrected`` or ``rayleigh_corrected``. See the + ``sunz_corrected``, ``effective_solar_pathlength_corrected`` + or ``rayleigh_corrected``. See the `metadata wiki `_ for more information. - file\_type: Name of file type (see above). diff --git a/doc/source/modifiers.rst b/doc/source/modifiers.rst index 4869fe9091..294fa329ed 100644 --- a/doc/source/modifiers.rst +++ b/doc/source/modifiers.rst @@ -34,11 +34,18 @@ on those modifiers can be found in the linked API documentation. - Description * - ``sunz_corrected`` - :class:`~satpy.modifiers.geometry.SunZenithCorrector` - - Modifies solar channels for the solar zenith angle to provide - smoother images. + - Normalizes solar channels for the solar zenith angle using ``1/cos(sza)`` + to compute the true reflectance. This leads to zero reflectance for + solar zenith angles of 90 degrees and above. For Satpy < 1.0 a reduction + of the correction is applied between 88-95 degrees in order to avoid + over-correction for (RGB) imagery and retain imagery beyond 90 degrees. * - ``effective_solar_pathlength_corrected`` - :class:`~satpy.modifiers.geometry.EffectiveSolarPathLengthCorrector` - - Modifies solar channels for atmospheric path length of solar radiation. + - Normalizes solar channels for the solar zenith angle to compute the reflectance, + but parameterized following Li and Shibata (2006, :doi:`10.1175/JAS3682.1`) to avoid + over-correction at high solar zenith angles for better looking (RGB) imagery, also + extending beyond 90 degrees solar zenith angle. This should not be used for + quantitative scientific applications beyond the visual usage of imagery. * - ``nir_reflectance`` - :class:`~satpy.modifiers.spectral.NIRReflectance` - Calculates reflective part of channels at the edge of solar and diff --git a/satpy/composites/spectral.py b/satpy/composites/spectral.py index e130a6a337..54d3af1d0e 100644 --- a/satpy/composites/spectral.py +++ b/satpy/composites/spectral.py @@ -41,11 +41,11 @@ class SpectralBlender(GenericCompositor): fractions: [0.63, 0.29, 0.08] prerequisites: - name: B02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: B03 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: B04 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: toa_bidirectional_reflectance Other examples can be found in the``ahi.yaml`` composite file in the satpy distribution. @@ -93,9 +93,9 @@ class HybridGreen(SpectralBlender): fraction: 0.15 prerequisites: - name: B02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: B04 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: toa_bidirectional_reflectance Other examples can be found in the ``ahi.yaml`` and ``ami.yaml`` composite @@ -126,11 +126,11 @@ class NDVIHybridGreen(SpectralBlender): strength: 1.0 prerequisites: - name: vis_05 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: vis_06 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: vis_08 - modifiers: [sunz_corrected ] + modifiers: [effective_solar_pathlength_corrected ] standard_name: toa_bidirectional_reflectance In this example, pixels with NDVI=0.0 will be a weighted average with 15% contribution from the diff --git a/satpy/etc/composites/abi.yaml b/satpy/etc/composites/abi.yaml index 0a6f0b9999..649a8ad6db 100644 --- a/satpy/etc/composites/abi.yaml +++ b/satpy/etc/composites/abi.yaml @@ -32,11 +32,11 @@ composites: prerequisites: # should we be using the most corrected or least corrected inputs? - name: C01 - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance green_raw: @@ -46,11 +46,11 @@ composites: prerequisites: # should we be using the most corrected or least corrected inputs? - name: C01 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance green: @@ -60,11 +60,11 @@ composites: prerequisites: # should we be using the most corrected or least corrected inputs? - name: C01 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance green_nocorr: @@ -82,30 +82,30 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] - name: green_crefl - name: C01 - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] standard_name: true_color true_color_raw: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: green_raw - name: C01 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: true_color true_color: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: green - name: C01 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color true_color_nocorr: @@ -120,11 +120,11 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: C05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] high_resolution_band: blue standard_name: natural_color @@ -149,9 +149,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - C14 standard_name: overview @@ -190,11 +190,11 @@ composites: prerequisites: # should we be using the most corrected or least corrected inputs? - name: C01 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance cimss_green_sunz: @@ -203,11 +203,11 @@ composites: prerequisites: # should we be using the most corrected or least corrected inputs? - name: C01 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance cimss_green: @@ -232,10 +232,10 @@ composites: Research Article: https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2018EA000379 prerequisites: - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: cimss_green_sunz_rayleigh - name: C01 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: cimss_true_color cimss_true_color_sunz: @@ -250,10 +250,10 @@ composites: Research Article: https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2018EA000379 prerequisites: - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: cimss_green_sunz - name: C01 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: cimss_true_color cimss_true_color: @@ -439,9 +439,9 @@ composites: prerequisites: - name: C13 - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: cloud_phase_distinction day_cloud_type_distinction: @@ -600,9 +600,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - compositor: !!python/name:satpy.composites.arithmetic.DifferenceCompositor prerequisites: - name: C07 @@ -680,9 +680,9 @@ composites: prerequisites: - name: C06 - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: land_cloud_fire land_cloud: @@ -694,9 +694,9 @@ composites: prerequisites: - name: C05 - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: land_cloud snow: @@ -709,9 +709,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C07 modifiers: [nir_reflectance] standard_name: snow @@ -726,7 +726,7 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C07 modifiers: [nir_reflectance] - name: C14 @@ -754,11 +754,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: C05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C06 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: cloud_phase cloud_phase_raw: @@ -796,9 +796,9 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: green standard_name: true_color @@ -824,10 +824,10 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: green - name: C01 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color_reproduction_color_stretch true_color_reproduction_uncorr: diff --git a/satpy/etc/composites/agri.yaml b/satpy/etc/composites/agri.yaml index 63a22cec76..5e5f48db00 100644 --- a/satpy/etc/composites/agri.yaml +++ b/satpy/etc/composites/agri.yaml @@ -8,11 +8,11 @@ composites: prerequisites: # should we be using the most corrected or least corrected inputs? - name: C01 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance green_nocorr: @@ -33,9 +33,9 @@ composites: prerequisites: # should we be using the most corrected or least corrected inputs? - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance pseudored_nocorr: @@ -54,7 +54,7 @@ composites: - name: pseudored - name: green - name: C01 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color true_color_nocorr: @@ -77,9 +77,9 @@ composites: prerequisites: - name: C12 - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: cloud_phase_distinction cloud_phase_distinction_raw: @@ -101,9 +101,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - compositor: !!python/name:satpy.composites.arithmetic.DifferenceCompositor prerequisites: - name: C07 @@ -133,9 +133,9 @@ composites: prerequisites: - name: C06 - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: land_cloud_fire land_cloud: @@ -148,9 +148,9 @@ composites: prerequisites: - name: C05 - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: land_cloud snow: @@ -163,9 +163,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C07 modifiers: [nir_reflectance] standard_name: snow @@ -180,7 +180,7 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C07 modifiers: [nir_reflectance] - name: C12 @@ -211,11 +211,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: C05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C06 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: natural_color cloud_phase_raw: @@ -234,9 +234,9 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: C03 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: green standard_name: true_color diff --git a/satpy/etc/composites/ahi.yaml b/satpy/etc/composites/ahi.yaml index af8e96b4d3..393dee7d32 100644 --- a/satpy/etc/composites/ahi.yaml +++ b/satpy/etc/composites/ahi.yaml @@ -7,7 +7,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: B03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -24,9 +24,9 @@ composites: # should we be using the most corrected or least corrected inputs? # what happens if something requests more modifiers on top of this? - wavelength: 0.51 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - wavelength: 0.85 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance reproduced_green: @@ -35,11 +35,11 @@ composites: fractions: [0.6321, 0.2928, 0.0751] prerequisites: - name: B02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: B03 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: B04 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: none reproduced_green_uncorr: @@ -69,11 +69,11 @@ composites: strength: 3.0 prerequisites: - name: B02 - modifiers: [sunz_corrected, rayleigh_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: B03 - modifiers: [sunz_corrected, rayleigh_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: B04 - modifiers: [sunz_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance airmass: @@ -200,9 +200,9 @@ composites: - wavelength: 3.85 modifiers: [nir_reflectance] - wavelength: 2.26 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 1.61 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: fire_temperature name: fire_temperature_39refl @@ -210,9 +210,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: B03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: B04 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: B13 standard_name: overview @@ -228,11 +228,11 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - wavelength: 1.63 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 0.85 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 0.635 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] high_resolution_band: blue standard_name: natural_color @@ -240,10 +240,10 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: B03 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: hybrid_green - name: B01 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] high_resolution_band: red standard_name: true_color @@ -251,10 +251,10 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: B03 - modifiers: [sunz_corrected, rayleigh_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: ndvi_hybrid_green - name: B01 - modifiers: [sunz_corrected, rayleigh_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] high_resolution_band: red standard_name: true_color @@ -302,10 +302,10 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: B03 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: reproduced_green - name: B01 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color_reproduction_color_stretch true_color_reproduction_uncorr: diff --git a/satpy/etc/composites/ami.yaml b/satpy/etc/composites/ami.yaml index 8dd9c3fc7b..c1b57c0699 100644 --- a/satpy/etc/composites/ami.yaml +++ b/satpy/etc/composites/ami.yaml @@ -6,9 +6,9 @@ composites: compositor: !!python/name:satpy.composites.spectral.HybridGreen prerequisites: - name: VI005 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VI008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance fraction: 0.15 @@ -17,9 +17,9 @@ composites: compositor: !!python/name:satpy.composites.spectral.HybridGreen prerequisites: - name: VI005 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: VI008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance fraction: 0.15 @@ -36,9 +36,9 @@ composites: compositor: !!python/name:satpy.composites.spectral.HybridGreen prerequisites: - name: VI005 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VI008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance fraction: 0.15 @@ -46,9 +46,9 @@ composites: compositor: !!python/name:satpy.composites.spectral.HybridGreen prerequisites: - name: VI005 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: VI008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance fraction: 0.15 @@ -72,11 +72,11 @@ composites: strength: 3.0 prerequisites: - name: VI005 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: VI006 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: VI008 - modifiers: [sunz_corrected ] + modifiers: [effective_solar_pathlength_corrected ] standard_name: toa_bidirectional_reflectance ndvi_hybrid_green_raw: @@ -95,20 +95,20 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: VI006 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: hybrid_green_raw - name: VI004 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: true_color true_color: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: VI006 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: hybrid_green - name: VI004 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color true_color_nocorr: @@ -137,11 +137,11 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: NR016 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VI008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VI006 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] high_resolution_band: blue standard_name: natural_color @@ -308,10 +308,10 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: VI006 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: ndvi_hybrid_green - name: VI004 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color_reproduction_color_stretch true_color_reproduction_uncorr: diff --git a/satpy/etc/composites/ec_msi.yaml b/satpy/etc/composites/ec_msi.yaml index 9a3242c69e..b0ac2a710d 100644 --- a/satpy/etc/composites/ec_msi.yaml +++ b/satpy/etc/composites/ec_msi.yaml @@ -11,7 +11,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: VIS - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -31,9 +31,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: SWIR1 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: NIR - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VIS - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color diff --git a/satpy/etc/composites/epic.yaml b/satpy/etc/composites/epic.yaml index 2bfca8ca0d..2404c73f6b 100644 --- a/satpy/etc/composites/epic.yaml +++ b/satpy/etc/composites/epic.yaml @@ -12,7 +12,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: B680 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -24,11 +24,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: B680 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: B551 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: B443 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color true_color_raw: diff --git a/satpy/etc/composites/fci.yaml b/satpy/etc/composites/fci.yaml index f73df3e557..ae3238fb98 100644 --- a/satpy/etc/composites/fci.yaml +++ b/satpy/etc/composites/fci.yaml @@ -54,11 +54,11 @@ composites: strength: 3.0 prerequisites: - name: vis_05 - modifiers: [sunz_corrected, rayleigh_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: vis_06 - modifiers: [sunz_corrected, rayleigh_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: vis_08 - modifiers: [sunz_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected] standard_name: toa_bidirectional_reflectance ndvi_hybrid_green_raw: @@ -73,18 +73,18 @@ composites: - name: vis_08 standard_name: toa_bidirectional_reflectance - ndvi_hybrid_green_fully_sunzencorrected: - description: Same as ndvi_hybrid_green, but without Sun-zenith reduction + ndvi_hybrid_green_sunz_reduced: + description: Same as ndvi_hybrid_green, but with Sun-zenith reduction for smoother transition to space compositor: !!python/name:satpy.composites.spectral.NDVIHybridGreen limits: [0.15, 0.05] strength: 3.0 prerequisites: - name: vis_05 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected, sunz_reduced] - name: vis_06 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected, sunz_reduced] - name: vis_08 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected, sunz_reduced] standard_name: toa_bidirectional_reflectance ### Non-official HRV Clouds composite similar to SEVIRI @@ -94,9 +94,9 @@ composites: standard_name: hrv_clouds prerequisites: - name: vis_06 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: vis_06 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - ir_105 ### True Color @@ -108,23 +108,23 @@ composites: of the ndvi_hybrid_green composites for details. prerequisites: - name: vis_06 - modifiers: [sunz_corrected, rayleigh_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: ndvi_hybrid_green - name: vis_04 - modifiers: [sunz_corrected, rayleigh_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color - true_color_fully_sunzencorrected: + true_color_sunz_reduced: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB description: > - Same as true_color, but without Sun-zenith reduction. For users that want to maintain as much data as possible - close to the terminator, at cost of some artefacts (bright limb and reddish clouds) (see issue #2643). + Same as true_color, but with Sun-zenith reduction to reduce some artefacts (bright + limb and reddish clouds) (see issue #2643). prerequisites: - name: vis_06 - modifiers: [sunz_corrected, rayleigh_corrected] - - name: ndvi_hybrid_green_fully_sunzencorrected + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected, sunz_reduced] + - name: ndvi_hybrid_green_sunz_reduced - name: vis_04 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected, sunz_reduced] standard_name: true_color true_color_raw_with_corrected_green: @@ -187,10 +187,10 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: vis_06 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: ndvi_hybrid_green - name: vis_04 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color_reproduction_color_stretch true_color_reproduction_uncorr: @@ -358,7 +358,7 @@ composites: standard_name: ir_sandwich prerequisites: - name: "vis_06" - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: colorized_ir_clouds colorized_ir_clouds: @@ -379,23 +379,23 @@ composites: ### other RGBs cloud_type: description: > - Equal to cimss_cloud_type recipe, but with additional sunz_reducer modifier to avoid saturation at the terminator. + Equal to cimss_cloud_type recipe. references: EUMETRAIN Quick Guide: https://resources.eumetrain.org/rgb_quick_guides/quick_guides/CloudTypeRGB.pdf Recipe: https://resources.eumetrain.org/RGBguide/recipes/RGB_recipes.pdf compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: nir_13 - modifiers: [sunz_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected] - name: vis_06 - modifiers: [sunz_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected] - name: nir_16 - modifiers: [sunz_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected] standard_name: cimss_cloud_type day_cloud_type_chmi: description: > - Equal to cimss_cloud_type recipe, but with effective_solar_pathlength_corrected modifier to avoid saturation at the terminator. + Equal to cloud_type recipe, but with alternative enhancement by CHMI to avoid saturation. references: EUMETRAIN Quick Guide: https://eumetrain.org/sites/default/files/2021-05/CloudTypeRGB.pdf EUMETRAIN extended Guide: https://resources.eumetrain.org/data/7/736/index.htm @@ -421,24 +421,22 @@ composites: - night_ir105 cloud_phase: - description: > - Equal to cloud_phase recipe, but with additional sunz_reducer modifier to avoid saturation at the terminator. references: EUMETRAIN Quick Guide: https://resources.eumetrain.org/rgb_quick_guides/quick_guides/CloudPhaseRGB.pdf Recipe: https://resources.eumetrain.org/RGBguide/recipes/RGB_recipes.pdf compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: nir_16 - modifiers: [sunz_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected] - name: nir_22 - modifiers: [sunz_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected] - name: vis_06 - modifiers: [sunz_corrected, rayleigh_corrected, sunz_reduced] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: cloud_phase day_cloud_phase_chmi: description: > - Equal to cloud_phase recipe, but with effective_solar_pathlength_corrected modifier to avoid saturation at the terminator. + Equal to cloud_phase recipe, but with alternative enhancement by CHMI to avoid saturation. compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: nir_16 @@ -494,9 +492,9 @@ composites: - name: ir_38 modifiers: [nir_reflectance] - name: nir_22 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: nir_16 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] fire_temperature_rad: standard_name: fire_temperature_fci_rad @@ -520,9 +518,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: vis_08 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: nir_16 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: ir_38 modifiers: [nir_reflectance] standard_name: snow @@ -655,7 +653,7 @@ composites: standard_name: vis-crude prerequisites: - name: vis_06 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] _ir105: compositor: !!python/name:satpy.composites.core.SingleBandCompositor diff --git a/satpy/etc/composites/ghi.yaml b/satpy/etc/composites/ghi.yaml index 5a47f728fd..8aaf7d8269 100644 --- a/satpy/etc/composites/ghi.yaml +++ b/satpy/etc/composites/ghi.yaml @@ -5,11 +5,11 @@ composites: compositor: !!python/name:satpy.composites.resolution.SelfSharpenedRGB prerequisites: - name: C04 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C03 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: C02 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color true_color_nocorr: diff --git a/satpy/etc/composites/insat3d_img.yaml b/satpy/etc/composites/insat3d_img.yaml index 8b80e13414..85a3d3ad54 100644 --- a/satpy/etc/composites/insat3d_img.yaml +++ b/satpy/etc/composites/insat3d_img.yaml @@ -13,9 +13,9 @@ composites: prerequisites: - wavelength: 10.8 - wavelength: 0.64 - modifiers: [ sunz_corrected, rayleigh_corrected ] + modifiers: [ effective_solar_pathlength_corrected, rayleigh_corrected ] - wavelength: 1.6 - modifiers: [ sunz_corrected ] + modifiers: [ effective_solar_pathlength_corrected ] standard_name: cloud_phase_distinction cloud_phase_distinction_raw: diff --git a/satpy/etc/composites/mersi-1.yaml b/satpy/etc/composites/mersi-1.yaml index a3fac0787a..006d9e04d3 100644 --- a/satpy/etc/composites/mersi-1.yaml +++ b/satpy/etc/composites/mersi-1.yaml @@ -7,7 +7,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: '3' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -38,36 +38,36 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '3' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '2' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '1' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color true_color_uncorr: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '3' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '2' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: true_color natural_color: compositor: !!python/name:satpy.composites.resolution.RatioSharpenedRGB prerequisites: - name: '6' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '16' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '3' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: '4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] high_resolution_band: green neutral_resolution_band: blue standard_name: natural_color @@ -76,8 +76,8 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '3' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '5' standard_name: overview diff --git a/satpy/etc/composites/mersi-2.yaml b/satpy/etc/composites/mersi-2.yaml index 231e03c161..4408902e33 100644 --- a/satpy/etc/composites/mersi-2.yaml +++ b/satpy/etc/composites/mersi-2.yaml @@ -7,12 +7,13 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: '3' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle - name: solar_azimuth_angle - name: solar_zenith_angle + sunz_corrected: modifier: !!python/name:satpy.modifiers.SunZenithCorrector prerequisites: @@ -54,25 +55,25 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '3' # 0.65 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '2' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '1' # 0.47 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color natural_color: compositor: !!python/name:satpy.composites.resolution.RatioSharpenedRGB prerequisites: - name: '6' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '15' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '3' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: '4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color high_resolution_band: green @@ -80,11 +81,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '6' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '15' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '12' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color overview_raw: @@ -99,9 +100,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '12' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '15' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '24' standard_name: overview @@ -117,7 +118,7 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '15' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '20' modifiers: [nir_reflectance] - name: '24' diff --git a/satpy/etc/composites/mersi-3.yaml b/satpy/etc/composites/mersi-3.yaml index 932e12ddbc..01426b20fa 100644 --- a/satpy/etc/composites/mersi-3.yaml +++ b/satpy/etc/composites/mersi-3.yaml @@ -7,12 +7,13 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: '3' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle - name: solar_azimuth_angle - name: solar_zenith_angle + sunz_corrected: modifier: !!python/name:satpy.modifiers.SunZenithCorrector prerequisites: @@ -54,25 +55,25 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '3' # 0.65 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '2' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '1' # 0.47 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color natural_color: compositor: !!python/name:satpy.composites.resolution.RatioSharpenedRGB prerequisites: - name: '6' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '15' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '3' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: '4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color high_resolution_band: green @@ -80,11 +81,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '6' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '15' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '12' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color overview_raw: @@ -99,9 +100,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '12' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '15' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '24' standard_name: overview @@ -117,7 +118,7 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '15' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '20' modifiers: [nir_reflectance] - name: '24' diff --git a/satpy/etc/composites/mersi-rm.yaml b/satpy/etc/composites/mersi-rm.yaml index e76b2925fa..41336c8577 100644 --- a/satpy/etc/composites/mersi-rm.yaml +++ b/satpy/etc/composites/mersi-rm.yaml @@ -7,12 +7,13 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle - name: solar_azimuth_angle - name: solar_zenith_angle + sunz_corrected: modifier: !!python/name:satpy.modifiers.SunZenithCorrector prerequisites: @@ -31,11 +32,11 @@ composites: compositor: !!python/name:satpy.composites.resolution.RatioSharpenedRGB prerequisites: - name: '5' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '3' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color overview_raw: @@ -50,9 +51,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '2' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '7' standard_name: overview @@ -68,7 +69,7 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '2' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '7' modifiers: [nir_reflectance] - name: '8' diff --git a/satpy/etc/composites/modis.yaml b/satpy/etc/composites/modis.yaml index aeda364908..0ba3c2e4d2 100644 --- a/satpy/etc/composites/modis.yaml +++ b/satpy/etc/composites/modis.yaml @@ -17,7 +17,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - satellite_azimuth_angle - satellite_zenith_angle - solar_azimuth_angle @@ -28,59 +28,59 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '3' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: true_color true_color: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '1' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '4' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '3' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color true_color_thin: compositor: !!python/name:satpy.composites.fill.FillingCompositor prerequisites: - name: '1' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '1' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '12' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '10' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color true_color_crefl: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '1' - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] - name: '4' - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] - name: '3' - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] standard_name: true_color overview: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - compositor: !!python/name:satpy.composites.fill.Filler prerequisites: - name: '2' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '31' standard_name: overview @@ -90,11 +90,11 @@ composites: - compositor: !!python/name:satpy.composites.fill.Filler prerequisites: - name: '2' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '6' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '20' modifiers: [nir_reflectance] standard_name: snow @@ -103,15 +103,15 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '6' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - compositor: !!python/name:satpy.composites.fill.Filler prerequisites: - name: '2' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color day_microphysics: @@ -120,9 +120,9 @@ composites: - compositor: !!python/name:satpy.composites.fill.Filler prerequisites: - name: '2' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '20' modifiers: [nir_reflectance] - name: '31' @@ -146,11 +146,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '1' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '4' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '3' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: ocean_color night_fog: diff --git a/satpy/etc/composites/msu-gs.yaml b/satpy/etc/composites/msu-gs.yaml index 0e45292460..b456a27738 100644 --- a/satpy/etc/composites/msu-gs.yaml +++ b/satpy/etc/composites/msu-gs.yaml @@ -12,8 +12,8 @@ composites: compositor: !!python/name:satpy.composites.core.RGBCompositor prerequisites: - name: 00_9 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: 00_9 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - 10.8 standard_name: overview diff --git a/satpy/etc/composites/msu_gsa.yaml b/satpy/etc/composites/msu_gsa.yaml index 8d924d58d6..1f3edfa987 100644 --- a/satpy/etc/composites/msu_gsa.yaml +++ b/satpy/etc/composites/msu_gsa.yaml @@ -12,20 +12,20 @@ composites: compositor: !!python/name:satpy.composites.core.RGBCompositor prerequisites: - name: C01 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C09 standard_name: overview msugsa_color: compositor: !!python/name:satpy.composites.core.RGBCompositor prerequisites: - name: C03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C02 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: C01 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color msugsa_color_raw: compositor: !!python/name:satpy.composites.core.RGBCompositor diff --git a/satpy/etc/composites/olci.yaml b/satpy/etc/composites/olci.yaml index 3b0377b582..0dd29ebc21 100644 --- a/satpy/etc/composites/olci.yaml +++ b/satpy/etc/composites/olci.yaml @@ -9,7 +9,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: 'Oa08' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -22,7 +22,7 @@ modifiers: aerosol_type: marine_clean_aerosol prerequisites: - name: 'Oa08' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -35,7 +35,7 @@ modifiers: aerosol_type: marine_tropical_aerosol prerequisites: - name: 'Oa08' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -48,7 +48,7 @@ modifiers: aerosol_type: desert_aerosol prerequisites: - name: 'Oa08' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -61,7 +61,7 @@ modifiers: aerosol_type: continental_average_aerosol prerequisites: - name: 'Oa08' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle diff --git a/satpy/etc/composites/oli_tirs.yaml b/satpy/etc/composites/oli_tirs.yaml index 131e2f6056..c1e0d1fe00 100644 --- a/satpy/etc/composites/oli_tirs.yaml +++ b/satpy/etc/composites/oli_tirs.yaml @@ -7,7 +7,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -20,7 +20,7 @@ modifiers: aerosol_type: antarctic_aerosol prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -33,7 +33,7 @@ modifiers: aerosol_type: continental_average_aerosol prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -46,7 +46,7 @@ modifiers: aerosol_type: continental_clean_aerosol prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -59,7 +59,7 @@ modifiers: aerosol_type: continental_polluted_aerosol prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -72,7 +72,7 @@ modifiers: aerosol_type: desert_aerosol prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -85,7 +85,7 @@ modifiers: aerosol_type: marine_clean_aerosol prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -98,7 +98,7 @@ modifiers: aerosol_type: marine_polluted_aerosol prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -111,7 +111,7 @@ modifiers: aerosol_type: marine_tropical_aerosol prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -124,7 +124,7 @@ modifiers: aerosol_type: rural_aerosol prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -137,7 +137,7 @@ modifiers: aerosol_type: urban_aerosol prerequisites: - name: 'B4' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle diff --git a/satpy/etc/composites/sen2_msi.yaml b/satpy/etc/composites/sen2_msi.yaml index c479964536..9b8ce5908c 100644 --- a/satpy/etc/composites/sen2_msi.yaml +++ b/satpy/etc/composites/sen2_msi.yaml @@ -7,7 +7,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -20,7 +20,7 @@ modifiers: aerosol_type: antarctic_aerosol prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -33,7 +33,7 @@ modifiers: aerosol_type: continental_average_aerosol prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -46,7 +46,7 @@ modifiers: aerosol_type: continental_clean_aerosol prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -59,7 +59,7 @@ modifiers: aerosol_type: continental_polluted_aerosol prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -72,7 +72,7 @@ modifiers: aerosol_type: desert_aerosol prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -85,7 +85,7 @@ modifiers: aerosol_type: marine_clean_aerosol prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -98,7 +98,7 @@ modifiers: aerosol_type: marine_polluted_aerosol prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -111,7 +111,7 @@ modifiers: aerosol_type: marine_tropical_aerosol prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -124,7 +124,7 @@ modifiers: aerosol_type: rural_aerosol prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -137,7 +137,7 @@ modifiers: aerosol_type: urban_aerosol prerequisites: - name: 'B04' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle diff --git a/satpy/etc/composites/seviri.yaml b/satpy/etc/composites/seviri.yaml index 4a5b59ee68..e1fd530ecd 100644 --- a/satpy/etc/composites/seviri.yaml +++ b/satpy/etc/composites/seviri.yaml @@ -17,7 +17,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: VIS006 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -137,9 +137,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: VIS008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: IR_016 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: IR_039 modifiers: [nir_reflectance] standard_name: snow @@ -148,7 +148,7 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: VIS008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: IR_039 modifiers: [nir_reflectance] - IR_108 @@ -158,7 +158,7 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: VIS008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: IR_039 modifiers: [nir_reflectance] - IR_108 @@ -176,11 +176,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: IR_016 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VIS008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VIS006 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color natural_color_nocorr: @@ -336,11 +336,11 @@ composites: standard_name: realistic_colors prerequisites: - name: VIS006 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VIS008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: HRV - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] ir_overview: compositor: !!python/name:satpy.composites.core.GenericCompositor @@ -362,9 +362,9 @@ composites: compositor: !!python/name:satpy.composites.core.RGBCompositor prerequisites: - name: VIS006 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VIS008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - IR_108 standard_name: overview @@ -387,7 +387,7 @@ composites: standard_name: vis_sharpened_ir prerequisites: - name: 'HRV' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: colorized_ir_clouds ir_sandwich: @@ -395,7 +395,7 @@ composites: standard_name: ir_sandwich prerequisites: - name: 'HRV' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: colorized_ir_clouds natural_enh: @@ -406,20 +406,20 @@ composites: ch06_w: 2.2 prerequisites: - name: IR_016 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VIS008 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: VIS006 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] hrv_clouds: compositor: !!python/name:satpy.composites.core.GenericCompositor standard_name: hrv_clouds prerequisites: - name: HRV - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: HRV - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - IR_108 hrv_fog: @@ -427,19 +427,19 @@ composites: standard_name: hrv_fog prerequisites: - name: IR_016 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: HRV - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: HRV - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] hrv_severe_storms: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: HRV - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: HRV - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - compositor: !!python/name:satpy.composites.arithmetic.DifferenceCompositor prerequisites: - wavelength: 10.8 @@ -463,7 +463,7 @@ composites: - name: hrv_severe_storms # Data used in masking - name: HRV - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: hrv_severe_storms_masked natural_with_night_fog: @@ -538,14 +538,14 @@ composites: standard_name: vis06 prerequisites: - name: VIS006 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] _hrv: compositor: !!python/name:satpy.composites.core.GenericCompositor standard_name: hrv prerequisites: - name: HRV - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] _vis06_filled_hrv: compositor: !!python/name:satpy.composites.fill.Filler diff --git a/satpy/etc/composites/sgli.yaml b/satpy/etc/composites/sgli.yaml index 863b902bf3..8085127994 100644 --- a/satpy/etc/composites/sgli.yaml +++ b/satpy/etc/composites/sgli.yaml @@ -9,7 +9,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: 'VN9' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -22,7 +22,7 @@ modifiers: aerosol_type: marine_clean_aerosol prerequisites: - name: 'VN8' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -35,7 +35,7 @@ modifiers: aerosol_type: marine_tropical_aerosol prerequisites: - name: 'VN8' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -48,7 +48,7 @@ modifiers: aerosol_type: desert_aerosol prerequisites: - name: 'VN8' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -61,7 +61,7 @@ modifiers: aerosol_type: continental_average_aerosol prerequisites: - name: 'VN8' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle diff --git a/satpy/etc/composites/slstr.yaml b/satpy/etc/composites/slstr.yaml index e21be27ba6..5aa786f863 100644 --- a/satpy/etc/composites/slstr.yaml +++ b/satpy/etc/composites/slstr.yaml @@ -31,9 +31,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: S2 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: S3 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - S8 standard_name: overview @@ -41,18 +41,18 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: S5 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: S3 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: S2 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color day_microphysics: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: S3 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: S7 modifiers: [nir_reflectance] - S8 diff --git a/satpy/etc/composites/vii.yaml b/satpy/etc/composites/vii.yaml index 1543ca852f..c93e9b2a53 100644 --- a/satpy/etc/composites/vii.yaml +++ b/satpy/etc/composites/vii.yaml @@ -14,40 +14,40 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: 'vii_668' - modifiers: [ sunz_corrected ] + modifiers: [ effective_solar_pathlength_corrected ] - name: 'vii_555' - modifiers: [ sunz_corrected ] + modifiers: [ effective_solar_pathlength_corrected ] - name: 'vii_443' - modifiers: [ sunz_corrected ] + modifiers: [ effective_solar_pathlength_corrected ] standard_name: true_color true_color: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: 'vii_668' - modifiers: [ sunz_corrected, rayleigh_corrected ] + modifiers: [ effective_solar_pathlength_corrected, rayleigh_corrected ] - name: 'vii_555' - modifiers: [ sunz_corrected, rayleigh_corrected ] + modifiers: [ effective_solar_pathlength_corrected, rayleigh_corrected ] - name: 'vii_443' - modifiers: [ sunz_corrected, rayleigh_corrected ] + modifiers: [ effective_solar_pathlength_corrected, rayleigh_corrected ] standard_name: true_color natural_color: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: 'vii_1630' - modifiers: [ sunz_corrected ] + modifiers: [ effective_solar_pathlength_corrected ] - name: 'vii_865' - modifiers: [ sunz_corrected ] + modifiers: [ effective_solar_pathlength_corrected ] - name: 'vii_668' - modifiers: [ sunz_corrected, rayleigh_corrected ] + modifiers: [ effective_solar_pathlength_corrected, rayleigh_corrected ] standard_name: natural_color day_microphysics: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: 'vii_865' - modifiers: [ sunz_corrected ] + modifiers: [ effective_solar_pathlength_corrected ] - name: 'vii_3740' modifiers: [ nir_reflectance ] - name: 'vii_10690' @@ -57,9 +57,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: 'vii_865' - modifiers: [ sunz_corrected ] + modifiers: [ effective_solar_pathlength_corrected ] - name: 'vii_1630' - modifiers: [ sunz_corrected ] + modifiers: [ effective_solar_pathlength_corrected ] - name: 'vii_3740' modifiers: [ nir_reflectance ] standard_name: snow diff --git a/satpy/etc/composites/viirs.yaml b/satpy/etc/composites/viirs.yaml index c2f43670c4..a5dae09c7a 100644 --- a/satpy/etc/composites/viirs.yaml +++ b/satpy/etc/composites/viirs.yaml @@ -36,7 +36,7 @@ modifiers: prerequisites: - name: I01 resolution: 371 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] optional_prerequisites: - name: satellite_azimuth_angle resolution: 371 @@ -54,7 +54,7 @@ modifiers: prerequisites: - name: M05 resolution: 742 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle resolution: 742 @@ -72,7 +72,7 @@ modifiers: prerequisites: - name: M05 resolution: 742 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle resolution: 742 @@ -90,7 +90,7 @@ modifiers: prerequisites: - name: M05 resolution: 742 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle resolution: 742 @@ -113,6 +113,18 @@ modifiers: - name: solar_zenith_angle resolution: 371 + effective_solar_pathlength_corrected: + modifier: !!python/name:satpy.modifiers.EffectiveSolarPathLengthCorrector + prerequisites: + - name: solar_zenith_angle + resolution: 742 + + effective_solar_pathlength_corrected_iband: + modifier: !!python/name:satpy.modifiers.EffectiveSolarPathLengthCorrector + prerequisites: + - name: solar_zenith_angle + resolution: 371 + nir_emissive_lowres: modifier: !!python/name:satpy.modifiers.NIREmissivePartFromReflectance prerequisites: @@ -151,14 +163,14 @@ composites: compositor: !!python/name:satpy.composites.resolution.RatioSharpenedRGB prerequisites: - name: M05 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: M04 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: M03 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] optional_prerequisites: - name: I01 - modifiers: [sunz_corrected_iband, rayleigh_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband, rayleigh_corrected_iband] standard_name: true_color high_resolution_band: red @@ -166,14 +178,14 @@ composites: compositor: !!python/name:satpy.composites.resolution.RatioSharpenedRGB prerequisites: - name: M05 - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] - name: M04 - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] - name: M03 - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] optional_prerequisites: - name: I01 - modifiers: [sunz_corrected_iband, rayleigh_corrected_crefl_iband] + modifiers: [effective_solar_pathlength_corrected_iband, rayleigh_corrected_crefl_iband] standard_name: true_color high_resolution_band: red @@ -181,58 +193,58 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: M05 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: M04 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: M03 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color true_color_lowres_crefl: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: M05 - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] - name: M04 - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] - name: M03 - modifiers: [sunz_corrected, rayleigh_corrected_crefl] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_crefl] standard_name: true_color true_color_lowres_land: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: M05 - modifiers: [sunz_corrected, rayleigh_corrected_land] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_land] - name: M04 - modifiers: [sunz_corrected, rayleigh_corrected_land] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_land] - name: M03 - modifiers: [sunz_corrected, rayleigh_corrected_land] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_land] standard_name: true_color true_color_lowres_marine_tropical: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: M05 - modifiers: [sunz_corrected, rayleigh_corrected_marine_tropical] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_marine_tropical] - name: M04 - modifiers: [sunz_corrected, rayleigh_corrected_marine_tropical] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_marine_tropical] - name: M03 - modifiers: [sunz_corrected, rayleigh_corrected_marine_tropical] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected_marine_tropical] standard_name: true_color false_color: compositor: !!python/name:satpy.composites.resolution.RatioSharpenedRGB prerequisites: - name: M11 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M07 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M05 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] optional_prerequisites: - name: I02 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] standard_name: false_color high_resolution_band: green @@ -274,9 +286,9 @@ composites: - name: M12 modifiers: [nir_reflectance_lowres] - name: M11 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M10 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: fire_temperature name: fire_temperature_39refl @@ -284,14 +296,14 @@ composites: compositor: !!python/name:satpy.composites.resolution.RatioSharpenedRGB prerequisites: - name: M10 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M07 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M05 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] optional_prerequisites: - name: I01 - modifiers: [sunz_corrected_iband, rayleigh_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband, rayleigh_corrected_iband] standard_name: natural_color high_resolution_band: blue @@ -299,11 +311,11 @@ composites: compositor: !!python/name:satpy.composites.core.RGBCompositor prerequisites: - name: I03 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] - name: I02 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] - name: I01 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] standard_name: natural_color natural_color_surf: @@ -357,22 +369,22 @@ composites: compositor: !!python/name:satpy.composites.core.RGBCompositor prerequisites: - name: M10 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M07 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color true_color_raw: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: M05 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M04 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: true_color overview: @@ -409,7 +421,7 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: M07 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M12 modifiers: [nir_reflectance_lowres] - M15 @@ -419,7 +431,7 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: I02 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] - name: I04 modifiers: [nir_reflectance_hires] - I05 @@ -510,9 +522,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: M07 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M10 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M12 modifiers: [nir_reflectance_lowres] standard_name: snow @@ -521,9 +533,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: I02 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] - name: I03 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] - name: I04 modifiers: [nir_reflectance_hires] standard_name: snow @@ -532,9 +544,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: I02 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] - name: I03 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] - name: I04 modifiers: [nir_reflectance_hires] standard_name: snow @@ -587,29 +599,29 @@ composites: compositor: !!python/name:satpy.composites.viirs.SnowAge prerequisites: - name: M07 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M08 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M09 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M10 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M11 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: snow_age ocean_color: compositor: !!python/name:satpy.composites.resolution.RatioSharpenedRGB prerequisites: - name: M05 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: M04 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: M03 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] optional_prerequisites: - name: I01 - modifiers: [sunz_corrected_iband, rayleigh_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband, rayleigh_corrected_iband] standard_name: ocean_color high_resolution_band: red @@ -627,9 +639,9 @@ composites: prerequisites: - name: M15 - name: I01 - modifiers: [sunz_corrected_iband, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected_iband, rayleigh_corrected] - name: I03 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] standard_name: cloud_phase_distinction day_cloud_type_distinction: @@ -644,9 +656,9 @@ composites: prerequisites: - name: M15 - name: I01 - modifiers: [sunz_corrected_iband, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected_iband, rayleigh_corrected] - name: I03 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] standard_name: day_cloud_type_distinction cloud_phase_distinction_raw: @@ -683,9 +695,9 @@ composites: prerequisites: - name: M09 - name: I01 - modifiers: [sunz_corrected_iband, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected_iband, rayleigh_corrected] - name: I03 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] standard_name: day_cloud_type cloud_phase: @@ -697,11 +709,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: I03 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] - name: M11 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: M05 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: cloud_phase cloud_phase_raw: @@ -723,11 +735,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: M09 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: I01 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] - name: I03 - modifiers: [sunz_corrected_iband] + modifiers: [effective_solar_pathlength_corrected_iband] standard_name: cimss_cloud_type cimss_cloud_type_raw: diff --git a/satpy/etc/composites/virr.yaml b/satpy/etc/composites/virr.yaml index 0043048306..d3a109c111 100644 --- a/satpy/etc/composites/virr.yaml +++ b/satpy/etc/composites/virr.yaml @@ -12,7 +12,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - name: satellite_azimuth_angle - name: satellite_zenith_angle @@ -24,20 +24,20 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '1' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '9' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - name: '7' - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: true_color true_color: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - name: '1' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '9' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - name: '7' - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: true_color diff --git a/satpy/etc/composites/visir.yaml b/satpy/etc/composites/visir.yaml index 6738f59878..f169e0c8a7 100644 --- a/satpy/etc/composites/visir.yaml +++ b/satpy/etc/composites/visir.yaml @@ -55,7 +55,7 @@ modifiers: aerosol_type: rayleigh_only prerequisites: - wavelength: 0.67 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -68,7 +68,7 @@ modifiers: aerosol_type: marine_tropical_aerosol prerequisites: - wavelength: 0.67 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -81,7 +81,7 @@ modifiers: aerosol_type: desert_aerosol prerequisites: - wavelength: 0.67 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -94,7 +94,7 @@ modifiers: aerosol_type: continental_average_aerosol prerequisites: - wavelength: 0.67 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle @@ -179,9 +179,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - wavelength: 0.8 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 1.63 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 3.9 modifiers: [nir_reflectance] standard_name: snow @@ -190,7 +190,7 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - wavelength: 0.85 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 3.9 modifiers: [nir_reflectance] - 10.8 @@ -244,11 +244,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - wavelength: 1.63 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 0.85 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 0.635 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: natural_color night_fog: @@ -277,9 +277,9 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - wavelength: 0.6 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 0.8 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - 10.8 standard_name: overview @@ -527,11 +527,11 @@ composites: standard_name: natural_enh prerequisites: - wavelength: 1.6 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 0.8 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 0.6 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] _night_background: compositor: !!python/name:satpy.composites.aux_data.StaticImageCompositor @@ -557,9 +557,9 @@ composites: prerequisites: - wavelength: 10.3 - wavelength: 0.64 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] - wavelength: 1.6 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: cloud_phase_distinction cloud_phase_distinction_raw: @@ -581,11 +581,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - wavelength: 1.6 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 2.25 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 0.67 - modifiers: [sunz_corrected, rayleigh_corrected] + modifiers: [effective_solar_pathlength_corrected, rayleigh_corrected] standard_name: cloud_phase cloud_phase_raw: @@ -607,11 +607,11 @@ composites: compositor: !!python/name:satpy.composites.core.GenericCompositor prerequisites: - wavelength: 1.38 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 0.64 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] - wavelength: 1.61 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] standard_name: cimss_cloud_type cimss_cloud_type_raw: diff --git a/satpy/modifiers/angles.py b/satpy/modifiers/angles.py index 9ea6b008b0..07936c70d7 100644 --- a/satpy/modifiers/angles.py +++ b/satpy/modifiers/angles.py @@ -20,6 +20,7 @@ import datetime as dt import hashlib +import logging import os import shutil import warnings @@ -41,6 +42,8 @@ PRGeometry: TypeAlias = SwathDefinition | AreaDefinition | StackedAreaDefinition +logger = logging.getLogger(__name__) + # Arbitrary time used when computing sensor angles that is passed to # pyorbital's get_observer_look function. # The difference is on the order of 1e-10 at most as time changes so we force @@ -531,73 +534,119 @@ def _get_sensor_angles_ndarray(lons, lats, start_time, sat_lon, sat_lat, sat_alt return np.stack([sata, satz]) -def sunzen_corr_cos(data: da.Array, - cos_zen: da.Array, - limit: float = 88., - max_sza: Optional[float] = 95.) -> da.Array: - """Perform Sun zenith angle correction. +def sunzen_corr_cos(data: xr.DataArray, + cos_zen: xr.DataArray, + correction_limit: Optional[float] = 88., + max_sza: Optional[float] = 95.) -> xr.DataArray: + """Perform standard Sun zenith angle correction. + + The correction is based on the provided cosine of the solar zenith angle + (``cos_zen``) and the correction is applied by multiplying the input ``data`` + by the inverse of the ``cos_zen`` (``1/cos_zen``). + + Through different combinations of the ``correction_limit`` and ``max_sza`` + parameters, the correction can be capped or reduced at higher solar zenith angles. + See class definition of SunZenithCorrector for more details on how these parameters + can be used to tweak the correction. The typical historical use case is to avoid + over-correction at high solar zenith angles for improved (RGB) imagery, but not the + effective pathlength parameterization by Li and Shibata (2006) is recommended + when computing the reflectance for (RGB) imagery. This parameterization is availalbe + through the EffectiveSolarPathLengthCorrector class. - The correction is based on the provided cosine of the zenith - angle (``cos_zen``). The correction is limited - to ``limit`` degrees (default: 88.0 degrees). For larger zenith - angles, the correction is the same as at the ``limit`` if ``max_sza`` - is `None`. The default behavior is to gradually reduce the correction - past ``limit`` degrees up to ``max_sza`` where the correction becomes - 0. Both ``data`` and ``cos_zen`` should be 2D arrays of the same shape. + Both ``data`` and ``cos_zen`` should be 2D arrays of the same shape. """ - return da.map_blocks(_sunzen_corr_cos_ndarray, - data, cos_zen, limit, max_sza, - meta=np.array((), dtype=data.dtype), - chunks=data.chunks) - - -def _sunzen_corr_cos_ndarray(data: np.ndarray, - cos_zen: np.ndarray, - limit: float, - max_sza: Optional[float]) -> np.ndarray: - # Convert the zenith angle limit to cosine of zenith angle - limit_rad = np.deg2rad(limit) - limit_cos = np.cos(limit_rad) - max_sza_rad = np.deg2rad(max_sza) if max_sza is not None else max_sza - - # Cosine correction - corr = (1. / cos_zen).astype(data.dtype, copy=False) - if max_sza is not None: - # gradually fall off for larger zenith angle - grad_factor = (np.arccos(cos_zen) - limit_rad) / (max_sza_rad - limit_rad) + sunz = np.rad2deg(np.arccos(cos_zen)) + corr_standard = (1. / cos_zen) + corr_at_limit = ( + 1. / np.cos(np.deg2rad(correction_limit)) + if correction_limit is not None + else None + ) + + def cutoff(): + logger.debug( + f"Apply the standard sun-zenith correction [1/cos(sunz)] but set correction (and reflectance) " + f"to 0 for angles larger than {max_sza} degrees." + ) + return corr_standard.where(sunz <= max_sza, 0) + + def capped(): + logger.debug( + f"Apply the standard sun-zenith correction [1/cos(sunz)] but cap the maximum correction " + f"for angles larger than {correction_limit} degrees." + ) + return corr_standard.where(sunz <= correction_limit, corr_at_limit) + + def reduced(): + logger.debug( + f"Apply the standard sun-zenith correction [1/cos(sunz)] but gradually reduce the correction " + f"for angles larger than {correction_limit} degrees up to {max_sza} degrees where the " + f"correction (and reflectance) becomes 0." + ) + if max_sza <= correction_limit: + raise ValueError( + "`max_sza` must be larger than `correction_limit` for a gradual " + "reduction of the correction to work.") + reduction_factor = (sunz - correction_limit) / (max_sza - correction_limit) + # invert the factor so maximum correction is done at `limit` and falls off later with np.errstate(invalid="ignore"): # we expect space pixels to be invalid - grad_factor = 1. - np.log(grad_factor + 1) / np.log(2) - # make sure we don't make anything negative - grad_factor = grad_factor.clip(0.) + reduction_factor = 1. - np.log(reduction_factor + 1) / np.log(2) + + corr_with_reduction = (corr_at_limit * reduction_factor) + + return corr_standard.where(sunz < correction_limit, corr_with_reduction) + + # Check if any modification of the standard correction is requested + if correction_limit is None and max_sza is not None: + corr = cutoff() + elif correction_limit is not None and max_sza is None: + corr = capped() + elif correction_limit is not None and max_sza is not None: + corr = reduced() else: - # Use constant value (the limit) for larger zenith angles - grad_factor = 1. - corr = np.where( - cos_zen > limit_cos, - corr, - (grad_factor / limit_cos).astype(data.dtype, copy=False) - ) - # Force "night" pixels to 0 (where SZA is invalid) - corr[np.isnan(cos_zen)] = 0 + logger.debug("Apply the standard sun-zenith correction [1/cos(sunz)].") + corr = corr_standard + + # Preserve data type, make sure we don't produce negative values and set correction to 0 for + # "night" and space pixels where SZA is invalid + corr = corr.astype(data.dtype, copy=False) + corr = corr.clip(0.) + corr = corr.where(cos_zen.notnull(), 0) + + return data * corr + + +def atmospheric_path_length_correction(data: xr.DataArray, + cos_zen: xr.DataArray) -> xr.DataArray: + """Perform Sun zenith angle correction following the Li and Shibata parameterization. + + This function uses the correction method proposed by + Li and Shibata (2006): https://doi.org/10.1175/JAS3682.1 and is recommended for computing + the reflectance for (RGB) imagery to avoid over-correction at high solar zenith angles. It + should not be used for quantitative or scientific applications beyond the visual usage of + imagery for which the standard cosine correction is more appropriate (see SunZenithCorrector + for more details on how to use it). + + Both ``data`` and ``cos_zen`` should be 2D arrays of the same shape. + + """ + logger.debug("Apply the effective solar atmospheric path length correction method by Li and Shibata (2006)") + corr = 24.35 / (2. * cos_zen + np.sqrt(498.5225 * cos_zen**2 + 1)) + + # Force "night" and space pixels to 0 (where SZA is invalid) + corr = corr.where(cos_zen.notnull(), 0) + return data * corr -def sunzen_reduction(data: da.Array, - sunz: da.Array, +def sunzen_reduction(data: xr.DataArray, + sunz: xr.DataArray, limit: float = 55., max_sza: float = 90., - strength: float = 1.5) -> da.Array: + strength: float = 1.5) -> xr.DataArray: """Reduced strength of signal at high sun zenith angles.""" - return da.map_blocks(_sunzen_reduction_ndarray, data, sunz, limit, max_sza, strength, - meta=np.array((), dtype=data.dtype), chunks=data.chunks) - -def _sunzen_reduction_ndarray(data: np.ndarray, - sunz: np.ndarray, - limit: float, - max_sza: float, - strength: float) -> np.ndarray: # compute reduction factor (0.0 - 1.0) between limit and maz_sza reduction_factor = (sunz - limit) / (max_sza - limit) reduction_factor = reduction_factor.clip(0., 1.) @@ -612,11 +661,11 @@ def _sunzen_reduction_ndarray(data: np.ndarray, reduction_factor = reduction_factor ** strength / ( reduction_factor ** strength + (1 - reduction_factor) ** strength) - # compute final correction term, with no reduction for angles < limit - corr = np.where(sunz < limit, 1.0, reduction_factor) + # compute final correction term, with no reduction (=1.0) for angles < limit + corr = reduction_factor.where(sunz >= limit, 1.0) # force "night" pixels to 0 (where SZA is invalid) - corr[np.isnan(sunz)] = 0 + corr = corr.where(sunz.notnull(), 0) # reduce data signal with correction term res = data * corr diff --git a/satpy/modifiers/atmosphere.py b/satpy/modifiers/atmosphere.py index c7144c27ca..03022c31ff 100644 --- a/satpy/modifiers/atmosphere.py +++ b/satpy/modifiers/atmosphere.py @@ -56,7 +56,7 @@ class PSPRayleighReflectance(ModifierBase): reduce_strength: 0.6 prerequisites: - name: B03 - modifiers: [sunz_corrected] + modifiers: [effective_solar_pathlength_corrected] optional_prerequisites: - satellite_azimuth_angle - satellite_zenith_angle diff --git a/satpy/modifiers/geometry.py b/satpy/modifiers/geometry.py index f2ae4a50c0..a63bb18777 100644 --- a/satpy/modifiers/geometry.py +++ b/satpy/modifiers/geometry.py @@ -20,12 +20,13 @@ from __future__ import annotations import logging +import warnings +from typing import Optional import numpy as np from satpy.modifiers import ModifierBase -from satpy.modifiers.angles import sunzen_corr_cos, sunzen_reduction -from satpy.utils import atmospheric_path_length_correction +from satpy.modifiers.angles import atmospheric_path_length_correction, sunzen_corr_cos, sunzen_reduction logger = logging.getLogger(__name__) @@ -33,34 +34,32 @@ class SunZenithCorrectorBase(ModifierBase): """Base class for sun zenith correction modifiers.""" - def __init__(self, max_sza=95.0, **kwargs): # noqa: D417 - """Collect custom configuration values. - - Args: - max_sza (float): Maximum solar zenith angle in degrees that is - considered valid and correctable. Default 95.0. - - """ - self.max_sza = max_sza - self.max_sza_cos = np.cos(np.deg2rad(max_sza)) if max_sza is not None else None + def __init__(self, **kwargs): # noqa: D417 + """Collect custom configuration values.""" super(SunZenithCorrectorBase, self).__init__(**kwargs) def __call__(self, projectables, **info): """Generate the composite.""" projectables = self.match_data_arrays(list(projectables) + list(info.get("optional_datasets", []))) vis = projectables[0] - if vis.attrs.get("sunz_corrected"): - logger.debug("Sun zenith correction already applied") - return vis - logger.debug("Applying sun zen correction") + # Make sure to avoid alternative but mutually exclusive sun zenith angle corrections + sunz_correction_methods = {"sunz_corrected", "effective_solar_pathlength_corrected"} + if self.method in sunz_correction_methods: + for correction in sunz_correction_methods: + if vis.attrs.get(correction) or correction in vis.attrs.get("modifiers"): + logger.debug( + f"Sun zenith angle correction '{correction}' already applied. " + f"Skipping correction '{self.method}'." + ) + return vis + + logger.debug("Applying Sun zenith angle correction") if not info.get("optional_datasets"): # we were not given SZA, generate cos(SZA) logger.debug("Computing sun zenith angles.") from .angles import get_cos_sza coszen = get_cos_sza(vis) - if self.max_sza is not None: - coszen = coszen.where(coszen >= self.max_sza_cos) else: # we were given the SZA, calculate the cos(SZA) coszen = np.cos(np.deg2rad(projectables[1])) @@ -75,92 +74,144 @@ def _apply_correction(self, proj, coszen): class SunZenithCorrector(SunZenithCorrectorBase): - """Standard sun zenith correction using ``1 / cos(sunz)``. + """Standard Sun zenith angle correction using ``1 / cos(sunz)``. + + Modes + ----- + The behavior of the correction depends on the combination of ``correction_limit`` and + ``max_sza``: - In addition to adjusting the provided reflectances by the cosine of the - solar zenith angle, this modifier forces all reflectances beyond a - solar zenith angle of ``max_sza`` to 0. It also gradually reduces the - amount of correction done between ``correction_limit`` and ``max_sza``. If - ``max_sza`` is ``None`` then a constant correction is applied to zenith - angles beyond ``correction_limit``. + * ``correction_limit=None, max_sza=None``: + Apply pure ``1 / cos(sunz)`` correction everywhere. - To set ``max_sza`` to ``None`` in a YAML configuration file use: + * ``correction_limit=None, max_sza=``: + Apply ``1 / cos(sunz)`` correction up to ``max_sza``. + Pixels with solar zenith angle > ``max_sza`` are set to 0. + + * ``correction_limit=, max_sza=None``: + Apply ``1 / cos(sunz)`` up to ``correction_limit``. + Beyond this limit, the correction is clamped to the value at + ``correction_limit`` (constant correction). + + * ``correction_limit=, max_sza=``: + Apply ``1 / cos(sunz)`` up to ``correction_limit``. + Between ``correction_limit`` and ``max_sza``, the correction is + gradually reduced to 0. + Pixels with solar zenith angle > ``max_sza`` are set to 0. + + Note that all corrections are undefined for ``cos(sunz) <= 0`` meaning that + the reflectance data are forced to zero. + + To configure this in a YAML configuration file setting e.g. ``max_sza`` to ``None`` use: .. code-block:: yaml sunz_corrected: modifier: !!python/name:satpy.modifiers.SunZenithCorrector + correction_limit: 88 max_sza: !!null optional_prerequisites: - solar_zenith_angle """ - def __init__(self, correction_limit=88., **kwargs): # noqa: D417 + def __init__( + self, + correction_limit: Optional[float] = 88.0, + max_sza: Optional[float] = 95.0, + **kwargs, + ): """Collect custom configuration values. Args: - correction_limit (float): Maximum solar zenith angle to apply the - correction in degrees. If ``max_sza`` is ``None``, pixels beyond this limit have a - constant correction applied. Otherwise, the correction is gradually reduced to 0 at - ``max_sza``. Default 88. - max_sza (float): Maximum solar zenith angle in degrees that is - considered valid and correctable. Default 95.0. + correction_limit: + Solar zenith angle in degrees where correction limiting + begins. + + max_sza: + Maximum valid angle in degrees for solar zenith angle correction. + + Pixels with solar zenith angles greater than + ``max_sza`` are set to 0. + + **kwargs: + Additional keyword arguments passed to the parent class. """ + self.method = "sunz_corrected" self.correction_limit = correction_limit + self.max_sza = max_sza super(SunZenithCorrector, self).__init__(**kwargs) def _apply_correction(self, proj, coszen): - logger.debug("Apply the standard sun-zenith correction [1/cos(sunz)]") - res = proj.copy() - res.data = sunzen_corr_cos(proj.data, coszen.data, limit=self.correction_limit, max_sza=self.max_sza) - return res + if self.correction_limit == 88.0 or self.max_sza == 95.0: + # TODO Change class defaults and remove warning in satpy v1.0 + warnings.warn( + "The default reduction of the standard Sun zenith angle correction above 88 degrees will " + "be removed in satpy v1.0 in order to compute the true reflectance with the 'sunz_corrected' modifier. " + "To avoid overcorrection at high angles for (RGB) imagery it's recommended to use the " + "'effective_solar_pathlength_corrected' modifier instead. If you still want to keep the current " + "behaviour, please set the 'correction_limit' parameter to 88.0 and 'max_sza' to 95.0 in a local " + "definition of the modifier.", + UserWarning, + stacklevel=2, + ) + return sunzen_corr_cos(proj, coszen, correction_limit=self.correction_limit, max_sza=self.max_sza) class EffectiveSolarPathLengthCorrector(SunZenithCorrectorBase): - """Special sun zenith correction with the method proposed by Li and Shibata. + """Special sun zenith angle correction using the parameterization proposed by Li and Shibata. (2006): https://doi.org/10.1175/JAS3682.1 - In addition to adjusting the provided reflectances by the cosine of the - solar zenith angle, this modifier forces all reflectances beyond a - solar zenith angle of `max_sza` to 0 to reduce noise in the final data. - It also gradually reduces the amount of correction done between - ``correction_limit`` and ``max_sza``. If ``max_sza`` is ``None`` then a - constant correction is applied to zenith angles beyond - ``correction_limit``. + This correction method is designed to reduce the over-correction of the standard + sun zenith angle correction at high solar zenith angles, which is especially + relevant for (RGB) imagery. - To set ``max_sza`` to ``None`` in a YAML configuration file use: - - .. code-block:: yaml - - effective_solar_pathlength_corrected: - modifier: !!python/name:satpy.modifiers.EffectiveSolarPathLengthCorrector - max_sza: !!null - optional_prerequisites: - - solar_zenith_angle + In previous versions of Satpy, this correction could be capped or reduced at higher + sun zenith angles by using the ``correction_limit`` and ``max_sza`` parameters. + This has been disabled for this correction since the parameterization also deals with + overcorrection at high solar zenith angles. If capping or reduction is still desireble + it can be achieved by using the SunZenithCorrector with the same ``correction_limit`` + and ``max_sza`` parameters. """ - def __init__(self, correction_limit=88., **kwargs): # noqa: D417 + def __init__( + self, + correction_limit: Optional[float] = None, + max_sza: Optional[float] = None, + **kwargs, + ): """Collect custom configuration values. Args: - correction_limit (float): Maximum solar zenith angle to apply the - correction in degrees. If ``max_sza`` is ``None``, pixels beyond this limit have a - constant correction applied. Otherwise, the correction is gradually reduced to 0 at - ``max_sza``. Default 88. - max_sza (float): Maximum solar zenith angle in degrees that is - considered valid and correctable. Default 95.0. + correction_limit: + Solar zenith angle in degrees where correction limiting + begins. Deprecated. + + max_sza: + Maximum valid angle in degrees for solar zenith angle correction. Deprecated. + + **kwargs: + Additional keyword arguments passed to the parent class. """ - self.correction_limit = correction_limit + if correction_limit is not None or max_sza is not None: + # TODO Remove class init input variables and warning in satpy v1.0 + msg = "The ``correction_limit`` and ``max_sza`` parameters have been deprecated and are no " \ + "longer used for the EffectiveSolarPathLengthCorrector and will be fully removed " \ + "in satpy v1.0. This is done since the parameterization by Li and Shibata (2006) " \ + "already accounts for overcorrection at high solar zenith angles. If capping or " \ + "reduction of the correction is still desirable it can be achieved by using the " \ + "``SunZenithCorrector`` with the same ``correction_limit`` and ``max_sza`` parameters." + warnings.warn(msg, UserWarning, stacklevel=2) + + self.method = "effective_solar_pathlength_corrected" super(EffectiveSolarPathLengthCorrector, self).__init__(**kwargs) def _apply_correction(self, proj, coszen): - logger.debug("Apply the effective solar atmospheric path length correction method by Li and Shibata") - return atmospheric_path_length_correction(proj, coszen, limit=self.correction_limit, max_sza=self.max_sza) + return atmospheric_path_length_correction(proj, coszen) class SunZenithReducer(SunZenithCorrectorBase): @@ -173,7 +224,7 @@ class SunZenithReducer(SunZenithCorrectorBase): where reduction_factor is a pixel-level value ranging from 0 to 1 within the sunz interval. - The `strength` parameter can be used for a non-linear reduction within the sunz interval. A strength larger + The ``strength`` parameter can be used for a non-linear reduction within the sunz interval. A strength larger than 1.0 will decelerate the signal reduction towards the sunz interval extremes, whereas a strength smaller than 1.0 will accelerate the signal reduction towards the sunz interval extremes. @@ -189,19 +240,21 @@ def __init__(self, correction_limit=80., max_sza=90, strength=1.3, **kwargs): # strength (float): The strength of the non-linear signal reduction. """ + self.method = "sunz_reduced" self.correction_limit = correction_limit + self.max_sza = max_sza self.strength = strength - super(SunZenithReducer, self).__init__(max_sza=max_sza, **kwargs) + super(SunZenithReducer, self).__init__(**kwargs) if self.max_sza is None: raise ValueError("`max_sza` must be defined when using the SunZenithReducer.") def _apply_correction(self, proj, coszen): logger.debug(f"Applying sun-zenith signal reduction with correction_limit {self.correction_limit} deg," f" strength {self.strength}, and max_sza {self.max_sza} deg.") - res = proj.copy() - sunz = np.rad2deg(np.arccos(coszen.data)) - res.data = sunzen_reduction(proj.data, sunz, - limit=self.correction_limit, - max_sza=self.max_sza, - strength=self.strength) + sunz = np.rad2deg(np.arccos(coszen)) + res = sunzen_reduction(proj, + sunz, + limit=self.correction_limit, + max_sza=self.max_sza, + strength=self.strength) return res diff --git a/satpy/scene.py b/satpy/scene.py index 8693cc77b4..cf0e44c34e 100644 --- a/satpy/scene.py +++ b/satpy/scene.py @@ -1452,9 +1452,9 @@ def load(self, wishlist, calibration="*", resolution="*", # noqa: D417 loaded datasets. This is a shortcut similar to calibration, but only represents a single set of modifiers as a tuple. For example, specifying - ``modifiers=('sunz_corrected', 'rayleigh_corrected')`` will + ``modifiers=('effective_solar_pathlength_corrected', 'rayleigh_corrected')`` will attempt to apply both of these modifiers to all loaded - datasets in the specified order ('sunz_corrected' first). + datasets in the specified order ('effective_solar_pathlength_corrected' first). level (list | str): Pressure level to limit available datasets. Pressure should be in hPa or mb. If an altitude is used it should be specified in inverse meters (1/m). The units of this diff --git a/satpy/tests/test_modifiers.py b/satpy/tests/test_modifiers.py index 11e09a8803..b7fd26caef 100644 --- a/satpy/tests/test_modifiers.py +++ b/satpy/tests/test_modifiers.py @@ -101,8 +101,7 @@ def sunz_ds2(): def sunz_sza(): """Generate fake solar zenith angle data array for testing.""" sza = xr.DataArray( - np.rad2deg(np.arccos(da.from_array([[0.0149581333, 0.0146694376], [0.0150812684, 0.0147925727]], - chunks=2))), + da.from_array([[80.0, 87.0], [89.0, 93.0]], chunks=2), attrs={"area": _sunz_area_def()}, dims=("y", "x"), coords={"y": [0, 1], "x": [0, 1]}, @@ -110,27 +109,49 @@ def sunz_sza(): return sza +def call_sunz_modifier(comp, data_arr, sunz_sza=None, dtype=None): + """Helper function for running sunz modifiers.""" + if dtype is not None: + data_arr = data_arr.astype(dtype) + if sunz_sza is not None: + sunz_sza = sunz_sza.astype(dtype) + + info = {"test_attr": "test"} + if sunz_sza is not None: + info["optional_datasets"] = [sunz_sza] + + return comp((data_arr,), **info) + + +def assert_sunz_modifier_result(res, expected, data_arr, dtype=None, rtol=1e-5): + """Helper function for asserting sunz modifier results.""" + np.testing.assert_allclose(res.values, expected, rtol=rtol) + assert type(res.data) is type(data_arr.data) + if dtype is not None: + assert res.dtype == dtype + assert res.values.dtype == dtype + + class TestSunZenithCorrector: - """Test case for the zenith corrector.""" + """Test case for the standard Sun zenith angle corrector.""" @pytest.mark.parametrize("as_32bit", [False, True]) - def test_basic_default_not_provided(self, sunz_ds1, as_32bit): + def test_default_with_sza_not_provided(self, sunz_ds1, as_32bit): """Test default limits when SZA isn't provided.""" from satpy.modifiers.geometry import SunZenithCorrector - if as_32bit: sunz_ds1 = sunz_ds1.astype(np.float32) comp = SunZenithCorrector(name="sza_test", modifiers=tuple()) - res = comp((sunz_ds1,), test_attr="test") - np.testing.assert_allclose(res.values, np.array([[22.401667, 22.31777], [22.437503, 22.353533]]), - rtol=1e-6) + expected = np.array([[22.401667, 22.31777], [22.437503, 22.353533]]) + res = call_sunz_modifier(comp, sunz_ds1) + assert_sunz_modifier_result(res, expected, sunz_ds1) assert "y" in res.coords assert "x" in res.coords + ds1 = sunz_ds1.copy().drop_vars(("y", "x")) - res = comp((ds1,), test_attr="test") + res = call_sunz_modifier(comp, ds1) res_np = res.compute() - np.testing.assert_allclose(res_np.values, np.array([[22.401667, 22.31777], [22.437503, 22.353533]]), - rtol=1e-6) + np.testing.assert_allclose(res_np.values, expected, rtol=1e-5) assert res.dtype == res_np.dtype assert "y" not in res.coords assert "x" not in res.coords @@ -138,50 +159,152 @@ def test_basic_default_not_provided(self, sunz_ds1, as_32bit): assert res.dtype == np.float32 @pytest.mark.parametrize("dtype", [np.float32, np.float64]) - def test_basic_lims_not_provided(self, sunz_ds1, dtype): - """Test custom limits when SZA isn't provided.""" + @pytest.mark.parametrize("data_arr", [lazy_fixture("sunz_ds1"), lazy_fixture("sunz_ds1_stacked")]) + def test_default_with_sza_provided(self, data_arr, sunz_sza, dtype): + """Test default limits when SZA is provided.""" from satpy.modifiers.geometry import SunZenithCorrector - comp = SunZenithCorrector(name="sza_test", modifiers=tuple(), correction_limit=90) - res = comp((sunz_ds1.astype(dtype),), test_attr="test") - expected = np.array([[66.853262, 68.168939], [66.30742, 67.601493]], dtype=dtype) - values = res.values - np.testing.assert_allclose(values, expected, rtol=1e-5) - assert res.dtype == dtype - assert values.dtype == dtype + comp = SunZenithCorrector(name="sza_test", modifiers=tuple()) + expected = np.array([[5.758770, 19.107323], [23.133712, 6.372368]], dtype=dtype) + res = call_sunz_modifier(comp, data_arr, sunz_sza, dtype) + assert_sunz_modifier_result(res, expected, data_arr, dtype) @pytest.mark.parametrize("dtype", [np.float32, np.float64]) @pytest.mark.parametrize("data_arr", [lazy_fixture("sunz_ds1"), lazy_fixture("sunz_ds1_stacked")]) - def test_basic_default_provided(self, data_arr, sunz_sza, dtype): - """Test default limits when SZA is provided.""" + def test_standard_with_sza_provided(self, data_arr, sunz_sza, dtype): + """Test correction_limit=None and max_sza=None when SZA is provided.""" + from satpy.modifiers.geometry import SunZenithCorrector + comp = SunZenithCorrector(name="sza_test", modifiers=tuple(), correction_limit=None, max_sza=None) + expected = np.array([[5.758770, 19.107323], [57.298689, 0.0]], dtype=dtype) + res = call_sunz_modifier(comp, data_arr, sunz_sza, dtype) + assert_sunz_modifier_result(res, expected, data_arr, dtype) + + @pytest.mark.parametrize("dtype", [np.float32, np.float64]) + @pytest.mark.parametrize("data_arr", [lazy_fixture("sunz_ds1"), lazy_fixture("sunz_ds1_stacked")]) + def test_custom_max_sza_with_sza_provided(self, data_arr, sunz_sza, dtype): + """Test custom max_sza (and correction_limit=None) when SZA is provided.""" + from satpy.modifiers.geometry import SunZenithCorrector + comp = SunZenithCorrector(name="sza_test", modifiers=tuple(), correction_limit=None, max_sza=88) + expected = np.array([[5.758770, 19.107323], [0.0, 0.0]], dtype=dtype) + res = call_sunz_modifier(comp, data_arr, sunz_sza, dtype) + assert_sunz_modifier_result(res, expected, data_arr, dtype) + + @pytest.mark.parametrize("dtype", [np.float32, np.float64]) + @pytest.mark.parametrize("data_arr", [lazy_fixture("sunz_ds1"), lazy_fixture("sunz_ds1_stacked")]) + def test_custom_correction_limit_with_sza_provided(self, data_arr, sunz_sza, dtype): + """Test custom correction_limit (and max_sza=None) when SZA is provided.""" + from satpy.modifiers.geometry import SunZenithCorrector + comp = SunZenithCorrector(name="sza_test", modifiers=tuple(), correction_limit=88, max_sza=None) + expected = np.array([[5.758770, 19.107323], [28.653708, 28.653708]], dtype=dtype) + res = call_sunz_modifier(comp, data_arr, sunz_sza, dtype) + assert_sunz_modifier_result(res, expected, data_arr, dtype) + + @pytest.mark.parametrize("dtype", [np.float32, np.float64]) + @pytest.mark.parametrize("data_arr", [lazy_fixture("sunz_ds1"), lazy_fixture("sunz_ds1_stacked")]) + def test_custom_max_sza_and_correction_limit_with_sza_provided(self, data_arr, sunz_sza, dtype): + """Test custom correction_limit and max_sza when SZA is provided.""" + from satpy.modifiers.geometry import SunZenithCorrector + comp = SunZenithCorrector(name="sza_test", modifiers=tuple(), correction_limit=88, max_sza=95) + expected = np.array([[5.758770, 19.107323], [23.133712, 6.372368]], dtype=dtype) + res = call_sunz_modifier(comp, data_arr, sunz_sza, dtype) + assert_sunz_modifier_result(res, expected, data_arr, dtype) + + @pytest.mark.parametrize("dtype", [np.float32, np.float64]) + @pytest.mark.parametrize("data_arr", [lazy_fixture("sunz_ds1"), lazy_fixture("sunz_ds1_stacked")]) + def test_double_correction(self, data_arr, sunz_sza, dtype): + """Test double sunz correction when SZA is provided.""" from satpy.modifiers.geometry import SunZenithCorrector comp = SunZenithCorrector(name="sza_test", modifiers=tuple()) - res = comp((data_arr.astype(dtype), sunz_sza.astype(dtype)), test_attr="test") - expected = np.array([[22.401667, 22.31777], [22.437503, 22.353533]], dtype=dtype) - values = res.values - np.testing.assert_allclose(values, expected) - assert res.dtype == dtype - assert values.dtype == dtype + data_arr = data_arr.copy() + data_arr.attrs["modifiers"] = ("effective_solar_pathlength_corrected",) + expected = data_arr.values + res = call_sunz_modifier(comp, data_arr, sunz_sza, dtype) + assert_sunz_modifier_result(res, expected, data_arr, dtype) @pytest.mark.parametrize("dtype", [np.float32, np.float64]) @pytest.mark.parametrize("data_arr", [lazy_fixture("sunz_ds1"), lazy_fixture("sunz_ds1_stacked")]) - def test_basic_lims_provided(self, data_arr, sunz_sza, dtype): - """Test custom limits when SZA is provided.""" + def test_invalid_max_sza_and_correction_limit_with_sza_provided(self, data_arr, sunz_sza, dtype): + """Test with correction_limit > max_sza when SZA is provided.""" from satpy.modifiers.geometry import SunZenithCorrector - comp = SunZenithCorrector(name="sza_test", modifiers=tuple(), correction_limit=90) - res = comp((data_arr.astype(dtype), sunz_sza.astype(dtype)), test_attr="test") - expected = np.array([[66.853262, 68.168939], [66.30742, 67.601493]], dtype=dtype) - values = res.values - np.testing.assert_allclose(values, expected, rtol=1e-5) - assert res.dtype == dtype - assert values.dtype == dtype + comp = SunZenithCorrector(name="sza_test", modifiers=tuple(), correction_limit=88, max_sza=80) + with pytest.raises(ValueError, match="`max_sza` must be larger than `correction_limit`"): + call_sunz_modifier(comp, data_arr, sunz_sza, dtype) - def test_imcompatible_areas(self, sunz_ds2, sunz_sza): + def test_incompatible_areas(self, sunz_ds2, sunz_sza): """Test sunz correction on incompatible areas.""" from satpy.composites.core import IncompatibleAreas from satpy.modifiers.geometry import SunZenithCorrector - comp = SunZenithCorrector(name="sza_test", modifiers=tuple(), correction_limit=90) + comp = SunZenithCorrector(name="sza_test", modifiers=tuple()) + with pytest.raises(IncompatibleAreas): + call_sunz_modifier(comp, sunz_ds2, sunz_sza) + + +class TestEffectiveSolarPathLengthCorrector: + """Test case for the effective solar path length corrector.""" + + @pytest.mark.parametrize("as_32bit", [False, True]) + def test_with_sza_not_provided(self, sunz_ds1, as_32bit): + """Test when SZA isn't provided.""" + from satpy.modifiers.geometry import EffectiveSolarPathLengthCorrector + if as_32bit: + sunz_ds1 = sunz_ds1.astype(np.float32) + comp = EffectiveSolarPathLengthCorrector(name="sza_test", modifiers=tuple()) + expected = np.array([[22.458680, 22.512698], [22.435495, 22.489718]]) + res = call_sunz_modifier(comp, sunz_ds1) + assert_sunz_modifier_result(res, expected, sunz_ds1) + assert "y" in res.coords + assert "x" in res.coords + + ds1 = sunz_ds1.copy().drop_vars(("y", "x")) + res = call_sunz_modifier(comp, ds1) + res_np = res.compute() + np.testing.assert_allclose(res_np.values, expected, rtol=1e-5) + assert res.dtype == res_np.dtype + assert "y" not in res.coords + assert "x" not in res.coords + if as_32bit: + assert res.dtype == np.float32 + + @pytest.mark.parametrize("dtype", [np.float32, np.float64]) + @pytest.mark.parametrize("data_arr", [lazy_fixture("sunz_ds1"), lazy_fixture("sunz_ds1_stacked")]) + def test_with_sza_provided(self, data_arr, sunz_sza, dtype): + """Test when SZA is provided.""" + from satpy.modifiers.geometry import EffectiveSolarPathLengthCorrector + comp = EffectiveSolarPathLengthCorrector(name="sza_test", modifiers=tuple()) + expected = np.array([[5.595989, 14.823307], [21.973671, 16.988299]], dtype=dtype) + res = call_sunz_modifier(comp, data_arr, sunz_sza, dtype) + assert_sunz_modifier_result(res, expected, data_arr, dtype) + + @pytest.mark.parametrize("dtype", [np.float32, np.float64]) + @pytest.mark.parametrize("data_arr", [lazy_fixture("sunz_ds1"), lazy_fixture("sunz_ds1_stacked")]) + def test_double_correction(self, data_arr, sunz_sza, dtype): + """Test double sunz correction when SZA is provided.""" + from satpy.modifiers.geometry import EffectiveSolarPathLengthCorrector + comp = EffectiveSolarPathLengthCorrector(name="sza_test", modifiers=tuple()) + data_arr = data_arr.copy() + data_arr.attrs["modifiers"] = ("sunz_corrected",) + expected = data_arr.values + res = call_sunz_modifier(comp, data_arr, sunz_sza, dtype) + assert_sunz_modifier_result(res, expected, data_arr, dtype) + + def test_with_deprecated_correction_limit(self): + """Test with deprecated correction_limit.""" + from satpy.modifiers.geometry import EffectiveSolarPathLengthCorrector + with pytest.warns(UserWarning, match="deprecated"): + EffectiveSolarPathLengthCorrector(name="sza_test", modifiers=tuple(), correction_limit=88) + + def test_with_deprecated_sza_max(self): + """Test with deprecated max_sza.""" + from satpy.modifiers.geometry import EffectiveSolarPathLengthCorrector + with pytest.warns(UserWarning, match="deprecated"): + EffectiveSolarPathLengthCorrector(name="sza_test", modifiers=tuple(), max_sza=95) + + def test_incompatible_areas(self, sunz_ds2, sunz_sza): + """Test with incompatible areas.""" + from satpy.composites.core import IncompatibleAreas + from satpy.modifiers.geometry import EffectiveSolarPathLengthCorrector + comp = EffectiveSolarPathLengthCorrector(name="sza_test", modifiers=tuple()) with pytest.raises(IncompatibleAreas): - comp((sunz_ds2, sunz_sza), test_attr="test") + call_sunz_modifier(comp, sunz_ds2, sunz_sza) class TestSunZenithReducer: @@ -198,34 +321,23 @@ def setup_class(cls): @pytest.mark.parametrize("dtype", [np.float32, np.float64]) def test_default_settings(self, sunz_ds1, sunz_sza, dtype): """Test default settings with sza data available.""" - res = self.default((sunz_ds1.astype(dtype), sunz_sza.astype(dtype)), test_attr="test") - expected = np.array([[0.02916261, 0.02839063], [0.02949383, 0.02871911]], dtype=dtype) - assert res.dtype == dtype - values = res.values - assert values.dtype == dtype - np.testing.assert_allclose(values, - expected, - rtol=2e-5) + expected = np.array([[1.0, 0.176790], [0.036095, 0.0]], dtype=dtype) + res = call_sunz_modifier(self.default, sunz_ds1, sunz_sza, dtype) + assert_sunz_modifier_result(res, expected, sunz_ds1, dtype, rtol=2e-5) @pytest.mark.parametrize("dtype", [np.float32, np.float64]) def test_custom_settings(self, sunz_ds1, sunz_sza, dtype): """Test custom settings with sza data available.""" - res = self.custom((sunz_ds1.astype(dtype), sunz_sza.astype(dtype)), test_attr="test") - expected = np.array([[0.01041319, 0.01030033], [0.01046164, 0.01034834]], dtype=dtype) - assert res.dtype == dtype - values = res.values - assert values.dtype == dtype - np.testing.assert_allclose(values, - expected, - rtol=1e-5) + expected = np.array([[5.436207e-01, 3.657017e-02], [1.143065e-02, 2.450100e-04]], dtype=dtype) + res = call_sunz_modifier(self.custom, sunz_ds1, sunz_sza, dtype) + assert_sunz_modifier_result(res, expected, sunz_ds1, dtype, rtol=2e-5) - def test_invalid_max_sza(self, sunz_ds1, sunz_sza): + def test_invalid_max_sza(self): """Test invalid max_sza with sza data available.""" from satpy.modifiers.geometry import SunZenithReducer with pytest.raises(ValueError, match="`max_sza` must be defined when using the SunZenithReducer."): SunZenithReducer(name="sza_reduction_test_invalid", modifiers=tuple(), max_sza=None) - class TestNIRReflectance: """Test NIR reflectance compositor.""" @@ -275,7 +387,6 @@ def setup_method(self): "units": "K", }) - @pytest.mark.parametrize( ("include_sunz", "include_co2", "exp_res"), [ diff --git a/satpy/utils.py b/satpy/utils.py index bdf9d77e4c..8d5a8e7ce7 100644 --- a/satpy/utils.py +++ b/satpy/utils.py @@ -271,51 +271,6 @@ def proj_units_to_meters(proj_str): return " ".join(new_parts) -def _get_sunz_corr_li_and_shibata(cos_zen): - return 24.35 / (2. * cos_zen + np.sqrt(498.5225 * cos_zen**2 + 1)) - - -def atmospheric_path_length_correction(data, cos_zen, limit=88., max_sza=95.): - """Perform Sun zenith angle correction. - - This function uses the correction method proposed by - Li and Shibata (2006): https://doi.org/10.1175/JAS3682.1 - - The correction is limited to ``limit`` degrees (default: 88.0 degrees). For - larger zenith angles, the correction is the same as at the ``limit`` if - ``max_sza`` is `None`. The default behavior is to gradually reduce the - correction past ``limit`` degrees up to ``max_sza`` where the correction - becomes 0. Both ``data`` and ``cos_zen`` should be 2D arrays of the same - shape. - - """ - # Convert the zenith angle limit to cosine of zenith angle - limit_rad = np.deg2rad(limit) - limit_cos = np.cos(limit_rad) - max_sza_rad = np.deg2rad(max_sza) if max_sza is not None else max_sza - - # Cosine correction - corr = _get_sunz_corr_li_and_shibata(cos_zen) - # Use constant value (the limit) for larger zenith angles - corr_lim = _get_sunz_corr_li_and_shibata(limit_cos) - - if max_sza is not None: - # gradually fall off for larger zenith angle - grad_factor = (np.arccos(cos_zen) - limit_rad) / (max_sza_rad - limit_rad) - # invert the factor so maximum correction is done at `limit` and falls off later - grad_factor = 1. - np.log(grad_factor + 1) / np.log(2) - # make sure we don't make anything negative - grad_factor = grad_factor.clip(0.) - else: - # Use constant value (the limit) for larger zenith angles - grad_factor = 1. - corr = corr.where(cos_zen > limit_cos, grad_factor * corr_lim) - # Force "night" pixels to 0 (where SZA is invalid) - corr = corr.where(cos_zen.notnull(), 0) - - return data * corr - - def get_satpos( data_arr: xr.DataArray, preference: Optional[str] = None,