NCAP2(1) General Commands Manual NCAP2(1)NAME
ncap2 - netCDF Arithmetic Processor, Next Generation
SYNTAX
ncap2 [-3] [-4] [-6] [-A] [-C] [-c] [-D dbg] [-d dim,[ min][,[ max]]] [-F] [-f] [-h] [-l path] [-O] [-o output-file] [-p path] [-R] [-r]
[-S script-file][-s script][-t thr_nbr][-v var[,...]] input-file [ output-file ]
DESCRIPTION
ncap2 supercedes and is backwards-compatible with ncap which is now deprecated. Both operators arithmetically process netCDF files. The
primary ncap2 documentation is currently the sample script <http://nco.sf.net/ncap2.in> The remainder of this manpage is identical to the
ncap manpage.
The processing instructions are contained either in the NCO script file fl.nco or in a sequence of command line arguments. The options -s
(or long options --spt or --script) are used for in-line scripts and -S (or long options --fl_spt or --script-file) are used to provide the
filename where (usually multiple) scripting commands are pre-stored. ncap2 was written to perform arbitrary albebraic transformations of
data and archive the results as easily as possible. Missing values are treated correctly. The results of the algebraic manipulations are
called derived fields.
Unlike the other operators, ncap2 does not accept a list of variables to be operated on as an argument to -v. Rather, the -v switch takes
no arguments and indicates that ncap2 should output only user-defined variables. ncap2 does not accept or understand the -x switch.
EXAMPLES
Compute the square of variable T
ncap2 -s "T2=T*T" in.nc out.nc
AUTHOR
NCO manual pages written by Charlie Zender and Brian Mays.
REPORTING BUGS
Report bugs to <http://sf.net/bugs/?group_id=3331>.
COPYRIGHT
Copyright (C) 1995-2010 Charlie Zender
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for NCO is maintained as a Texinfo manual called the NCO User's Guide. Because NCO is mathematical in nature, the
documentation includes TeX-intensive portions not viewable on character-based displays. Hence the only complete and authoritative versions
of the NCO User's Guide are the PDF (recommended), DVI, and Postscript versions at <http://nco.sf.net/nco.pdf>,
<http://nco.sf.net/nco.dvi>, and <http://nco.sf.net/nco.ps>, respectively. HTML and XML versions are available at
<http://nco.sf.net/nco.html> and <http://nco.sf.net/nco.xml>, respectively.
If the info and NCO programs are properly installed at your site, the command
info nco
should give you access to the complete manual, except for the TeX-intensive portions.
HOMEPAGE
The NCO homepage at <http://nco.sf.net> contains more information.
NCAP2(1)
Check Out this Related Man Page
NCEA(1) General Commands Manual NCEA(1)NAME
ncea - netCDF Ensemble Averager
SYNTAX
ncea [-3] [-4] [-6] [-A] [-C] [-c] [-D dbg] [-d dim,[ min][,[ max]]] [-F] [-h] [-L dfl_lvl] [-l path] [-n loop] [-O] [-p path] [-R] [-r]
[-t thr_nbr] [-v var[,...]] [-X box] [-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. Each variable in the output-file will be the same size as the same variable in any one of the in the input-files,
and all input-files must be the same size. Whereas ncra only performs averages over the record dimension (e.g., time), and weights each
record in the record dimension evenly, ncea averages entire files, and weights each file evenly. All dimensions, including the record
dimension, are treated identically and preserved in the output-file.
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 experi-
ments, 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 assumes coordinate variable
are properties common to all of the experiments and so does not average them across files. Instead, ncea copies the values of the coordi-
nate variables from the first input file to the output file.
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. 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 hyper-
slab 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.
AUTHOR
NCO manual pages written by Charlie Zender and Brian Mays.
REPORTING BUGS
Report bugs to <http://sf.net/bugs/?group_id=3331>.
COPYRIGHT
Copyright (C) 1995-2010 Charlie Zender
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for NCO is maintained as a Texinfo manual called the NCO User's Guide. Because NCO is mathematical in nature, the
documentation includes TeX-intensive portions not viewable on character-based displays. Hence the only complete and authoritative versions
of the NCO User's Guide are the PDF (recommended), DVI, and Postscript versions at <http://nco.sf.net/nco.pdf>,
<http://nco.sf.net/nco.dvi>, and <http://nco.sf.net/nco.ps>, respectively. HTML and XML versions are available at
<http://nco.sf.net/nco.html> and <http://nco.sf.net/nco.xml>, respectively.
If the info and NCO programs are properly installed at your site, the command
info nco
should give you access to the complete manual, except for the TeX-intensive portions.
HOMEPAGE
The NCO homepage at <http://nco.sf.net> contains more information.
NCEA(1)