Re: Daily average

From: Brandon Fisel <bjfisel_at_nyahnyahspammersnyahnyah>
Date: Mon, 16 Mar 2009 21:01:23 -0500

I have been able to successfully create a new .nc file with daily averages
using runave_Wrap.

However, can I import other variables from my in file to the new out file?
Since this is a met_em file, I will need to have XLONG_M and XLAT_M attached
to the new .nc file. The difference in the times from the in file (728) and
the times in the out file (364) are causing a problem.

I have tried the method described at
http://www.ncl.ucar.edu/Applications/method_2.shtml, but this calls a fatal
error.

Brandon Fisel

On Mon, Mar 16, 2009 at 12:13, Adam Phillips <asphilli_at_cgd.ucar.edu> wrote:

> 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 - 20:01:23 MDT

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