1NCWA(1)                     General Commands Manual                    NCWA(1)
2
3
4

NAME

6       ncwa - netCDF Weighted Averager
7

SYNTAX

9       ncwa  [-3] [-4] [-5] [-6] [-7] [-A] [-a dim[,...]]  [-B mask_cond] [-b]
10       [--bfr sz_byt][-C][-c]  [--cmp  cmp_sng]  [--cnk_byt  sz_byt][--cnk_csh
11       sz_byt][--cnk_dmn   nm,sz_lmn]   [--cnk_map   map]  [--cnk_min  sz_byt]
12       [--cnk_plc plc] [--cnk_scl sz_lmn][-D dbg_lvl] [-d dim,[ min][,[ max]]]
13       [--dbl|flt]  [-F]  [--fl_fmt=fmt]  [-G  gpe_dsc] [-g grp[,...]]  [--glb
14       att_name= att_val]] [-H] [-h]  [--hdf]  [--hdr_pad  sz_byt][--hpss_try]
15       [-I]  [-L  dfl_lvl][-l  path]  [-M  val]  [-m mask] [-N] [--no_cll_msr]
16       [--no_cll_mth] [--no_frm_trm] [--no_tmp_fl] [-O] [-o  output-file]  [-p
17       path]  [--ppc  var1[,  var2[,...]]=  prc]]  [-R]  [-r]  [--ram_all] [-T
18       mask_comp] [-t thr_nbr] [--uio] [--unn]  [-v  var[,...]]   [-w  weight]
19       [-x] [-y op_typ] input-file output-file
20

DESCRIPTION

22       ncwa  averages  variables  in  a single file over arbitrary dimensions,
23       with options to specify weights, masks, and normalization.  The default
24       behavior  of ncwa is to arithmetically average every numerical variable
25       over all dimensions and produce a scalar result.  To average  variables
26       over  only  a subset of their dimensions, specify these dimensions in a
27       comma-separated list following -a, e.g., -a time,lat,lon.  As with  all
28       arithmetic  operators,  the operation may be restricted to an arbitrary
29       hypserslab by employing the -d option ncwa also handles values matching
30       the  variable's  _FillValue attribute correctly.  Moreover, ncwa under‐
31       stands how to manipulate user-specified weights, masks, and  normaliza‐
32       tion options.  With these options, ncwa can compute sophisticated aver‐
33       ages (and integrals) from the command line.
34
35       mask and weight, if specified, are broadcast to conform  to  the  vari‐
36       ables  being  averaged.  The rank of variables is reduced by the number
37       of dimensions which they are averaged over.  Thus arrays which are  one
38       dimensional  in  the  input-file and are averaged by ncwa appear in the
39       output-file as scalars.  This allows the user to infer which dimensions
40       may  have  been  averaged.  Note that that it is impossible for ncwa to
41       make make a weight or mask of rank W conform to a var of rank V if W  >
42       V.   This  situation  often arises when coordinate variables (which, by
43       definition, are one dimensional) are weighted and averaged.   ncwa  as‐
44       sumes  you  know  this  is  impossible  and so ncwa does not attempt to
45       broadcast weight or mask to conform to var in this case, nor does  ncwa
46       print  a  warning  message  telling  you this, because it is so common.
47       Specifying dbg > 2 does cause ncwa to emit  warnings  in  these  situa‐
48       tions, however.
49
50       Non-coordinate  variables  are always masked and weighted if specified.
51       Coordinate variables, however, may be treated specially.   By  default,
52       an averaged coordinate variable, e.g., latitude, appears in output-file
53       averaged the same way as any other variable containing an averaged  di‐
54       mension.   In other words, by default ncwa weights and masks coordinate
55       variables like all other variables.  This design decision was  intended
56       to  be  helpful  but  for some applications it may be preferable not to
57       weight or mask coordinate variables  just  like  all  other  variables.
58       Consider  the  following  arguments to ncwa: “-a latitude -w lat_wgt -d
59       latitude,0.,90.” where lat_wgt is a weight in the  latitude  dimension.
60       Since, by default ncwa weights coordinate variables, the value of lati‐
61       tude in the output-file depends on the weights in lat_wgt  and  is  not
62       likely  to  be 45.---the midpoint latitude of the hyperslab.  Option -I
63       overrides this default behavior and causes ncwa not to weight  or  mask
64       coordinate variables.  In the above case, this causes the value of lat‐
65       itude in the output-file to be 45.---which is a somewhat appealing  re‐
66       sult.  Thus, -I specifies simple arithmetic averages for the coordinate
67       variables.  In the case of latitude, -I specifies that  you  prefer  to
68       archive the central latitude of the hyperslab over which variables were
69       averaged rather than the area weighted centroid of the hyperslab.  Note
70       that  the default behavior of ( -I) changed on 1998/12/01---before this
71       date the default was not to weight or mask coordinate  variables.   The
72       mathematical definition of operations involving rank reduction is given
73       above.
74
75

AUTHOR

77       NCO manual pages written by Charlie Zender and originally formatted  by
78       Brian Mays.
79
80

REPORTING BUGS

82       Report bugs to <http://sf.net/bugs/?group_id=3331>.
83
84
86       Copyright © 1995-present Charlie Zender
87       This is free software; see the source for copying conditions.  There is
88       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
89       PURPOSE.
90
91

SEE ALSO

93       The full documentation for NCO is maintained as a Texinfo manual called
94       the NCO Users Guide.  Because NCO is mathematical in nature, the  docu‐
95       mentation  includes  TeX-intensive  portions not viewable on character-
96       based displays.  Hence the only complete and authoritative versions  of
97       the NCO Users Guide are the PDF (recommended), DVI, and Postscript ver‐
98       sions at <http://nco.sf.net/nco.pdf>, <http://nco.sf.net/nco.dvi>,  and
99       <http://nco.sf.net/nco.ps>,  respectively.   HTML  and XML versions are
100       available         at          <http://nco.sf.net/nco.html>          and
101       <http://nco.sf.net/nco.xml>, respectively.
102
103       If  the  info and NCO programs are properly installed at your site, the
104       command
105
106              info nco
107
108       should give you access to the complete manual, except for  the  TeX-in‐
109       tensive portions.
110
111       ncap2(1),   ncatted(1),   ncbo(1),   ncclimo(1),   nces(1),  ncecat(1),
112       ncflint(1), ncz2psx(1), ncks(1), nco(1), ncpdq(1), ncra(1),  ncrcat(1),
113       ncremap(1), ncrename(1), ncwa(1)
114
115

HOMEPAGE

117       The NCO homepage at <http://nco.sf.net> contains more information.
118
119
120
121                                                                       NCWA(1)
Impressum