Skip to content
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

Add more metadata in Satpy reader YAML-files for categorical datasets #2212

Open
sjoro opened this issue Sep 29, 2022 · 2 comments
Open

Add more metadata in Satpy reader YAML-files for categorical datasets #2212

sjoro opened this issue Sep 29, 2022 · 2 comments
Labels
component:readers future ideas Wishes and ideas for the future

Comments

@sjoro
Copy link
Collaborator

sjoro commented Sep 29, 2022

Feature Request

When reading a categorical dataset, e.g. SEVIRI Cloud Mask product, the user typically ends up with a data-array with some integers in it. In the example case here, seviri_l2_grib does not provide any information on what these cloud mask values (between 0 and 3) mean and the user needs to find this information online in a user manual.

Describe the solution you'd like
Satpy-reader should provide the user the needed information for the categorical datasets mapping the different categories to the corresponding values in the dataset. CF convention suggests using flag_values and flag_meanings (and flag_masks in case of bit field notating a unique bit set for s specific meaning), which could be added to the readers where necessary.
https://cfconventions.org/cf-conventions/cf-conventions.html#flags

Describe any changes to existing user workflow
None. The information could be added in the reader YAML-files for affected datasets.

Additional context
Just opening up the conversation on this here in case there's a better solution for the problem.

@sjoro sjoro added future ideas Wishes and ideas for the future component:readers labels Sep 29, 2022
@djhoese
Copy link
Member

djhoese commented Sep 29, 2022

Your suggestion is exactly what I was going to suggest. In most readers that are NetCDF-based this is already done since most NetCDF creators try to follow (or almost follow) CF conventions. Parts of Satpy and Pyresample even treat datasets differently if they have flag_meanings defined. I think if the file doesn't provide that information then putting it in the YAML makes sense.

@strandgren
Copy link
Collaborator

Just for the record this functionality is briefly mentioned in issue #1921 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:readers future ideas Wishes and ideas for the future
Projects
None yet
Development

No branches or pull requests

3 participants