Skip to content

Fix C4 dryness sensitivity typo in compute_chi#1805

Merged
AlexisRenchon merged 1 commit into
mainfrom
ar/fix_compute_chi_c4
Jul 14, 2026
Merged

Fix C4 dryness sensitivity typo in compute_chi#1805
AlexisRenchon merged 1 commit into
mainfrom
ar/fix_compute_chi_c4

Conversation

@AlexisRenchon

Copy link
Copy Markdown
Member

Summary

compute_chi computes the optimal ci/ca ratio (χ) by blending a C3 and a C4 branch. The C4 intercellular CO₂ was computed with the C3 dryness sensitivity ξ_c3 instead of ξ_c4:

ci_c3 = intercellular_co2_pmodel(ξ_c3, ca_pp, Γstar, VPD_safe)
ci_c4 = intercellular_co2_pmodel(ξ_c3, ca_pp, Γstar, VPD_safe)  # <- was ξ_c3

Since ξ_c4 = sqrt(β_c4 * (Kmm + Γstar) / (Drel * ηstar)) uses a much smaller unit-cost ratio (β_c4β_c3 / 9), the C4 branch was getting the C3 χ, biasing the blended χ toward C3 behavior at C4 and mixed C3/C4 cells.

Impact

  • compute_chi is consumed by the optimal-LAI model (optimal_lai.jl) for the water-limitation term, so the bias propagated into optimal LAI at C4/mixed cells.
  • The per-timestep GPP path (compute_blended_pmodel_photosynthesis) computes ci_c3/ci_c4 correctly with their own ξ and is not affected.
  • Pure-C3 cells (fractional_c3 = 1) are unaffected since the C4 branch is weighted out.

Change

One-line fix: use ξ_c4 for the C4 intercellular CO₂. Plus a NEWS entry.

🤖 Generated with Claude Code

@AlexisRenchon
AlexisRenchon force-pushed the ar/fix_compute_chi_c4 branch from 2e77e53 to 05abf10 Compare July 14, 2026 16:54
@AlexisRenchon
AlexisRenchon requested a review from kmdeck July 14, 2026 16:56

@kmdeck kmdeck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

The C4 intercellular CO2 in `compute_chi` used the C3 dryness
sensitivity `ξ_c3` instead of `ξ_c4`, biasing the blended χ (and the
optimal-LAI water-limitation term that consumes it) at C4 and mixed
C3/C4 grid cells. The per-timestep GPP path is unaffected; only
`compute_chi` (used by the optimal-LAI model) had the error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AlexisRenchon
AlexisRenchon force-pushed the ar/fix_compute_chi_c4 branch from 05abf10 to 701c5fc Compare July 14, 2026 17:45
@AlexisRenchon
AlexisRenchon merged commit 8d3e495 into main Jul 14, 2026
15 of 16 checks passed
@AlexisRenchon
AlexisRenchon deleted the ar/fix_compute_chi_c4 branch July 14, 2026 18:58
@AlexisRenchon AlexisRenchon mentioned this pull request Jul 17, 2026
AlexisRenchon added a commit that referenced this pull request Jul 17, 2026
Patch release: bump version 1.10.2 -> 1.10.3 and freeze the NEWS.md `main`
section as v1.10.3. Adds the two NEWS entries that were missing for changes
merged since v1.10.2 (P-model ci NaN guard #1811, SIF kd_p2 + units #1812)
alongside the already-logged C4 compute_chi fix #1805. Bumps the recorded
ClimaLand version to 1.10.3 in the four tracked Manifests (.buildkite and
docs, Julia 1.10 and 1.12); dependency versions are unchanged since #1811
refreshed them.

No breaking changes, so the patch slot is bumped.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants