Skip to content

Commit

Permalink
✅ Change short aliases to long params for pygmt v0.4.0
Browse files Browse the repository at this point in the history
Silences the SyntaxWarnings raised in PyGMT v0.4.0 due to GenericMappingTools/pygmt#1316.
  • Loading branch information
weiji14 committed Jun 29, 2021
1 parent a6eb0b3 commit 41917ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deepicedrain/spatiotemporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def spatiotemporal_cube(
J=f'"{projection}"', # projection
M="3c", # mask values 3 pixel cells outside/away from valid data
T=0.35, # tension factor
V="e", # error messages only
verbose="e", # error messages only
)
for cycle in tqdm.tqdm(iterable=cycles):
df_trimmed = pygmt.blockmedian(
Expand Down
10 changes: 5 additions & 5 deletions deepicedrain/vizplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def plot_alongtrack(
text=f"Reference Ground Track {rgtpair}",
position="TC",
offset="jTC0c/0.2c",
V="q",
verbose="q",
)
# Colors from https://colorbrewer2.org/#type=qualitative&scheme=Set1&n=9
cycle_colors: dict = {
Expand Down Expand Up @@ -556,7 +556,7 @@ def plot_icesurface(
try:
series = diff_grid_region[-2:]
except TypeError:
series = pygmt.grdinfo(grid=diff_grid, T="1+s")[2:-3]
series = pygmt.grdinfo(grid=diff_grid, nearest_multiple="1+s")[2:-3]
finally:
pygmt.makecpt(cmap="roma", series=series)
fig.grdview(
Expand Down Expand Up @@ -613,7 +613,7 @@ def plot_icesurface(
)
fig.colorbar(
cmap=True,
I=True, # shading
shading=True,
position="JMR+o1c/0c+w7c/0.5c+n",
frame=['x+l"Elevation"', "y+lm"],
perspective=True,
Expand All @@ -634,15 +634,15 @@ def plot_icesurface(
pygmt.grdtrack(
points=outline_points,
grid=grid,
R="/".join(map(str, grid_region[:-2])),
region="/".join(map(str, grid_region[:-2])),
outfile=tmpfile.name,
verbose="e",
)
_df = pd.read_csv(tmpfile.name, sep="\t", names=["x", "y", "z"])
pygmt.grdtrack(
points=outline_points,
grid=grid,
R="/".join(map(str, grid_region[:-2])),
region="/".join(map(str, grid_region[:-2])),
outfile=tmpfile.name,
d=f"o{_df.z.median()}", # fill NaN points with median height
verbose="e",
Expand Down

0 comments on commit 41917ea

Please sign in to comment.