[gradsusr] Display Day.

Bill Reilly bill_reilly at compuserve.com
Sat May 23 06:20:31 EDT 2015


Stuart:

'q time'
dayofweek = subwrd(result,8)
day = substr(result, 11,2)
month = substr(result, 13,3)
year = substr(result, 16,4)
hour = substr(result,8,2)

I hope this helps.

Bill

--

Bill Reilly
(+34) 686-110-748

bill at passageweather.com
www.passageweather.com

bill at brwebworks.com
www.brwebworks.com

On 5/23/2015 11:29 AM, Chorley Weather wrote:
> 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.




More information about the gradsusr mailing list