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

Bob Kuligowski - NOAA Federal bob.kuligowski at noaa.gov
Tue Jan 23 15:22:01 EST 2018


Bill,

     Perfect; thanks a lot!

     (And Jeff, thanks for chiming in too!)

Cheers,
Bob
> 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,
>>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr


-- 
Bob Kuligowski, Ph.D.
Meteorologist
NOAA/NESDIS/Center for Satellite Applications and Research (STAR)

Mailing Address:
National Oceanic and Atmospheric Administration
NESDIS STAR/SMCD
Bob Kuligowski
NCWCP E/RA2
5830 University Research Court
2nd Floor, Office #2828
College Park, MD 20740-3818

Phone:  (301) 683-3593
Fax  :  (301) 683-3616

http://www.star.nesdis.noaa.gov/star/Kuligowski_B.php
http://www.star.nesdis.noaa.gov/smcd/emb/ff/index.php



More information about the gradsusr mailing list