Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite logic for setting min and max values for data ranges
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