ncecat(1) netCDF Ensemble Concatenator


ncecat [-3] [-4] [-6] [-7] [-A] [--bfr sz][-C][-c][--cnk_byt sz][--cnk_dmn nm,sz] [--cnk_map map] [--cnk_min sz] [--cnk_plc plc] [--cnk_scl sz][-D dbg_lvl] [-d dim,[ min][,[ max]]] [-F] [-G gpe_dsc] [-g grp[,...]] [--gag] [--glb att_name= att_val]] [-h] [--hdr_pad sz] [-L dfl_lvl] [-l path] [-M] [--mrd] [--msa] [-n loop] [--no_tmp_fl] [-O] [-p path] [--ppc var1[, var2[,...]]= prc]] [-R] [-r] [--ram_all] [-t thr_nbr] [-u ulm_nm] [--unn] [-v var[,...]] [-X box] [-x] input-files output-file


ncecat concatenates an arbitrary number of input files into a single output file. Input files are glued together by creating a record dimension in the output file. Input files must be the same size. Each input file is stored consecutively as a single record in the output file. Each variable (except coordinate variables) in each input file becomes one record in the same variable in the output file. Coordinate variables are not concatenated, they are instead simply copied from the first input file to the output-file. Thus, the size of the output file is the sum of the sizes of the input files.

Consider five realizations,,,... of 1985 predictions from the same climate model. Then ncecat 85?.nc glues the individual realizations together into the single file, If an input variable was dimensioned [ lat, lon], it will have dimensions [ record, lat, lon] in the output file. A restriction of ncecat is that the hyperslabs of the processed variables must be the same from file to file. Normally this means all the input files are the same size, and contain data on different realizations of the same variables.


Consider a model experiment which generated five realizations of one year of data, say 1985. You can imagine that the experimenter slightly perturbs the initial conditions of the problem before generating each new solution. Assume each file contains all twelve months (a seasonal cycle) of data and we want to produce a single file containing all the seasonal cycles. Here the numeric filename suffix denotes the experiment number (not the month):

ncecat 85_0[1-5].nc
ncecat -n 5,2,1
These three commands produce identical answers. The output file,, is five times the size as a single input-file. It contains 60 months of data (which might or might not be stored in the record dimension, depending on the input files).


NCO manual pages written by Charlie Zender and originally formatted by Brian Mays.


Report bugs to <>.


Copyright © 1995-2016 Charlie Zender
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


The NCO homepage at <> contains more information.