[#275] Update leaf on/leaf off mechanics documentation - #378
Open
priyanshusky0 wants to merge 1 commit into
Open
[#275] Update leaf on/leaf off mechanics documentation#378priyanshusky0 wants to merge 1 commit into
priyanshusky0 wants to merge 1 commit into
Conversation
Replace the TODO markers in the Leaf Carbon and Plant Nitrogen Demand sections, and bring the Leaf On/Leaf Off section in line with the code. - Leaf Carbon: define leaf production and leaf litter as a continuous term plus a pulse at the growing season boundary - Plant Nitrogen Demand: leaf on demand is the stoichiometric shortfall between the source tissue and leaf tissue, is met from the plant nitrogen storage pool, and is not part of the demand served by fixation and uptake - Leaf On/Leaf Off: carbon is drawn from wood and coarse roots in proportion to their current sizes, limited by leafOnReallocFrac and by available storage nitrogen; leaf off resorbs a fraction of leaf nitrogen back to storage
priyanshusky0
requested review from
Alomir,
dlebauer,
mdietze and
mswilburn
as code owners
August 27, 2026 15:39
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
docs/model-structure.md(Leaf Carbon and Plant Nitrogen Demand) and updates the Leaf On/Leaf Off section to match the code.L. The Plant Nitrogen Demand section showed leaf-on demand as part of the total demand partitioned between fixation and uptake, but leaf-on demand is excluded from that demand and is instead satisfied from the plant nitrogen storage pool. The Leaf On/Leaf Off section also described the carbon as coming from the wood pool alone.Changes
leafOnCreation/leafCN - leafOnCreation/woodCN. It is satisfied from the plant nitrogen storage pool, has first claim on that pool, and is no longer shown as part of the demand served by fixation and uptake.leafOnReallocFracand by available storage nitrogen, with the tighter of the two constraints determining the final transfer. Leaf-off resorbs a fraction of leaf nitrogen back into storage.Per the guidance in the issue thread, the level-by-level worked examples are left out, and the
fmax(0.0, ...)question incalcLeafOnNFromC()is not documented.Not included here
While reading the code, I noticed a few other places in
model-structure.mdthat also appear to be out of date. These include the wood and coarse-root carbon leaf-on term, the litter nitrogen balance, which does not show leaf N resorption, and the plant nitrogen storage pool, which is not documented anywhere. I left these out to keep this PR scoped to the issue. Happy to track them separately if you want.How was this change tested?
Documentation only, with no code changes. Verified with a local
mkdocs build: the page builds without new warnings, the added equations number correctly, and the section cross-references resolve.Reproduction steps
Install the docs toolchain with:
pip install mkdocs mkdocs-material pymdown-extensionsThen run:
mkdocs buildfrom the repo root.
Related issues
Checklist
[#<number>] <concise description of proposed change>)docs/CHANGELOG.mdupdated with noteclang-format(rungit clang-formatif needed)Tests and
clang-formatdo not apply, as this changes no code.CHANGELOG.mdis left unchanged to match previous documentation-only PRs in this repository.