Bugfix #2762 part 2 -- fix PCPCombine leap year issue #2766
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.
Pull Request Testing
@CPKalb discovered that the previous PR #2764 still did not work for March of the use case. It did work for January and February. We debugged this together and discovered that the leap year was causing issues due to the way to the last time to look for accumulation data was calculated. This modification uses the valid time minus the total output accumulation as the reference time to compute the number of seconds of a year (input accum). We tested on Derecho with the use case and confirmed that it now works for all months.
Already done (see above)
Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes or No]
Do these changes include sufficient testing updates? [Yes]
We tested using the use case. Writing a useful unit test to make sure this behavior works would involve a lot of work and thought. We could consider adding this in the future, but it is out of the scope for this release.
Will this PR result in changes to the test suite? [No]
If yes, describe the new output and/or changes to the existing output:
Do these changes introduce new SonarQube findings? [No]
If yes, please describe:
Please complete this pull request review by 11/4/2024.
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s) and Development issue
Select: Milestone as the version that will include these changes
Select: Coordinated METplus-X.Y Support project for bugfix releases or METplus-Wrappers-X.Y.Z Development project for official releases