ecmwf / cfgrib

A Python interface to map GRIB files to the NetCDF Common Data Model following the CF Convention using ecCodes
Apache License 2.0
400 stars 77 forks source link

Two write tests fail after an update of *python-eccodes* #278

Open alexamici opened 2 years ago

alexamici commented 2 years ago

The tests test_50_sample_data.py::test_canonical_dataset_to_grib[era5-levels-members] and test_50_sample_data.py::test_canonical_dataset_to_grib[regular_ll_msl] fail the round trip test.

We observe waring like:

WARNING  cfgrib.messages:messages.py:171 failed to set key 'number' to 0
WARNING  cfgrib.messages:messages.py:171 failed to set key 'endStep' to numpy.timedelta64(0,'ns')

This points to the wrong GRIB message to be use as template, that probably happen after an update to python-eccodes but it is not possible to test the old version because it has been removed by conda forge.

I'll add xfail makers for now.

iainrussell commented 2 years ago

This will be partly fixed with python-eccodes 1.4.1 - the problem with encoding the 'number' was that it is a numpy.int64 (a side-effect of #272), which python-eccodes did not accept. The next python-eccodes will accept it. I have a separate fix in cfgrib for the 'endStep' issue, and with that, these tests should work again.

iainrussell commented 2 years ago

With the latest commit and python-eccodes 1.4.1, these two tests will work again. I will not re-activate them and close this issue until python-eccodes has been released.