Skip to main content

Leaf stomatal profit-max


source

leaf_stomatal_profit_max

def leaf_stomatal_profit_max(
    physcon:plant_hydraulics.parameter_classes.PhysCon, atmos:plant_hydraulics.parameter_classes.Atmos,
    leaf:plant_hydraulics.parameter_classes.Leaf, # Must have: g0, g1_medlyn, minl_wp, a_psi.
    flux:plant_hydraulics.parameter_classes.Flux
)->plant_hydraulics.parameter_classes.Flux: # With converged gs, An, Tleaf, psi_leaf, etc.

Stomatal conductance via Medlyn + profit-maximisation.

Algorithm:

  1. Sweep gs from g0 to gs_max (30 points).

  2. At each gs, compute the full leaf physics chain: boundary layer → energy balance → photosynthesis → water potential.

  3. Compute normalised GAIN = An/An_max and COST = vulnerability(ψ_leaf).

  4. PROFIT = GAIN - COST. Find the gs that maximises profit.

  5. Clamp to Medlyn gs (hydraulics can only reduce gs, never increase it).

  6. Recompute final fluxes at the optimal gs.

Parameters

physcon : PhysCon atmos : Atmos leaf : Leaf Must have: g0, g1_medlyn, minl_wp, a_psi. flux : Flux

Returns

flux : Flux With converged gs, An, Tleaf, psi_leaf, etc.