Skip to content

Use effective_solar_pathlength_corrected for cloud type and cloud phase #3032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
23 changes: 23 additions & 0 deletions doc/source/dev_guide/writing_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,26 @@ that are used in the module::
# The following fixtures are not defined in this file, but are used and injected by Pytest:
# - tmp_path
# - fixture_defined_in_conftest.py

=============
Imagery tests
=============

Satpy has automated image comparison tests using the third-party `behave <https://behave.readthedocs.io/en/stable/>`_ package.

Image comparison tests will run only if an authorised developer comments
"start behave test" in a GitHub pull request.
Running such tests is recommended for any pull request that may affect image
production.

To add new image comparison tests:

- Add one or more entries to the "Examples" table in ``satpy/tests/behave/features/image_comparison.feature``
- Checkout / update the git repository at ``https://github.com/pytroll/image-comparison-tests``
- If needed, add a new directory for a test case inside ``image-comparison-tests/data/satellite_data/<satellite-name>/<case>``. Do not commit those data.
- Run the script ``satpy/utils/create_reference.py`` to create the reference images. Note
that although it reads the reference data, it does not create all reference images defined in the
behave tests, only those passed as arguments to the script.
- deploy by running ``ansible-playbook playbooks/deploy_image_comparison.yml --ask-become-pass``.
You may need to install ansible first.
You will need access to the virtual machine in the European Weather Cloud for this step.
16 changes: 8 additions & 8 deletions satpy/etc/composites/fci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -328,18 +328,18 @@ 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, but with the effective_solar_pathlength_corrected modifier to avoid saturation at the terminator.
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.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

cloud_type_with_night_ir105:
Expand All @@ -355,18 +355,18 @@ composites:

cloud_phase:
description: >
Equal to cloud_phase recipe, but with additional sunz_reducer modifier to avoid saturation at the terminator.
Equal to cloud_phase recipe, but with the effective_solar_pathlength_corrected 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.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 ]
standard_name: cloud_phase

cloud_phase_with_night_ir105:
Expand Down
4 changes: 4 additions & 0 deletions satpy/etc/composites/visir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ modifiers:
modifier: !!python/name:satpy.modifiers.EffectiveSolarPathLengthCorrector
optional_prerequisites:
- solar_zenith_angle
# max_sza None means no reduction beyond correction_limit, see https://github.com/pytroll/satpy/issues/3096
max_sza: !!null
correction_limit: 150 # use "raw" Li/Shibata without correction
Comment on lines +18 to +20
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will impact any composite that uses this default modifier, so not only the FCI Cloud type and Cloud Phase RGBs. Given the discussion during and past the RGB workshop I guess that's fine and even preferred. But in that case I suggest to modify the PR title and description to make this more clear.

alternatively make a local modifier inside ./satpy/etc/composites/fci.yaml and then we change the default in a separate PR, potentially the one I want to do at some point refactoring the code for the standard and Li and Shibata sunz corrections.


sunz_reduced:
modifier: !!python/name:satpy.modifiers.SunZenithReducer
Expand Down Expand Up @@ -44,6 +47,7 @@ modifiers:
- solar_zenith_angle
- 13.4
sunz_threshold: 85.0

atm_correction:
modifier: !!python/name:satpy.modifiers.PSPAtmosphericalCorrection
optional_prerequisites:
Expand Down
1 change: 1 addition & 0 deletions satpy/tests/behave/features/image_comparison.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feature: Image Comparison
|Meteosat-12 | scan_night | night_microphysics | fci_l1c_nc | sve | gradient_search | True |
|Meteosat-12 | mali_day | essl_colorized_low_level_moisture | fci_l1c_nc | mali | gradient_search | False |
|Meteosat-12 | spain_day | colorized_low_level_moisture_with_vis06 | fci_l1c_nc,fci_l2_nc | spain | nearest | False |
|Meteosat-12 | spain_twilight | cloud_type | fci_l1c_nc | spain | nearest | False |
|GOES17 | americas_night | airmass | abi_l1b | null | null | null |
|GOES16 | americas_night | airmass | abi_l1b | null | null | null |
|GOES16 | americas_night | ash | abi_l1b | null | null | null |
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy