[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #SVV-303876]: netcdf averaging



Hi Fereshteh,

> i have netcdf file which its variable has  (lon, lat, time) as dimension .
> it is 3 hourly data that now i want to do monthly averaging. for example in
> Matlab i use
> 
> 
> *sensible
> ='CS_sensible2_era_07.nc';sensible_jan=ncread(sensible,'sensible',[1 1
> 1],[inf inf 248]);*
> 
> to choose all January data and put them in sensible_jan..
> but i don't know how i can do averaging in sensible_jan to reach to one
> average value in whole domain in January.
> would you please help me

The easiest way to do this would be to use a command-line utility from
one of the third-party packages that support netCDF data, such as NCO 
(or NCL or CDO).  For NCO, one of the averager tools ncea or ncra 
would be appropriate.  

There may also be a simple way to do this in MATLAB, but we don't have 
access to MATLAB here, so we are not familiar with it.

  NCO Home Page:  http://nco.sourceforge.net/
  NCO User Guide: http://nco.sourceforge.net/nco.html

--Russ

  
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: SVV-303876
Department: Support netCDF
Priority: Normal
Status: Closed