Project

General

Profile

grid description in SERVICE files

Added by Anne Fleig over 13 years ago

Hello,

I am trying to prepare data from the CERA database (the ECHAM5 runs: EH5_OM_20C3M) to be used by a FORTRAN program. The fortran program requires the input data to be in a 1x1 lonlat grid over the domain 36N - 69N and 32W - 45E. So I interpolated the ECHAM5 data using remapcon and selected the domain using selindexbox. I then copy the data file, saving in in a SERVICE format to be read in by FORTRAN. The FORTRAN program can read in and use the data correctly, which means that the dimensions of the grid and domain are probably correct. However, the results we get are unrealistic so that we think that the data points might not be read in with their correct location (grid point). I was therefore wondering whether any necessary grid information is lost when I copy the data files from GRIB to a SERVICE format.

The grid description for the data stored as GRIB or netCDF data is:

gridtype = lonlat
gridsize = 2652
xname = lon
xlongname = longitude
xunits = degrees_east
yname = lat
ylongname = latitude
yunits = degrees_north
xsize = 78
ysize = 34
xfirst = -32
xinc = 1
yfirst = 36
yinc = 1

However, for the SERVICE file it is:

gridtype = generic
gridsize = 2652
xname = x
xunits = degrees
yname = y
yunits = degrees
xsize = 78
ysize = 34

So the lonlat and xfirst and yfirst information is not there anymore. I also tried specifying the grid when I copy the data from GRIB to SERVICE by

cdo -g mygrid -f srv ifile.grb ofile.srv

where mygrid is:

gridtype = lonlat
xsize = 78
ysize = 34
xfirst = -32
yfirst = -36
xinc = 1
yinc = 1

However, using cdo griddes, I still receive the above grid description for the SERVICE file.

P.S. The FORTRAN program I'm using is identifying the Grosswetterlagen over Europe for each day (i.e. the locations of high and low pressure systems over Europe and the eastern North Atlantic are matched with a predefined set of 29 weather types which describe the pressure fields over that domain). Why we also think that the problem is related to the location/grid information is, because we get for example long series of days classified as a situation with a low pressure system over Iceland. When I look at these days in the prepared data set in netCDF format (using ncview), the actual pressure fields look differently (e.g. instead of the low pressure over Iceland, there might be a low pressure over Spain or Eastern Scandinavia).

P.P.S. The FORTRAN program itself should not be the problem, as it is working correctly with other climate data.

Is there anything, I did wrong or should do differently when I prepare the data and copy it to the SERVICE format which could cause this problem?

Thank you very much in advance!
Anne


Replies (3)

RE: grid description in SERVICE files - Added by Uwe Schulzweida over 13 years ago

Hi Anne,
The SERVICE format does not contain any grid information. Only the number of lons and lats are stored in the SERVICE file. Maybe your parameter to selindexbox are wrong. But the results of the grid description look ok.
Best regards,
Uwe

RE: grid description in SERVICE files - Added by Anne Fleig over 13 years ago

Hi Uwe,

thanks a lot for your reply! Just to double-check: in the SERVICE file, I produced, the data then starts with the lower left corner of my domain. Is that correct as well?
Best regards, Anne

RE: grid description in SERVICE files - Added by Uwe Schulzweida over 13 years ago

Hi Anne,

it depends on how the data was stored in the original file. The ECHAM grid for example goes from north to south, so it starts with the upper left corner. You can check it with the griddes function. A grid with a positive yinc goes from south to north and a negative yinc goes from north to south. selindexbox or sellonlatbox does not change the orientation of the grid. The grid orientation of your SERVICE file depends on the grid description for the interpolation to the 1 degree grid. You can change the orientation with the function invertlat.

Best regards,
Uwe

    (1-3/3)