Re: Daily average

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Mon, 16 Mar 2009 11:13:26 -0600

Hi Brandon,

Uou can use runave_Wrap:
http://www.ncl.ucar.edu/Document/Functions/Contributed/runave_Wrap.shtml

; arr is dimensioned time x lat x lon, data starts at 00Z Jan 1st

arr_ra = runave_Wrap(arr(lat|:,lon|:,time|:),2,0)
delete(arr)
;grab every other timestep and reorder
finarr = arr_ra(time|0::2,lat|:,lon|:)
delete(arr_ra)

As far as writing to a netCDF file, there are two methods that you can
use as is shown here:
http://www.ncl.ucar.edu/Applications/o-netcdf.shtml

Assuming you are not writing a complex (= writing a large number of
variables) or large (approaching 2GB in size), the simpler Method 1
should suffice.

Good luck,
Adam

Brandon Fisel wrote:
> Hi NCL'ers
>
> I have a .nc file that contains 1 year worth of data (1 variable) and 2
> time steps for each day (i.e. 12z and 00z).
>
> I want to compute a daily average for each day of the year and have this
> output to a new .nc file. What is the best method of doing this?
>
>
> Brandon Fisel
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> 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
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 16 2009 - 11:13:26 MDT

This archive was generated by hypermail 2.2.0 : Wed Mar 18 2009 - 14:50:21 MDT