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

NAME

6       ncra - netCDF Record Averager
7

SYNTAX

9       ncra  [-3]  [-4]  [-5]  [-6]  [-7]  [-A] [--bfr sz_byt] [-C] [-c] [--cb
10       y1,y2,m1,m2,tpd] [--cmp cmp_sng] [--cnk_byt sz_byt] [--cnk_csh  sz_byt]
11       [--cnk_dmn  nm,sz_lmn]  [--cnk_map  map]  [--cnk_min sz_byt] [--cnk_plc
12       plc]  [--cnk_scl  sz_lmn]  [-D  dbg_lvl]  [-d  dim,[  min][,[   max]][,
13       stride[[,[     subcycle[[,[     interleave]]]]]]    [--dbl|flt]    [-F]
14       [--fl_fmt=fmt] [-G gpe_dsc] [-g grp[,...]]  [--glb att_name=  att_val]]
15       [-h]  [--hdf]  [--hdr_pad  sz_byt]  [--hpss_try] [-L dfl_lvl] [-l path]
16       [--mro]  [--msa]   [-N]   [-n   loop]   [--no_cll_msr]   [--no_cll_mth]
17       [--no_frm_trm]  [--no_tmp_fl] [-O] [-p path] [--ppc var1[, var2[,...]]=
18       prc]] [--prm_int] [--prw wgt_arr] [-R] [-r] [--ram_all] [--rec_apn] [-t
19       thr_nbr]  [--uio]  [--unn]  [-v  var[,...]]  [-w wgt] [-X box] [-x] [-y
20       op_typ] input-files output-file
21

DESCRIPTION

23       ncra averages record variables across  an  arbitrary  number  of  input
24       files.   The  record dimension is retained as a degenerate (size 1) di‐
25       mension in the output variables.
26
27       Input files may vary in size, but each must have  a  record  dimension.
28       The record coordinate, if any, should be monotonic for (or else non-fa‐
29       tal warnings may be generated).  Hyperslabs  of  the  record  dimension
30       which  include more than one file are handled correctly.  ncra supports
31       the stride argument to the -d hyperslab option for the record dimension
32       only, stride is not supported for non-record dimensions.
33
34       ncra weights each record (e.g., time slice) in the input-files equally.
35       ncra does not attempt to see if, say, the time  coordinate  is  irregu‐
36       larly spaced and thus would require a weighted average in order to be a
37       true time average.
38

EXAMPLES

40       Average files 85.nc, 86.nc,  ...  89.nc along the record dimension, and
41       store the results in 8589.nc:
42              ncra 85.nc 86.nc 87.nc 88.nc 89.nc 8589.nc
43              ncra 8[56789].nc 8589.nc
44              ncra -n 5,2,1 85.nc 8589.nc
45       These three methods produce identical answers.
46
47       Assume  the files 85.nc, 86.nc,  ...  89.nc each contain a record coor‐
48       dinate time of length 12 defined such that the third  record  in  86.nc
49       contains  data  from  March  1986, etc.  NCO knows how to hyperslab the
50       record dimension across files.  Thus, to average  data  from  December,
51       1985 through February, 1986:
52              ncra -d time,11,13 85.nc 86.nc 87.nc 8512_8602.nc
53              ncra -F -d time,12,14 85.nc 86.nc 87.nc 8512_8602.nc
54       The  file  87.nc  is  superfluous, but does not cause an error.  The -F
55       turns on the Fortran (1-based) indexing convention.  The following uses
56       the stride option to average all the March temperature data from multi‐
57       ple input files into a single output file
58              ncra  -F  -d  time,3,,12  -v  temperature  85.nc   86.nc   87.nc
59              858687_03.nc
60
61       Assume the time coordinate is incrementally numbered such that January,
62       1985 = 1 and December, 1989 = 60.  Assuming ??   only  expands  to  the
63       five desired files, the following averages June, 1985--June, 1989:
64              ncra -d time,6.,54. ??.nc 8506_8906.nc
65
66

AUTHOR

68       NCO  manual pages written by Charlie Zender and originally formatted by
69       Brian Mays.
70
71

REPORTING BUGS

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

SEE ALSO

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

HOMEPAGE

108       The NCO homepage at <http://nco.sf.net> contains more information.
109
110
111
112                                                                       NCRA(1)
Impressum