Template problem
Douglas Clark
dbcl at CEH.AC.UK
Mon Feb 26 04:02:50 EST 2007
John,
Assuming that your files have 9 or 10 days' of data in each, I think you'll need to use the CHSUB option - see GrADS index
http://grads.iges.org/grads/gadoc/gadocindex.html
under control file > options > template (or the likes).
With your current template, the way the template works is such that every day's data is assumed to be in a different file - because you have %d2 in the template. So when you set the time to 1997/01/01, GrADS looks for data in a file called 199701_01-01_2D.dat, which doesn't exist - so it says all values are undefined (arguably it might be more useful if GrADS said "can't find file" at this point, but it doesn't). With time 1997/01/02, GrADS looks for data in a file called 199701_02-02_2D.dat, and so on.
I think CHSUB will come to your rescue (although I have never used it myself). You need a ctl file with something along the lines of
DSET ^199701_%ch_2D.dat
CHSUB 1 9 01-09
CHSUB 10 19 10-19
CHSUB 20 31 20-31
OPTIONS template
The first two integers on each CHSUB line will depend on the time step given in yout TDEF line - I have assumed daily data. See the GrADS documentation for details.
Doug
>>> johnguhin at GMAIL.COM 26/02/2007 07:14 >>>
Hi,
I have three files like these....
199701_01-09_2D.ctl
199701_10-19_2D.ctl
199701_20-31_2D.ctl
I wrote a control file like this...
dset ^199701_%d2-%d2_2D.dat
options template
................................................
I can open the control file, but while plotting it says
Cannot contour grid - all undefined values
But I can plot from individual files. Where am I doing wrong?
--
John Guhin
--
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.
More information about the gradsusr
mailing list