Open Alexander-Barth opened 1 month ago
Would a PR pinning the version of eccodes_jll
(indirect dependency via GRIB.jl) be helpful?
After a bit of digging. This page has a list of some of the changed variable names. https://confluence.ecmwf.int/display/MTG2US/Changes+in+ecCodes+version+2.36.0+compared+to+the+previous+version
It looks like, they don't considering changing the short names breaking. This is not good since GRIBDataset.jl clearly relies on the short names.
paramID | Old shortName | New shortName |
---|---|---|
235080 | mrsn | avg_rsn |
235081 | mcvl | avg_cvl |
235082 | mcvh | avg_cvh |
235083 | mci | avg_ci |
235084 | msst | avg_sst |
235085 | mlai_lv | avg_lai_lv |
235086 | mlai_hv | avg_lai_hv |
235087 | mtclw | avg_tclw |
235088 | mtciw | avg_tciw |
235089 | m2sh | avg_2sh |
235090 | mlmlt | avg_lmlt |
235091 | mlmld | avg_lmld |
235092 | m2r | avg_2r |
235093 | mfscov | avg_fscov |
235094 | msot | avg_sot |
235131 | mu | avg_u |
235132 | mv | avg_v |
235134 | msp | avg_sp |
235136 | mtcw | avg_tcw |
235137 | mtcwv | avg_tcwv |
235141 | msd_m | avg_sd_m |
235151 | mmsl | avg_msl |
235157 | mr | avg_r |
235165 | m10u | avg_10u |
235166 | m10v | avg_10v |
235168 | m2d | avg_2d |
235186 | mlcc_frac | avg_lcc_frac |
235187 | mmcc_frac | avg_mcc_frac |
235188 | mhcc_frac | avg_hcc_frac |
235238 | mtsn | avg_tsn |
235243 | mfal_frac | avg_fal_frac |
235244 | mfsr | avg_fsr |
235245 | mflsr | avg_flsr |
Hi!
Indeed, the error comes from the change in those short names. It's because the tests are still using the old variable name. Here's the error with a higher level test:
u10 = ds2["u10"]
ERROR: LoadError: The key `u10` was not found in the dataset. Available keys: ["lon", "lat", "hybrid", "heightAboveGround", "heightAboveGround_2", "valid_time", "u", "v", "etadot", "t", "sp", "q", "lsp", "acpcp", "sshf", "iews", "inss", "ssr", "avg_sd_m", "avg_msl", "tcc", "avg_10u", "avg_10v", "mean2t", "avg_2d", "avg_z", "lsm", "sdor", "cvl", "cvh", "avg_fsr"]
Which is much more explicit :-)
I'll fix that!
BTW, I'm sorry I'm not really active anymore, I changed my job and I don't really use Julia anymore (unfortunately)
Hi @tcarion
BTW, I'm sorry I'm not really active anymore, I changed my job and I don't really use Julia anymore (unfortunately)
This is completely understandable. I really appreciate what you have done with the package so far. GRIBDataset.jl is useful for me in my work and I hope that I can contribute more to it in the future. That being said, I will probably not be able to do any significant contribution to the package the next 6 months but I hope I can do it after.
BTW, I have made a PR to pin eccodes_jll to make the variable names stable.
I would like to second @lupemba's appreciation of your work :-)
Maybe, it would be useful to look-up the variable by the CF standard names?
using GRIBDatasets
using CommonDataModel: @CF_str
ds = GRIBDataset("/home/abarth/.julia/dev/GRIBDatasets/test/sample-data/era5-levels-members.grib");
ds["isobaricInhPa"]
#isobaricInhPa (2)
# Datatype: Int64 (Int64)
# Dimensions: isobaricInhPa
# Attributes:
# units = hPa
# stored_direction = decreasing
# long_name = pressure
# axis = Z
# standard_name = air_pressure
# positive = down
ds["isobaricInhPa"][:] == ds[CF"air_pressure"][:]
# returns true
This assumes that there is only one variable with a given standard_name
but it is often the case.
The CF standard names are probably more stable than the eccodes, but it is maybe a bit annoying to use the CF
prefix all the time.
I am investigating recent failures in the integration test (https://github.com/JuliaGeo/CommonDataModel.jl/actions/runs/10672550987). The error is reproducible, when I install the current main version of GRIBDatasets.jl (4f138719ec5c1443baa06c33aed221fd82ac3740) is an empty environment. I get the following test error:
With the following dependencies:
If I manually downgrade eccodes_jll to v2.28.0 (the previous released version), all tests pass.
Independently of the test suite, the issue can be reproduced with the sample file ENH18080914:
Is this a known problem? Thank you for your insights!