Skip to content

Commit

Permalink
Fixed a typo in compare_single_level when use_cmap_RdBu
Browse files Browse the repository at this point in the history
In routine compare_single_level (in benchmark.py), there was a typo
in the definition of absmax when use_cmap_RdBu=True but when Ref
had all NaN values.  In this case, the values of vmin_ref and
vmax_ref were used to define absmax, but we should have used
vmin_dev and vmax_dev.  Now fixed.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
  • Loading branch information
yantosca committed Aug 28, 2019
1 parent 8d8282c commit 90fed1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcpy/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ def compare_single_level(refdata, refstr, devdata, devstr, varlist=None,
if match_cbar and (not ref_is_all_nan):
absmax = max([np.abs(vmin_abs), np.abs(vmax_abs)])
else:
absmax = max([np.abs(vmin_ref), np.abs(vmax_ref)])
absmax = max([np.abs(vmin_dev), np.abs(vmax_dev)])
[vmin1, vmax1] = [-absmax, absmax]
else:
if match_cbar and (not ref_is_all_nan):
Expand Down

0 comments on commit 90fed1a

Please sign in to comment.