[gradsusr] Fwd: Accumulated Rain (6 hourly data)

Lyndon Mark Olaguera olagueralyndonmark429 at gmail.com
Tue May 7 05:22:58 EDT 2013


Hello fellow GRAD user,

I have a problem in plotting the accumulated rain in grads.,
my data comes in 6 hourly...
my sample script is shown below.
the dates are:
08/06/2012/00
08/06/2012/06
08/06/2012/12
08/06/2012/08
08/07/2012/00
08/07/2012/06
08/07/2012/12
08/07/2012/18
08/08/2012/00
08/08/2012/06
08/08/2012/12
08/08/2012/18
08/09/2012/00
08/09/2012/06
08/09/2012/12
08/09/2012/18
08/10/2012/00

I want to plot the accumulated rain EVERY 6 HOUR but my script does not
ouput it correctly.Could anyone help me correct my script?
i'll appreciate any help.

thanks


'open surfnudge/surf.ctl'
'set display color white'
'clear'
'set gxout shaded'
'set mpdset hires'
'set lat  4   24'
'set lon  115 134'

prompt 'Max Time: '
pull Max_time
prompt 'Title Header: '
pull Title_header

Time_val=2
*Time_val=8
while(Time_val<=Max_time)
'set t 'Time_val
DateStr = subwrd(result,4)
'c'
*Every 3 hours for model output
'd rainc+rainnc-(rainc(t='Time_val-1')-rainnc(t='Time_val-1'))'
'draw title 'Title_header'\'DateStr
'cbarn'
'printim 'Title_header'_'DateStr'.png'
'c'
Time_val=Time_val+1
endwhile
'quit'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130507/28ab1345/attachment-0003.html 


More information about the gradsusr mailing list