@@ -25,31 +25,32 @@ def grdvolume(grid, output_type="pandas", outfile=None, **kwargs):
25
25
r"""
26
26
Determine the volume between the surface of a grid and a plane.
27
27
28
- Read a 2-D grid file and calculate the volume contained below the surface
29
- and above the plane specified by the given contour (or zero if not given)
30
- and return the contour, area, volume, and maximum mean height
31
- (volume/area). Alternatively, a range of contours can be specified to
32
- return the volume and area inside the contour for all contour values.
28
+ Read a 2-D grid file and calculate the volume contained below the surface
29
+ and above the plane specified by the given contour (or zero if not given)
30
+ and return the contour, area, volume, and maximum mean height
31
+ (volume/area). Alternatively, a range of contours can be specified to
32
+ return the volume and area inside the contour for all contour values.
33
33
34
34
Full option list at :gmt-docs:`grdvolume.html`
35
35
36
- {aliases}
36
+ {aliases}
37
37
38
- Parameters
39
- ----------
38
+ Parameters
39
+ ----------
40
40
grid : str or xarray.DataArray
41
41
The file name of the input grid or the grid loaded as a DataArray.
42
42
This is the only required parameter.
43
43
output_type : str
44
44
Determine the format the xyz data will be returned in [Default is
45
45
``pandas``]:
46
+
46
47
- ``numpy`` - :class:`numpy.ndarray`
47
48
- ``pandas``- :class:`pandas.DataFrame`
48
49
- ``file`` - ASCII file (requires ``outfile``)
49
50
outfile : str
50
51
The file name for the output ASCII file.
51
52
contour : str or int or float or list
52
- *cval*\ | *low/high/delta*\ | **r**\ *low/high*\ | **r**\ *cval*.
53
+ *cval*\|\ *low/high/delta*\|\ **r**\ *low/high*\|\ **r**\ *cval*.
53
54
Find area, volume and mean height (volume/area) inside and above the
54
55
*cval* contour. Alternatively, search using all contours from *low* to
55
56
*high* in steps of *delta*. [Default returns area, volume and mean
@@ -62,19 +63,20 @@ def grdvolume(grid, output_type="pandas", outfile=None, **kwargs):
62
63
between two contours. If no *contour* is given then there is no contour
63
64
and the entire grid area, volume and the mean height is returned and
64
65
*cval* will be reported as 0.
65
- {R}
66
- {V}
66
+ {R}
67
+ {V}
67
68
68
- Returns
69
- -------
69
+ Returns
70
+ -------
71
+ ret : pandas.DataFrame or numpy.ndarray or None
70
72
ret : pandas.DataFrame or numpy.ndarray or None
71
73
Return type depends on ``outfile`` and ``output_type``:
74
+
72
75
- None if ``outfile`` is set (output will be stored in file set by
73
- ``outfile``)
76
+ ``outfile``)
74
77
- :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile``
75
- is not set (depends on ``output_type`` [Default is
76
- class:`pandas.DataFrame`])
77
-
78
+ is not set (depends on ``output_type`` [Default is
79
+ class:`pandas.DataFrame`])
78
80
"""
79
81
if output_type not in ["numpy" , "pandas" , "file" ]:
80
82
raise GMTInvalidInput (
0 commit comments