Project

General

Profile

GRIB2 unsupported, but listed in filetypes with "cdo -V"

Added by Joakim Kjellsson over 6 years ago

Hi

I've got a simulation with the OpenIFS model from ECMWF that outputs data in what I think is GRIB2 format.
Outputs from the first step is enclosed. ICMSH is the output in spectral space (u,v,T etc) and ICMGG is grid point data (precipitation, humidity etc).
OpenIFS and CDO have both been compiled with grib_api version 1.16.0, and both compiled without any issues.

When try to convert to netCDF I get the following message
hlogin1:~ $ cdo -f nc copy ICMSHg002+000000 test.nc
cdo copy/selall : UNCHANGED_RECORD=0
cdo copy/selall : cdiGribDataScanningMode=0; lcopy=0

Error (decodeIS) : GRIB version 2 unsupported!

but CDO lists grb2 as supported!

hlogin1:~ $ cdo -V
Climate Data Operators version 1.8.2 (http://mpimet.mpg.de/cdo)
Compiled: by bzfbmsch on bdata2 (x86_64-unknown-linux-gnu) Jun 20 2017 16:51:04
Compiler: icc -std=gnu99 -O3 -Wl,-rpath,/sw/intel/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64_lin/ -fopenmp
version: icc (ICC) 16.0.3 20160415
Features: DATA PTHREADS OpenMP4 HDF5 NC4/HDF5/threadsafe SZ UDUNITS2 PROJ.4 FFTW3 SSE2
Libraries: HDF5/1.8.17 proj/4.92
Filetypes: srv ext ieg grb1 grb2 nc1 nc2 nc4 nc4c
CDI library version : 1.8.2 of Jun 20 2017 16:49:27
CGRIBEX library version : 1.7.6 of Dec 20 2016 19:55:24
GRIB_API library version : 1.16.0
NetCDF library version : 4.3.3.1 of Jul 25 2016 00:59:47 $
HDF5 library version : 1.8.17 threadsafe
SERVICE library version : 1.4.0 of Jun 20 2017 16:49:07
EXTRA library version : 1.4.0 of Jun 20 2017 16:49:00
IEG library version : 1.4.0 of Jun 20 2017 16:49:03
FILE library version : 1.8.3 of Jun 20 2017 16:49:01

I've also tried to use CDO to convert from grib2 to grib1 and that does not work either.
Does anyone know how to deal with grib2 data?

Merry Christmas!
Joakim

PS: I can convert from grib1 to grib2. If I then try to convert that grib2 file to netCDF it works, but CDO can not convert from the reduced Gaussian to the regular grid at the same time, i.e.

hlogin1:/gfs1/work/shkjocke/oifs/oifs40r1v1/t159l91/g002 $ cdo -R -f nc -t ecmwf copy test.grb2 test.nc
cdo copy/selall : UNCHANGED_RECORD=0
cdo copy/selall : cdiGribDataScanningMode=0; lcopy=0
Warning (cdfDefRgrid) : Creating a NetCDF file with data on a gaussian reduced grid.
Warning (cdfDefRgrid) : The further processing of the resulting file is unsupported!
Warning (gribapiDecode) : Conversion of gaussian reduced grids unsupported!
cdo copy: Processed 1464438 values from 41 variables over 1 timestep ( 0.13s )


Replies (2)

RE: GRIB2 unsupported, but listed in filetypes with "cdo -V" - Added by Karin Meier-Fleischer over 6 years ago

Hi Joakim,

there is a solution for the first two files ICMGGg002+000000 and ICMSHg002+000000. The files have mixed GRIB1/GRIB2 record which CDO cannot handle. But what is test.grb2?

For ICMGGg002+000000 (reduced gaussian grid):

  grib_set -s editionNumber=1 ICMGGg002+000000 ICMGGg002+000000.grb

  cdo -setgridtype,regular ICMGGg002+000000.grb ICMGGg002+000000_regular.grb

  cdo -t ecmwf -f nc copy ICMGGg002+000000_regular.grb ICMGGg002+000000.nc

For ICMSHg002+000000:

  grib_set -s editionNumber=1 ICMSHg002+000000 ICMSHg002+000000.grb

  cdo -t ecmwf -f nc copy ICMSHg002+000000_regular.grb ICMSHg002+000000_c.nc

-Karin

RE: GRIB2 unsupported, but listed in filetypes with "cdo -V" - Added by Joakim Kjellsson over 6 years ago

Hi Karin

Thank you for your quick reply!
For ICMGG this solved it.
For ICMSH the first command is good, but the next one should be

cdo -f nc -t ecmwf sp2gpl ICMSHg002+000000.grb ICMSHg002+000000.nc 

Thanks for all your help!
Merry Christmas
/Joakim

    (1-2/2)