Skip to content

[#275] Update leaf on/leaf off mechanics documentation - #378

Open
priyanshusky0 wants to merge 1 commit into
PecanProject:masterfrom
priyanshusky0:275-leaf-on-off-docs
Open

[#275] Update leaf on/leaf off mechanics documentation#378
priyanshusky0 wants to merge 1 commit into
PecanProject:masterfrom
priyanshusky0:275-leaf-on-off-docs

Conversation

@priyanshusky0

Copy link
Copy Markdown

Summary

  • What: Replaces the two TODO markers in docs/model-structure.md (Leaf Carbon and Plant Nitrogen Demand) and updates the Leaf On/Leaf Off section to match the code.
  • Motivation: The Leaf Carbon section never defined the leaf production term 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

  • Leaf Carbon: Leaf production and leaf litter are each written as a continuous term plus a pulse at the growing-season boundary, with leaf-on identified as a reallocation of existing plant carbon rather than an allocation of NPP.
  • Plant Nitrogen Demand: Leaf-on demand is explained as the stoichiometric shortfall between the source tissue and leaf tissue, which is why it takes the form 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.
  • Leaf On/Leaf Off: Carbon is drawn from the wood and coarse-root pools in proportion to their current sizes. The transfer is limited both by leafOnReallocFrac and 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 in calcLeafOnNFromC() is not documented.

Not included here

While reading the code, I noticed a few other places in model-structure.md that 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-extensions

Then run:

mkdocs build

from the repo root.

Related issues

Checklist

  • Related issues are listed above.
  • PR title has the issue number in it ([#<number>] <concise description of proposed change>)
  • Tests added/updated for new features
  • Documentation updated (if applicable)
  • docs/CHANGELOG.md updated with note
  • Code formatted with clang-format (run git clang-format if needed)

Tests and clang-format do not apply, as this changes no code. CHANGELOG.md is left unchanged to match previous documentation-only PRs in this repository.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Leaf On/Leaf Off mechanics documentation

1 participant