Skip to content

PPS cloud water path composites fall through to the default enhancement #3457

Description

@djhoese

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.yaml defines two parallel sets of NWCSAF/PPS cloud water path
composites, and only one of them has a matching enhancement.

Set Acloud_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 Bpps_cwp, pps_iwp, pps_lwp,
which set standard_name: pps_cwp / pps_iwp / pps_lwp and do have
matching colorize enhancements
using cmic_cwp_pal / cmic_iwp_pal / cmic_lwp_pal.

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:

"cmic_cwp_pps": ("pps", "cmic_cwp", None, "cmic_cwp_pal", None, "cloud_water_path", ...),
"cmic_lwp_pps": ("pps", "cmic_lwp", None, "cmic_lwp_pal", None, "liquid_water_path", ...),
"cmic_iwp_pps": ("pps", "cmic_iwp", None, "cmic_iwp_pal", None, "ice_water_path", ...),

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

  1. Deprecate/remove the Set A composites in favour of Set B, and repoint the test parametrization.
  2. Keep Set A and add enhancement sections for its three standard names.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions