1GRDVOLUME(1) Generic Mapping Tools GRDVOLUME(1)
2
3
4
6 grdvolume - Calculating volume under a surface within a contour
7
9 grdvolume grdfile [ -Ccval or -Clow/high/delta ] [ -Lbase ] [
10 -Rwest/east/south/north[r] ] [ -S[k] ] [ -T ] [ -V[l] ] [
11 -Zfact[/delta] ] [ -fcolinfo ]
12
14 grdvolume reads a 2-D binary grid file and calculates the volume con‐
15 tained between the surface and the plane specified by the given contour
16 (or zero if not given) and reports the area, volume, and maximum mean
17 height (volume/area). Alternatively, specify a range of contours to be
18 tried and grdvolume will determine the volume and area inside the con‐
19 tour for all contour values. The contour that produced the maximum
20 mean height is reported as well. This feature may be used with grdfil‐
21 ter in designing an Optimal Robust Separator [Wessel, 1998].
22
23 grdfile
24 The name of the input 2-D binary grid file. (See GRID FILE FOR‐
25 MAT below.)
26
28 No space between the option flag and the associated arguments.
29
30 -C find area and volume inside the cval contour. Alternatively,
31 search using all contours from low to high in steps of delta.
32 [Default returns entire area and volume of grid]. The area is
33 measured in the plane of the contour.
34
35 -L Also add in the volume from the level of the contour down to
36 base [Default base is contour].
37
38 -S Convert degrees to meters, append k for km [Default is Carte‐
39 sian].
40
41 -T Use curvature minimum rather than maximum height to find best
42 contour value (when contour search is selected with -C).
43
44 -R xmin, xmax, ymin, and ymax specify the Region of interest. For
45 geographic regions, these limits correspond to west, east,
46 south, and north and you may specify them in decimal degrees or
47 in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left
48 and upper right map coordinates are given instead of w/e/s/n.
49 The two shorthands -Rg and -Rd stand for global domain (0/360
50 and -180/+180 in longitude respectively, with -90/+90 in lati‐
51 tude). Alternatively, specify the name of an existing grid file
52 and the -R settings (and grid spacing, if applicable) are copied
53 from the grid. For calendar time coordinates you may either
54 give (a) relative time (relative to the selected TIME_EPOCH and
55 in the selected TIME_UNIT; append t to -JX|x), or (b) absolute
56 time of the form [date]T[clock] (append T to -JX|x). At least
57 one of date and clock must be present; the T is always required.
58 The date string must be of the form [-]yyyy[-mm[-dd]] (Gregorian
59 calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock
60 string must be of the form hh:mm:ss[.xxx]. The use of delim‐
61 iters and their type and positions must be exactly as indicated
62 (however, input, output and plot formats are customizable; see
63 gmtdefaults).
64
65 -V Selects verbose mode, which will send progress reports to stderr
66 [Default runs "silently"]. Append l to see all the results for
67 each contour level tested (when contour search has been
68 selected).
69
70 -Z Optionally subtract shift before scaling data by fact. [Default
71 is no scaling]. (Numbers in -C, -L refer to values after this
72 scaling has occurred).
73
74 -f Special formatting of input and/or output columns (time or geo‐
75 graphical data). Specify i or o to make this apply only to
76 input or output [Default applies to both]. Give one or more
77 columns (or column ranges) separated by commas. Append T (abso‐
78 lute calendar time), t (relative time in chosen TIME_UNIT since
79 TIME_EPOCH), x (longitude), y (latitude), or f (floating point)
80 to each column or column range item. Shorthand -f[i|o]g means
81 -f[i|o]0x,1y (geographic coordinates).
82
84 GMT is able to recognize many of the commonly used grid file formats,
85 as well as the precision, scale and offset of the values contained in
86 the grid file. When GMT needs a little help with that, you can add the
87 suffix =id[/scale/offset[/nan]], where id is a two-letter identifier of
88 the grid type and precision, and scale and offset are optional scale
89 factor and offset to be applied to all grid values, and nan is the
90 value used to indicate missing data. See grdreformat(1) and Section
91 4.17 of the GMT Technical Reference and Cookbook for more information.
92
93 When reading a netCDF file that contains multiple grids, GMT will read,
94 by default, the first 2-dimensional grid that can find in that file. To
95 coax GMT into reading another multi-dimensional variable in the grid
96 file, append ?varname to the file name, where varname is the name of
97 the variable. Note that you may need to escape the special meaning of ?
98 in your shell program by putting a backslash in front of it, or by
99 placing the filename and suffix between quotes or double quotes. See
100 grdreformat(1) and Section 4.18 of the GMT Technical Reference and
101 Cookbook for more information, particularly on how to read splices of
102 3-, 4-, or 5-dimensional grids.
103
105 To determine the volume in km^3 under the surface hawaii_topo.grd
106 (height in km), use
107
108 grdvolume hawaii_topo.grd -Sk
109
110 To find the volume between the surface peaks.grd and the contour z =
111 250, use
112
113 grdvolume peaks.grd -Sk -C250
114
115 To search for the contour, between 100 and 300 in steps of 10, that
116 maximizes the ratio of volume to surface area for the file peaks.grd,
117 use
118
119 grdvolume peaks.grd -Sk -C100/300/10 > results.d
120
121 To see the areas and volumes for all the contours in the previous exam‐
122 ple, use
123
124 grdvolume peaks.grd -Sk -Vl -C100/300/10 > results.d
125
127 grdvolume distinguishes between gridline and gridcell oriented grids.
128 In both cases the area and volume are computed up to the grid bound‐
129 aries. That means that in the first case the gridcells on the boundary
130 only contribute half their area (and volume), whereas in the second
131 case all gridcells are fully used. The exception is when the -C flag is
132 used: since contours do not extend beyond the outermost gridpoint, both
133 grid types are treated the same. That means the outer rim in gridcell
134 oriented grids is ignored when using the -C flag.
135
137 GMT(1), grdfilter(1)
138
140 Wessel, P., 1998, An empirical method for optimal robust regional-
141 residual separation of geophysical data, Math. Geol., 30(4), 391-408.
142
143
144
145GMT 4.5.6 10 Mar 2011 GRDVOLUME(1)