-
Notifications
You must be signed in to change notification settings - Fork 92
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
Updates and fixes to history zeroing and flushing #1208
Conversation
Is there an addition or change we can/should make to the CTSM test list to avoid a bug like this in the future? E.g., I first noticed this with |
There are other things to do with cleaning up the history files, but they are out of scope, so I think this PR is feature complete and ready for review. |
@samsrabin we periodically need to update the FatesColdAllVars test to make sure it has all of the variables. We have this script: tools/FindInactive.py that trawls the code and updates the list, seems like we need to update it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One note and clarification on possible cleanup. I'll start testing on this as soon as derecho is back up.
|
||
! ====================================================================================== | ||
|
||
subroutine flush_all_hvars(this,nc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note per discussion with Ryan this is staged for the next PR mentioned here: #1208 (comment)
regression testing underway |
Regression testing on cheyenne against
I need to take a look at these to see if they make sense, but there two that jump out at me at first glance. The |
The dynamics time-scale complex variables were not being flushed and zero'd correctly, this was corrected, the MORTALITY_PF variable is an example of that |
Per our conversation, I went back and looked and realized I misread the
So this is indeed corrected as you explained. I think we can integrate. For postertity, the test location on derecho: |
Description:
Some multi-dimensioned history variables were not being reported correctly because they were not being zero'd. These variables were likely incremented over a patch-cohort loop, but being incremented on top of an uninitialized number. This set of changes seeks to make the flushing and zeroing more consistent across all of the different groups of history variables.
This also reduces confusion by moving flushing and zeroing to occur inside the routine that performs the updates. These flushing and zeroing calls still happen redundantly in the host models, should be removed, but are not a liability to generating incorrect results. These calls are just superfluous.
Fixes #1207
Collaborators:
@samsrabin
Expectation of Answer Changes:
Checklist
If this is your first time contributing, please read the CONTRIBUTING document.
All checklist items must be checked to enable merging this pull request:
Contributor
Integrator
Documentation
Test Results:
CTSM (or) E3SM (specify which) test hash-tag:
CTSM (or) E3SM (specify which) baseline hash-tag:
FATES baseline hash-tag:
Test Output: