Closed jqs-noaa closed 3 years ago
Hi @jqs-noaa , this is happening because cfgrib uses the paramId key to distinguish between parameters, and this is not set in your custom tables and is therefore zero for both fields. You can check out the ecCodes FAQ for how to add a paramId to your data: https://confluence.ecmwf.int/display/UDOC/Creating+your+own+local+definitions+-+ecCodes+GRIB+FAQ I could get your fields into a single dataset by creating a paramId.def file with these contents (I chose random paramId numbers for testing):
# cimixr
'239' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 82 ;
}
# massden
'240' = {
discipline = 0 ;
parameterCategory = 20 ;
parameterNumber = 0 ;
}
It's actually the first time I've personally created one of these files, so I hope I did it right, but it works for me nonetheless :)
I hope this helps!
Best regards, Iain
That works! Thank you.
Excellent - thanks for letting me know!
I'm seeing an problem where I have two variables defined using custom definitions for the eccodes library. When reading in this file with cfgrib, I only get a dataset with one variable instead of 2. For some reason, cfgrib is only returning the first variable it sees. What am I missing?
Example project: test.zip
First I set my ECCODE_DEFINITION_PATH
export ECCODES_DEFINITION_PATH=custom_definitions:/usr/share/eccodes/definitions
grib_ls see's both variables:
Example Code:
Results:
I expected to see a dataset with both 'cimixr' and 'massden' variables
cfgrib version:
Other Details: OS: PopOS 20.04 Env: Conda 4.10.3