Project

General

Profile

Performing expr's on polar stereographic grib2 data

Added by Thomas Gibson over 11 years ago

Hi,

I am trying to get CDO to perform some arithmetic operations on grib2 field in my data and am seeing the following error message:

Error (gribapiDefGrid) : Unsupported grid type: generic

In reading some of the forum it seems that the grid I am using (polar stereographic) is not supported by CDO. It sounds likes some individual have worked around the problem but I don't understand 100% how this was accomplished?

Any help would be appreciated. The grid I am dealing with:
----
interpretationOfNumberOfPoints = 0; # Polar stereographic can be south or north (grib2/tables/4/3.1.table)
gridDefinitionTemplateNumber = 20; # Earth assumed spherical with radius of 6,371,229.0 m (grib2/tables/4/3.2.table)
shapeOfTheEarth = 6;
Nx = 493;
Ny = 399;
latitudeOfFirstGridPointInDegrees = 32.549;
longitudeOfFirstGridPointInDegrees = 225.38; # (3=0) i direction increments not given;(4=0) j direction increments not given;(5=1) Resolved u- and v- components of vector quantities relative to the defined grid in the direction of increasing x and y (or i and j) coordinates respectively:grib2/tables/[tablesVersion]/3.3.table # flags: 00001000
resolutionAndComponentFlag = 8;
LaDInDegrees = 60;
orientationOfTheGridInDegrees = 249;
DxInMetres = 15000;
DyInMetres = 15000; # (1=0) North Pole is on the projection plane;(2=0) Only one projection centre is used:grib2/tables/[tablesVersion]/3.5.table # flags: 00000000
projectionCentreFlag = 0;
iScansNegatively = 0;
jScansPositively = 1;
jPointsAreConsecutive = 0;
alternativeRowScanning = 0;
gridType = polar_stereographic;
NV = 0;


Replies (3)

RE: Performing expr's on polar stereographic grib2 data - Added by Ralf Mueller over 11 years ago

CDO version, sample data and your CDO call would be helpful

regards
ralf

RE: Performing expr's on polar stereographic grib2 data - Added by Thomas Gibson over 11 years ago

The result appears to be version independent but here is the version and some data:

CDO Version 1.5.3

Command used (ie.) : cdo -f grb2 expr,'t=t-273.15' test.grb test.result.grb

test.grb (384 KB) test.grb

RE: Performing expr's on polar stereographic grib2 data - Added by Uwe Schulzweida over 11 years ago

Unfortunately CDO does not support polar stereographic grids. That means you can use all CDO operators except such which are need the grid information (e.g. remapping). And the polar stereographic coordinates can not stored back to the results. If you do not need the correct coordinates you can either store the result to netCDF:

cdo -f nc expr,'t=t-273.15' test.grb test.result.nc
or use setgrid to overwrite the grid description with some dummy values, e.g. a global grid with 493x399 grid points:
cdo -f grb2 -setgrid,r493x399 -expr,'t=t-273.15' test.grb test.result.grb
    (1-3/3)