You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on the "warning for default enhancement" in #3237, Claude identified a likely bug. Here's Claude's summary:
satpy/etc/composites/visir.yaml defines two parallel sets of NWCSAF/PPS cloud water path
composites, and only one of them has a matching enhancement.
Set A — cloud_water_path, ice_water_path, liquid_water_path,
which set standard_name: cloud_water_path / ice_water_path / liquid_water_path.
There is no enhancement section for any of those three standard names in satpy/etc/enhancements/generic.yaml.
So loading a Set A composite matches no enhancement section and falls through to the default
wildcard section, which applies a dynamic linear stretch. The GEO equivalents are fine — they have cloud_liquid_water_path / cloud_ice_water_path enhancements.
The tests point at Set A
test_nwcsaf_comps
parametrizes cmic_cwp_pps, cmic_lwp_pps and cmic_iwp_pps onto the Set A names:
This goes unnoticed because the test's assertions are guarded by if flavour == "geo":,
so the pps cases load the composite and enhance it but never check the result.
Notes
Set A uses ColorizeCompositor, which has been deprecated since Satpy 0.39
in favour of ColormapCompositor. It also colorizes inside the compositor, so a linear stretch is
being applied on top of already-colorized output.
Surfaced by the new default-enhancement warning in Add warning to default enhancement #3237, which reports No YAML enhancement found for 'cloud_water_path' (and the other two) during the test suite.
Possible resolutions
Deprecate/remove the Set A composites in favour of Set B, and repoint the test parametrization.
Keep Set A and add enhancement sections for its three standard names.
Either way, drop or extend the if flavour == "geo": guard so the PPS cases actually assert
something.
Addition by Dave: If the colorize/colormap compositor is meant to pre-enhance the dataset then it would seem best to have an enhancement defined that is the static limit of the enhanced data (0-1?). Otherwise the dynamic stretching of the default will always change the result.
The Problem
While working on the "warning for default enhancement" in #3237, Claude identified a likely bug. Here's Claude's summary:
satpy/etc/composites/visir.yamldefines two parallel sets of NWCSAF/PPS cloud water pathcomposites, and only one of them has a matching enhancement.
Set A —
cloud_water_path,ice_water_path,liquid_water_path,which set
standard_name: cloud_water_path/ice_water_path/liquid_water_path.There is no enhancement section for any of those three standard names in
satpy/etc/enhancements/generic.yaml.Set B —
pps_cwp,pps_iwp,pps_lwp,which set
standard_name: pps_cwp/pps_iwp/pps_lwpand do havematching
colorizeenhancementsusing
cmic_cwp_pal/cmic_iwp_pal/cmic_lwp_pal.So loading a Set A composite matches no enhancement section and falls through to the
defaultwildcard section, which applies a dynamic linear stretch. The GEO equivalents are fine — they have
cloud_liquid_water_path/cloud_ice_water_pathenhancements.The tests point at Set A
test_nwcsaf_compsparametrizes
cmic_cwp_pps,cmic_lwp_ppsandcmic_iwp_ppsonto the Set A names:This goes unnoticed because the test's assertions are
guarded by
if flavour == "geo":,so the
ppscases load the composite and enhance it but never check the result.Notes
ColorizeCompositor, which has beendeprecated since Satpy 0.39
in favour of
ColormapCompositor. It also colorizes inside the compositor, so a linear stretch isbeing applied on top of already-colorized output.
No YAML enhancement found for 'cloud_water_path'(and the other two) during the test suite.Possible resolutions
if flavour == "geo":guard so the PPS cases actually assertsomething.
Addition by Dave: If the colorize/colormap compositor is meant to pre-enhance the dataset then it would seem best to have an enhancement defined that is the static limit of the enhanced data (0-1?). Otherwise the dynamic stretching of the default will always change the result.