[gradsusr] Display Day.

Chorley Weather weatherstu at chorleyweather.com
Sat May 23 05:29:49 EDT 2015


Hi guys,

Is there a way to add the 'day' in my display along with 'time & date' I 
already have? I've added my script here:

* Parse the arguments: date, hour
   if (args = '')
   prompt 'Enter forecast date (example, 20110717) --> '
   pull date
   prompt 'Enter forecast hour (example, 00 or 06 or 12 or 18) --> '
   pull hour
   else
   date = subwrd(args,1)
   hour  = subwrd(args,2)
   endif

'reinit'
'sdfopen 
http://nomads.ncep.noaa.gov:9090/dods/gfs_0p25/gfs'date'/gfs_0p25_'hour'z'

* Get info from the descriptor file
'q ctlinfo'
_ctl = result
_undef = getctl(undef)
_tdef = getctl(tdef)
_zdef = getctl(zdef)

maps = 82

* Get the Time axis info
tsize = subwrd(_tdef,2)
_t1 = 1       ;* 2nd half of timeseries
_t2 = 45
tsize = _t2 - _t1 + 1
'set t '_t1' '_t2
'q dims'
times  = sublin(result,5)
_time1 = subwrd(times,6)
_time2 = subwrd(times,8)
_tdim = _time1' '_time2

tincr = subwrd(_tdef,5)
_tdef = 'tdef 'tsize' linear '_time1' 'tincr

huh = subwrd(_tdef,4)


Many thanks,
Stuart.
-- 
Chief Forecaster & Owner


More information about the gradsusr mailing list