1BLOCKMEAN(1) GMT BLOCKMEAN(1)
2
3
4
6 blockmean - Block average (x, y, z) data tables by L2 norm
7
9 blockmean [ table ]
10 -Iincrement
11 -Rregion [ -C ] [ -E[p] ] [ -S[m|n|s|w] ] [ -V[level] ] [
12 -W[i|o][+s] ] [ -bbinary ] [ -dnodata ] [ -eregexp ] [ -fflags ] [
13 -hheaders ] [ -iflags ] [ -oflags ] [ -r ] [ -:[i|o] ]
14
15 Note: No space is allowed between the option flag and the associated
16 arguments.
17
19 blockmean reads arbitrarily located (x,y,z) triples [or optionally
20 weighted quadruples (x,y,z,w)] from standard input [or table] and
21 writes to standard output a mean position and value for every non-empty
22 block in a grid region defined by the -R and -I arguments. Either
23 blockmean, blockmedian, or blockmode should be used as a pre-processor
24 before running surface to avoid aliasing short wavelengths. These rou‐
25 tines are also generally useful for decimating or averaging (x,y,z)
26 data. You can modify the precision of the output format by editing the
27 FORMAT_FLOAT_OUT parameter in your gmt.conf file, or you may choose
28 binary input and/or output to avoid loss of precision.
29
31 -Ixinc[unit][+e|n][/yinc[unit][+e|n]]
32 x_inc [and optionally y_inc] is the grid spacing. Optionally,
33 append a suffix modifier. Geographical (degrees) coordinates:
34 Append m to indicate arc minutes or s to indicate arc seconds.
35 If one of the units e, f, k, M, n or u is appended instead, the
36 increment is assumed to be given in meter, foot, km, Mile, nau‐
37 tical mile or US survey foot, respectively, and will be con‐
38 verted to the equivalent degrees longitude at the middle lati‐
39 tude of the region (the conversion depends on PROJ_ELLIPSOID).
40 If y_inc is given but set to 0 it will be reset equal to x_inc;
41 otherwise it will be converted to degrees latitude. All coordi‐
42 nates: If +e is appended then the corresponding max x (east) or
43 y (north) may be slightly adjusted to fit exactly the given
44 increment [by default the increment may be adjusted slightly to
45 fit the given domain]. Finally, instead of giving an increment
46 you may specify the number of nodes desired by appending +n to
47 the supplied integer argument; the increment is then recalcu‐
48 lated from the number of nodes and the domain. The resulting
49 increment value depends on whether you have selected a grid‐
50 line-registered or pixel-registered grid; see App-file-formats
51 for details. Note: if -Rgrdfile is used then the grid spacing
52 has already been initialized; use -I to override the values.
53
54 -Rxmin/xmax/ymin/ymax[+r][+uunit] (more ...)
55 Specify the region of interest.
56
58 table 3 [or 4, see -W] column ASCII data table file(s) [or binary, see
59 -bi] holding (x,y,z[,w]) data values. [w] is an optional weight
60 for the data. If no file is specified, blockmean will read from
61 standard input.
62
63 -C Use the center of the block as the output location [Default uses
64 the mean location].
65
66 -E[p] Provide Extended report which includes s (the standard deviation
67 about the mean), l, the lowest value, and h, the high value for
68 each block. Output order becomes x,y,z,s,l,h[,w]. [Default out‐
69 puts x,y,z[,w]. See -W for w output. If -Ep is used we assume
70 weights are 1/(sigma squared) and s becomes the propagated error
71 of the mean.
72
73 -S[m|n|s|w]
74 Use -Sn to report the number of points inside each block, -Ss to
75 report the sum of all z-values inside a block, -Sw to report the
76 sum of weights [Default (or -Sm reports mean value].
77
78 -V[level] (more ...)
79 Select verbosity level [c].
80
81 -W[i|o][+s]
82 Weighted modifier[s]. Unweighted input and output have 3 columns
83 x,y,z; Weighted i/o has 4 columns x,y,z,w. Weights can be used
84 in input to construct weighted mean values for each block.
85 Weight sums can be reported in output for later combining sev‐
86 eral runs, etc. Use -W for weighted i/o, -Wi for weighted input
87 only, and -Wo for weighted output only. [Default uses unweighted
88 i/o]. If your weights are actually uncertainties (one sigma)
89 then append +s and we compute weight = 1/sigma.
90
91 -bi[ncols][t] (more ...)
92 Select native binary input. [Default is 3 (or 4 if -Wi is set)].
93
94 -bo[ncols][type] (more ...)
95 Select native binary output. [Default is 3 (or 4 if -Wo is
96 set)]. -E adds 3 additional columns. The -Sn option will work
97 with only 2 input columns (x and y).
98
99 -d[i|o]nodata (more ...)
100 Replace input columns that equal nodata with NaN and do the
101 reverse on output.
102
103 -e[~]"pattern" | -e[~]/regexp/[i] (more ...)
104 Only accept data records that match the given pattern.
105
106 -f[i|o]colinfo (more ...)
107 Specify data types of input and/or output columns.
108
109 -h[i|o][n][+c][+d][+rremark][+rtitle] (more ...)
110 Skip or produce header record(s).
111
112 -icols[+l][+sscale][+ooffset][,...] (more ...)
113 Select input columns and transformations (0 is first column).
114
115 -ocols[,...] (more ...)
116 Select output columns (0 is first column).
117
118 -r (more ...)
119 Set pixel node registration [gridline]. Each block is the locus
120 of points nearest the grid value location. Consider an example
121 with -R10/15/10/15 and -I1: With the -r option, 10 <= (x,y) < 11
122 is one of 25 blocks; without it 9.5 <= (x,y) < 10.5 is one of 36
123 blocks.
124
125 -:[i|o] (more ...)
126 Swap 1st and 2nd column on input and/or output.
127
128 -^ or just -
129 Print a short message about the syntax of the command, then
130 exits (NOTE: on Windows just use -).
131
132 -+ or just +
133 Print an extensive usage (help) message, including the explana‐
134 tion of any module-specific option (but not the GMT common
135 options), then exits.
136
137 -? or no arguments
138 Print a complete usage (help) message, including the explanation
139 of all options, then exits.
140
142 The ASCII output formats of numerical data are controlled by parameters
143 in your gmt.conf file. Longitude and latitude are formatted according
144 to FORMAT_GEO_OUT, absolute time is under the control of FOR‐
145 MAT_DATE_OUT and FORMAT_CLOCK_OUT, whereas general floating point val‐
146 ues are formatted according to FORMAT_FLOAT_OUT. Be aware that the for‐
147 mat in effect can lead to loss of precision in ASCII output, which can
148 lead to various problems downstream. If you find the output is not
149 written with enough precision, consider switching to binary output (-bo
150 if available) or specify more decimals using the FORMAT_FLOAT_OUT set‐
151 ting.
152
154 To find 5 by 5 minute block mean values from the ASCII data in
155 hawaii.xyg, run
156
157 gmt blockmean hawaii.xyg -R198/208/18/25 -I5m > hawaii_5x5.xyg
158
160 blockmedian, blockmode, gmt, gmt.conf, greenspline, nearneighbor, sph‐
161 triangulate, surface, triangulate
162
164 2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
165
166
167
168
1695.4.5 Feb 24, 2019 BLOCKMEAN(1)