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?
http://www.ncl.ucar.edu/Document/Functions/Contributed/month_to_seasonN.shtml
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...

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.
http://www.ncl.ucar.edu/Document/Functions/Contributed/dim_avg_Wrap.shtml
Good luck,

Michel.Mesquita_at_bjerknes.uib.no 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:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

```--
--------------------------------------------------------------