Project

General

Profile

cdo griddes do not correctly read ERA5 surface data

Added by Joshua Miller 16 days ago

Hello,

I need to perform conservative interpolation (specifically: cdo remapcon,r360x180 -setgridtype,regular infile.grib outfile.grib)on ERA5 mean sea level pressure (mslp) data as it is mandatory for my PhD project. To do this, I must first download the data as a .grib file in ERA5's native reduced Gaussian grid format. But before doing this operation I inspected the input file using the command "cdo griddes sphere_mslp.grib" I get the following:

gridtype = gaussian_reduced
gridsize = 542080
xsize = 2
ysize = 640
xname = lon
xlongname = "longitude"
xunits = "degrees_east"
yname = lat
ylongname = "latitude"
yunits = "degrees_north"

This is clearly wrong as it shows there are only two x-coordinates, but I downloaded the data for the whole globe. Interestingly, cdo griddes works fine on atmospheric variables in ERA5, just not surface ones. If any of you are interested in checking for yourselves, I've put the code used to download the input file below. I have also reached out to ECMWF for help but they could not diagnose the issue nor recommend a way to do the operation I need.

import cdsapi
c = cdsapi.Client()
c.retrieve("reanalysis-era5-complete", {
"class": "ea",
"date": "2005-08-28",
"expver": "1",
"levtype": "sfc", # Surface
"param": "151.128", # Code for mean sea level pressure
"stream": "oper",
"time": "00/to/23/by/1", # Get data every hour
"type": "an"
}, "sphere_mslp.grib")


Replies (1)

RE: cdo griddes do not correctly read ERA5 surface data - Added by Uwe Schulzweida 16 days ago

This is the information stored in the GRIB file for Gaussian reduced grids. The number of grid points is 542080 and for the longitudes only the first and last value is stored.
In the next step using setgrid,regular the reduced Gaussian grid will be transformed into a regular Gaussian grid. Here it looks as you would expect:
cdo griddes -setgridtype,regular sphere_mslp.grib:

gridtype  = gaussian
gridsize  = 819200
xsize     = 1280
ysize     = 640
xname     = lon
xlongname = "longitude" 
xunits    = "degrees_east" 
yname     = lat
ylongname = "latitude" 
yunits    = "degrees_north" 

    (1-1/1)