WHILE/ENDWHILE Problems

See Hai Ooi axl419 at YAHOO.COM
Fri Jan 8 22:08:19 EST 2010


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&#39;ve always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/



More information about the gradsusr mailing list