Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix computation of dynamic ratio colorbar min/max values in six_plot.py #344

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

yantosca
Copy link
Contributor

@yantosca yantosca commented Oct 8, 2024

Name and Institution (Required)

Name: Bob Yantosca
Institution: Harvard + GCST

Describe the update

This PR fixes an issue with the computation of the dynamic range colorbar values. Under certain circumstances the colorbar range would be set to a narrower range than what the actual data showed. Case in point, this J-value plot at 500 hPa from the 14.5.0-alpha.17 vs. 14.4.3 GEOS-Chem benchmark plots.

jval_bad

Expected changes

With this fix, the dynamic range colorbar ratio is set to the proper range to capture the variation in the data.
jval_fixed

gcpy/plot/six_plot.py
- Now set vmin as the min of the absolute values of the min and max
  of the plot_val array and set vmax as 1/vmin.
- This should prevent the colorbar from being set to a too-narrow range.

CHANGELOG.md
- Updated accordingly.
@yantosca yantosca added topic: Benchmark Plots and Tables Issues pertaining to generating plots/tables from benchmark output category: Bug Fix Fixes a bug that was previously reported labels Oct 8, 2024
@yantosca yantosca self-assigned this Oct 8, 2024
Copy link
Contributor

@msulprizio msulprizio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge. Thanks @yantosca!

@yantosca yantosca merged commit acb8626 into dev Oct 8, 2024
14 checks passed
@yantosca yantosca deleted the feature/fix-dynratio-vmin-vmax branch October 15, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Fix Fixes a bug that was previously reported topic: Benchmark Plots and Tables Issues pertaining to generating plots/tables from benchmark output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants