move frac_lai and frac_sai calculation outside do ib=1,hlm_numSWb loop #847
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.
Description:
Fixes a minor issue where the calculation of
frac_lai
andfrac_sai
was calculated twice unnecessarily inside thedo ib = 1,hlm_numSWb
loop. I moved the calculation outside of the loop and tested to make sure updates were bit for bit.This will save us (a small amount) of run time and make the code more accurate/readable.
This resolves issue #843.
Collaborators:
@glemieux
Expectation of Answer Changes:
None. I ran a simple fates test suite and everything was bit-for-bit.
Checklist:
Test Results:
I ran a fates test suite on Cheyenne against
fates-sci.1.55.4_api.22.1.0-ctsm5.1.dev084
, however CTSM is currently ondev085
so there were some expected NLCOMP diffs from the update todev085
. I will run the required tests again when it is time to push this through.CTSM (or) E3SM (specify which) test hash-tag:
ctsm5.1.dev085
CTSM (or) E3SM (specify which) baseline hash-tag:
ctsm5.1.dev084
FATES baseline hash-tag:
fates-sci.1.55.4_api.22.1.0
Test Output:
Many NLCOMP diffs from the difference between
dev085
anddev084
but this was expected. Once we update our baselines I will test again.Tests are on Cheyenne: /glade/scratch/afoster/tests_0317-152648ch