Data request warning: Request beyond file limits

Muhammad Rahiz muhammad.rahiz at OUCE.OX.AC.UK
Fri Jun 26 14:10:05 EDT 2009


I'm trying to get monthly averages from daily data (6hr intervals) from a
master file which contains 353 months and 42,985 time steps.

I ran the following script but got the error - Data request warning: Request
beyond file limits.

Can anyone point out where the mistake is?

Muhammad Rahiz
GrADS v1.9b4 @ Fedora 10
---------------------------

'open rf.tmp.ctl'
'set lon 46.25 114.26'
'set lat -5.07 45.6'
'set t 1'
'set gxout fwrite'
* total number of months
mtot = 353
* month index
m = 1
while(m<=mtot)
res = read('timeseries.txt')
say t1' 't2
t1 = sublin(res,1)
t2 = sublin(res,2)
* calculate the four digit year
yyyy = 1960
* calculate the two digit month
mm = 10
fout = 'tmp.'yyyy''mm'.bin'
'set fwrite 'fout
'define tmon = ave(t,t='t1',t='t2')'
'disable fwrite'
m = m + 1
endwhile

-----------------------------
DSET ^rf.tmp
UNDEF -1.e34
XDEF 303 LINEAR 46.25 0.225198675496689
YDEF 226 LINEAR -5.07 0.2252
ZDEF 1 LEVELS 1008.23
TDEF 42985 LINEAR 06Z01OCT1960 360mn
VARS 1
t 0 99 t
ENDVARS



More information about the gradsusr mailing list