1NCWA(1) General Commands Manual NCWA(1)
2
3
4
6 ncwa - netCDF Weighted Averager
7
9 ncwa [-A] [-a dim[,...]] [-C] [-c] [-D dbg] [-d dim,[ min][,[ max]]]
10 [-F] [-h] [-I] [-l path] [-M val] [-m mask] [-N] [-n] [-O] [-o condi‐
11 tion] [-p path] [-R] [-r] [-v var[,...]] [-W] [-w weight] [-x] [-y
12 op_typ] input-file output-file
13
15 ncwa averages variables in a single file over arbitrary dimensions,
16 with options to specify weights, masks, and normalization. The default
17 behavior of ncwa is to arithmetically average every numerical variable
18 over all dimensions and produce a scalar result. To average variables
19 over only a subset of their dimensions, specify these dimensions in a
20 comma-separated list following -a, e.g., -a time,lat,lon. As with all
21 arithmetic operators, the operation may be restricted to an arbitrary
22 hypserslab by employing the -d option ncwa also handles values matching
23 the variable's missing_value attribute correctly. Moreover, ncwa
24 understands how to manipulate user-specified weights, masks, and nor‐
25 malization options. With these options, ncwa can compute sophisticated
26 averages (and integrals) from the command line.
27
28 mask and weight, if specified, are broadcast to conform to the vari‐
29 ables being averaged. The rank of variables is reduced by the number
30 of dimensions which they are averaged over. Thus arrays which are one
31 dimensional in the input-file and are averaged by ncwa appear in the
32 output-file as scalars. This allows the user to infer which dimensions
33 may have been averaged. Note that that it is impossible for ncwa to
34 make make a weight or mask of rank W conform to a var of rank V if W >
35 V. This situation often arises when coordinate variables (which, by
36 definition, are one dimensional) are weighted and averaged. ncwa
37 assumes you know this is impossible and so ncwa does not attempt to
38 broadcast weight or mask to conform to var in this case, nor does ncwa
39 print a warning message telling you this, because it is so common.
40 Specifying dbg > 2 does cause ncwa to emit warnings in these situa‐
41 tions, however.
42
43 Non-coordinate variables are always masked and weighted if specified.
44 Coordinate variables, however, may be treated specially. By default,
45 an averaged coordinate variable, e.g., latitude, appears in output-file
46 averaged the same way as any other variable containing an averaged
47 dimension. In other words, by default ncwa weights and masks coordi‐
48 nate variables like all other variables. This design decision was
49 intended to be helpful but for some applications it may be preferable
50 not to weight or mask coordinate variables just like all other vari‐
51 ables. Consider the following arguments to ncwa: “-a latitude -w
52 lat_wgt -d latitude,0.,90.” where lat_wgt is a weight in the latitude
53 dimension. Since, by default ncwa weights coordinate variables, the
54 value of latitude in the output-file depends on the weights in lat_wgt
55 and is not likely to be 45.---the midpoint latitude of the hyperslab.
56 Option -I overrides this default behavior and causes ncwa not to weight
57 or mask coordinate variables. In the above case, this causes the value
58 of latitude in the output-file to be 45.---which is a somewhat appeal‐
59 ing result. Thus, -I specifies simple arithmetic averages for the
60 coordinate variables. In the case of latitude, -I specifies that you
61 prefer to archive the central latitude of the hyperslab over which
62 variables were averaged rather than the area weighted centroid of the
63 hyperslab. Note that the default behavior of ( -I) changed on
64 1998/12/01---before this date the default was not to weight or mask
65 coordinate variables. The mathematical definition of operations
66 involving rank reduction is given above.
67
68
70 NCO manual pages written by Charlie Zender and Brian Mays.
71
72
74 Report bugs to <http://sf.net/bugs/?group_id=3331>.
75
76
78 Copyright © 1995-2004 Charlie Zender
79 This is free software; see the source for copying conditions. There is
80 NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
81 PURPOSE.
82
83
85 The full documentation for NCO is maintained as a Texinfo manual called
86 the NCO User's Guide. Because NCO is mathematical in nature, the docu‐
87 mentation includes TeX-intensive portions not viewable on character-
88 based displays. Hence the only complete and authoritative versions of
89 the NCO User's Guide are the PDF (recommended), DVI, and Postscript
90 versions at <http://nco.sf.net/nco.pdf>, <http://nco.sf.net/nco.dvi>,
91 and <http://nco.sf.net/nco.ps>, respectively. HTML and XML versions
92 are available at <http://nco.sf.net/nco.html> and
93 <http://nco.sf.net/nco.xml>, respectively.
94
95 If the info and NCO programs are properly installed at your site, the
96 command
97
98 info nco
99
100 should give you access to the complete manual, except for the TeX-
101 intensive portions.
102
103
105 The NCO homepage at <http://nco.sf.net> contains more information.
106
107
108
109 NCWA(1)