Skip to content

Commit f1c3210

Browse files
willschlitzerMeghan Jones
andauthored
Apply suggestions from code review
Co-authored-by: Meghan Jones <meghanj@hawaii.edu>
1 parent dd47b3d commit f1c3210

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pygmt/src/grdlandmask.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@use_alias(
1919
G="outgrid",
2020
R="region",
21-
I="increment",
21+
I="spacing",
2222
r="registration",
2323
)
2424
@kwargs_to_strings(R="sequence")
@@ -42,7 +42,7 @@ def grdlandmask(**kwargs):
4242
outgrid : str or None
4343
The name of the output netCDF file with extension .nc to store the grid
4444
in.
45-
increment : str
45+
spacing : str
4646
*xinc*\ [**+e**\|\ **n**][/\ *yinc*\ [**+e**\|\ **n**]].
4747
*x_inc* [and optionally *y_inc*] is the grid spacing. **Geographical
4848
(degrees) coordinates**: Optionally, append a increment unit. Choose
@@ -75,7 +75,7 @@ def grdlandmask(**kwargs):
7575
``outgrid``)
7676
"""
7777
if "I" not in kwargs.keys() or "R" not in kwargs.keys():
78-
raise GMTInvalidInput("Region and increment must be specified.")
78+
raise GMTInvalidInput("Region and spacing must be specified.")
7979

8080
with GMTTempFile(suffix=".nc") as tmpfile:
8181
with Session() as lib:

pygmt/tests/test_grdlandmask.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_grdlandmask_outgrid():
1414
Creates a grid land mask with an outgrid argument.
1515
"""
1616
with GMTTempFile(suffix=".nc") as tmpfile:
17-
result = grdlandmask(outgrid=tmpfile.name, increment=1, region=[-5, 5, -5, 5])
17+
result = grdlandmask(outgrid=tmpfile.name, spacing=1, region=[-5, 5, -5, 5])
1818
assert result is None # return value is None
1919
assert os.path.exists(path=tmpfile.name) # check that outgrid exists
2020
result = (
@@ -27,7 +27,7 @@ def test_grdlandmask_no_outgrid():
2727
"""
2828
Test grdlandmask with no set outgrid.
2929
"""
30-
temp_grid = grdlandmask(increment=1, region=[-5, 5, -5, 5])
30+
temp_grid = grdlandmask(spacing=1, region=[-5, 5, -5, 5])
3131
assert temp_grid.dims == ("lat", "lon")
3232
assert temp_grid.gmt.gtype == 1 # Geographic grid
3333
assert temp_grid.gmt.registration == 0

0 commit comments

Comments
 (0)