<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:10pt"><div><span>Thanks Thomas, that was very helpful.</span></div><div>&nbsp;</div><div>"Every human being represents hands to work, and not just another mouth to feed. ..."<br></div>  <div style="font-family: tahoma, new york, times, serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Thomas Robinson &lt;ter@hawaii.edu&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Khetsiwe Khumalo &lt;theregoesthecat@yahoo.co.uk&gt;; GrADS Users Forum &lt;gradsusr@gradsusr.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, 11 December 2012, 8:31<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [gradsusr] OLR daily anomaly for DJF<br>
 </font> </div> <br><div id="yiv2107539092">I use while to do loops in grads. &nbsp;<a rel="nofollow" target="_blank" href="http://www.iges.org/grads/gadoc/script.html#while">http://www.iges.org/grads/gadoc/script.html#while</a><div><br></div><div>Try this:<div><br></div><div><div style="font-family:tahoma,;font-size:24px;">
<span style="font-size:13px;">'define OLRave=ave(olr,time=21jan2001,time=21Jan2011,365)'<br></span></div><div style="font-family:tahoma,;font-size:24px;"><span style="font-size:13px;">count_time=2001</span></div>
<div style="font-family:tahoma,;font-size:24px;"><span style="font-size:13px;">while (count_time &lt;=2011)</span></div><div style="font-family:tahoma,;font-size:24px;">
<span style="font-size:13px;">'c'</span></div><div style="font-family:tahoma,;font-size:24px;"><span style="font-size:13px;">'set time 21Jan' count_time<br>'define anom=olr-OLRave'</span></div>
<div style="font-family:tahoma,;font-size:13px;">'d anom'</div><div style="font-family:tahoma,;font-size:13px;">'printim OLRanom' count_time '.jpg'</div>
<div style="font-family:tahoma,;font-size:13px;">count_time=count_time+1</div><div style="font-family:tahoma,;font-size:13px;">endwhile</div><div><br></div>I added a printim so you can get quick output to look at also, otherwise your images will be made and then they will be deleted by 'c'.</div>
<div><br></div><div>I hope this helps</div><div><br></div><div>-Tom</div><div><br></div><div><br><div class="yiv2107539092gmail_quote">On Mon, Dec 10, 2012 at 2:04 PM, Khetsiwe Khumalo <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:theregoesthecat@yahoo.co.uk" target="_blank" href="mailto:theregoesthecat@yahoo.co.uk">theregoesthecat@yahoo.co.uk</a>&gt;</span> wrote:<br>
<blockquote class="yiv2107539092gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-size:18pt;font-family:tahoma, new york, times, serif;"><div><span>Dear GrADS users,</span></div><div style="font-style:normal;font-size:24px;background-color:transparent;font-family:tahoma, new york, times, serif;">
<br><span></span></div><div style="font-style:normal;font-size:24px;background-color:transparent;font-family:tahoma, new york, times, serif;"><span>I am a novice in grads. Please I need help. I want to do olr daily anomaly for DJF season for 10years but i dont know how to do the looping in the script. Can anyone help me how to word the script so I do not have to do it for each day mannually. Currently my script look like this;<br>
</span></div><div style="font-style:normal;font-size:24px;background-color:transparent;font-family:tahoma, new york, times, serif;"><span style="font-size:13px;">'reinit'<br>'set
 display color white'<br>'c'<br>'set grads off'<br>'set grid off'<br>'set mpdset hires'<br>'set map 1 1 5'<br>'sdfopen F:\Research\Data\<a rel="nofollow" target="_blank" href="http://olr.day.mean.nc/">olr.day.mean.nc</a>'<br>
'set lon 10 40'<br>'set lat -37 -20'<br>'set xlint 5'<br>'set ylint 5'<br>'define OLRave=ave(olr,time=21jan2001,time=21Jan2011,365)'<br>'set time 21Jan2011'<br>'define anom=olr-OLRave'</span></div>
<div style="font-style:normal;font-size:13px;background-color:transparent;font-family:tahoma, new york, times, serif;">'d anom'</div><div style="font-style:normal;font-size:13px;background-color:transparent;font-family:tahoma, new york, times, serif;">
<br></div><div style="font-style:normal;font-size:13px;background-color:transparent;font-family:tahoma, new york, times, serif;">Thank you for your assistance.<br><span></span></div><div style="font-style:normal;font-size:24px;background-color:transparent;font-family:tahoma, new york, times, serif;">
<br><span></span></div><div style="font-style:normal;font-size:24px;background-color:transparent;font-family:tahoma, new york, times, serif;"><br><span></span></div><div style="font-style:normal;font-size:24px;background-color:transparent;font-family:tahoma, new york, times, serif;">
<br><span></span></div><div style="font-style:normal;font-size:24px;background-color:transparent;font-family:tahoma, new york, times, serif;"><span><br></span></div><div>&nbsp;</div><div>"Every human being represents hands to work, and not just another mouth to feed. ..."</div>
</div></div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a rel="nofollow" ymailto="mailto:gradsusr@gradsusr.org" target="_blank" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a rel="nofollow" target="_blank" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Tom Robinson<br>President - Graduate Student Organization <br>Graduate Student - Department of Meteorology<br>732-718-2323<br><br>
</div></div>
</div><br><br> </div> </div>  </div></body></html>