writing double loop to ascii file
Tom Pollard
tomp at EARTHLINK.NET
Thu Oct 13 09:32:04 EDT 2005
On Oct 12, 2005, at 7:07 PM, Michael Sigmond wrote:
> I'm trying to write 21 timeseries to an ascii file with the script
> below.
> Grads doesn't understand my double while construction. Does anybody
> know a
> solution?
The only thing I see that's the matter with this script is that the
statement 't=1' needs to be inside the outer while loop, that is,
while(area<=21)
t = 1
while(t<=60)
Cheers,
Tom
> file='g05c.txt'
> area=1
> t=1
>
> while(area<=21)
> while(t<=60)
> 'set t 't
> 'd g05c'area
> yy=subwrd(result,4)
> good=write(file,yy,append)
> t=t+1
> endwhile
> area=area+1
> endwhile
>
More information about the gradsusr
mailing list