Next: , Previous: ncbo netCDF Binary Operator, Up: Operator Reference Manual


4.4 ncea netCDF Ensemble Averager

SYNTAX

     ncea [-3] [-4] [-6] [-A] [-C] [-c]
     [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_plc plc] [--cnk_scl sz]
     [-D dbg] [-d dim,[min][,[max][,[stride]]] [-F] [-h] [-L dfl_lvl] [-l path]
     [-n loop] [-O] [-o output-file] [-p path] [-R] [-r]
     [-t thr_nbr] [-v var[,...]] [-X ...] [-x] [-y op_typ]
     [input-files] [output-file]

DESCRIPTION

ncea performs gridpoint averages of variables across an arbitrary number (an ensemble) of input-files, with each file receiving an equal weight in the average. ncea averages entire files, and weights each file evenly. This is distinct from ncra, which only averages over the record dimension (e.g., time), and weights each record in the record dimension evenly,

Variables in the output-file are the same size as the variable in each of the input-files, and all input-files must be the same size. The only exception is that ncea allows files to differ in the record dimension size if the requested record hyperslab (see Hyperslabs) resolves to the same size for all files. ncea recomputes the record dimension hyperslab limits for each input file so that coordinate limits may be used to select equal length timeseries from unequal length files. This simplifies analysis of unequal length timeseries from simulation ensembles (e.g., the CMIP IPCC AR4 archive).

ncea always averages coordinate variables regardless of the arithmetic operation type performed on the non-coordinate variables. (see Operation Types). All dimensions, including the record dimension, are treated identically and preserved in the output-file.

See Averaging vs. Concatenating, for a description of the distinctions between the various averagers and concatenators. As a multi-file operator, ncea will read the list of input-files from stdin if they are not specified as positional arguments on the command line (see Large Numbers of Files).

The file is the logical unit of organization for the results of many scientific studies. Often one wishes to generate a file which is the gridpoint average of many separate files. This may be to reduce statistical noise by combining the results of a large number of experiments, or it may simply be a step in a procedure whose goal is to compute anomalies from a mean state. In any case, when one desires to generate a file whose properties are the mean of all the input files, then ncea is the operator to use.

ncea only allows coordinate variables to be processed by the linear average, minimum, and maximum operations. ncea will return the linear average of coordinates unless extrema are explicitly requested. Other requested operations (e.g., square-root, RMS) are applied only to non-coordinate variables. In these cases the linear average of the coordinate variable will be returned.

EXAMPLES

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 the ensemble average (mean) seasonal cycle. Here the numeric filename suffix denotes the experiment number (not the month):

     ncea 85_01.nc 85_02.nc 85_03.nc 85_04.nc 85_05.nc 85.nc
     ncea 85_0[1-5].nc 85.nc
     ncea -n 5,2,1 85_01.nc 85.nc

These three commands produce identical answers. See Specifying Input Files, for an explanation of the distinctions between these methods. The output file, 85.nc, is the same size as the inputs files. It contains 12 months of data (which might or might not be stored in the record dimension, depending on the input files), but each value in the output file is the average of the five values in the input files.

In the previous example, the user could have obtained the ensemble average values in a particular spatio-temporal region by adding a hyperslab argument to the command, e.g.,

     ncea -d time,0,2 -d lat,-23.5,23.5 85_??.nc 85.nc

In this case the output file would contain only three slices of data in the time dimension. These three slices are the average of the first three slices from the input files. Additionally, only data inside the tropics is included.