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,'new york',times,serif;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,'new york',times,serif;font-size:24px"><span style="font-size:13px">count_time=2001</span></div>
<div style="font-family:tahoma,'new york',times,serif;font-size:24px"><span style="font-size:13px">while (count_time <=2011)</span></div><div style="font-family:tahoma,'new york',times,serif;font-size:24px">
<span style="font-size:13px">'c'</span></div><div style="font-family:tahoma,'new york',times,serif;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,'new york',times,serif;font-size:13px">'d anom'</div><div style="font-family:tahoma,'new york',times,serif;font-size:13px">'printim OLRanom' count_time '.jpg'</div>
<div style="font-family:tahoma,'new york',times,serif;font-size:13px">count_time=count_time+1</div><div style="font-family:tahoma,'new york',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 'c'.</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"><<a href="mailto:theregoesthecat@yahoo.co.uk" target="_blank">theregoesthecat@yahoo.co.uk</a>></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">'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 href="http://olr.day.mean.nc" target="_blank">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> </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 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>