[gradsusr] Trying to create a time series of anomalies from a seasonal average

Alec Joubert alecjoubert at gmail.com
Thu Jun 2 10:31:32 EDT 2011


Dear All

 

I am trying to create a time series of anomalies from a seasonal
climatology.

 

I am using CRU TS 3.1 data. The dimensions of the dataset are as follows:

File 1 : CRU TS 3.10 Precipitation

  Descriptor: cru_ts_3_10.1901.2009.pre.dat.nc

  Binary: cru_ts_3_10.1901.2009.pre.dat.nc

  Type = Gridded

  Xsize = 720  Ysize = 360  Zsize = 1  Tsize = 1308  Esize = 1

  Number of Variables = 1

     pre  0  t,y,x  precipitation

 

I have managed to calculate long-run monthly averages and convert these to a
climatology in order to calculate monthly anomalies from the long-run
average, based on a response from Brian Doty to a similar post (attached
below). Note he goes on to demonstrate a 'manual' approach to calculating
long-run seasonal averages. What I'd like to do is to calculate seasonal
averages in a similar fashion to the approach used below to calculate
long-run monthly averages, and then build a time-series of anomalies from
the long-run seasonal average, as is done below for monthly data.

 

Can anyone assist?

 

Thanks

 

Alec Joubert

_______________________________________________

Previous post showing calculation of monthly averages, anomalies from a
monthly average and seasonal average calculations:

 

Have you tried using the "modify" command to create seasonal averages?
 
http://grads.iges.org/grads/gadoc/gradcomdmodify.html
 
from above web site:
---
modify /varname type/
 
This command defines a climatological variable, which is
year-independent. /varname/ is a defined grid. There are two options for
/type/:
 
      |seasonal   |- For creating monthly or multi-monthly climatologies
      |diurnal    |- For creating climatologies over a time period less
      than a day
 
 
      Usage Notes
 
 
      Example
 
Say you have a 50-year timeseries of monthly mean sea surface
temperatures (a variable named sst with 600 time steps) and you want to
create a climatology and then look at the monthly anomalies. First, set
the time range for 1 to 12, to span a complete year. Second, define the
variable "sstclim" which will contain the January mean in the first time
step, the February mean in the second time set, etc. Then use 'modify'
to turn 'sstclim' into a climatological variable. This means that the
calendar year associated with 'sstclim' (the first year in the original
sst data set) becomes a wild card. Then you can define the anomaly by
subtracting the climatology from the original time series. The commands
are as follows:
 
'set t 1 12'
'define sstclim = ave(sst, t+0, t=600, 12)'
'modify sstclim seasonal'
'set t 1 last'
'define anom = sst - sstclim'
---
 
and from a Brian Doty email to the GrADS Listserv:
 
---
...
    set lon 0 360
    set lat -90 90
    set z 1
    set t 1 12
    define ozave = ave(ozone,t+0,t=144,12)
 
Now 'ozave' contains the seasonal mean for each month (the above assumes
the data starts with January).
 
Then, to display a seasonal mean -- for example, DJF:
 
   display (ozave(t=12)+ozave(t=1)+ozave(t=2))/3
 
or if you want to account for the lengths of the months (note that ave
does not do this by default when averaging monthly data):
 
   display (ozave(t=12)*31+ozave(t=1)*31+ozave(t=2)*28)/90
 
...Brian

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110602/e7ac9529/attachment-0003.html 


More information about the gradsusr mailing list