From 41917ea515edbe548975e2a25c25ff55c6eb4b1a Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 29 Jun 2021 12:16:23 +1200 Subject: [PATCH] :white_check_mark: Change short aliases to long params for pygmt v0.4.0 Silences the SyntaxWarnings raised in PyGMT v0.4.0 due to https://github.com/GenericMappingTools/pygmt/pull/1316. --- deepicedrain/spatiotemporal.py | 2 +- deepicedrain/vizplots.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deepicedrain/spatiotemporal.py b/deepicedrain/spatiotemporal.py index c34de09..9571665 100644 --- a/deepicedrain/spatiotemporal.py +++ b/deepicedrain/spatiotemporal.py @@ -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( diff --git a/deepicedrain/vizplots.py b/deepicedrain/vizplots.py index 625f597..acc162b 100644 --- a/deepicedrain/vizplots.py +++ b/deepicedrain/vizplots.py @@ -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 = { @@ -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( @@ -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, @@ -634,7 +634,7 @@ 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", ) @@ -642,7 +642,7 @@ 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, d=f"o{_df.z.median()}", # fill NaN points with median height verbose="e",