Skip to content
Open
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
29587e5
Refactor code for standard sunz angle correction and improve document…
strandgren May 20, 2026
f41db09
Move method for Li and Shibata sun zenith angle correction and remove…
strandgren May 20, 2026
0cf0f7f
Also skip sunz correction if effective_solar_path_length_corrected ha…
strandgren May 20, 2026
0219e05
Fix typo and also search for already applied sunz corrections in modi…
strandgren May 20, 2026
9ba3952
Clarify log message for dual correction. Add type annotation.
strandgren May 20, 2026
b77e52c
Change tolerance given that the correction is now done in degrees ins…
strandgren May 21, 2026
6ac410c
Fix tests for SunZenithCorrector:
strandgren May 21, 2026
b8cfe96
Add tests to verify that data are not computed and kept lazy
strandgren May 21, 2026
e9d1398
Remove keyword argument from test where it's not used
strandgren May 21, 2026
6da9aeb
Fix typo and pass sunz angle as optional_dataset
strandgren May 21, 2026
4cfff67
Add missing tests for EffectiveSolarPathLengthCorrector
strandgren May 21, 2026
df6ca46
Add UserWarning tests for deprecated reduction parameters in Effectiv…
strandgren May 21, 2026
157dfda
Fix SunZenithReducer following refactoring work on SunZenithCorrector…
strandgren May 21, 2026
402488e
Fix SunZenithReducer tests to make sure that sunz_sza is passed and u…
strandgren May 21, 2026
1654104
Remove unused arguments
strandgren May 21, 2026
e060df0
Make sure sunzen_corr_cos doesn't compute any data and remove map_blo…
strandgren May 21, 2026
7db07fe
Add tests to check that data type is preserved in SunZenithReducer a…
strandgren May 21, 2026
8977287
Make sure sunzen_reduction doesn't compute any data and remove map_bl…
strandgren May 21, 2026
feb958f
Refactor sunzen_corr_cos to reduce cyclomatic complexity,
strandgren May 21, 2026
afc345f
Refactor tests for sunz modifiers to reduce duplicate code
strandgren May 22, 2026
d72c4c9
Change default behaviour of SunZenithCorrector to compute true reflec…
strandgren May 22, 2026
be37d09
use warnings package instead for warning of deprecated use. Fix use o…
strandgren May 22, 2026
384a9df
Change from warning to debug message when still applying reduction to…
strandgren May 22, 2026
400fd53
Remove log message when correction_limit is used for sunz_corrected s…
strandgren May 22, 2026
5b294b2
clarify warning message
strandgren May 22, 2026
854f0ad
Fix warning in tests.
strandgren May 26, 2026
019a2e8
Add more tests for warnings and invalid combination
strandgren May 26, 2026
7b88b02
Add comment on why sunz_corrected is needed for VIIRS data and explic…
strandgren May 26, 2026
53b0335
change from `sunz_corrected` to `effective_solar_pathlength_corrected…
strandgren May 27, 2026
7091e4f
Update documentation wrt. sunz corrections
strandgren May 27, 2026
aa95b42
Add missing 'method' for SunZenithReducer and make sure to skip when …
strandgren May 27, 2026
fca4a32
Add tests for skipping double sunz correction
strandgren May 27, 2026
64bf5f1
Use `effective_solar_pathlength_corrected` instead of `sunz_corrected…
strandgren May 27, 2026
92bf353
Update documentation for Scene
strandgren May 27, 2026
05d20e1
Update modifiers documentation for solar zenith angle corrections
strandgren May 28, 2026
f2053c0
Remove deprecated reduction of pre-defined `sunz_corrected` modifiers
strandgren May 28, 2026
db357c0
Use EffectiveSolarPathLengthCorrector modifier but named sunz_correct…
strandgren May 28, 2026
51fb5c2
Fix descriptions of FCI true_color_sunz_reduced recipes. Remove FCI c…
strandgren May 28, 2026
6d9ce8a
Update doc/source/modifiers.rst
strandgren May 28, 2026
292ab54
Clarify docstring wrt. scientific use.
strandgren May 28, 2026
ee8161b
Revert "Remove deprecated reduction of pre-defined `sunz_corrected` m…
strandgren Jun 3, 2026
1e20f11
Change VIIRS composites to use the name effective_solar_pathlength_co…
strandgren Jun 3, 2026
f3b605d
Revert back to old default behaviour of SunZenithCorrector in order t…
strandgren Jun 3, 2026
83dec7b
Add todo for v1.0 cleanup
strandgren Jun 3, 2026
4628c1c
Limit scope for warning
strandgren Jun 3, 2026
0c342a1
Remove explicit modifiers with old/current reduction parameters and c…
strandgren Jun 3, 2026
466d0bc
Add legacy viirs sunz_corrected modifiers
strandgren Jun 3, 2026
e8e8853
Remove unintended white-space
strandgren Jun 3, 2026
af7a080
Update modifier documentation given (no) change to default behaviour
strandgren Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions doc/source/composites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 <https://github.com/pytroll/satpy/tree/main/satpy/etc/composites>`_.
Expand Down
3 changes: 2 additions & 1 deletion doc/source/dev_guide/custom_reader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/pytroll/satpy/wiki/Metadata-names>`_
for more information.
- file\_type: Name of file type (see above).
Expand Down
11 changes: 8 additions & 3 deletions doc/source/modifiers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ 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.
* - ``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 or scientific applications.
Comment thread
strandgren marked this conversation as resolved.
Outdated
* - ``nir_reflectance``
- :class:`~satpy.modifiers.spectral.NIRReflectance`
- Calculates reflective part of channels at the edge of solar and
Expand Down
16 changes: 8 additions & 8 deletions satpy/composites/spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
96 changes: 48 additions & 48 deletions satpy/etc/composites/abi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand All @@ -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:
Expand Down
Loading
Loading