I use while to do loops in grads.  <a 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,&#39;new york&#39;,times,serif;font-size:24px">
<span style="font-size:13px">&#39;define OLRave=ave(olr,time=21jan2001,time=21Jan2011,365)&#39;<br></span></div><div style="font-family:tahoma,&#39;new york&#39;,times,serif;font-size:24px"><span style="font-size:13px">count_time=2001</span></div>
<div style="font-family:tahoma,&#39;new york&#39;,times,serif;font-size:24px"><span style="font-size:13px">while (count_time &lt;=2011)</span></div><div style="font-family:tahoma,&#39;new york&#39;,times,serif;font-size:24px">
<span style="font-size:13px">&#39;c&#39;</span></div><div style="font-family:tahoma,&#39;new york&#39;,times,serif;font-size:24px"><span style="font-size:13px">&#39;set time 21Jan&#39; count_time<br>&#39;define anom=olr-OLRave&#39;</span></div>
<div style="font-family:tahoma,&#39;new york&#39;,times,serif;font-size:13px">&#39;d anom&#39;</div><div style="font-family:tahoma,&#39;new york&#39;,times,serif;font-size:13px">&#39;printim OLRanom&#39; count_time &#39;.jpg&#39;</div>
<div style="font-family:tahoma,&#39;new york&#39;,times,serif;font-size:13px">count_time=count_time+1</div><div style="font-family:tahoma,&#39;new york&#39;,times,serif;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 &#39;c&#39;.</div>
<div><br></div><div>I hope this helps</div><div><br></div><div>-Tom</div><div><br></div><div><br><div class="gmail_quote">On Mon, Dec 10, 2012 at 2:04 PM, Khetsiwe Khumalo <span dir="ltr">&lt;<a href="mailto:theregoesthecat@yahoo.co.uk" target="_blank">theregoesthecat@yahoo.co.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_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">&#39;reinit&#39;<br>&#39;set
 display color white&#39;<br>&#39;c&#39;<br>&#39;set grads off&#39;<br>&#39;set grid off&#39;<br>&#39;set mpdset hires&#39;<br>&#39;set map 1 1 5&#39;<br>&#39;sdfopen F:\Research\Data\<a href="http://olr.day.mean.nc" target="_blank">olr.day.mean.nc</a>&#39;<br>
&#39;set lon 10 40&#39;<br>&#39;set lat -37 -20&#39;<br>&#39;set xlint 5&#39;<br>&#39;set ylint 5&#39;<br>&#39;define OLRave=ave(olr,time=21jan2001,time=21Jan2011,365)&#39;<br>&#39;set time 21Jan2011&#39;<br>&#39;define anom=olr-OLRave&#39;</span></div>
<div style="font-style:normal;font-size:13px;background-color:transparent;font-family:tahoma,new york,times,serif">&#39;d anom&#39;</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> </div><div>&quot;Every human being represents hands to work, and not just another mouth to feed. ...&quot;</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><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>