Re: DJF averaging

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu, 11 Jun 2009 14:24:32 -0600

Hi Michel,
When you say you are using the function month_to_month, do you mean you
are using the function month_to_seasonN?
As the documentation states, the time dimension must be divisible by 12,
and must start in January. Also, the first average (DJF year 0) is
actually the average of January and February year 0.

So, taking all of that into account, you want to compute the DJF average
from 1979-2008, and you want to take into account December 1978...

d = addfile("","r")
data = d->slp ; data will be dimensioned time x lat x lon

data_temp = month_to_seasonN(data,"DJF")
data_djf = data_temp(0,31:60,:,:) ; 31:60 = 1979-2007

You can make that more generic instead of coding in the 31:60 if you
wish, and that would probably be recommended.

Finally, if you want an overall DJF 1979-2007 mean, use dim_avg_Wrap to
average over the time dimension of data_djf.
Good luck,
Adam wrote:
> Hi everyone,
> I have a netcdf file with data from 1948 - 2009(march). I want to
> calculate the DJF average from 1978(9) to 2007.
> First, I need to slice the data for the period I am working with. But
> where should I start this slice if I use the function month_to_month
> in NCL? I know this function has to start from January.
> If I start from January 1978 do these values (January and February
> 1978) enter in the average calculation? And if I end the data in
> December 2008, does that December enter in the calculation? I assume
> they don't.
> I really appreciate your help!
> Kindest regards,
> Michel
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

Adam Phillips			   
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Thu Jun 11 2009 - 14:24:32 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 11 2009 - 14:54:54 MDT