[gradsusr] LON-LAT for European sector

Clark, Douglas B. dbcl at ceh.ac.uk
Mon May 9 04:27:26 EDT 2011


Djordje,

I'm not sure, but I suspect that the problem might be related to the fact that the xdef entry in the ctl file appears to specify a grid that covers more than 360degrees of longitude, in that 145x2.5=362.5. So I think GrADS has failed to identify that the grid should be cyclic in longitude or just can't work out which data to use in the "overlap" area. I certainly couldn't get anything to plot across 0E when I hacked up an example, even when I tried a few standard "tricks".

(The fact that the grid is rather large in latitude too, >180deg, probably doesn't matter because there's no need for GrADS to wrap round in latitude. Also note that for a "basic" gridded data file, the t,z,y,x bit in the var line is not used, as far as I know - I tend to put "99" in there instead.)

IF you only had one time level in the data file (which only has a single variable on a single level in it), you might be able to change the xdef line to have nx=144 so that GrADS thinks it only has data for 360deg - BUT THAT WILL NOT work for your current example which has >1 time.

I think you'll probably have to trim the grid to 360deg before going into GrADS if you want to plot across 0E.

If the data file RTmavglobal(1961-1990).grd was written using fwrite  to output a subset of a larger file, then I think you will be able to proceed by explicitly setting 'set x 1 144' before you write the file. Otherwise GrADS will likely have added an extra column of data because of how it normally sets up for a global grid.

Doug

From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Djordje Romanic
Sent: 09 May 2011 08:54
To: GrADS Users Forum
Subject: [gradsusr] LON-LAT for European sector

Dear Users,

I have a *.grd file (relative topography data) covering the whole globe. His CTL file is as follows:

***************************************************************************

dset ^RTmavglobal(1961-1990).grd

undef 9.999e+20

xdef 145 linear 0 2.5

ydef 73 linear -90 2.5

zdef 1 levels 1000

tdef 43709 linear 0Z31jan1961 360mn

vars 1

RT 1 t,z,y,x **Relative topography 500/1000 [hPa]

endvars

**************************************************************************

The data on global map (LAT -90 90; LON 0 360) are attached (global.jpeg). Now, from the global file I want to extract the data for the European sector (longitude interval is from 30W to 60E and latitude interval is from 0 90N), but after the following commands:

***********************************************************************

set lon -30 60

set lat 0 90

d rt

************************************************************************

I get the image that does not have the data East of the 0 meridian(attached as file euro.jpeg).

Please, can someone help me with this issue? What is causing this?

Kind regards,

Djordje

-- 
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110509/5baa8585/attachment-0003.html 


More information about the gradsusr mailing list