Re: daily mean

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed, 01 Mar 2006 09:37:44 -0700

Hi Sahana,

I would use the function runave:
http://www.ncl.ucar.edu/Document/Functions/Built-in/runave.shtml

arr is an array with dimensions time (365*12), lat (73), lon (144)

temp = runave(arr(lat|:,lon|:,time|:),4,0)
arr2 = arr(lat|:,lon|:,time|1::4) ; create new array to keep
                                        ; coord variable info
arr2 = (/ temp(:,:,1::4) /) ; grab the 1st timestep and then
                                ; every 4th timestep
delete(arr)
delete(temp)

 From the runave documentation:
If the number of weights is even, the filter's center falls between
series elements; in this case, the center is shifted one-half of a time
increment towards the latter element.

You need a 4 timestep running average, so the average of the four
timesteps will be placed in the 1st element, and then every 4th timestep
after that.

Good luck.
Adam

sahana_paul wrote:
> Hi,
> I have 6 hourly data for a month. I want to get daily mean of
> each day at each grid point. What is the function I can use.
>
> regards
>
> sahana
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 01 2006 - 09:37:44 MST

This archive was generated by hypermail 2.2.0 : Wed Mar 01 2006 - 10:21:43 MST