Fix nitrogen allocation to litter pool during harvest events (#244)#258
Fix nitrogen allocation to litter pool during harvest events (#244)#258Alomir merged 13 commits intoPecanProject:masterfrom
Conversation
Alomir
left a comment
There was a problem hiding this comment.
Looks great so far. This should break a unit test, but is unlikely to before we update them (future work, though very-soon future work). I suspect the russell_2 smoke test will fail.
Please resolve the conflicts in events.c and we'll see how it goes.
|
In the PR summary, the related issue needs to be
not an embedded link. Github will take care of the linking, as well as automagically assigning this PR as closing that ticket. |
|
If everything looks good, I can start working on fixing the russell_2 smoke test next. |
|
@Thomas-Sedhom One thing - please make sure the code builds cleanly locally before pushing changes. |
|
Hey @Thomas-Sedhom - to be clear, we don't have any harvest events in the smoke tests (yet!), so we won't see any break. |
Alomir
left a comment
There was a problem hiding this comment.
Looks great - just one missed rename that needs to be done.
Thanks for clarifying! That makes sense. |
Alomir
left a comment
There was a problem hiding this comment.
Whoops, tests are failing - can't wait until the B&T runs automatically.
Summary
This PR fixes nitrogen loss during harvest events.
Currently, harvest transfers carbon from plant biomass to the litter pool but does not allocate the associated nitrogen. Since plant nitrogen is not explicitly tracked in SIPNET, this results in nitrogen being lost from the system.
Related issues
Fixes #244
Checklist
docs/CHANGELOG.mdupdated with noteworthy changesclang-format(rungit clang-formatif needed)Note: See CONTRIBUTING.md for additional guidance. This repository uses automated formatting checks; if the pre-commit hook blocks your commit, run
git clang-formatto format staged changes.