Simple dimension question

Douglas Clark dbcl at CEH.AC.UK
Mon Sep 19 05:42:39 EDT 2005


If you need the number of times in a dataset (the number as given in the ctl file), in a script you could use:
'q file'
lin=sublin(result,5)
nt=subwrd(lin,12)

If you need the time range as currently set, use
'q dims'
then parse the result using sublin, subwrd etc.
Note that the format of the result of 'q dims' varies slightly according to whether time is fixed or varying.

For more on subwrd and other functions, see GrADS docs at:
http://grads.iges.org/grads/gadoc/gadocindex.html
under GrADS scripting language > Intrinsic functions.

Doug


>>> knilssen at WEATHER3000.COM 19/09/2005 09:53:11 >>>
How can I get the range of a dimension? I need the number of time
dimensions.



More information about the gradsusr mailing list