Skip to content

Commit

Permalink
add unit and slice parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
willschlitzer committed May 26, 2021
1 parent 19f2fe7 commit d3ed614
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pygmt/src/grdvolume.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@

@fmt_docstring
@use_alias(
C="above",
Cr="below",
C="plane",
Cr="outside_volume",
D="slice",
R="region",
S="unit",
V="verbose",
)
@kwargs_to_strings(C="sequence", R="sequence")
Expand All @@ -40,7 +42,9 @@ def grdvolume(grid, **kwargs):
with Session() as lib:
file_context = lib.virtualfile_from_data(check_kind="raster", data=grid)
with file_context as infile:
arg_str = " ".join([infile, build_arg_string(kwargs)])
arg_str = " ".join(
[infile, build_arg_string(kwargs), "->" + outfile.name]
)
lib.call_module("grdvolume", arg_str)
result = outfile.read()
return result

0 comments on commit d3ed614

Please sign in to comment.