-
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
Refactor of patch and cohort objects #1024
Conversation
I forgot to delete the assignment of the local variables when I moved it to the beginning of the `do` loop (thanks @glemieux).
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.
A few clean up suggestions and a couple of questions. Sorry for the delay in reviewing!
Co-authored-by: Gregory Lemieux <[email protected]>
@adrifoster found during regression testing late last week that the fates spmode tests where not B4B against the baseline. The culprit appears to have been that in the call to Cheyenne is currently down, so I can't run the fix in commit cf41e0a against our typical fates suite regression tests, but I did run this on lobata comparing the output of a one year long sp mode smoke test at BCI against As an aside, this raises the question: for initialization only, is using the |
It looks like the issue that I identified is only part of the story: global sp mode tests are still failing against the baseline. That said, the 1x1_brazil smoke test passes b4b as expected (given that my test for the fix was for a single site). Test results: UPDATE: Running a daily case, it looks like this is happening on the second time step, so is probably not an initialization issue. Plotting out the DIFF results show no particular global pattern. |
It looks like the thing that was causing the non-b4b results against the baseline for the global sp mode runs was the additional call of This has me thinking that we were seeing as not-b4b prior to my commit is actually more correct. Right now on main, we adjust fates/biogeochem/EDPhysiologyMod.F90 Lines 1952 to 1979 in caf4aae
@rosiealice given the dependency of leaf carbon on cohort area and number, should we actually be waiting to call |
Generating a new fates baseline using |
Right, I see what you mean. I agree it seems like there is no reason to call the leafc_dfrom_treelai before the error correction of the canopy area here... |
Also responding to the hgt_min question from earlier in this thread, does this mean that the intitializatio value will only operate for perhaps the very first time step (or not even that) before being overwritten with the values from the surface dataset? If so then that is fine... |
Regression testing on cheyenne against UPDATE: fates suite testing on izumi is b4b for all expected tests against the baseline. Cheyenne location: |
That's correct @rosiealice, it would only be during the |
First refactor of patch and cohort objects to facilitate unit testing and decrease circular dependencies
Description:
I moved the patch and cohort objects into their own modules, and moved some procedures in
FatesCohortDynamicsMod
andFatesPatchDynamicsMod
into those modes as bound procedures associated with each type.This also necessitated some modifications of other modules/types to get rid of circular dependencies.
Most notably, I got rid of the pointers from the
cohort
type to their respectivepatch
. I did not think this was necessary, and created circular dependencies (the pointer from eachpatch
to itscohort
linked list remains). Where information about the patch was necessary, I converted the procedures to take in patch-specific variables/attributes rather than the entire patch structure itself.To be coordinated with ESCOMP/CTSM#2000 and E3SM-Project/E3SM#5849
Collaborators:
@rgknox ; @billsacks ; @glemieux ; @JessicaNeedham
Expectation of Answer Changes:
None - all tests should be B4B
Checklist:
Test Results:
see /glade/scratch/afoster/tests_fates_refactor_latest
all tests are PASS or EXPECTED FAIL
CTSM (or) E3SM (specify which) test hash-tag:
ctsm5.1.dev123-14-g2e8d71075
CTSM (or) E3SM (specify which) baseline hash-tag: ctsm5.1.dev123
FATES baseline hash-tag:
sci.1.65.4_api.25.4.0
Test Output: