how to fwrite data from a while loop
Dan Barrie
dbarrie at ATMOS.UMD.EDU
Sat May 6 14:53:57 EDT 2006
Hi everyone,
I am having a relatively simple problem with a grads script I wrote. I
am simply looking for the script to output a data file with the result
of every incremental passage through a while loop. The loop I have
written is hopefully producing only one data point each time through.
All I am getting out is a blank data file. I have copied my script
below. Thank you in advance for your help.
Sincerely,
Dan Barrie
'reinit'
'open project/ERA40_test.ctl'
'set lon 140 260'
'set lat 15 75'
'set lev 775'
'set t 1 528'
countt = 12
a=1959
'set fwrite project/peakvalues.data'
'set gxout fwrite'
while(countt<=527)
'set t 'countt
'define d=vv'
countt=countt+1
'set t 'countt
'define j=vv'
countt=countt+1
'set t 'countt
'define f=vv'
'define win=(d+j+f)/3'
'define pval=aave(win'a',lon=189,lon=207,lat=51,lat=64)'
'd pval'
a=a+1
countt = countt + 10
endwhile
'disable fwrite'
More information about the gradsusr
mailing list