Remove memory and lai variables#887
Conversation
|
This is great @rgknox. Such a simple solution! I'm struggling to remember why it didn't work like this in the first place. How does it work with crown damage? I guess we just change the target? |
|
right, crown damage level is remembered, and that instructs the allometry target |
| ! ---------------------------------------------------------------- | ||
|
|
||
| enddo !currentCohort | ||
| if( (currentCohort%treelai+currentCohort%treesai) > 0._r8)then |
There was a problem hiding this comment.
To be consistent with other places in the code, should we use variable "nearzero" instead of 0._r8?
There was a problem hiding this comment.
this has been changed to use nearzero
|
|
||
| currentCohort%sapwmemory = sapw_c * stem_drop_fraction | ||
| currentCohort%structmemory = struct_c * stem_drop_fraction | ||
|
|
There was a problem hiding this comment.
Another good reason to drop the memory variables: leafmemory was the prior leaf biomass, whereas sapwmemory/structmemory were the amount of woody biomass lost. I actually had changed the definition of sapwmemory/structmemory in #801 to the same as leafmemory because I found the original definitions very confusing...
There was a problem hiding this comment.
i saw that too, not sure if this will come up on tests, but glad its correct now
| write(fates_log(),*) ' phen_stem_drop_fraction: ', EDPFtvarcon_inst%phen_stem_drop_fraction(ipft) | ||
| write(fates_log(),*) ' Aborting' | ||
| call endrun(msg=errMsg(sourcefile, __LINE__)) | ||
| end if |
There was a problem hiding this comment.
Good idea to prevent the model to run if this combination is not acceptable.
This tag includes some simple improvements to math operations in high-frequency history diagnostics
|
Testing on Cheyenne is resulting in DIFFs across all tests except the clm50 non-fates test (expected) and the Test folder location: |
|
yes, there should be diffs, some of it is related to what @mpaiao noted, in how we previously defined memory for non-leaf pools, and we were replacing these pools based on the total, and not the remainder (where the latter is correct) |
|
Per the discussion at the fates software meeting last week, @rgknox is going to assess splitting this PR into two separate issues: one to remove the |
|
Updated tests with the changes to fleaf. /glade/scratch/rgknox/tests_0913-100825ch |
Description:
The memory (laimemory, sapwmemory and structmemory) and lai terms are unecessary. We don't need the memory terms because we can use the allometry functions to calculate targets. We don't need the cohort level lai and sai variables because we can derive them from treelai, treesai, crown area and canopy area.
Fixes #541
I also removed the smooth leaf distribution code from the canopy vertical profile routine because that is old and unmaintained and is triggering lots of compiler warnings.
Collaborators:
Expectation of Answer Changes:
I expect small but subtle differences in results due to the laimemory stuff. The flushing target was previously laimemory, which was the target when the leaves dropped. Now the target is just re-caclulated when the leaves are ready to flush. Its possible that a trimming event would had happened in between, or perhaps due to canopy promotion/demotion/fusion there was a small change in dbh to maintain mass conservation, which would also trigger a difference in the target.
Checklist:
Test Results:
CTSM (or) E3SM (specify which) test hash-tag:
CTSM (or) E3SM (specify which) baseline hash-tag:
FATES baseline hash-tag:
Test Output: