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

NAME

6       ncwa - netCDF Weighted Averager
7

SYNTAX

9       ncwa  [-3] [-4] [-6] [-A] [-a dim[,...]]  [-B mask_cond] [-b] [-C] [-c]
10       [-D dbg] [-d dim,[ min][,[ max]]] [-F] [-h] [-I] [-L dfl_lvl][-l  path]
11       [-M  val]  [-m mask] [-N] [-O] [-o output-file] [-p path] [-R] [-r] [-T
12       mask_comp] [-t thr_nbr] [-v var[,...]]  [-w weight]  [-x]  [-y  op_typ]
13       input-file output-file
14

DESCRIPTION

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

AUTHOR

71       NCO manual pages written by Charlie Zender and Brian Mays.
72
73

REPORTING BUGS

75       Report bugs to <http://sf.net/bugs/?group_id=3331>.
76
77
79       Copyright © 1995-2010 Charlie Zender
80       This is free software; see the source for copying conditions.  There is
81       NO  warranty;  not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
82       PURPOSE.
83
84

SEE ALSO

86       The full documentation for NCO is maintained as a Texinfo manual called
87       the NCO User's Guide.  Because NCO is mathematical in nature, the docu‐
88       mentation includes TeX-intensive portions not  viewable  on  character-
89       based  displays.  Hence the only complete and authoritative versions of
90       the NCO User's Guide are the PDF  (recommended),  DVI,  and  Postscript
91       versions  at  <http://nco.sf.net/nco.pdf>, <http://nco.sf.net/nco.dvi>,
92       and <http://nco.sf.net/nco.ps>, respectively.  HTML  and  XML  versions
93       are       available       at      <http://nco.sf.net/nco.html>      and
94       <http://nco.sf.net/nco.xml>, respectively.
95
96       If the info and NCO programs are properly installed at your  site,  the
97       command
98
99              info nco
100
101       should  give  you  access  to  the complete manual, except for the TeX-
102       intensive portions.
103
104

HOMEPAGE

106       The NCO homepage at <http://nco.sf.net> contains more information.
107
108
109
110                                                                       NCWA(1)
Impressum