pedon.soil module¶
- class pedon.soil.Soil(name: str, model: SoilModel | None = None, sample: SoilSample | None = None, source: str | None = None, description: str | None = None)¶
Bases:
objectA class representing soil properties and models.
- name¶
The name identifier for the soil.
- Type:
str
- model¶
The soil model instance containing hydraulic parameters, by default None.
- Type:
SoilModel | None, optional
- sample¶
The soil sample data associated with this soil, by default None.
- Type:
SoilSample | None, optional
- source¶
The data source for the soil parameters (e.g., ‘HYDRUS’, ‘Staring_2018’), by default None.
- Type:
str | None, optional
- description¶
A text description of the soil type, by default None.
- Type:
str | None, optional
- description: str | None = None¶
- from_name(sm: Type[SoilModel] | SoilModel | str, source: str | None = None) Self¶
Load soil parameters from a CSV database by soil name and model type.
- from_staring(year: str = '2018') Self¶
Load soil parameters from the Staring series database.
- static list_names(sm: Type[SoilModel] | SoilModel | str) list[str]¶
Return a list of available soil names for a given soil model.
- name: str¶
- sample: SoilSample | None = None¶
- source: str | None = None¶
- class pedon.soil.SoilSample(sand_p: float | None = None, silt_p: float | None = None, clay_p: float | None = None, rho: float | None = None, th33: float | None = None, th1500: float | None = None, om_p: float | None = None, m50: float | None = None, d10: float | None = None, d20: float | None = None, h: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None, k: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None, theta: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None)¶
Bases:
objectA container for measured soil properties and in-situ soil hydraulic data, with convenience routines to predict hydraulic parameters using a range of pedo- transfer functions and empirical models.
- sand_p¶
Sand fraction in percent (%).
- Type:
float | None
- silt_p¶
Silt fraction in percent (%).
- Type:
float | None
- clay_p¶
Clay fraction in percent (%).
- Type:
float | None
- rho¶
Bulk density (g cm^-3).
- Type:
float | None
- th33¶
Water content at -33 kPa (cm).
- Type:
float | None
- th1500¶
Water content at -1500 kPa (cm).
- Type:
float | None
- om_p¶
Organic matter content in percent (%).
- Type:
float | None
- m50¶
Median sand fraction (μm).
- Type:
float | None
- d10¶
Representative grain diameter from sieve curve (m).
- Type:
float | None
- d20¶
Representative grain diameter from sieve curve (m).
- Type:
float | None
- h¶
Pressure head measurements (cm).
- Type:
FloatArray | None
- k¶
Hydraulic conductivity measurements (m s^-1 or cm d^-1).
- Type:
FloatArray | None
- theta¶
Measured volumetric water content (dimensionless).
- Type:
FloatArray | None
Notes
Verify units before use as different methods expect specific conventions.
Methods return soil hydraulic model instances (e.g., Genuchten, Brooks).
Some methods make external API calls (rosetta) or use empirical relationships.
- clay_p: float | None = None¶
- cosby() Brooks¶
Cooper (2021) - Using data assimilation to optimize pedotransfer functions using field-scale in situ soil moisture observations
- d10: float | None = None¶
- d20: float | None = None¶
- fit(sm: Type[SoilModel], pbounds: DataFrame | None = None, weights: float | ndarray[tuple[Any, ...], dtype[float64]] = 1.0, W1: float = 0.1, W2: float | None = None, k_s: float | None = None, silent: bool = True) SoilModel¶
Fit the provided SoilModel (e.g., van Genuchten, Brooks-Corey class) to the stored measurements (theta, k, h) using nonlinear least squares. If pbounds is not provided, default parameter bounds are retrieved for the requested model name. The objective combines water retention and log10(k) errors; weighting terms W1 and W2 control the relative contribution of k. Returns a model instance with optimized parameters.
Notes
Requires theta and k (and optionally h) to be set.
If k_s is provided it will be fixed during optimization.
Input/outputs and bounds are expected in the units used by the soil model.
- from_staring(name: str, year: str = '2018') SoilSample¶
Get properties and measurements from Staring series
- h: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None¶
- hypags() Genuchten¶
Estimate van Genuchten parameters using the HYPAGS method.
Implements the Kozeny-Carman-based parameterization from Peche & Houben (2023, 2024) to derive van Genuchten parameters and characteristic grain-size metrics from hydraulic conductivity and/or grain size inputs.
The routine: - Accepts k (hydraulic conductivity), d10, or d20 as input (at least one required) - Iteratively estimates effective porosity (ne), d50, and d60 - Computes van Genuchten alpha and n parameters with bootstrap-derived errors - Returns a Genuchten model with k_s, theta_r, theta_s, alpha, and n
Notes
Grain diameters should be in meters; k in m s^-1
Input values outside empirically supported ranges trigger warnings
theta_r is estimated from k; theta_s equals effective porosity (ne)
- Returns:
Van Genuchten soil model with estimated parameters.
- Return type:
References
Peche, A., Houben, G., & Altfelder, S. (2024). Approximation of van Genuchten Parameter Ranges from Hydraulic Conductivity Data. Groundwater, 62(3), 469-479.
Peche, A., & Houben, G. J. (2023). Estimating characteristic grain sizes and effective porosity from hydraulic conductivity data. Groundwater, 61(4), 574-585.
- k: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None¶
- m50: float | None = None¶
- om_p: float | None = None¶
- rho: float | None = None¶
- rosetta(version: Literal[1, 2, 3] = 3) Genuchten¶
Rosetta (Schaap et al., 2001) - Predicting soil water retention from soil
- sand_p: float | None = None¶
- silt_p: float | None = None¶
- th1500: float | None = None¶
- th33: float | None = None¶
- theta: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None¶
- wosten(ts: bool = False) Genuchten¶
Wosten et al (1999) - Development and use of a database of hydraulic properties of European soils