Data request warning: Request beyond file limits

Dhaval Prajapati dhaval.prajapati at ICCSIR.ORG
Mon Jun 29 00:27:44 EDT 2009


Dear Muhammad,

I think in your loop you have given the condition (m<=353), you try by giving only m<353 because everytime when loop ends it increment the m by 1so and the loop goes upto 353 so the last point it takes is 354 and it is not existing that why may be ??

Just check out if it works

-----Original Message-----
From: Muhammad Rahiz [mailto:muhammad.rahiz at OUCE.OX.AC.UK]
Sent: Friday, June 26, 2009 11:40 PM
To: GRADSUSR at LIST.CINECA.IT
Subject: Data request warning: Request beyond file limits

I'm trying to get monthly averages from daily data (6hr intervals) from amaster file which contains 353 months and 42,985 time steps.I ran the following script but got the error - Data request warning: Requestbeyond file limits.Can anyone point out where the mistake is?Muhammad RahizGrADS 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 monthsmtot = 353* month indexm = 1while(m<=mtot)res = read('timeseries.txt')say t1' 't2t1 = sublin(res,1)t2 = sublin(res,2)* calculate the four digit yearyyyy = 1960* calculate the two digit monthmm = 10fout = 'tmp.'yyyy''mm'.bin''set fwrite 'fout'define tmon = ave(t,t='t1',t='t2')''disable fwrite'm = m + 1endwhile-----------------------------DSET ^rf.tmpUNDEF -1.e34XDEF 303 LINEAR 46.25 0.225198675496689YDEF 226 LINEAR -5.07 0.2252ZDEF 1 LEVELS 1008.23TDEF 42985 LINEAR 06Z01OCT1960 360mnVARS 1t 0 99 tENDVARS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090629/bfc5b0d2/attachment.html 


More information about the gradsusr mailing list