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

conditional load of grib keys depending on productDefinitionTemplateNumber #323

Open
cosunae opened this issue Dec 10, 2022 · 0 comments
Open

Comments

@cosunae
Copy link

cosunae commented Dec 10, 2022

Hi

I have a question concerning how the grib keys are loaded into a dataset.
Here we see a set of predefined keys that will be loaded
https://github.com/ecmwf/cfgrib/blob/27071067bcdd7505b1abbcb2cea282cf23b36598/cfgrib/dataset.py

additionally the user can add any list using the read_keys in the open_dataset call.
The issue I have is that many grib keys will be present/needed depending on the value of productDefinitionTemplateNumber.
Therefore a static list of keys does not work while opening a file that contains various records with different productDefinitionTemplateNumber.
Something similar to what happen with the grid type, which seems to be solved using this map.

GRID_TYPE_MAP = {

Is there any solution envisioned ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant