[gradsusr] OLR daily anomaly for DJF
Thomas Robinson
ter at hawaii.edu
Mon Dec 10 19:31:18 EST 2012
I use while to do loops in grads.
http://www.iges.org/grads/gadoc/script.html#while
Try this:
'define OLRave=ave(olr,time=21jan2001,time=21Jan2011,365)'
count_time=2001
while (count_time <=2011)
'c'
'set time 21Jan' count_time
'define anom=olr-OLRave'
'd anom'
'printim OLRanom' count_time '.jpg'
count_time=count_time+1
endwhile
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'.
I hope this helps
-Tom
On Mon, Dec 10, 2012 at 2:04 PM, Khetsiwe Khumalo <
theregoesthecat at yahoo.co.uk> wrote:
> Dear GrADS users,
>
> 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;
> 'reinit'
> 'set display color white'
> 'c'
> 'set grads off'
> 'set grid off'
> 'set mpdset hires'
> 'set map 1 1 5'
> 'sdfopen F:\Research\Data\olr.day.mean.nc'
> 'set lon 10 40'
> 'set lat -37 -20'
> 'set xlint 5'
> 'set ylint 5'
> 'define OLRave=ave(olr,time=21jan2001,time=21Jan2011,365)'
> 'set time 21Jan2011'
> 'define anom=olr-OLRave'
> 'd anom'
>
> Thank you for your assistance.
>
>
>
>
>
> "Every human being represents hands to work, and not just another mouth to
> feed. ..."
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
Tom Robinson
President - Graduate Student Organization
Graduate Student - Department of Meteorology
732-718-2323
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20121210/6827135a/attachment-0003.html
More information about the gradsusr
mailing list