<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Ooi,<br>
<br>
Thanks for the suggestion. Unfortunately, that didn't work for me. Any
other ideas?<br>
<br>
-Dan<br>
<br>
<br>
<br>
<br>
See Hai Ooi wrote:
<blockquote
cite="mid20060506220712.91876.qmail@web31014.mail.mud.yahoo.com"
type="cite">
<pre wrap="">Hi,
I am not clear about your intended output.
Perhaps you could try the following:-
*
'reinit'
*
'open project/ERA40_test.ctl'
'set gxout fwrite'
'set fwrite project/peakvalues.data'
*
'set lon 140 260'
'set lat 15 75'
'set lev 775'
*
countt = 12
while(countt<=528)
'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'
*
a=1959
'define
pval=aave(win'a',lon=189,lon=207,lat=51,lat=64)'
'd pval'
a=a+1
*
countt = countt + 10
endwhile
*
'disable fwrite'
Hope this helps. Regards.
Ooi
--- Dan Barrie <a class="moz-txt-link-rfc2396E" href="mailto:dbarrie@ATMOS.UMD.EDU"><dbarrie@ATMOS.UMD.EDU></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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'
</pre>
</blockquote>
<pre wrap=""><!---->
Send instant messages to your online friends <a class="moz-txt-link-freetext" href="http://uk.messenger.yahoo.com">http://uk.messenger.yahoo.com</a>
</pre>
</blockquote>
</body>
</html>