Closed jodemaey closed 2 years ago
Hi @jodemaey , this was a subtle one, but after a little while I realised what was going on (using two of my own GRIB files from MARS including a reforecast and a non-reforecast - the behaviour was the same). You need to specify the dataData as a number, not a string, i.e.
dss = xr.open_dataset('reforecasts_ensemble_2019-10-31.grb', engine='cfgrib',
backend_kwargs={'filter_by_keys': {'dataDate': 19991031, 'perturbationNumber': 1}})
I didn't look deeply into why the error message was so unhelpful, but the filter was not matching any fields because dataDate is extracted from the GRIB header as a number, and it was being compared with your string and of course it was always False!
I hope this helps (and that it works for you). Best regards, Iain
Hi,
Just to let you know that the current command to load and filter a reforecasts file download from ECMWF Mars fails:
However, loading the full file works and gives:
Eccodes version is
2.23.0
.