Skip to main content

SurEau soil params


source

compute_soil_root_geometry

def compute_soil_root_geometry(
    soil:plant_hydraulics.parameter_classes.SurEauSoilParams,
    veg:plant_hydraulics.parameter_classes.SurEauVegetationParams
)->plant_hydraulics.parameter_classes.SurEauSoilParams:

Compute soil parameters depending on plant parameters (Gardner-Cowan geometry). Old function name init_par_soil


source

sureau_soil_params

def sureau_soil_params(
    soil:plant_hydraulics.parameter_classes.SurEauSoilParams, # SurEau soil parameters object with the following input attributes:
    # - depth : np.ndarray
    #     Cumulative depth of each soil layer bottom (m).
    # - RFC : np.ndarray
    #     Rock fragment content for each layer (%).
    # - g_soil0 : float
    #     Maximum soil surface conductance to water vapor (mmol/m2/s).
    # - offset_psoil : np.ndarray
    #     Offset applied to soil water potential for each layer (MPa).
    # - psoil_at_field_capacity : float
    #     Soil water potential at field capacity (MPa).
    # - reset_SWC : bool
    #     Whether to reset soil water content to field capacity each year.
    # - water_soil_transfer : bool
    #     Whether inter-layer water transfer is enabled.
    # - soil_evap : bool
    #     Whether soil surface evaporation is enabled.
    # - PTF : str
    #     Pedotransfer function to use: "VG" (van Genuchten) or "Campbell".
    # - Ksat : np.ndarray
    #     Saturated hydraulic conductivity for each layer (mm/h).
    # - saturation_capacity : np.ndarray
    #     Volumetric water content at saturation for each layer (m3/m3).
    # - residual_capacity : np.ndarray
    #     Residual volumetric water content for each layer (m3/m3).
    # - alpha_vg : np.ndarray
    #     Van Genuchten alpha parameter for each layer (cm-1).
    # - n_vg : np.ndarray
    #     Van Genuchten n shape parameter for each layer (-).
    # - I_vg : np.ndarray
    #     Van Genuchten tortuosity parameter for each layer (-).
    # - b_camp : np.ndarray
    #     Campbell b shape parameter for each layer (-).
    # - psie_camp : np.ndarray
    #     Campbell air-entry potential for each layer (MPa).
)->plant_hydraulics.parameter_classes.SurEauSoilParams: # Updated SurEau soil parameters object with the following derived attributes:
- n_layers : int
    Number of soil layers (-).
- layer_thickness : np.ndarray
    Thickness of each soil layer (m).
- m : np.ndarray
    Van Genuchten m parameter, computed as 1 - 1/n_vg (-).
- V_field_capacity : np.ndarray
    Water height at field capacity for each layer (mm).
- V_saturation_capacity : np.ndarray
    Water height at saturation for each layer (mm).
- V_residual_capacity : np.ndarray
    Water height at residual content for each layer (mm).
- V_wilting_point : np.ndarray
    Water height at wilting point (-1.5 MPa) for each layer (mm).
- B_GC : np.ndarray
    Gardner-Cowan geometry factor for each layer (-).
    Set to 0.5 placeholder if not previously computed from root geometry.

Compute derived soil hydraulic quantities from raw SurEau soil parameters.

Broadcasts scalar inputs to per-layer arrays, computes layer thicknesses, van Genuchten or Campbell derived parameters, and converts volumetric water contents to water heights (mm) for field capacity and wilting point.

Parameters:

  • soil: SurEauSoilParams object with the following input attributes:

    • depth: Cumulative depth of each soil layer bottom (m).
    • RFC: Rock fragment content for each layer (%).
    • g_soil0: Maximum soil surface conductance to water vapor (mmol/m2/s).
    • offset_psoil: Offset applied to soil water potential for each layer (MPa).
    • psoil_at_field_capacity: Soil water potential at field capacity (MPa).
    • reset_SWC: Whether to reset soil water content to field capacity each year (bool).
    • water_soil_transfer: Whether inter-layer water transfer is enabled (bool).
    • soil_evap: Whether soil surface evaporation is enabled (bool).
    • PTF: Pedotransfer function to use: “VG” (van Genuchten) or “Campbell”.
    • Ksat: Saturated hydraulic conductivity for each layer (mm/h).
    • saturation_capacity: Volumetric water content at saturation for each layer (m3/m3).
    • residual_capacity: Residual volumetric water content for each layer (m3/m3).
    • alpha_vg: Van Genuchten alpha parameter for each layer (cm-1).
    • n_vg: Van Genuchten n shape parameter for each layer (-).
    • I_vg: Van Genuchten tortuosity parameter for each layer (-).
    • b_camp: Campbell b shape parameter for each layer (-).
    • psie_camp: Campbell air-entry potential for each layer (MPa).

Returns:

  • soil: Updated SurEauSoilParams object with the following derived attributes:

    • n_layers: Number of soil layers (-).
    • layer_thickness: Thickness of each soil layer (m).
    • m: Van Genuchten m parameter, computed as 1 - 1/n_vg (-).
    • V_field_capacity: Water height at field capacity for each layer (mm).
    • V_saturation_capacity: Water height at saturation for each layer (mm).
    • V_residual_capacity: Water height at residual content for each layer (mm).
    • V_wilting_point: Water height at wilting point (-1.5 MPa) for each layer (mm).
    • B_GC: Gardner-Cowan geometry factor for each layer (-). Set to 0.5 placeholder if not previously computed from root geometry.

Parameters

soil : SurEauSoilParams SurEau soil parameters object with the following input attributes: - depth : np.ndarray Cumulative depth of each soil layer bottom (m). - RFC : np.ndarray Rock fragment content for each layer (%). - g_soil0 : float Maximum soil surface conductance to water vapor (mmol/m2/s). - offset_psoil : np.ndarray Offset applied to soil water potential for each layer (MPa). - psoil_at_field_capacity : float Soil water potential at field capacity (MPa). - reset_SWC : bool Whether to reset soil water content to field capacity each year. - water_soil_transfer : bool Whether inter-layer water transfer is enabled. - soil_evap : bool Whether soil surface evaporation is enabled. - PTF : str Pedotransfer function to use: “VG” (van Genuchten) or “Campbell”. - Ksat : np.ndarray Saturated hydraulic conductivity for each layer (mm/h). - saturation_capacity : np.ndarray Volumetric water content at saturation for each layer (m3/m3). - residual_capacity : np.ndarray Residual volumetric water content for each layer (m3/m3). - alpha_vg : np.ndarray Van Genuchten alpha parameter for each layer (cm-1). - n_vg : np.ndarray Van Genuchten n shape parameter for each layer (-). - I_vg : np.ndarray Van Genuchten tortuosity parameter for each layer (-). - b_camp : np.ndarray Campbell b shape parameter for each layer (-). - psie_camp : np.ndarray Campbell air-entry potential for each layer (MPa).

Returns

soil : SurEauSoilParams Updated SurEau soil parameters object with the following derived attributes: - n_layers : int Number of soil layers (-). - layer_thickness : np.ndarray Thickness of each soil layer (m). - m : np.ndarray Van Genuchten m parameter, computed as 1 - 1/n_vg (-). - V_field_capacity : np.ndarray Water height at field capacity for each layer (mm). - V_saturation_capacity : np.ndarray Water height at saturation for each layer (mm). - V_residual_capacity : np.ndarray Water height at residual content for each layer (mm). - V_wilting_point : np.ndarray Water height at wilting point (-1.5 MPa) for each layer (mm). - B_GC : np.ndarray Gardner-Cowan geometry factor for each layer (-). Set to 0.5 placeholder if not previously computed from root geometry.

Example sureau_soil_params()

from plant_hydraulics.parameter_classes import SurEauSoilParams, SurEauSoil
from plant_hydraulics.sureau_soil_params import sureau_soil_params
soil_params = SurEauSoilParams(
    depth=np.array([0.2, 0.8, 2.0]),
    RFC=np.array([75.0, 75.0, 75.0]),
    g_soil0=30.0,
    PTF="VG",
    Ksat=np.array([1.69, 1.69, 1.69]),
    saturation_capacity=np.array([0.50, 0.50, 0.50]),
    residual_capacity=np.array([0.098, 0.098, 0.098]),
    alpha_vg=np.array([0.0005, 0.0005, 0.0005]),
    n_vg=np.array([1.55, 1.55, 1.55]),
    I_vg=np.array([0.5, 0.5, 0.5]),
)
soil_params = sureau_soil_params(soil_params)