CalculatingClimatologyForEachSeason

Let's complicate things a bit (from previous session). 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

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