Project

General

Profile

Problems remapping GRIB rotated_latlon vector fields with CDO

Added by Carlos Santos over 11 years ago

Hi all,

I get some problems when remapping GRIB rotated latlon vector fields:

(1) sellonlatbox

cdo sellonlatbox,-45,-16,-9,9 $fileIn $fileOut

It crops properly the field, but CDO changes one GRIB header property:
uvRelativeToGrid=1 in the original file, but uvRelativeToGrid=0 in the cropped one; therefore, the field is not properly displayed, though the values are correct.

This can be easily fixed using grib_api:

grib_set -s uvRelativeToGrid=1 $fileOut $fileOutCorrected

(2) remapbil

cdo remapbil,mygrid $fileIn $fileOut

Here CDO is not remapping properly: the output vector field seems to be referred to a regular latlon grid, not taking into account the rotation of the original grid.

(1) is just a bug that might be easily fixed inside CDO code
(2) seems to be more difficult to address
I provide a tar.gz'ed directory with a small sample.

Any help or comment?
Thanks in advance
Carlos


Replies (1)

RE: Problems remapping GRIB rotated_latlon vector fields with CDO - Added by Uwe Schulzweida over 11 years ago

Your output grid description file mygrid refers to a regular lonlat. You have to add the coordinates of the pole to take the rotation into account.

gridtype = lonlat
xsize    = 20
ysize    = 20
xfirst   = -18.0
xinc     = 0.10
yfirst   = 27.0
yinc     = 0.10
xnpole   = -150
ynpole   = 46

    (1-1/1)