fields in GrADS

Mallikarjun arjunjt at CAOS.IISC.ERNET.IN
Wed Feb 23 12:28:38 EST 2005


Hello Kristian,

  You can use one more variable like 'count'. For example i and
use like this;

count=1
i=1
while ( count <= 10 )
'd pslv/100'
'q pos'
a.i=subwrd(result,3)
count=count+1
i=i+1
endwhile

Your a.i varible contains all the values; something like this;
a.1,a.2,a.3,a.4 and so on.

Try it out.



On Wed, 23 Feb 2005, Kristian Horvath wrote:

> Dear GrADS people,
>
> I would like to write a while loop and every time when passing the loop remember the value of a variable for manipulation after the loop.
>
> Something like:
>
> count=1
> while ( count <= 10 )
> 'd pslv/100'
>  'q pos'
>  a=subwrd(result,3)
> count=count+1
> endwhile
>
> where I would like to have values of a(1), a(2)...a(10) after in the script.
>
> I would appreciate any suggestions,
> Cheers,
> Kristian
>
> _________________________________________
>
> Kristian Horvath
> research fellow
> Croatian Meteorological and Hydrological Service
>
>

--
Mallikarjuna.K
J.R.F
Centre for Atmospheric and Oceanic Sciences
Indian Institute of Science
Bangalore - 560 012



More information about the gradsusr mailing list