compute_pheno
def compute_pheno(
state:plant_hydraulics.parameter_classes.SurEauPlantState, # Plant state object. The following fields are read/written:
# # - LAI_pheno : float
# # Current phenological LAI (m²/m²). Written.
# # - LAI : float
# # Current actual LAI (m²/m²). Read during senescence.
# # - sum_temperature : float
# # Cumulative forcing temperature (°C). Read/written.
# # - budburst_date : float
# # Day of year of budburst (int or NaN). Read/written.
params:plant_hydraulics.parameter_classes.SurEauVegetationParams, # Vegetation parameters. Relevant attributes:
# # - foliage : str
# # ``"Evergreen"``, ``"Deciduous"``, or ``"Forced"``.
# # - LAI_max : float
# # Maximum leaf area index (m²/m²).
# # - T_base : float
# # Minimum temperature for forcing accumulation (°C).
# # - F_crit : float
# # Cumulative forcing threshold for budburst (°C).
# # - day_start : int
# # First DOY for temperature accumulation.
# # - nb_day_LAI : int
# # Days from budburst to full canopy.
# # - day_start_forced : int
# # Fixed budburst DOY for Forced model.
# # - day_end_forced : int
# # Fixed senescence DOY for Forced model.
temperature:float, # Daily mean air temperature (°C).
DOY:int, # Day of year (1–365).
)->plant_hydraulics.parameter_classes.SurEauPlantState: # Updated plant state with modified ``LAI_pheno``,``sum_temperature``, ``budburst_date``.Update the phenological leaf area fraction (LAI_pheno) based on the seasonal cycle of leaf growth and loss.
Implements the leaf phenology module described in Appendix A of Ruffault et al. (2022). The function controls ∅ (the phenological fraction, 0 to 1) which feeds into Equation A1:
LAI = ∅ × LAI_max
Eq. A1 itself is computed downstream in update_LAI_and_stocks. This function determines ∅ by tracking the progression through three seasonal phases: dormancy → leaf-out → full canopy → senescence.
Three foliage types are supported:
Evergreen: LAI_pheno is set to LAI_max on DOY 1 and never changes.The canopy is always at full capacity.
Deciduous: Implements Equation A2 for budburst timing:
Σ_{t0}^{tf} R_f(T_d) ≥ F*
Each day after day_start (t0), if the temperature exceeds T_base (T_D), the temperature is added to a running sum.When the sum exceeds F_crit (F*), budburst is triggered. After budburst, LAI_pheno increases linearly over nb_day_LAI days at rate LAI_max / nb_day_LAI (the paper’s R_LAI). In autumn (DOY ≥ 280), LAI_pheno decreases at the same rate until zero.
Forced: Same as Deciduous but budburst is triggered by a fixed calendar date (day_start_forced) instead of temperature accumulation. Senescence is triggered by day_end_forced instead of DOY 280. Useful for sensitivity experiments where phenology should be decoupled from climate.
Physical analogy: Think of the tree as a solar panel factory with a seasonal schedule. Evergreen factories run 24/7. Deciduous factories shut down in winter and wait for enough accumulated warmth to restart — like a bank account for warmth that must reach a threshold before the factory reopens. Forced factories follow a fixed calendar regardless of weather.
Parameters:
state: SurEauPlantState object. The following fields are read and/or written:
LAI_pheno: Current phenological LAI (m²/m²). Written each call. Set to LAI_max for Evergreen on DOY 1, incremented during leaf-out, decremented during senescence.
LAI: Current actual LAI (m²/m²). Read during senescence to compute the daily decrement. May differ from LAI_pheno if cavitation-induced defoliation has occurred.
sum_temperature: Cumulative forcing temperature (°C). Read and written during the Deciduous accumulation phase. Reset to 0 on DOY 1.
budburst_date: Day of year when budburst occurred (int or NaN). Written when the temperature sum exceeds F_crit. Reset to NaN on DOY 1 for non-Evergreen species.
params: SurEauVegetationParams object with the following attributes:
foliage: Foliage type.
"Evergreen","Deciduous", or"Forced".LAI_max: Maximum leaf area index of the stand (m²/m²). E.g. 4.5 for Quercus ilex, 5.0 for Fagus sylvatica.
T_base: Minimum temperature to start cumulating forcing temperatures (°C). Equivalent to T_D in Eq. A2. E.g. 3.0.
F_crit: Amount of cumulative forcing temperature required to trigger budburst (°C). Equivalent to F* in Eq. A2. E.g. 450.
day_start: First day of year to begin temperature accumulation (DOY). Equivalent to t0 in Eq. A2. E.g. 55 (late February).
nb_day_LAI: Number of days from budburst to full canopy (days). Controls both the leaf-out growth rate and the senescence decline rate: rate = LAI_max / nb_day_LAI. Equivalent to R_LAI in text near Eq. A1. E.g. 21.
day_start_forced: Fixed budburst date for the Forced model (DOY). Only used when
foliage="Forced". E.g. 40.day_end_forced: Fixed senescence start date for the Forced model (DOY). Only used when
foliage="Forced". E.g. 220.
temperature: Daily mean air temperature (°C). Used for temperature accumulation in the Deciduous model (Eq. A2). Corresponds to
clim_day.T_air_mean.DOY: Day of year (1–365). Controls the yearly reset (DOY 1), the start of accumulation (
day_start), and the onset of senescence (DOY 280 for Deciduous,day_end_forcedfor Forced).
Returns:
- state: Updated SurEauPlantState with modified
LAI_pheno,sum_temperature, andbudburst_date.
Seasonal phases for Deciduous:
DOY 1 Reset: LAI_pheno=0, sum_T=0, budburst=NaN
│
▼
Phase 1: Dormancy (DOY < day_start or T < T_base)
│ Nothing happens, waiting for warmth
│
▼
Phase 1b: Accumulation (DOY ≥ day_start and T > T_base)
│ sum_T += temperature each day
│ (Eq. A2: Σ R_f(T_d))
│
▼ when sum_T > F_crit (Eq. A2: ≥ F*)
│
Phase 2: Leaf-out (budburst_date ≤ DOY < budburst + nb_day_LAI)
│ LAI_pheno += LAI_max / nb_day_LAI each day
│ (rate = R_LAI)
│
▼ when DOY = budburst + nb_day_LAI
│
Summer plateau (budburst + nb_day_LAI ≤ DOY < 280)
│ LAI_pheno stays constant (≈ LAI_max)
│ No conditions match — function does nothing
│
▼ when DOY ≥ 280 (≈ October 7)
│
Phase 3: Senescence LAI_pheno decreases by LAI_max / nb_day_LAI
│ each day until LAI_pheno = 0
▼
Back to DOY 1 next year
Numerical example (Deciduous, LAI_max = 5.0, T_base = 3.0, F_crit = 450, day_start = 55, nb_day_LAI = 21):
Daily growth rate = 5.0 / 21 = 0.238 m²/m²/day
DOY 55: accumulation begins (day_start)
DOY 56: T = 2°C → below T_base, no deposit. sum_T = 0
DOY 57: T = 7°C → deposit 7. sum_T = 7
DOY 58: T = 12°C → deposit 12. sum_T = 19
... (roughly 8°C/day average contribution)
DOY 111: sum_T = 452 > 450 → budburst! budburst_date = 111
DOY 112: LAI_pheno = 0.238 (first day of leaf-out)
DOY 113: LAI_pheno = 0.476
...
DOY 132: LAI_pheno = 5.0 (full canopy after 21 days)
DOY 133–279: summer plateau, LAI_pheno = 5.0 (no change)
DOY 280: senescence begins
DOY 280: LAI_pheno = 5.0 − 0.238 = 4.762
DOY 281: LAI_pheno = 4.762 − 0.238 = 4.524
...
DOY 301: LAI_pheno ≈ 0 (fully bare after 21 days)
Parameters
state : SurEauPlantState Plant state object. The following fields are read/written: # - LAI_pheno : float # Current phenological LAI (m²/m²). Written. # - LAI : float # Current actual LAI (m²/m²). Read during senescence. # - sum_temperature : float # Cumulative forcing temperature (°C). Read/written. # - budburst_date : float # Day of year of budburst (int or NaN). Read/written. params : SurEauVegetationParams Vegetation parameters. Relevant attributes: # - foliage : str # "Evergreen", "Deciduous", or "Forced". # - LAI_max : float # Maximum leaf area index (m²/m²). # - T_base : float # Minimum temperature for forcing accumulation (°C). # - F_crit : float # Cumulative forcing threshold for budburst (°C). # - day_start : int # First DOY for temperature accumulation. # - nb_day_LAI : int # Days from budburst to full canopy. # - day_start_forced : int # Fixed budburst DOY for Forced model. # - day_end_forced : int # Fixed senescence DOY for Forced model. temperature : float Daily mean air temperature (°C). DOY : int Day of year (1–365).
Returns
state : SurEauPlantState Updated plant state with modified LAI_pheno,sum_temperature, budburst_date.