This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
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