[gradsusr] Display Day.

Chorley Weather weatherstu at chorleyweather.com
Sat May 23 07:11:49 EDT 2015


On 23-05-2015 11:20, Bill Reilly wrote:
> 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.
> 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
Hi Bill,

Thanks for the reply. The function doesn't seem to work with my script, 
is there some script I need to remove or alter to allow the function to 
work? And or is my script overriding the function somewhere?

Regards,
Stuart.
-- 
Chief Forecaster & Owner


More information about the gradsusr mailing list