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

[netCDF #EWR-677749]: Merging netcdf files!

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.


  • Subject: [netCDF #EWR-677749]: Merging netcdf files!
  • Date: Mon, 13 Aug 2012 08:43:11 -0600

Hi,

> I have weather outputs from the WRF model that generates data at 6
> hourly time step. I am looking for ways to merge multiple netcdf files
> that have same variables but are for different time periods. Such as
> 1979Jan.nc, 1979Feb.nc, 1979Mar.nc. I would like to merge these files
> together with time component added in the file. I would appreciate your
> suggestions. Thanks!

I suggest installing the NCO (netCDF Operators) software, available from
sourceforge, and described here:

  http://www.unidata.ucar.edu/netcdf/software.html#NCO

In particular, the operators ncrcat and ncecat are designed for merging
netCDF data.  Also, if you're merging the files before computing averages,
NCO provides averaging operators that compute the averages without merging
first, for example ncra.

Other software that provides similar capabilities includes NCL and CDO:

  http://www.unidata.ucar.edu/netcdf/software.html#NCL
  http://www.unidata.ucar.edu/netcdf/software.html#CDO

--Russ

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



Ticket Details
===================
Ticket ID: EWR-677749
Department: Support netCDF
Priority: Normal
Status: Closed