1GRDVOLUME(1)                 Generic Mapping Tools                GRDVOLUME(1)
2
3
4

NAME

6       grdvolume - Calculating volume under a surface within a contour
7

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

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 countour.
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).  For calendar time coordinates you may  either  give  (a)
52              relative  time  (relative  to the selected TIME_EPOCH and in the
53              selected TIME_UNIT; append t to -JX|x), or (b) absolute time  of
54              the  form  [date]T[clock]  (append T to -JX|x).  At least one of
55              date and clock must be present; the T is always  required.   The
56              date  string  must  be  of the form [-]yyyy[-mm[-dd]] (Gregorian
57              calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock
58              string  must  be  of the form hh:mm:ss[.xxx].  The use of delim‐
59              iters and their type and positions must be exactly as  indicated
60              (however,  input,  output and plot formats are customizable; see
61              gmtdefaults).
62
63       -V     Selects verbose mode, which will send progress reports to stderr
64              [Default  runs "silently"].  Append l to see all the results for
65              each  contour  level  tested  (when  contour  search  has   been
66              selected).
67
68       -Z     Optionally  subtract shift before scaling data by fact. [Default
69              is no scaling].  (Numbers in -C, -L refer to values  after  this
70              scaling has occurred).
71
72       -f     Special  formatting of input and/or output columns (time or geo‐
73              graphical data).  Specify i or o to  make  this  apply  only  to
74              input  or  output  [Default  applies to both].  Give one or more
75              columns (or column ranges) separated by commas.  Append T (abso‐
76              lute  calendar time), t (relative time in chosen TIME_UNIT since
77              TIME_EPOCH), x (longitude), y (latitude), or f (floating  point)
78              to  each  column or column range item.  Shorthand -f[i|o]g means
79              -f[i|o]0x,1y (geographic coordinates).
80

GRID FILE FORMATS

82       GMT is able to recognize many of the commonly used grid  file  formats,
83       as  well  as the precision, scale and offset of the values contained in
84       the grid file. When GMT needs a little help with that, you can add  the
85       suffix =id[/scale/offset[/nan]], where id is a two-letter identifier of
86       the grid type and precision, and scale and offset  are  optional  scale
87       factor  and  offset  to  be  applied to all grid values, and nan is the
88       value used to indicate missing data.  See  grdreformat(1)  and  Section
89       4.17 of the GMT Technical Reference and Cookbook for more information.
90
91       When reading a netCDF file that contains multiple grids, GMT will read,
92       by default, the first 2-dimensional grid that can find in that file. To
93       coax  GMT  into  reading another multi-dimensional variable in the grid
94       file, append ?varname to the file name, where varname is  the  name  of
95       the variable. Note that you may need to escape the special meaning of ?
96       in your shell program by putting a backslash in  front  of  it,  or  by
97       placing  the  filename and suffix between quotes or double quotes.  See
98       grdreformat(1) and Section 4.18 of  the  GMT  Technical  Reference  and
99       Cookbook  for  more information, particularly on how to read splices of
100       3-, 4-, or 5-dimensional grids.
101

EXAMPLES

103       To determine the volume  in  km^3  under  the  surface  hawaii_topo.grd
104       (height in km), use
105
106       grdvolume hawaii_topo.grd -Sk
107
108       To  find  the  volume between the surface peaks.grd and the contour z =
109       250, use
110
111       grdvolume peaks.grd -Sk -C250
112
113       To search for the contour, between 100 and 300 in  steps  of  10,  that
114       maximizes  the  ratio of volume to surface area for the file peaks.grd,
115       use
116
117       grdvolume peaks.grd -Sk -C100/300/10 > results.d
118
119       To see the areas and volumes for all the contours in the previous exam‐
120       ple, use
121
122       grdvolume peaks.grd -Sk -Vl -C100/300/10 > results.d
123

NOTES

125       grdvolume  distinguishes  between gridline and gridcell oriented grids.
126       In both cases the area and volume are computed up to  the  grid  bound‐
127       aries.  That means that in the first case the gridcells on the boundary
128       only contribute half their area (and volume),  whereas  in  the  second
129       case all gridcells are fully used. The exception is when the -C flag is
130       used: since contours do not extend beyond the outermost gridpoint, both
131       grid  types  are treated the same. That means the outer rim in gridcell
132       oriented grids is ignored when using the -C flag.
133

SEE ALSO

135       GMT(1), grdfilter(1)
136

REFERENCES

138       Wessel, P., 1998, An empirical  method  for  optimal  robust  regional-
139       residual separation of geophysical data, Math. Geol., 30(4), 391-408.
140
141
142
143GMT 4.3.1                         15 May 2008                     GRDVOLUME(1)
Impressum