<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here is an example of the script I am currently using:<o:p></o:p></p>
<p class="MsoNormal">count = 1<o:p></o:p></p>
<p class="MsoNormal">while (count <= 4)<o:p></o:p></p>
<p class="MsoNormal">'set dfile 1'<o:p></o:p></p>
<p class="MsoNormal">'set t 'count<o:p></o:p></p>
<p class="MsoNormal">'q time'<o:p></o:p></p>
<p class="MsoNormal">say result<o:p></o:p></p>
<p class="MsoNormal">hour=substr(result,8,5)<o:p></o:p></p>
<p class="MsoNormal">'set parea 1.0 9.5 0.6 8.0'<o:p></o:p></p>
<p class="MsoNormal">'set z 1'<o:p></o:p></p>
<p class="MsoNormal">'set lat 13 25'<o:p></o:p></p>
<p class="MsoNormal">'set lon -106 -88'<o:p></o:p></p>
<p class="MsoNormal">'define a = co*1.0e9'<o:p></o:p></p>
<p class="MsoNormal">say 'define a = co*1.0e9'<o:p></o:p></p>
<p class="MsoNormal">'set grid off'<o:p></o:p></p>
<p class="MsoNormal">'set mpdraw on'<o:p></o:p></p>
<p class="MsoNormal">'set mpdset hires'<o:p></o:p></p>
<p class="MsoNormal">*'set map auto'<o:p></o:p></p>
<p class="MsoNormal">'set mpt 2 1 1 3'<o:p></o:p></p>
<p class="MsoNormal">'set csmooth on'<o:p></o:p></p>
<p class="MsoNormal">'set gxout shaded'<o:p></o:p></p>
<p class="MsoNormal">*'/discover/nobackup/esaunde2/grads_scripts/color_bar_scripts/cujo 200 1600 200 r'<o:p></o:p></p>
<p class="MsoNormal">'d a'<o:p></o:p></p>
<p class="MsoNormal">count = count + 1<o:p></o:p></p>
<p class="MsoNormal">'c'<o:p></o:p></p>
<p class="MsoNormal">endwhile<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Emily Saunders, PhD.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Senior Research Scientist<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Global Modeling and Assimilation Office/SSAI<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">NASA Goddard Space Flight Center Bldg 33, Room B-227B<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Code 610.1, Greenbelt, MD, 20771<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Phone: +1-301-614-6532<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>