Summary:

Numerical Implementation of Vegetation Water Potential

The model uses a circuit-analog approach to calculate the vegetation water potential (ψ) for four plant nodes: sunlit leaf (ψsunleaf), shaded leaf (ψshadeleaf), stem (ψstem), and root (ψroot). These potentials are calculated based on soil matric potential and unstressed transpiration, which is then used to compute stomatal conductance and the water stress factor (βt).

Key steps:
1. Define the transpiration fluxes (Esun, Eshade) and water supply fluxes (q1a, q1b, q2, qsoil) in terms of the water potentials.
2. Use a linearized explicit approach with Newton's method to iteratively solve for the vector of water potentials (ψ) that satisfies the water flow continuity equations.
3. Compute the change in water potentials (Δψ) by solving the matrix equation AΔψ = b, where A and b are derived from the flux equations.
4. Update the water potentials using ψm+1 = ψm + Δψ, iterating until the water fluxes are balanced (b → 0).
5. Use the final transpiration solution to compute the stomatal conductance and the water stress factors (βt,sun, βt,shade), which are then used in the Photosynthesis module.
6. The solution for ψ is saved as the vegetation water potential, and the soil-to-root fluxes (q3,i) are used as the soil transpiration sink in the Richards' equation subsurface flow equations.