Conversion of reduced gaussian grid to regular grid is failing with -R flag
Added by Chris Bartolomei about 6 years ago
Hello - I have a daily GRIB set of files with one variable coming from ECMWF in a reduced gaussian grid (N1280) which I need to convert to a regular grid (F1280). I concatenate the GRIB files into a single file. The CDO reference card implies the -R flag would do the trick but I am getting errors about the reduced gaussian grid. Here's the command I use:
cdo -R -s -f nc4 -t ecmwf -copy concat.grb 52.runoff.nc
and here's the error:
Warning (cdfDefRgrid): Creating a NetCDF file with data on a gaussian reduced grid.
Warning (cdfDefRgrid): The further processing of the resulting file is unsupported!
grib_decode_double : Number of values (6143684) and sum of lons per row (8505906) differ, abort conversion to regular Gaussian grid!
(that error repeats a lot)
Could someone please look to see if I have something wrong with my files?
I attached a smaller sample of the concatenated GRIB file.
Here's my cdo -V:
$ cdo -V
Climate Data Operators version 1.9.5 (http://mpimet.mpg.de/cdo)
System: x86_64-pc-linux-gnu
CXX Compiler: g++ -std=gnu++11 -g -O2 -fopenmp
CXX version : g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
C Compiler: gcc -std=gnu99 -fPIC -fopenmp
C version : gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
F77 Compiler: gfortran -g -O2
F77 version : GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
Features: 31GB 4threads C++11 Fortran DATA PTHREADS OpenMP3 HDF5 NC4/HDF5 OPeNDAP SSE2
Libraries: HDF5/1.8.12
Filetypes: srv ext ieg grb1 nc1 nc2 nc4 nc4c
CDI library version : 1.9.5
CGRIBEX library version : 1.9.1
NetCDF library version : 4.3.3.1 of Dec 10 2015 16:44:18 $
HDF5 library version : 1.8.12
EXSE library version : 1.4.0
FILE library version : 1.8.3
Thank you for looking at this! Any help would be greatly appreciated.
:)
Chris
concat.grb (26.4 MB) concat.grb |
Replies (6)
RE: Conversion of reduced gaussian grid to regular grid is failing with -R flag - Added by Uwe Schulzweida about 6 years ago
The CDO option -R is implemented only for data on a reduced Gaussian grid which covers the full globe (I will update the documentation). The longitudes in your file are from 0 to 259.94 deg.
A more general method to convert reduced Gaussian data to a regular Gaussian grid is:
cdo setridtype,regular infile outfileThis works for non global reduced Gaussian grids and also with GRIB2 data.
And with the conversion to NetCDF:
cdo -s -f nc4 -t ecmwf setridtype,regular concat.grb 52.runoff.ncCheers,
Uwe
RE: Conversion of reduced gaussian grid to regular grid is failing with -R flag - Added by Chris Bartolomei about 6 years ago
Thank you so much Uwe! I didn't even think to look at the spatial extents. The data was supposed to be a full global dataset ... I'm speaking with ECMWF now to get the proper data sent. You're awesome! Thank you
RE: Conversion of reduced gaussian grid to regular grid is failing with -R flag - Added by Chris Bartolomei about 6 years ago
Uwe (or anyone else),
Quick question:
It looks like we won't be able to get a 0-360 N-gridded (regular reduced gaussian grid) forecast from ECMWF ... but we may be able to get the forecast on an octahedral reduced gaussian grid (the ECMWF O-grid).
We had previously attempted to convert the O-grid to the F-grid (regular gaussian grid). The O-grid was 2560x1280 but with the conversion using "cdo -s -R -f nc4 -t ecmwf -copy ERAILand_gu1a_runoff6h_198610 test.nc", test.nc winds up on a grid that's 2576 x 1280 instead of the expected 2560 x 1280. I don't have a copy of that ERAILand_gu1a_runoff6h_198610 file to look at it more closely yet (I've requested it from the person who was testing the conversion for me) but was wondering if you knew if using the "-R" is the correct method or if we should use the "setgridtype,regular" instead? or is there some other trick that can go from an octahedral reduced gaussian grid to a regular gaussian grid?
Thanks again for you're help!
:)
Chris
RE: Conversion of reduced gaussian grid to regular grid is failing with -R flag - Added by Uwe Schulzweida about 6 years ago
Hi Chris,
The number of longitudes near the equator of a reduced Gaussian grid is 4*N (e.g. N=640 => nlon=4*320=2560).
This has been changed for an octahedral reduced Gaussian grid to 4*N+ 16 (N=640 => nlon=4*320+ 16 =2576).
For more information see: https://confluence.ecmwf.int/display/FCST/Introducing+the+octahedral+reduced+Gaussian+grid
This is handled correctly with the Option -R but not for setgridtype,regular. I have fixed this problem for the next CDO release.
Cheers,
Uwe
RE: Conversion of reduced gaussian grid to regular grid is failing with -R flag - Added by Chris Bartolomei about 6 years ago
Thank you again Uwe!
:)
Chris
RE: Conversion of reduced gaussian grid to regular grid is failing with -R flag - Added by Michael Shaw about 6 years ago
Looks like progress! Very helpful; thank you.