[gradsusr] Loop through dates

Saunders, Emily (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC] emily.saunders at nasa.gov
Tue May 28 17:37:43 EDT 2019


Hi all,

I am having trouble plotting each hourly average from my collection using a 'while' loop. Based on my current script I am able to plot each hour, but it is plotting the incorrect day. If I try to plot each hour for 5/7/2019 it will plot every time step based upon the date I have in my .ctl file, which is the following TDEF time 9000 LINEAR 00:30z10MAR2019 1hr.  I want to know how to plot the correct date when I run the grads script command: grads -lc 'Surface_NRT_hourly_location_map.gs surface mexico co no2 o3 pm25_rh35_gcc so2 20190507'. Thanks for your help in advance.

Here is an example of the script I am currently using:
count = 1
while (count <= 4)
'set dfile 1'
'set t 'count
'q time'
say result
hour=substr(result,8,5)
'set parea 1.0 9.5 0.6 8.0'
'set z 1'
'set lat 13 25'
'set lon -106 -88'
'define a = co*1.0e9'
say 'define a = co*1.0e9'
'set grid off'
'set mpdraw on'
'set mpdset hires'
*'set map auto'
'set mpt 2 1 1 3'
'set csmooth on'
'set gxout shaded'
*'/discover/nobackup/esaunde2/grads_scripts/color_bar_scripts/cujo 200 1600 200 r'
'd a'
count = count + 1
'c'
endwhile


Emily Saunders, PhD.
Senior Research Scientist
Global Modeling and Assimilation Office/SSAI
NASA Goddard Space Flight Center Bldg 33, Room B-227B
Code 610.1, Greenbelt, MD, 20771
Phone: +1-301-614-6532

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20190528/0a884e87/attachment.html>


More information about the gradsusr mailing list