Difference equation

RegionalGrasslandSim.input_WHC_PWPMethod
input_WHC_PWP(; sand, silt, clay, organic, bulk, rootdepth)

Derive walter holding capacity (WHC) and permanent wilting point (PWP) from soil properties.

\[\begin{align} θ₁ &= a₁ ⋅ \text{sand} + b₁ ⋅ \text{silt} + c₁ ⋅ \text{clay} + d₁ ⋅ \text{organic} + e₁ ⋅ \text{bulk} \\ \text{WHC} &= θ₁ ⋅ \text{rootdepth} \\ θ₂ &= a₂ ⋅ \text{sand} + b₂ ⋅ \text{silt} + c₂ ⋅ \text{clay} + d₂ ⋅ \text{organic} + e₂ ⋅ \text{bulk} \\ \text{PWP} &= θ₂ ⋅ \text{rootdepth} \end{align}\]

Equation and coefficients are taken from [19]. The coefficients a, b, c, d and e differ for the water holding capacity (matrix potential Ψ = -0.07 bar) and the permanent wilting point (matrix potential Ψ = -15 bar). The empirical coefficients that were estimated by [19] can be seen in the folling table:

Ψ [bar]abcde
-0.070.0056780.0092280.0091350.006103-0.2696
-15-5.9e-50.0011420.0057660.0022280.02671
  • sand: sand content [%]
  • silt: silt content [%]
  • clay: clay content [%]
  • bulk: bulk density [g cm⁻³]
  • organic: organic matter content [%]
  • rootdepth: rooting depth [mm]
  • θ: water content [cm³ cm⁻³]
  • WHC: water holding capacity [mm]
  • PWP: permanent wilting point [mm]
source
RegionalGrasslandSim.input_nutrientsMethod
input_nutrients(; gradientm, total_N, CN_ratio)

Derive a nutrient index by combining total nitrogen and carbon to nitrogen ratio.

\[ N = \frac{1}{1 + exp(-β₁ ⋅ \text{total_N} -β₂ ⋅ \text{CN_ratio}⁻¹)}\]

  • CN_ratio: carbon to nitrogen ratio [-]
  • total_N: total nitrogen [g kg⁻¹]
source
RegionalGrasslandSim.solve_probMethod
solve_prob(; input_obj, inf_p, calc = nothing)

Solve the model for one site.

Intialize the parameters, the state variables and the output vectors. In addition some vectors are preallocated to avoid allocations in the main loop. Then, run the main loop and store the results in the output vectors.

source