Provided by: nco_4.7.9-1_amd64

**NAME**

ncwa - netCDF Weighted Averager

**SYNTAX**

ncwa [-3] [-4] [-5] [-6] [-7] [-A] [-adim[,...]] [-Bmask_cond][-b] [--bfrsz_byt][-C][-c][--cnk_bytsz_byt][--cnk_cshsz_byt][--cnk_dmnnm,sz_lmn] [--cnk_mapmap] [--cnk_minsz_byt] [--cnk_plcplc] [--cnk_sclsz_lmn][-Ddbg_lvl] [-ddim,[min][,[max]]] [--dbl|flt] [-F] [--fl_fmt=fmt] [-Ggpe_dsc] [-ggrp[,...]] [--glbatt_name=att_val]] [-h] [--hdf] [--hdr_padsz_byt][--hpss_try][-I] [-Ldfl_lvl][-lpath] [-Mval] [-mmask] [-N] [--no_cll_msr] [--no_cll_mth] [--no_frm_trm] [--no_tmp_fl] [-O] [-ooutput-file] [-ppath] [--ppcvar1[,var2[,...]]=prc]] [-R] [-r] [--ram_all] [-Tmask_comp] [-tthr_nbr] [--unn] [-vvar[,...]] [-wweight] [-x] [-yop_typ]input-fileoutput-file

**DESCRIPTION**

ncwaaverages variables in a single file over arbitrary dimensions, with options to specify weights, masks, and normalization. The default behavior ofncwais to arithmetically average every numerical variable over all dimensions and produce a scalar result. To average variables over only a subset of their dimensions, specify these dimensions in a comma-separated list following-a, e.g.,-atime,lat,lon. As with all arithmetic operators, the operation may be restricted to an arbitrary hypserslab by employing the-doptionncwaalso handles values matching the variable's_FillValueattribute correctly. Moreover,ncwaunderstands how to manipulate user-specified weights, masks, and normalization options. With these options,ncwacan compute sophisticated averages (and integrals) from the command line.maskandweight, if specified, are broadcast to conform to the variables being averaged. The rank of variables is reduced by the number of dimensions which they are averaged over. Thus arrays which are one dimensional in theinput-fileand are averaged byncwaappear in theoutput-fileas scalars. This allows the user to infer which dimensions may have been averaged. Note that that it is impossible forncwato make make aweightormaskof rankWconform to avarof rankVifW>V. This situation often arises when coordinate variables (which, by definition, are one dimensional) are weighted and averaged.ncwaassumes you know this is impossible and soncwadoes not attempt to broadcastweightormaskto conform tovarin this case, nor doesncwaprint a warning message telling you this, because it is so common. Specifyingdbg>2does causencwato emit warnings in these situations, however. Non-coordinate variables are always masked and weighted if specified. Coordinate variables, however, may be treated specially. By default, an averaged coordinate variable, e.g.,latitude, appears inoutput-fileaveraged the same way as any other variable containing an averaged dimension. In other words, by defaultncwaweights and masks coordinate variables like all other variables. This design decision was intended to be helpful but for some applications it may be preferable not to weight or mask coordinate variables just like all other variables. Consider the following arguments toncwa: “-a latitude -w lat_wgt -d latitude,0.,90.” wherelat_wgtis a weight in thelatitudedimension. Since, by defaultncwaweights coordinate variables, the value oflatitudein theoutput-filedepends on the weights inlat_wgtand is not likely to be 45.---the midpoint latitude of the hyperslab. Option-Ioverrides this default behavior and causesncwanot to weight or mask coordinate variables. In the above case, this causes the value oflatitudein theoutput-fileto be 45.---which is a somewhat appealing result. Thus,-Ispecifies simple arithmetic averages for the coordinate variables. In the case of latitude,-Ispecifies that you prefer to archive the central latitude of the hyperslab over which variables were averaged rather than the area weighted centroid of the hyperslab. Note that the default behavior of (-I) changed on 1998/12/01---before this date the default was not to weight or mask coordinate variables. The mathematical definition of operations involving rank reduction is given above.

**AUTHOR**

NCOmanual pages written by Charlie Zender and originally formatted by Brian Mays.

**REPORTING** **BUGS**

Report bugs to <http://sf.net/bugs/?group_id=3331>.

**COPYRIGHT**

Copyright © 1995-2018 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.

**SEE** **ALSO**

The full documentation forNCOis maintained as a Texinfo manual called theNCOUsersGuide.BecauseNCOis mathematical in nature, the documentation includes TeX-intensive portions not viewable on character-based displays. Hence the only complete and authoritative versions of theNCOUsersGuideare 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 theinfoandNCOprograms are properly installed at your site, the commandinfoncoshould give you access to the complete manual, except for the TeX-intensive portions.ncap(1),ncap2(1),ncatted(1),ncbo(1),ncclimo(1),nces(1),ncecat(1),ncflint(1),ncks(1),nco(1),ncpdq(1),ncra(1),ncrcat(1),ncremap(1),ncrename(1),ncwa(1)

**HOMEPAGE**

TheNCOhomepage at <http://nco.sf.net> contains more information. NCWA(1)