Project

General

Profile

Unsupported file structure in grib2 files

Added by Alejandro Guerrero almost 4 years ago

Hello there,

I am trying to use CDO on some GRIB2 files. There are some files that work just fine, but other files show me an error of 'unsupported file structure'. I can see inside the files (using Panoply for instance) and realize that in the problematic files there are defined two time variables (instead of just one like in the files that work fine).
Do you know if it is possible to remove the "extra" time register of the problematic files using the CDO command? (and if yes, how?).

Thank you in advance
Alejandro


Replies (7)

RE: Unsupported file structure in grib2 files - Added by Karin Meier-Fleischer almost 4 years ago

Hi Alejandro,

have you tried to select a variable from those defect files? CDO should use only the associated time of the selected variable.

-Karin

RE: Unsupported file structure in grib2 files - Added by Alejandro Guerrero almost 4 years ago

Hi Karin,

The thing is I cannot use any CDO commmand on those defect files. This following error is shown:

"Warning (gribapiScanTimestep2): Record 451 (name=acpcp id=10.1.0 lev1=0 lev2=0) timestep 2: Parameter not defined at timestep 1!
cdo showname: Open failed on >my_file< Unsupported file structure".

I have no clue about what the problem is and how to solve it. I have only found that those defect files have declared two different time variables (it looks suspicious to me). Any help will be welcome!

Regards
Alejandro

RE: Unsupported file structure in grib2 files - Added by Karin Meier-Fleischer almost 4 years ago

It seems that the file has a mixed grib1 and grib2 structure.

Is it possible to upload the file?

RE: Unsupported file structure in grib2 files - Added by Alejandro Guerrero almost 4 years ago

Of course. This is the link of one file that works just fine with CDO:

https://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.20200707/18/gfs.t18z.pgrb2.0p25.f000

and this is the link of one defect file (CDO does not work on it):

https://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.20200707/18/gfs.t18z.pgrb2.0p25.f003

Depending on your browser they can be downloaded by right click on them + Save Link As...

Thank you in advance
Alejandro

RE: Unsupported file structure in grib2 files - Added by Ralf Mueller almost 4 years ago

I can confirm, that this file is not readable with CDO. But it also cannot converted to netcdf with NCL's ncl_convert2nc. I am not a grib-expert to be honest..

RE: Unsupported file structure in grib2 files - Added by Karin Meier-Fleischer almost 4 years ago

NCL ncl_filedump can show the content but also gives an error for some records:

warning:NclGRIB2: APCP_P8_L1 contains records that NCL cannot currently differentiate. One or more records will be ignored.
warning:NclGRIB2: ACPCP_P8_L1 contains records that NCL cannot currently differentiate. One or more records will be ignored.

RE: Unsupported file structure in grib2 files - Added by Uwe Schulzweida almost 4 years ago

You can remove the duplicated entries by setting the environment variable CDI_INVENTORY_MODE=time:

CDI_INVENTORY_MODE=time    cdo infon gfs.t18z.pgrb2.0p25.f003

    (1-7/7)