Climatology Or Anomaly For A Particular Month

Suppose you have monthly data for precipitation between january 1970 and december 2000 and you need a monthly climatology of the period. In this case, all that has to be done is to average all januaries, all februaries, and so on.

Here's how you can do that:

ga-> set time jan70 dec70
ga-> define clim=ave(prec,t+0,time=dec2000,12)
ga-> modify seasonal clim

Let's go through each line so that you can understand what's going on.

Line.1 Time spans from january to december of your first year. Since you have monthly data, that means 12 months.

Line.2 Then you create a new variable, which will automatically be defined between jan70 and dec70, i.e., function ave() will be called once for each month. The use of t+0 as the start time takes care of automatically changing the start time for each month. The last 12 is the time step used to average. At the end we have:

clim(time=jan70) = ave of jan70, jan70+12mon, jan70+24mon, ..., jan00
clim(time=feb70) = ave of feb70, feb71, feb72, ..., feb00
clim(time=mar70) = ave of mar70, mar71, mar72, ..., mar00
...
clim(time=dec70) = ave of dec70, dec71, dec72, ..., dec00

Line.3 The last line only tells GrADS that clim is a seasonal variable. This means it is a 12 month climatology of some variable and GrADS will not care about the year.

Now if you want to plot the climatology or the anomaly for a particular month it's very easy. For instance, here's how to show the average July and the anomaly precipitation for July 1976:

ga-> set gxout shaded
ga-> set time jul76
ga-> display clim
ga-> set gxout contour
ga-> display prec-clim

Notice that you don't need to specify which month of the climatology should be used! Since it's a seasonal variable, GrADS will automatically take July, as defined by set time.

GrADS pages you should read:

set time
ave()
modify

Page last modified on May 26, 2015, at 05:37 PM
Powered by PmWiki