<div dir="ltr">Jason,<div>What you added, in itself, is okay. Please include the entire portion of the script that generated the error so others can evaluate the cause.</div><div>Stephen</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 11, 2015 at 6:09 AM, <span dir="ltr"><<a href="mailto:webmaster@solargrafix.com" target="_blank">webmaster@solargrafix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<u></u>
<u></u>
<u></u>
<u></u>
<u></u>
<u></u>
<u></u>
<div lang="EN-US" link="blue" vlink="blue" style="word-wrap:break-word">
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">I added this, and received a syntax error for the line: fmt=‘%02.0f’<u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">
<hr size="2" width="100%" align="center">
</span></font></div>
<p class="MsoNormal"><b><font face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma;font-weight:bold">From:</span></font></b><font face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma"> Jennifer Adams
[mailto:<a href="mailto:jma@cola.iges.org" target="_blank">jma@cola.iges.org</a>] <br>
<b><span style="font-weight:bold">Sent:</span></b> Tuesday, February 10, 2015
8:33 AM<br>
<b><span style="font-weight:bold">To:</span></b> <a href="mailto:webmaster@solargrafix.com" target="_blank">webmaster@solargrafix.com</a>; <u></u>GrADS Users Forum<u></u><br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [gradsusr] save image
for each time step</span></font><u></u><u></u></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Hi, Jason — <u></u><u></u></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Add these to your script: <u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">fmt=‘%02.0f’<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">cc=math_format(fmt,count)<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">‘printim GFS-‘cc’.png x1280 y960’<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">—Jennifer<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
<div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">On Feb 10, 2015, at 8:30 AM, <a href="mailto:webmaster@solargrafix.com" target="_blank">webmaster@solargrafix.com</a>
wrote:<u></u><u></u></span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br>
<br>
<u></u><u></u></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Hello,<br>
<br>
Thank you all for your help. I finally got it working. I had the
cases<br>
wrong on a couple of the instances of 'count' . Once I made them all the<br>
same, it worked.<br>
<br>
Here is another quick question, when I save the image, I use the following<br>
format:<br>
<br>
'printim GFS-'count'.png x1280 y960'<br>
<br>
This saves an image with the file name: GFS-1.png<br>
<br>
What do I need to do to get it to save with a double digit count as follows:<br>
GFS-01.png<br>
<br>
Thanks again for your assistance.<br>
<br>
Jason<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: Howard Staines [<a href="mailto:metris@xtra.co.nz" target="_blank">mailto:metris@xtra.co.nz</a>]
<br>
Sent: Monday, February 09, 2015 10:15 PM<br>
To: <a href="mailto:webmaster@solargrafix.com" target="_blank">webmaster@solargrafix.com</a><br>
Subject: RE: [gradsusr] save image for each time step<br>
<br>
Hi <br>
<br>
Could you send me the section of the script just the loop start and finish<br>
ie/<br>
<br>
While ...<br>
And <br>
<br>
Endwhile<br>
<br>
Howard :)<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:webmaster@solargrafix.com" target="_blank">webmaster@solargrafix.com</a>
[<a href="mailto:webmaster@solargrafix.com" target="_blank">mailto:webmaster@solargrafix.com</a>]
<br>
Sent: Tuesday, 10 February 2015 4:10 p.m.<br>
To: <a href="mailto:info@metris.co.nz" target="_blank">info@metris.co.nz</a>; <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
Subject: RE: [gradsusr] save image for each time step<br>
<br>
Hello,<br>
<br>
I tried that, and now I get an error that says "Set error, missing or<br>
invalid arguments for T option, then is starts looping the first timestep.
<br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: Howard Staines [<a href="mailto:metris@xtra.co.nz" target="_blank">mailto:metris@xtra.co.nz</a>]<br>
Sent: Monday, February 09, 2015 6:14 PM<br>
To: <a href="mailto:webmaster@solargrafix.com" target="_blank">webmaster@solargrafix.com</a><br>
Subject: RE: [gradsusr] save image for each time step<br>
<br>
Hi<br>
After the while<br>
'Set t 'count<br>
<br>
....<br>
Then the next time around the time step will increase ( count = count +1)<br>
ie/ one time step advanced)<br>
<br>
Should work then<br>
<br>
Cheers Howard<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:webmaster@solargrafix.com" target="_blank">webmaster@solargrafix.com</a>
[<a href="mailto:webmaster@solargrafix.com" target="_blank">mailto:webmaster@solargrafix.com</a>]<br>
Sent: Tuesday, 10 February 2015 12:08 p.m.<br>
To: <a href="mailto:info@metris.co.nz" target="_blank">info@metris.co.nz</a>; '<u></u>GrADS Users Forum<u></u>'<br>
Subject: RE: [gradsusr] save image for each time step<br>
<br>
Hi,<br>
<br>
I almost have this working, but it does not advance through the timesteps.<br>
It loads the first timestep, saves the image, then clears the screen, and<br>
then loads the first timestep again, saves it, and so on.<br>
<br>
Below is the script I set up to test this, so perhaps you can see where I<br>
went wrong. Thanks!<br>
<br>
<br>
<br>
<br>
'set datawarn off'<br>
'sdfopen<br>
<a href="http://nomads.ncep.noaa.gov:80/dods/gfs_0p25/gfs20150209/gfs_0p25_12z'" target="_blank">http://nomads.ncep.noaa.gov:80/dods/gfs_0p25/gfs20150209/gfs_0p25_12z'</a><br>
<br>
Count = 1<br>
while (count > 80)<br>
<br>
'set t '1<br>
<br>
'set lat 35 50'<br>
'set lon -95 -65'<br>
'set mproj scaled'<br>
'set display color white'<br>
'set map 1'<br>
'set mpdset hires'<br>
'set mpdraw on'<br>
'set timelab off'<br>
'set grid off'<br>
'set font 0'<br>
'set strsiz .1'<br>
<br>
'q time'<br>
timestr=subwrd(result, 3)<br>
weekday1=subwrd(result,6)<br>
day=substr(result, 11, 9)<br>
hr=substr(result, 8, 2)<br>
'draw string 9.1 0.2 'day' 'hr z<br>
'draw string 8.7 0.2 'weekday1<br>
<br>
'set csmooth on'<br>
'set cterp on'<br>
'set gxout contour'<br>
'set clopts -1 -1 0.06'<br>
'set cmin 900'<br>
'set cmax 1100'<br>
'color 900 1100 2 -gxout contour -kind<br>
purple->darkblue->darkgreen->orange->red->darkred' <br>
'set cthick 2'<br>
'd smth9(prmslmsl/100)'<br>
<br>
'printim test'day'-'hr'z.png x1280 y960'<br>
<br>
Count = Count + 1<br>
'c'<br>
endwhile<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>]<br>
On Behalf Of Howard Staines<br>
Sent: Monday, February 09, 2015 1:44 PM<br>
To: <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
Subject: [gradsusr] Re image for each time step<br>
<br>
<br>
Print many variables for a time series (step through time series)<br>
<br>
Count = 1<br>
While (Count> 120 <span> </span>final
time step<br>
<br>
'set t 'count<span> </span>ie/
first time step<br>
<br>
'set stuff lat lon maps etc<br>
<br>
'd apcpsfc' <span> </span>display
variable<br>
'd t2m'<span> </span>display
another variable<br>
'd mslp'<span> </span>etc<br>
<br>
Print image<br>
'gxprint image_'Count .png x1200 y800'<br>
<br>
Count = Count + 1<span> </span>next
time step<br>
'c'<span> </span>clear
display<br>
Endwhile<span> </span>loops
between While and<br>
endwhile to print individual time steps<span> </span><br>
<br>
<br>
kind regards <br>
<br>
Howard Staines<br>
Metris New <u></u>Zealand<u></u> <br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><u></u><u></u></span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
<span style="text-align:-webkit-auto;word-spacing:0px"><span>
<div>
<div>
<p class="MsoNormal"><font size="1" color="black" face="Helvetica"><span style="font-size:9.0pt;font-family:Helvetica;color:black">--<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="1" color="black" face="Helvetica"><span style="font-size:9.0pt;font-family:Helvetica;color:black">Jennifer
M. Adams<br>
Center for Ocean-Land-Atmosphere Studies (COLA)<br>
111 Research Hall, Mail Stop 2B3<br>
<u></u><u></u>George<u></u> <u></u>Mason<u></u> <u></u>University<u></u><u></u><br>
<u></u><u></u>4400 University Drive<u></u><u></u><br>
<u></u><u></u>Fairfax<u></u>, <u></u>VA<u></u>
<u></u>22030<u></u><u></u> <u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="1" color="black" face="Helvetica"><span style="font-size:9.0pt;font-family:Helvetica;color:black"><u></u> <u></u></span></font></p>
</div>
<p class="MsoNormal"><font size="1" color="black" face="Helvetica"><span style="font-size:9.0pt;font-family:Helvetica;color:black"><br>
<br>
</span></font><u></u><u></u></p>
</div>
</span></span>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
</div>
</div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>