<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
Hi,
<br />just try:
<br /><font size="2">'d
rainc+rainnc-(rainc(t='Time_val</font><font size="2"><font size="2">'</font>-1)-rainnc(t='Time_val</font><font size="2"><font size="2">'</font>-1))'
<br /><font size="2">on<font size="2">c</font>e Time_val is a variable, and <font size="2">the number 1 is not.
<br />So, Time_val have to<font size="2"> be put between quotes, and the number 1, not.</font></font></font>
<br /></font>Hope this helps,
<br />Ricardo
<br />
<br /><font size="2"><b>On Tue, 7 May 2013 17:20:42 +0800, Lyndon Mark Olaguera wrote</b>
<br />>
Hello fellow GRAD user,
<br />>
<br />> I have a problem in plotting the
accumulated rain in grads.,
<br />> my data comes in 6 hourly...
<br />> my
sample script is shown below.
<br />>
the dates are:
<br />> 08/06/2012/00
<br />> 08/06/2012/06
<br />>
<br />>
08/06/2012/12
<br />> 08/06/2012/08
<br />> 08/07/2012/00
<br />>
08/07/2012/06
<br />> 08/07/2012/12
<br />> 08/07/2012/18
<br />>
08/08/2012/00
<br />> 08/08/2012/06
<br />> 08/08/2012/12
<br />>
08/08/2012/18
<br />>
08/09/2012/00
<br />> 08/09/2012/06
<br />> 08/09/2012/12
<br />>
08/09/2012/18
<br />> 08/10/2012/00
<br />>
<br />> I want to plot the
accumulated rain for each hour but my script does not ouput it correctly.Could
anyone help me correct my script?
<br />>
<br />> i'll appreciate any
help.
<br />>
<br />> thanks
<br />>
<br />> 'open
surfnudge/surf.ctl'
<br />> 'set display color white'
<br />>
'clear'
<br />> 'set gxout shaded'
<br />> 'set mpdset
hires'
<br />>
'set lat 4 24'
<br />> 'set lon 115 134'
<br />>
<br />>
prompt 'Max Time: '
<br />> pull Max_time
<br />> prompt 'Title
Header: '
<br />> pull Title_header
<br />>
<br />> Time_val=2
<br />>
*Time_val=8
<br />> while(Time_val<=Max_time)
<br />>
'set t 'Time_val
<br />> DateStr = subwrd(result,4)
<br />>
'c'
<br />> *Every 3 hours for model output
<br />> 'd
rainc+rainnc-(rainc(t='Time_val-1')-rainnc(t='Time_val-1'))'
<br />>
'draw title 'Title_header'\'DateStr
<br />>
'cbarn'
<br />> 'printim
'Title_header'_'DateStr'.png'
<br />> 'c'
<br />>
Time_val=Time_val+1
<br />> endwhile
<br />> 'quit'
<br />
<br />
<br />Ricardo
Hallak
<br />
<br />
Departamento de Ciências Atmosféricas (ACA)
<br />
Instituto de Astronomia, Geofísica e Ciências Atmosféricas (IAG)
<br />
Universidade de São Paulo (USP)
<br />
Rua do Matão, 1226 - Cidade Universitária - São Paulo SP 05508-900
<br />
Phone.: +55 (11) 3091-2850; 3091-4703
<br />
Fax: +55 (11) 3091-4714
<br />
<br />
</font>
</BODY>
</HTML>