[gradsusr] what am i doing wrong

Krishna Santhanam KSanthanam at Everpower.com
Wed Aug 10 17:01:13 EDT 2011


I am trying to fetch average monthly values for the following.

I have a ctl file which opens about 8496 files (.dat grads file every 10 minutes for 2 months)  the data set is defined as

dset ^fname_%y4-%m2-%d2_%h2_%n2.dat

I have a grads script with the following

function main()
'open fname.ctl'
cntx=32
while(cntx<=121) 
 cnty=17
while(cnty<=110)
'set x 'cntx
'set y 'cnty
'define wind=sqrt(umet*umet+vmet*vmet)'
'define mwind=ave(wind,t=1,t=4460)'
'd mwind'
dum1=sublin(result,2)
lrn=subwrd(dum1,4)
w=write(tmp1.dat,lrn)
cnty=cnty+1
endwhile
cntx=cntx+1
endwhile

I have a file written with nothing in that, could someone tell me what is wrong?

Thanks,
Krishna




More information about the gradsusr mailing list