File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,13 @@ def earthtide(**kwargs):
83
83
>>> # Create a grid of Earth tide at 1200 UTC on June 18, 2018
84
84
>>> grid = pygmt.earthtide(time="2018-06-18T12:00:00")
85
85
"""
86
- if "R" in kwargs and "I" not in kwargs :
86
+ if kwargs . get ( "R" ) is not None and kwargs . get ( "I" ) is None :
87
87
raise GMTInvalidInput ("Must specify 'spacing' if 'region' is specified." )
88
88
with GMTTempFile (suffix = ".nc" ) as tmpfile :
89
89
with Session () as lib :
90
90
if "G" not in kwargs : # if outgrid is unset, output to tempfile
91
91
kwargs .update ({"G" : tmpfile .name })
92
92
outgrid = kwargs ["G" ]
93
- arg_str = build_arg_string (kwargs )
94
- lib .call_module ("earthtide" , arg_str )
93
+ lib .call_module ("earthtide" , build_arg_string (kwargs ))
95
94
96
95
return load_dataarray (outgrid ) if outgrid == tmpfile .name else None
You can’t perform that action at this time.
0 commit comments