WHILE/ENDWHILE Problems

krishnamohan krishmet at GMAIL.COM
Sat Jan 9 09:47:24 EST 2010


Hai Jason,
                Try the attached gs file. I tried it with coads_climatology
file and is working.

Krishnamohan

On Sat, Jan 9, 2010 at 8:38 AM, See Hai Ooi <axl419 at yahoo.com> wrote:

> Hi Jason,
>
>    It appears to me that your data is the average value of the u-component
> wind (i.e. uwndavg).  If that is the case, you can display it directly
> without defining for each timestep using while/endwhile loop (Of course, you
> must clear the display for each timestep).  If you intend to find the
> average of all the values in your 10 timesteps, you may wish to consider the
> following script:-
>
>
>  'reinit'
> *
>  'sdfopen d:/..../uwndavg2001.nc'
> *
>  'suw=0'
> *
>   count=1
>   while (count <= 10)
> *
>     'suw=suw+uwndavg'
>      count=count+1
> *
>   endwhile
> *
>   'auw=suw/('count-1')'
> *
>   'd at'
> *
>    Hope this helps.
>
> Ooi
>
>
>      New Email names for you!
> Get the Email name you've always wanted on the new @ymail and @rocketmail.
> Hurry before someone else does!
> http://mail.promotions.yahoo.com/newdomains/aa/
>



-- 
Krishnamohan.K.S
Junior Research Fellow
Department Of Atmospheric Sciences
Cochin University of Science and Technology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100109/6bbf97c8/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: while.gs
Type: application/octet-stream
Size: 115 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20100109/6bbf97c8/attachment.obj 


More information about the gradsusr mailing list