problem reading a grib file
Added by christophe chaussin almost 8 years ago
Hello,
I have a problem reading a specific grib file with cdo.
It seems that cdo only reads the first variable in this file and not the next ones.
Here is the version of cdo used :
Climate Data Operators version 1.6.4rc6 (http://code.zmaw.de/projects/cdo)
Compiled: by ribiere on prev.der.edf.fr (x86_64-unknown-linux-gnu) May 26 2014 15:39:02
Compiler: gcc -std=gnu99 -g -O2 -fopenmp
version: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
Features: PTHREADS OpenMP NC4 Z
Libraries:
Filetypes: srv ext ieg grb grb2 nc nc2 nc4 nc4c
CDI library version : 1.6.4rc3 of May 26 2014 15:38:55
CGRIBEX library version : 1.6.4 of Mar 28 2014 13:24:51
GRIB_API library version : 1.12.3
netCDF library version : 4.1.1 of Jan 30 2014 05:31:22 $
HDF5 library version : 1.8.5
SERVICE library version : 1.3.2 of May 26 2014 15:38:39
EXTRA library version : 1.3.2 of May 26 2014 15:38:34
IEG library version : 1.3.2 of May 26 2014 15:38:38
FILE library version : 1.8.2 of May 26 2014 15:38:34
There is 4 variables in my file :
grib_get -m -P shortName 2566000000.20170327000000
ws sfc 20170327 0000 3 32.1
...
2t sfc 20170327 0000 3 11.1
...
tcc sfc 20170327 0000 3 71.1
...
unknown sfc 20170327 0000 3 105.149
but cdo only reads the first one :
cdo sinfo 2566000000.20170327000000
File format : GRIB
-1 : Institut Source Ttype Levels Num Points Num Dtype : Parameter ID
1 : unknown unknown instant 1 1 12240 1 P12 : 32.1
Grid coordinates :
1 : lonlat : points=12240 (136x90)
lon : -5.2 to 8.3 by 0.1 degrees_east
lat : 51.2 to 42.3 by -0.1 degrees_north
Vertical coordinates :
1 : height : levels=1
height : 10 m
Time coordinate : unlimited steps
RefTime = 2017-03-27 00:00:00 Units = hours Calendar = proleptic_gregorian
With another file given by the same provider, everything seems to work fine :
cdo sinfo 0490000000.20170327000000
File format : GRIB
-1 : Institut Source Ttype Levels Num Points Num Dtype : Parameter ID
1 : ECMWF unknown instant 1 1 1221 1 P16 : 186.128
2 : ECMWF unknown instant 1 1 1221 1 P16 : 187.128
3 : ECMWF unknown instant 1 1 1221 1 P16 : 188.128
4 : ECMWF unknown instant 1 1 1221 1 P16 : 165.128
5 : ECMWF unknown instant 1 1 1221 1 P16 : 166.128
6 : ECMWF unknown instant 1 1 1221 1 P16 : 167.128
7 : ECMWF unknown instant 1 1 1221 1 P16 : 164.128
Grid coordinates :
1 : lonlat : points=1221 (33x37)
lon : 7 to 11 by 0.125 degrees_east
lat : 44.5 to 40 by -0.125 degrees_north
etc ...
Any kind of help will be warmly welcome
Cheers,
Christophe
Replies (1)
RE: problem reading a grib file - Added by Uwe Schulzweida almost 8 years ago
The records in the file 2566000000.20170327000000 are sorted by variable:
ws sfc 20170327 0000 3 32.1 ws sfc 20170327 0000 4 32.1 ws sfc 20170327 0000 5 32.1 ... 2t sfc 20170327 0000 3 11.1 2t sfc 20170327 0000 4 11.1 2t sfc 20170327 0000 5 11.1 ... tcc sfc 20170327 0000 3 71.1 tcc sfc 20170327 0000 4 71.1 tcc sfc 20170327 0000 5 71.1 ... unknown sfc 20170327 0000 3 105.149 unknown sfc 20170327 0000 4 105.149 unknown sfc 20170327 0000 5 105.149 ...But CDO supports only GRIB files sorted by time:
ws sfc 20170327 0000 3 32.1 2t sfc 20170327 0000 3 11.1 tcc sfc 20170327 0000 3 71.1 unknown sfc 20170327 0000 3 105.149 ws sfc 20170327 0000 4 32.1 2t sfc 20170327 0000 4 11.1 tcc sfc 20170327 0000 4 71.1 unknown sfc 20170327 0000 4 105.149 ws sfc 20170327 0000 5 32.1 2t sfc 20170327 0000 5 11.1 tcc sfc 20170327 0000 5 71.1 unknown sfc 20170327 0000 5 105.149 ...