Ags#

class abcmodel.land.ags.AgsState(alpha, wg, temp_soil, temp2, surf_temp, wl, wq, wtheta, rs=<factory>, rssoil=<factory>, esat=<factory>, qsat=<factory>, dqsatdT=<factory>, e=<factory>, qsatsurf=<factory>, wCO2=<factory>, cliq=<factory>, temp_soil_tend=<factory>, wgtend=<factory>, wltend=<factory>, le_veg=<factory>, le_liq=<factory>, le_soil=<factory>, le=<factory>, hf=<factory>, gf=<factory>, le_pot=<factory>, le_ref=<factory>, vpd=<factory>, rsCO2=<factory>, gcco2=<factory>, ci=<factory>, co2abs=<factory>, wCO2A=<factory>, wCO2R=<factory>)[source]#

Bases: StandardLandState

A-gs model state.

rsCO2: Array#

Stomatal resistance to CO2.

gcco2: Array#

Conductance to CO2.

ci: Array#

Intercellular CO2 concentration.

co2abs: Array#

CO2 assimilation rate.

wCO2A: Array#

Net assimilation flux [mol m-2 s-1].

wCO2R: Array#

Respiration flux [mol m-2 s-1].

wCO2: Array#

Total CO2 flux [mol m-2 s-1].

class abcmodel.land.ags.AgsModel(c3c4='c3', **kwargs)[source]#

Bases: AbstractStandardLandModel

Ags land surface model with coupled photosynthesis and stomatal conductance.

Parameters:
  • c3c4 (str) – string indicating whether the model should use C3 or C4 photosynthesis. Default is “c3”.

  • **kwargs – additional keyword arguments to pass to the base class.

init_state(alpha=0.25, wg=0.21, temp_soil=285.0, temp2=286.0, surf_temp=290.0, wl=0.0, wq=0.0001, wtheta=0.1, rs=1000000.0, rssoil=1000000.0)[source]#

Initialize the model state.

Parameters:
  • alpha (float) – albedo [-]. Default is 0.25.

  • wg (float) – Volumetric soil moisture [m3 m-3]. Default is 0.21.

  • temp_soil (float) – Soil temperature [K]. Default is 285.0.

  • temp2 (float) – Deep soil temperature [K]. Default is 286.0.

  • surf_temp (float) – Surface temperature [K]. Default is 290.0.

  • wl (float) – Canopy water content [m]. Default is 0.0000.

  • wq (float) – Kinematic moisture flux [kg/kg m/s]. Default is 1e-4.

  • wtheta (float) – Kinematic heat flux [K m/s]. Default is 0.1.

  • rs (float) – Surface resistance [s m-1]. Default is 1.0e6.

  • rssoil (float) – Soil resistance [s m-1]. Default is 1.0e6.

Returns:

The initial land state.

compute_co2comp(thetasurf)[source]#

Compute the CO₂ compensation concentration.

Parameters:
  • thetasurf (Array) – surface potential temperature \(\theta_s\) [K].

  • rho – air density [kg m⁻³].

Returns:

The CO₂ compensation concentration \(\gamma\) [ppmv].

Notes

The CO₂ compensation point is computed as

\[\gamma = \rho \gamma_{298} Q_{10} e^{(T_s-298)/10}\]

where \(\gamma_{298}\) and \(Q_{10}\) are parameters depending on the plant type (C3 or C4). Here, \(\theta_s\) is used instead of the skin temperature \(T_s\) to compute the exponential term, probably because this comes before in the order of updates for stability?

References

Equation E.2 of the CLASS book.

compute_gm(thetasurf)[source]#

Compute the mesophyll conductance.

Parameters:

thetasurf (Array) – surface potential temperature \(\theta_s\) [K].

Returns:

Mesophyll conductance \(g_m\) [mm s⁻¹].

Notes

This is given by

\[g_m = \frac{g_{m298} \cdot \exp((T_s - 298)/10)} {[1 + \exp(0.3 \cdot (T_{1g_m} - T_s))] \cdot [1 + \exp(0.3 \cdot (T_s - T_{2g_m}))]},\]

where \(g_{m298}\), \(T_{1g_m}\) and \(T_{2g_m}\) are parameters depending on the plant type (C3 or C4). Here again, instead of using the skin temperature \(T_s\), we use \(\theta_s\).

References

Equation E.7 from the CLASS book.

compute_fmin(gm)[source]#

Compute minimum stomatal conductance factor (fmin).

Notes

The minimum stomatal conductance factor is computed by solving the quadratic equation:

\[f_{min}^2 + f_{min} \left( \frac{g_{min}}{\nu_{CO2}} - \frac{1}{9} g_m \right) - \frac{g_{min}}{\nu_{CO2}} g_m = 0\]

which leads to

\[f_{min} = -f_{min,0} + \frac{\sqrt{f_{min,0}^2 + 4 \frac{g_{min}}{\nu_{CO2}} g_m}}{2 g_m}\]

where \(f_{min,0} = \frac{g_{min}}{\nu_{CO2}} - \frac{1}{9} g_m\).

compute_ds(surf_temp, e)[source]#

Compute vapor pressure deficit (ds) in kPa.

Notes

The vapor pressure deficit is given by

\[d_s = \frac{e_{sat}(T_s) - e}{1000}\]

where \(e_{sat}(T_s)\) is the saturation vapor pressure at surface temperature and \(e\) is the actual vapor pressure.

compute_d0(fmin)[source]#

Compute reference vapor pressure deficit (d0) in kPa.

Notes

The reference vapor pressure deficit is given by

\[d_0 = \frac{f_0 - f_{min}}{a_d}\]

where \(f_0\) and \(a_d\) are empirical parameters.

compute_internal_co2(ds, d0, fmin, co2, co2comp)[source]#

Compute cfrac, co2abs, and ci (internal CO2 concentration).

Notes

The fraction of internal to ambient CO2 concentration \(c_{frac}\) is given by

\[c_{frac} = f_0 (1 - d_s/d_0) + f_{min} (d_s/d_0)\]

The ambient CO2 concentration in partial pressure units \(C_a\) is

\[C_a = [CO_2] \frac{M_{CO2}}{M_{air}} \rho\]

The internal CO2 concentration \(C_i\) is then

\[C_i = c_{frac} (C_a - \gamma) + \gamma\]

where \(\gamma\) is the CO2 compensation point.

compute_max_gross_primary_production(thetasurf)[source]#

Compute maximal gross primary production in high light conditions ammax.

Notes

The maximal gross primary production is given by

\[A_{m,max} = A_{m,max,298} Q_{10} e^{(T_s-298)/10} f_Q(T_s),\]

where \(A_{m,max,298}\) is the value at 298 K, \(Q_{10}\) is the temperature coefficient, and \(f_Q(T_s)\) is a temperature correction function given by

\[f_Q(T_s) = \frac{1}{[1 + \exp(0.3(T_{1Am}-T_s))] [1 + \exp(0.3(T_s-T_{2Am}))]}.\]

References

Equation E.3 from the CLASS book.

compute_soil_moisture_stress_factor(w2)[source]#

Compute effect of soil moisture stress on gross assimilation rate fstr.

Notes

The soil moisture stress factor is calculated based on the relative soil moisture content and the parameter \(c_{\beta}\).

\[f_{str} = \frac{1 - e^{-p \beta_w}}{1 - e^{-p}}\]

where \(\beta_w\) is the relative soil moisture and \(p\) depends on \(c_{\beta}\).

References

Equation E.19 from the CLASS book.

compute_gross_assimilation(ammax, gm, ci, co2comp)[source]#

Compute gross assimilation rate (am).

Notes

The gross assimilation rate is given by

\[A_m = A_{m,max} \left[ 1 - \exp\left( -\frac{g_m(C_i - \gamma)}{A_{m,max}} \right) \right]\]
compute_dark_respiration(am)[source]#

Compute dark respiration (rdark) as a fraction of gross assimilation.

Notes

Dark respiration is assumed to be proportional to gross assimilation:

\[R_{dark} = \frac{1}{9} A_m\]
compute_absorbed_par(in_srad)[source]#

Compute absorbed photosynthetically active rad (PAR).

Notes

Absorbed PAR is estimated as 50% of the incoming shortwave rad scaled by vegetation cover:

\[PAR = 0.5 \cdot S_{\downarrow} \cdot c_{veg}\]
compute_light_use_efficiency(co2abs, co2comp)[source]#

Compute light use efficiency (alphac).

Notes

The light use efficiency is given by

\[\alpha_c = \alpha_0 \frac{C_a - \gamma}{C_a + 2\gamma}\]
compute_canopy_co2_conductance(alphac, par, am, rdark, fstr, co2abs, co2comp, ds, d0, fmin)[source]#

Compute upscaling from leaf to canopy and CO2 conductance at canopy level gcco2.

Notes

The canopy conductance is obtained by integrating the leaf conductance over the canopy depth, assuming an exponential decay of rad and photosynthetic capacity.

References

Equations E.13, E.14, E.15 from the CLASS book.

compute_rs(gcco2)[source]#

Compute surface resistance from canopy CO2 conductance.

Notes

The surface resistance is related to the canopy CO2 conductance by

\[r_s = \frac{1}{1.6 g_{c,CO2}}\]

where the factor 1.6 accounts for the ratio of diffusivities of water vapor and CO2.

update_surface_resistance(state)[source]#

Compute surface resistance using Ags photosynthesis-conductance model.

compute_surface_co2_resistance(gcco2)[source]#

Compute surface resistance to CO₂ (rsCO2) from canopy conductance.

Notes

\[r_{s,CO2} = \frac{1}{g_{c,CO2}}\]
compute_net_assimilation(co2abs, ci, ra, rsCO2)[source]#

Compute net CO₂ assimilation rate (an).

Notes

The net assimilation rate is given by the diffusion equation:

\[A_n = -\frac{C_a - C_i}{r_a + r_{s,CO2}}\]
compute_soil_water_fraction(wg)[source]#

Compute soil water fraction (fw) for respiration scaling.

Notes

\[f_w = \frac{c_w W_{max}}{w_g + w_{min}}\]
compute_respiration(temp_soil, fw)[source]#

Compute soil respiration (resp) as a function of temperature and soil water.

Notes

Soil respiration is given by

\[R_{soil} = R_{10} (1 - f_w) \exp\left( \frac{E_0}{R T_{ref}} (1 - T_{ref}/T_{soil}) \right)\]

where \(R_{10}\) is the reference respiration at 10°C, \(E_0\) is the activation energy, and \(T_{ref} = 283.15\) K.

scale_flux_to_mol(flux)[source]#

Scale a flux to mol m⁻² s⁻¹ using physical constants.

Notes

The scaling is given by

\[F_{mol} = F \frac{M_{air}}{\rho M_{CO2}}\]
update_co2_flux(state)[source]#

Compute the CO₂ flux and update the state.

Notes

This method updates the CO2 flux variables in the state: - rsCO2: Surface resistance to CO2 - wCO2A: Net assimilation flux (scaled to mol) - wCO2R: Respiration flux (scaled to mol) - wCO2: Total CO2 flux