Project

General

Profile

sp2gpl: Can the assumed earth radius (shapeOfTheEarth = 0) be changed?

Added by Eva-Marie Schömann over 2 years ago

Dear users,

I want to remap ERA5 data (grib-files from the DKRZ levante) on a spectral grid (e.g. v,u parameter) onto a regular Lat-Lon grid. I thereby use the command:
cdo -remapbil,mygrid -setgridtype,regular ${OUTFILE} ${INFILE} taken from
https://collaboration.cen.uni-hamburg.de/display/Met3D/Remapping+from+spectral+grid+to+regular+grid

This works, but when I compare the file to a file directely downloaded via MARS in regular_ll, I get two major differences:
1) Earth assumed spherical with radius = 6,367,470.0 m (grib2/tables/5/3.2.table), shapeOfTheEarth = 0; instead of shapeOfTheEarth = 6 (I access this information with grib_dump file.grb)
2) the values I get for parameter 131 and 132 (u,v winds) differ signficantely

I assume that 2) is a consequence of 1).

Is there any way to set the assumed earth radius in sp2gp to 6,371,229.0 m (shapeOfTheEarth = 6)?

I use cdo/2.0.5-gcc-11.2.0

Thanks in advance!


Replies (9)

RE: sp2gpl: Can the assumed earth radius (shapeOfTheEarth = 0) be changed? - Added by Karin Meier-Fleischer over 2 years ago

Hi Eva-Marie,

without the files it is not possible to reproduce the problem. Can you upload the input file, mygrid and the MARS file for comparison.

RE: sp2gpl: Can the assumed earth radius (shapeOfTheEarth = 0) be changed? - Added by Eva-Marie Schömann over 2 years ago

Hi Karin,
thanks for the quick answer.
Attached you can find the files. I extracted only one grib message of each of my original files, as they are to large to upload.

RE: sp2gpl: Can the assumed earth radius (shapeOfTheEarth = 0) be changed? - Added by Uwe Schulzweida over 2 years ago

The ERA wind components on modellevel are scaled by 1/cos(lat). Multiply these field with cos(lat) in order to get the correct result:

cdo infon Input_param131_20090809_level1_t0.grib 
    -1 :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter name
     1 : 2009-08-09 00:00:00       1    45472       0 :     -34.460      4.8108      46.764 : u             

cdo infon -mulcoslat MARSfile_param131_20090809_level1_t0.grib 
    -1 :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter name
     1 : 2009-08-09 00:00:00       1    45472       0 :     -34.460      4.8107      46.749 : u             

RE: sp2gpl: Can the assumed earth radius (shapeOfTheEarth = 0) be changed? - Added by Karin Meier-Fleischer over 2 years ago

The grids of MARSfile_param131_20090809_level1_t0.grib and Input_param131_20090809_level1_t0.grib are the same as well as mygrid.

cdo griddes MARSfile_param131_20090809_level1_t0.grib > gridfile_MARSfile.txt
cdo griddes Input_param131_20090809_level1_t0.grib > gridfile_Input.txt
diff gridfile_MARSfile.txt gridfile_Input.txt
diff mygrid gridfile_Input.txt

RE: sp2gpl: Can the assumed earth radius (shapeOfTheEarth = 0) be changed? - Added by Uwe Schulzweida over 2 years ago

Sorry, The MARS file is probably correct. Then the other one should be divided by cos(lat):

cdo infon -divcoslat Input_param131_20090809_level1_t0.grib 
cdo(1) divcoslat: Process started
    -1 :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter name
     1 : 2009-08-09 00:00:00       1    45472       0 :     -37.067      7.5900      52.705 : u  

cdo infon MARSfile_param131_20090809_level1_t0.grib 
    -1 :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter name
     1 : 2009-08-09 00:00:00       1    45472       0 :     -35.581      7.5900      52.700 : u             

RE: sp2gpl: Can the assumed earth radius (shapeOfTheEarth = 0) be changed? - Added by Eva-Marie Schömann over 2 years ago

Thank you very much! This helps a lot

Can this information about the cos(lat) scaling (and similar infos) be found somewhere? I couldn't find it in the ERA5 documentation nor at other pages of the ecmwf-confluence.

    (1-9/9)