Fix errors in annual mean GCHP vs GC-Classic "diff-of-diffs" plots#397
Merged
Fix errors in annual mean GCHP vs GC-Classic "diff-of-diffs" plots#397
Conversation
gcpy/benchmark/modules/benchmark_funcs.py - Restructure the if block logic so that we do not take the time mean of data if we are computing the diff-of-diffs plots. The time mean has to be done in the compute_zonal_mean and compute_single_level functions. - Now only print info about second_ref and second_dev if verbose==True - Updated comments CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
gcpy/util.py - Removed special handling for data files generated prior to MAPL 1.0.0 - Use a single algorithm for computing diff-of-diffs - Add a guard clause at the top of get_diff_of_diffs to exit unless both Ref and Dev are on the same grid - Added if blocks to compute the mean of differences if absddiffs or fracdiffs has more than one time point - Updated PyDoc header comments gcpy/plot/compare_single_level.py gcpy/plot/compare_zonal_mean.py - In a commented-out code block for diff-of-diffs, place the comment character at the same level as the code (instead of in the 1st column) Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
yantosca
commented
Jan 23, 2026
yantosca
commented
Jan 23, 2026
msulprizio
approved these changes
Jan 23, 2026
This was referenced Jan 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Name and Institution (Required)
Name: Bob Yantosca
Institution: Harvard + GCST
Describe the update
This is the companion PR to #393. We have updated the code so as to do the following:
compare_single_levelandcompare_zonal_mean, do not take the time mean of data if we are doing for diff-of-diffs plots.get_diff_of_diffs(ingcpy/util.py) so that a single algorithm is used for both GC-Classic and GCHP.get_diff_of_diffsExpected changes
As pointed out in #393, the top row of the buggy diff-of-diffs plots looked like this:
With this fix, the top row now (correctly) looks like this:
Related Github Issue
Tagging @sdeastham