site-level mass flux accounting part 2#1473
Conversation
|
Making a note that we should add a comment units fix originally posted #1474 |
|
Sorry, I made #1474 by accident, but I guess FYI the actual PR I meant to make for our NorESM side stuff is here NorESMhub#31 with a bit of discussion for background, that include fixing the comment also for grazing which is wrong in the same way presumably for the same reason |
glemieux
left a comment
There was a problem hiding this comment.
Looks good. I only have one question that might be more for my own education. Otherwise this is good to go from my perspective.
Per discussion with @rgknox
fix calculation of the distance between model grid and inventory sites Adopts the use of the great circle distance function
|
Regression testing on |
|
Regression testing against Both are showing diffs only in one fates output: I think this may be an acceptible diff given that the changes to the calculation of fates/main/ChecksBalancesMod.F90 Lines 318 to 319 in 546326c Thoughts @rgknox ? |
|
I'm running a modified version of the sp mode compset adding |
I realized this isn't necessary per the history output logic. |
|
I'm seeing DIFFS on the exact restart with the e3sm |
| !-------------------------------------------------------------------------------! | ||
|
|
||
| subroutine TotalBalanceCheck (currentSite, call_index ) | ||
| subroutine TotalBalanceCheck (currentSite, call_index, is_restarting ) |
There was a problem hiding this comment.
Can this be an optional argument? With a local variable that is .false. by default and takes the argument value when the argument is present? Then you don't have to alter every call of this routine
There was a problem hiding this comment.
Sounds fine to me, I'll submit the change
@rgknox I figure this out. We need to move the Lines 856 to 861 in 56add1b which would result in the bc_out varaibles being zero'd out during restart. I'll submit a change shortly.
|
|
@rgknox the last commit won't build, because of the argument name and local name conflicts. |
|
merged, thanks @mvdebolskiy |
|
Tests look good, merging /glade/derecho/scratch/<>/tests_1129-120611de Double checked diffs and they were only relegated to the error tracking diagnostic, which was the targetted change. |
Description:
This PR seeks to generate more consistency with how we track and restart some site-level mass fluxes. These mass fluxes are used for multiple purposes: run-time mass balance checks, history diagnostics and boundary conditions. So these fluxes needed a little attention in how they are used.
This PR is based on and should follow: #1448
Collaborators:
@glemieux @ckoven
Expectation of Answer Changes:
No answer changes, but it should fix restart errors with E3SM mass_balance_error diagnostics.
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
If satellite phenology regressions are not b4b, please hold merge and notify the FATES development team.
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: