Monthly data

Climatology or anomaly for a particular month

Supose you have monthly data for precipitation between january 1970 and december 2000 and you need a monthly climotology 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.

Calculating climatology for each season

Let's complicate things a bit. Now you need the climatology for each season. You can do that by:

ga-> summer=(clim(t=12)+clim(t= 1)+clim(t= 2))/3. ga-> autumn=(clim(t= 3)+clim(t= 4)+clim(t= 5))/3. ga-> winter=(clim(t= 6)+clim(t= 7)+clim(t= 8))/3. ga-> spring=(clim(t= 9)+clim(t=10)+clim(t=11))/3.

Or you can try the following:

ga-> set t 1 12 ga-> seasons=ave(clim,t+0,t+2)

It is easier and you have not only summer/autumn/winter/spring, but all 3-months periods:

seasons(t=1) = ave of clim(jan), clim(feb) and clim(mar) seasons(t=2) = ave of clim(feb), clim(mar) and clim(apr) ... seasons(t=12) = ave of clim(dec), clim(jan) and clim(feb)

GrADS pages you should read:

set time
ave()
modify
Hosted by www.Geocities.ws

1