Unsupported file structure
Added by Richard Harvey over 1 year ago
Hello,
I got this error message when using cdo on an otherwise perfectly normal grib file:
Error in calling operator remapbil with:
cdo -O -s -remapbil,/vagrant/data/output/MODEL_DATA/sref/20230629/09/cat/stations sref_2t.grib2 series_2t.grib2<<<
STDOUT:
STDERR:Warning (gribapiScanTimestep2): Record 3 (name=2t id=0.0.0 lev1=2 lev2=0) timestep 2: Parameter not defined at timestep 1!
cdo remapbil: Open failed on >sref_2t.grib2<
Unsupported file structure
When I run "file" on the faulty file, I can confirm this is a bonefide grib2:
$ file myfile.grib2
myfile.grib2 : Gridded binary (GRIB) version 2
$
I seem to have come across this on one of the forums in that cdo still has issues with the way certain valid grib2 files are internally structured.
Any ideas, anybody ?
Richard
sref_nmb.t09z.pgrb132.n1.f81.grib2 (290 KB) sref_nmb.t09z.pgrb132.n1.f81.grib2 | File for which the cdo -infon command works | ||
sref_2t.grib2 (17.5 MB) sref_2t.grib2 | File for which the cdo -infon command throws the 'Unsupported file structure' error |
Replies (2)
RE: Unsupported file structure - Added by Uwe Schulzweida over 1 year ago
Hello Richard,
The file contains the variable 2t for the data type cf (Control forecast product) and pf (Perturbed forecast product).
It looks like all GRIB records appear twice in the file. This leads to an inconsistency from CDO's point of view even if it is a valid GRIB file.
Here are the first 20 records of the GRIB file:
grib_ls sref_2t.grib2 | head -20 sref_2t.grib2 edition centre date dataType gridType stepRange typeOfLevel level shortName packingType 2 kwbc 20230629 cf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 cf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 3 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 cf lambert 6 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 6 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 6 heightAboveGround 2 2t grid_simple 2 kwbc 20230629 pf lambert 6 heightAboveGround 2 2t grid_simpleCDO can work with the data if you split the file into the data type:
grib_copy -w dataType=pf sref_2t.grib2 pf_sref_2t.grib2 grib_copy -w dataType=cf sref_2t.grib2 cf_sref_2t.grib2Cheers,
Uwe
RE: Unsupported file structure - Added by Richard Harvey over 1 year ago
Thanks Uwe for your quick response!
Just installed the libeccodes-tools library...
Richard