Computing pentad averages!

abbas mofidi abbasmofidi at YAHOO.COM
Fri May 4 12:16:39 EDT 2007


Dear Grads users,
  I am new to Grads and I have a question related to getting time average. I have written a sript to compute the pentad averages of variables. I don't know what's wrong with it which instead of pentad averages(for example in the following script: the pentad for 62-66, 67-71,72-76,......) it is displaying just for the first day of each pentad(62th,67th,72th,...)?
  Thank you very much for your assistance
  A. Mofidi
  * script For Computing pentad Vorticity and Hgt 200hpa-JJA
     ti = 62
while ti <= 153
'sdfopen ncdata\hour\uwind200mb-1apr-31oct1994-daily.nc'
'sdfopen ncdata\hour\vwind200mb-1apr-30sep1994-daily.nc'
'sdfopen ncdata\hour\hgt200mb-1apr-30sep1994-daily.nc'
    'clear'
    'set dfile 1'
    'set t ' ti
    'set lat 10 50'
    'set lon 20 110'
    'set z 1'
    'set ave(z 1,ti=62,ti=153)'
    'u=uwnd'
    'set dfile 2'
    'set t ' ti
    'set z 1'
    'set ave(z 1,ti=62,ti=153)'
    'v=vwnd'
    'set gxout shaded'
    'set csmooth on'
    'set grid off'
    'set cint 0.00001'
    'set black -1e-06 1e-06'
    'set font 2'
    'set xlopts 1 5 0.14'
    'set ylopts 1 5 0.14'
    'display hcurl(u,v)/0.00001'
    'run cbarn'
    'set dfile 3'
    'set t ' ti
    'set lat 10 50'
    'set lon 20 110'
    'set z 1'
    'set ave(z 1,ti=62,ti=153)'
    'set gxout contour'
    'set csmooth on'
    'set grid off'
    'set cint 25'
    'set clskip 2'
    'set font 2'
    'set cthick 6'
    'set xlopts 1 5 0.14'
    'set ylopts 1 5 0.14'
    'set ccolor 1'
    'set map 1'
    'display hgt'
    'draw title Vorticity 700hPa and Geop.Height 200hPa-' ti''
  'printim Vort&Hgt200mb' ti '.gif gif x1200 y1000 white'
    ti = ti + 5
ENDWHILE
say


 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20070504/5b1a1d90/attachment.html 


More information about the gradsusr mailing list