[gradsusr] How to extract / display the file time when using a template?

Bill Reilly bill_reilly at compuserve.com
Tue Jan 23 14:42:25 EST 2018


Bob:

Put this in your script:

'q time'
mapdayofweek = subwrd(result,8)
mapday = substr(result, 11,2)
mapmonth = substr(result, 13,3)
mapyear = substr(result, 16,4)
maphour = substr(result,8,2)

This is how I do it.

Bill

--

Bill Reilly

(+34) 686-110-748

bill at passageweather.com
www.passageweather.com

bill at brwebworks.com
www.brwebworks.com

On 23/01/2018 20:22, Bob Kuligowski - NOAA Federal wrote:
> All,
>
>     I'm using a template to create a loop of images for an entire 
> day.  I have the appropriate template settings in DSET, OPTIONS, and 
> TDEF of my .ctl file; e.g.,
>
>> DSET 
>> ^/data/smcd2/rainfall/yli/ABI/Evaluation/srcNewFixCof/outputNew/2018/022/RRR_GRABI2018022%h2%n2.nc
>> OPTIONS yrev template
>> DTYPE netcdf
>> UNDEF  -99
>> UNPACK scale_factor add_offset
>> TITLE Operational GOES-R QPE
>> XDEF 5424 LINEAR 1 1
>> YDEF 5424 LINEAR 1 1
>> ZDEF 1 LEVELS 1000
>> TDEF 96 LINEAR 00:00Z22JAN2018 15mn
>> VARS 1
>> RRQPE=>rr_v5y   1 y,x   RRQPE
>> ENDVARS
>     Everything displays just fine, BUT...I would like to be able to 
> display the hour and minute of each file in the image along with the 
> associated data field.  Is there a GrADS variable that will either 
> give me the value of TDEF associated with the that I can parse for 
> display, or at least the value of %h2 and %n2 associated with the time 
> period currently being displayed so I can create a time string to 
> append to the image display?  Thanks!
>
> Cheers,
>



More information about the gradsusr mailing list