Skip to content

Commit

Permalink
Rewrite logic for setting min and max values for data ranges
Browse files Browse the repository at this point in the history
In compute_zonal_mean and compute_single_level, we needed to make
the following updates to the logic that sets the min and max values
(e.g. vmin0, vmax0, vmin1, vmax1, vmin, vmax) that get passed to
normalize_colors:

(1) Define ref_is_all_zero, ref_is_all_nan, dev_is_all_zero, and
    dev_is_all_nan above the section where we plot Ref and Dev.

(2) Whenever match_cbar is used, we need to also add
    (a) For Ref: if match_cbar and (not dev_is_all_nan):
    (b) For Dev: if match_cbar and (not ref_is_all_nan):
    If we include the NaN values in the setting of the vmin* and
    vmax* values, then the plot range will show from 0..1 instead
    of the dynamic range of the data.

(3) Similarly, define absdiff_is_all_zero and absdiff_is_all_nan
    above the sections where we plot absolute difference.

(4) Also define fracdiff_is_all_zero and fracdiff_is_all_nan
    above the sections where we plot fractional difference.

(5) Update comments accordingly

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
  • Loading branch information
yantosca committed Aug 28, 2019
1 parent 05cf675 commit 8d8282c
Showing 1 changed file with 182 additions and 162 deletions.
Loading

0 comments on commit 8d8282c

Please sign in to comment.