Skip to content

Fix #372: Consider leaf-off litter and event fluxes in negative-growt… - #397

Open
coder-Yash886 wants to merge 1 commit into
PecanProject:masterfrom
coder-Yash886:fix/372-negative-growth-leaf-off-event-fluxes
Open

coder-Yash886 wants to merge 1 commit into
PecanProject:masterfrom
coder-Yash886:fix/372-negative-growth-leaf-off-event-fluxes

Conversation

@coder-Yash886

Copy link
Copy Markdown

Closes #372
Summary
This PR updates checkNegativeCreation() in src/sipnet/limitations.c to account for leaf-off litter (both computed phenology leaf-off and event leaf-off) and event biomass fluxes, as well as coarse root deductions for leaf-on allocations when performing the negative-growth look-ahead limitation check.

Previously, checkNegativeCreation() used continuous leaf turnover rate (envi.plantLeafC * params.leafTurnoverRate) and ignored phenology leaf-off litter, event leaf-off litter, event leaf/root fluxes, and leaf-on allocations. This could result in negative pool deficits not being properly detected and reallocated during timesteps with leaf-off or event fluxes.

Proposed Changes

  1. Model Logic (src/sipnet/limitations.c)
    Leaf Deficit: Updated calculation to use fluxes.leafLitter (which includes both continuous turnover and computed phenology leaf-off litter), fluxes.eventLeafOffLitter, fluxes.leafOnCreation, fluxes.eventLeafC, and fluxes.eventLeafOnCreation.
    Fine Root Deficit: Updated calculation to include fluxes.eventFineRootC.
    Coarse Root Deficit: Updated calculation to include fluxes.eventCoarseRootC, as well as coarse root deductions for leaf-on allocations (leafOnFromRoot and eventLeafOnFromRoot).
    Carbon Balance: Verified that reallocations between sibling pools (leafCreation
    ↔
    ↔ woodCreation and fineRootCreation
    ↔
    ↔ coarseRootCreation) preserve exact total carbon creation across biomass pools.
  2. Unit Tests (tests/sipnet/test_modeling/testFluxCalculations.c)
    Added testLeafOffAndEventDeficits() to test:
    Phenology leaf-off litter triggering leaf deficit reallocation to wood.
    Event leaf-off litter (eventLeafOffLitter) triggering leaf deficit reallocation to wood.
    Event root biomass fluxes and leaf-on root allocations in fine/coarse root deficit calculations.
    Explicit verification of carbon conservation across biomass creation fluxes.
  3. Smoke Test Reference Outputs (tests/smoke/)
    Updated reference outputs for russell_1, russell_2, and russell_3 to reflect the corrected negative growth allocations during event/leaf-off timesteps.

@coder-Yash886

coder-Yash886 commented Sep 10, 2026 •

Copy link
Copy Markdown
Author

@mdietze @Alomir @dlebauer Please Review the Pr When you have free time

@coder-Yash886

Copy link
Copy Markdown
Author

@Alomir @dlebauer Please Review the PR when you have the free time

This branch has not been deployed

No deployments
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.

Consider leaf-off litter and event fluxes in negative-growth limitation check

1 participant