reducing accumulated precipitation to hourly

Theo Carter thibidottwo at HOTMAIL.COM
Sat Aug 16 16:25:18 EDT 2008




Hi to all,I have just started using the WRF-ARW (after using WRF-NMM) and it outputs precip as an accumulated total through the forecast period.  I need to display in hourly amounts using grads. My display field (called by a menu button from the main script) outputs 10m wind along with SLP and precipitation every hour for 48 forecast hours.  The time is set to _x earlier on in the run script and I wrote the following: ####################################################function rain()# printing out the first hour's precipitationif _x = 1  'set gxout contour'  'set cthick 2'  'set cmin 0.3'  'set ccolor rainbow'  'd APCPsfc'  'set cthick 3'  'set ccolor 4'  'set cmax 0.0001'  'set cint 0.1'  'd APCPsfc'# printing out all the following hours precipitationelse  'define current = APCPsfc'  _x = _x - 1  'define last = APCPsfc'  _x = _x + 1  'define hourly = current-last'  'set gxout contour'  'set cthick 2'  'set cmin 0.3'  'set ccolor rainbow'  'd hourly'  'set cthick 3'  'set ccolor 4'  'set cmax 0.0001'  'set cint 0.1'  'd hourly'  'undefine last'  'undefine current'  'undefine hourly'endifreturn######################################I have been struggling with this for a week, and reading through the script writing section, it appears that one cannot attach new values to a 'global variable' such as _x. How then else are you able to step back one hour so that you can retrieve that data to subtract it from the current hour? Thanks for any help,Theo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080816/81ce9d87/attachment.html 


More information about the gradsusr mailing list