96 retention models
8 basic × {uni·bi·tri-modal} × 4 variants (original·Brunswick·PDI·Wang).
Documentation
A complete, hands-on guide to fitting soil water-retention curves (SWRC, θ(h)) and hydraulic-conductivity curves (HCC, K(h)) with 96 retention models, 6 conductivity models, three fit objectives, and bootstrap or likelihood uncertainty. This manual applies to both the web app and the desktop app — the interface is identical.
Teaching a class? See the short, student-friendly classroom guide built around the app's Learner mode (soil presets + manual curve preview).
The SWRC/HCC Fitter estimates the two functions that govern unsaturated water flow in soil:
pF = log₁₀(h in cm)).You upload measured points, pick a model, and the app fits the model parameters by global optimisation (differential evolution), then shows the fitted curves, parameters with confidence intervals, goodness-of-fit metrics, and 95 % confidence and prediction intervals. You can fit and compare several models at once.
The app opens in Simple mode — van Genuchten–Mualem (VGM) and its Brunswick version (BW-VGM), which covers most everyday work. Switch to Power user (top of the model pane) for all 96 retention models, every conductivity model and the expert options (§5.2).
8 basic × {uni·bi·tri-modal} × 4 variants (original·Brunswick·PDI·Wang).
Mualem, Burdine, Alexander–Skaggs, Childs–Collis-George, plus Gardner exponential & power — with any retention curve.
nRMSE, NSE, or Gaussian NLL (which also calibrates the noise σ).
95 % confidence intervals and 95 % prediction intervals, by bootstrap or by likelihood (NLL) — validated by simulation.
The app is the same in both places, so every step in this manual applies to both.
Open PTF.bluerror.com in any modern browser. Your data is processed in a private session and is not stored.
SWRC-HCC-Fitter-setup.exe from the latest release..run) is on the same release page.Web vs desktop differences are cosmetic only: the desktop app runs in its own window and handles file dialogs natively; the web app opens in a browser tab. The fitting engine and every control are identical.
The app reads CSV, text, and Excel (.xlsx / .xls) files. You can provide the two branches separately or in one combined file.
Columns are auto-detected, and you confirm the mapping in the toolbar.
A retention file with a suction column and a water-content column, and a conductivity file with a suction column and a conductivity column. Suction can be given as pF (= log₁₀ of cm of head).
| RetMeas.csv | CondMeas.csv |
|---|---|
|
|
pF — suction as log₁₀(h/cm). E.g. pF 2 = 100 cm ≈ 10 kPa; pF 4.2 ≈ permanent wilting point.theta — volumetric water content (cm³/cm³), e.g. 0.0–0.5.K — unsaturated conductivity in your own units (e.g. cm/day). Must be positive (it is fitted in log space).Use a sample_id column plus separate suction columns for each branch. Leave cells blank where a
branch has no measurement on that row.
sample_id,pF_theta,theta,pF_K,K
Loam_A,0.00,0.4294,0.50,38.73
Loam_A,1.50,0.3310,1.40,4.467
Loam_A,2.30,0.1738,2.30,0.00922
Sand_B,0.00,0.3790,0.50,290.4
Sand_B,1.50,0.2104,1.40,55.13
A sample may have only retention or only conductivity — whichever branch is present is fitted. If your suction is in kPa or cm, convert to pF with pF = log₁₀(head in cm) (1 kPa ≈ 10.2 cm).
The app ships with three public soil hydraulic databases. In the toolbar, open
“No data? Try a database”, pick a source and a soil sample, and click
Load — the measured retention and conductivity are loaded ready to fit
(your own uploads are never touched). You can also download the whole collection as an
Excel workbook (one *_SWRC and one *_HCC sheet per source, each
with Sample_ID and pF).
Please also cite the database(s) you use:
Smart reader. Drop in CSV, text, or Excel — the app figures out the rest. It auto-detects the separator (comma, semicolon, or tab) and decimal mark (so European / LabView exports using ; with a , decimal load directly), picks the right worksheet in an Excel workbook, and finds where the data table starts even when there are metadata/preamble rows above it (common in instrument exports). It also auto-detects whether the conductivity column is K or already log₁₀(K) (name contains “log”, or any value ≤ 0), so it never double-logs. No setup — and if a guess is off, just re-pick the columns in the toolbar.
pF/θ and Conductivity pF/K dropdowns (auto-guessed). Pick a sample_id column and a single sample if you have several.The toolbar groups the inputs: the upload zone, then Retention θ(h) (pF, θ), Conductivity K(h) (pF, K), and Sample (ID column + one sample). Hover (or tap) the ⓘ badge on any panel for an in-app explanation.
Screen size and zoom. On big monitors the whole interface is scaled up; on small laptop screens the text keeps its normal size and the page scrolls instead of shrinking (the control panes may wrap onto two rows). Browser zoom works as on any website — Ctrl + makes everything bigger, Ctrl − smaller (⌘ on a Mac; the same keys work in the desktop app). Narrow windows and phones get the one-view-at-a-time layout with a bottom tab bar. All control panes (optimisation, model, both parameter tables, results) have the same height, set by the window size alone — switching Simple ⇄ Power user, uni/bi/trimodal or learner mode never changes it or the plot area; a pane with more content (e.g. the Power-user model pane) scrolls inside.
Simple | Power user. The switch at the top of the model pane sets how much of the model library you see. The app remembers your choice in this browser (or desktop app); first-time visitors start in Simple.
| Mode | Models | Default model |
|---|---|---|
| Simple | van Genuchten (m = 1 − 1/n) only, in two variants: VGM (original, with Mualem conductivity) and BW-VGM (Brunswick, Weber et al. 2019) — uni-, bi- or trimodal. The conductivity model is Mualem, and the expert options (6 cm pore cutoff, Brunswick film base h₀/ha, vapor conductivity, other K models) are hidden and stay at the paper defaults. | unimodal VGM |
| Power user | All 8 retention shapes × 4 variants × 3 modalities (96 models), all 6 conductivity models and every expert option — everything described below. | unimodal BW-VGM (Brunswick van Genuchten) |
The default is only used until you pick a model yourself; switching modes keeps your selection where the mode allows it (going to Simple keeps VGM / BW-VGM models and otherwise selects unimodal VGM). Restoring a saved session that uses a model or option Simple mode does not show switches to Power user automatically — the restored model is never changed.
The matrix has one row per retention function and one column per variant (original · Brunswick · PDI · Wang; in Simple mode just the VGM and BW-VGM cells). Click a cell to select that model (filled). Above the matrix, switch the modality (unimodal / bimodal / trimodal) — a single selected model follows the switch. Below it (Power user), choose the conductivity (K) model(s). Hovering a cell with the mouse shows the model's equations; on a touch screen a long press does (✕ or any tap closes it).
Several models at once. Ctrl+click (⌘+click on a Mac) a cell to add it to the selection or remove it again — or tick Select several models above the matrix: then every plain click (or tap) adds or removes a model, no key needed — up to 10 models, also across modalities. Example: with unimodal VGM selected, switch the modality to bimodal (the model moves to bimodal VGM), then Ctrl+click bimodal VGM: both unimodal and bimodal VGM are now selected. While two or more models are selected the modality switch only changes which cells are shown. The line under the matrix lists the selection (“3 models: ★ VGM · uni · VGM · bi · BW-VGM · tri”): the ★ model is the primary one whose parameters are shown in the tables; click another chip to make it primary, ✕ to remove one, clear to keep only the primary. With Select several models unticked, a plain click (tap) always selects just that one model again.
| Variant | What it adds | Source |
|---|---|---|
| original | Classic capillary model. θ(h) reaches a residual θr. | — |
| Brunswick | Adds a non-capillary (film/adsorptive) term so θ→0 at oven dryness; extra film-conductivity terms. Uses θcs/θncs notation. | Weber et al. 2019 |
| PDI | Peters–Durner–Iden adsorptive saturation; θ→0 at pF 6.8. Adds Ksnc, a; tortuosity τs. Film conductivity follows Eq. 21 (base h₀/ha), so a = 1.5 gives the physical Tokunaga −1.5 dry-end slope; Brunswick uses Weber's Eq. 12 (base h₀). | Peters, Durner & Iden 2024 |
| Wang | Wang, Ma & Vereecken (2025) generalized framework: θ = C(h)·[(θs−θr)Γ + θr], C(h) = [1 − ln(1+h/hr)/ln(1+h0/hr)]nc. The exponent nc makes one capillary curve produce a bimodal SWRC. Conductivity is matched at ha=−6 cm (K(ha)) for the sharp near-saturation structure decline, plus a film term; Ks is anchored to the wettest measured K and the structure branch enforces Ks ≥ K(ha) so K(h) stays continuous (no near-saturation step). Following Table 2, nc=1, pF₀=6.8 and the tortuosity l(τ)=0.5 are fixed by default; tick any of them to fit — untick nc stays 1 (U-model), tick it for the bimodal B-model that performed best in the paper. | Wang, Ma & Vereecken 2025 |
| Control | Meaning |
|---|---|
| bootstrap | Number of resample-and-refit rounds used to build the 95 % confidence intervals (parameters and curves) and the 95 % prediction intervals (see §5.7). 0 or 1 = off (fastest). 100–200 is typical. Used for nRMSE/NSE. |
| max iter | Differential-evolution generations. Higher = more thorough optimisation (and slower). 150 is a good default. |
| Fit metric | The objective — see §5.4 and §8. |
Two tables — retention and conductivity — list each parameter with its fitted Value and its 95 % confidence interval (2.5 % / 97.5 %, §5.7). Symbols follow the selected variant's source paper (e.g. α, n, θr, θs; for Brunswick θcs, θncs; for PDI Ksnc, τs).
Fit or fix each parameter. Every row has a checkbox. Ticked (the default) means the parameter is fitted. Untick it to pin the parameter at the value in its box — type the value you want first, then untick — and it is held fixed while everything still ticked is fitted around it. This is useful when you know a value independently (say θs from saturation, or Ks from a measurement) and want the rest of the curve fitted to it. The min/max cells set each fitted parameter's search range. Your edited bounds and fit/fix toggles are kept across fits — only restore parameters resets everything to defaults.
Oven-dryness head pF₀. The full-range variants (PDI, Brunswick, Wang) carry an extra parameter pF₀ — the suction, in pF, at which θ → 0. It is a normal parameter row: it defaults to pF 6.8 and is fixed (its box unticked), reproducing the classic dry end. Change its value, set its range, or tick it to fit pF₀ to your dry-end data like any other parameter.
Toggle each square plot independently. Measured points are shown as dots and fitted models as lines; a standalone legend sits to the right so the plots stay square.
θ(h), K(h) and K(θ) carry a 95 % confidence interval (darker) and a 95 % prediction interval (lighter, dotted edge); capacity and pore-size carry the 95 % confidence interval (§5.7).
Full screen. Each plot has a full-screen button in its corner. It shows that figure over the whole window (or phone screen), re-drawn at full resolution — not magnified — with the same curves, intervals (with the same confidence interval / prediction interval ticks as the legend; changing them keeps your zoom) and data, the legend inside the figure, and the zoom you had set. Drag to zoom, double-click to reset, use the Plotly tools (top right) to pan, and ⬇ PNG to save the figure as shown at high resolution. Esc or ✕ closes it.
Every fit can carry two different 95 % intervals. They answer different questions, and since 3.2.0 both are computed rigorously in both uncertainty modes and validated by simulation (below):
Both are shown on Retention θ(h), Conductivity K(h) and Conductivity K(θ); Capacity C(h) and Pore-size show the 95 % confidence interval. The legend names the method, e.g. “95 % confidence interval (bootstrap)” or “95 % prediction interval (likelihood)”, and hovering a legend entry explains it. θ is treated on its volumetric scale and K on the log₁₀ scale (the scales the fit uses). θ and K are always fitted together (one parameter vector for both branches), and every interval comes from that joint fit: each bootstrap refit and each likelihood draw gives one matching set of θ(h), K(h) and K(θ) curves.
Several models. Every selected model gets its own intervals — its own bootstrap (B refits per model, so the fit takes about that many times longer) or its own likelihood draws. The plots first show the intervals of the primary ★ model only; the ticks confidence interval / prediction interval under each model in the legend (and the all models row) choose which intervals are drawn, in every plot, the full-screen view, ⬇ Figure and the PDF report.
3.1 drew the prediction band as “confidence band ± 1.96 σresidual”; it is replaced. B = 100–200 is a good choice (the simulation used 100).
K(θ) intervals are read at a fixed water content: each refit / draw gives its own K(θ) curve (its K(h) plotted against its own θ(h)), and the percentiles are taken at the θ values of the fitted curve. The 95 % prediction interval on K(θ) is for a new log₁₀ K measurement at a known water content; the measurement error of that point's θ is not part of it (points plotted at a measured θ scatter a little more, see the last coverage row).
The script tools/coverage_test.py (in the source) simulates data sets from known curves,
fits each through the real engine and counts how often the intervals contain the truth. Design like a HYPROP +
WP4 measurement: 41 θ points (35 at pF 0.3–3.0, 6 at pF 3.2–4.2) and 13 log₁₀ K points (one Ks at
pF 0, 12 at pF 1.6–3.0), noise σθ = 0.008, σlogK = 0.15; and a sparser design (25 θ
points at pF 0–4.2, 10 K points at pF 1.6–3.0, σθ = 0.01, σlogK = 0.2). Truth: unimodal
VGM (θr 0.06, θs 0.43, α 0.02 cm⁻¹, n 1.6, Ks 50 cm d⁻¹, τ 0.5) and unimodal
BW-VGM (θncs 0.04, θcs 0.40, α 0.03, n 1.8, pF₀ 6.8, Ksc 30, τ 0.5,
Ksnc 0.05, a 1.5). 300 simulated data sets per model and design; bootstrap with B = 100 refits (100–200 is the recommended range; 100 keeps the run affordable), likelihood with 2000 draws; the previous version (3.1) was run on the same HYPROP data sets for comparison. Confidence interval: share of pF grid points in the measured range
where the true curve lies inside; prediction interval: share of new, independent measurements (at the design
pF and at random pF) that fall inside. ± = Monte-Carlo standard error (data sets are the independent units).
Target: 95 %.
HYPROP + WP4 design (41 θ, 13 log₁₀ K points; coverage in %, “3.1” = the previous version on the same data sets):
| Quantity | VGM bootstrap 3.2 | VGM bootstrap 3.1 | VGM likelihood 3.2 | VGM likelihood 3.1 | BW-VGM bootstrap 3.2 | BW-VGM bootstrap 3.1 | BW-VGM likelihood 3.2 | BW-VGM likelihood 3.1 |
|---|---|---|---|---|---|---|---|---|
| θ(h) — confidence interval covers the true curve | 93.3 ± 0.6 | 91.6 ± 0.7 | 94.3 ± 0.6 | 88.1 ± 0.8 | 96.0 ± 0.4 | 94.1 ± 0.5 | 94.7 ± 0.6 | 89.1 ± 0.8 |
| log₁₀ K(h) — confidence interval covers the true curve | 91.8 ± 1.0 | 86.0 ± 1.3 | 94.2 ± 0.9 | 60.4 ± 1.4 | 95.0 ± 0.7 | 86.9 ± 1.1 | 94.7 ± 0.7 | 54.5 ± 1.2 |
| K(θ) — confidence interval covers the true curve | 92.9 ± 0.9 | 77.6 ± 1.4 | 95.2 ± 0.7 | 49.9 ± 1.4 | 95.8 ± 0.6 | 82.2 ± 1.2 | 95.6 ± 0.6 | 50.2 ± 1.3 |
| θ AND K at the same pF — both confidence intervals cover | 85.8 ± 1.1 | 78.9 ± 1.4 | 88.3 ± 1.0 | 56.0 ± 1.5 | 91.7 ± 0.8 | 82.6 ± 1.1 | 90.1 ± 0.8 | 52.8 ± 1.3 |
| θ — prediction interval, new measurement at the measured pF | 94.9 ± 0.2 | 97.3 ± 0.2 | 94.6 ± 0.2 | — | 96.1 ± 0.2 | 98.0 ± 0.1 | 95.5 ± 0.2 | — |
| θ — prediction interval, new measurement at random pF | 94.9 ± 0.2 | 97.6 ± 0.1 | 94.7 ± 0.2 | — | 95.2 ± 0.2 | 97.7 ± 0.1 | 94.8 ± 0.2 | — |
| log₁₀ K — prediction interval, new measurement at the measured pF | 93.0 ± 0.5 | 94.5 ± 0.5 | 92.8 ± 0.6 | — | 94.3 ± 0.5 | 94.2 ± 0.5 | 95.5 ± 0.4 | — |
| log₁₀ K — prediction interval, new measurement at random pF | 93.2 ± 0.4 | 95.6 ± 0.3 | 94.2 ± 0.4 | — | 95.2 ± 0.3 | 94.9 ± 0.4 | 94.9 ± 0.4 | — |
| θ AND K — both prediction intervals hold a new pair (random pF) | 89.4 ± 0.4 | 93.2 ± 0.3 | 89.8 ± 0.4 | — | 91.4 ± 0.4 | 92.5 ± 0.4 | 89.9 ± 0.4 | — |
| K(θ) — prediction interval, new log₁₀ K at known θ | 94.1 ± 0.4 | — | 94.9 ± 0.4 | — | 95.6 ± 0.3 | — | 95.2 ± 0.3 | — |
| K(θ) — same, point plotted at a measured θ | 86.0 ± 0.5 | — | 86.5 ± 0.6 | — | 91.3 ± 0.4 | — | 90.4 ± 0.5 | — |
| mean width, confidence interval θ [vol. %] | 1.10 | 1.02 | 0.99 | 0.81 | 1.20 | 1.08 | 1.05 | 0.87 |
| mean width, prediction interval θ [vol. %] | 3.48 | 4.03 | 3.36 | — | 3.55 | 4.10 | 3.40 | — |
| mean width, confidence interval log₁₀ K | 0.32 | 0.26 | 0.29 | 0.12 | 0.70 | 0.50 | 0.42 | 0.16 |
| mean width, prediction interval log₁₀ K | 0.69 | 0.76 | 0.70 | — | 1.02 | 0.95 | 0.77 | — |
Sparse design (25 θ, 10 log₁₀ K points; 3.2 only):
| Quantity | VGM bootstrap 3.2 | VGM likelihood 3.2 | BW-VGM bootstrap 3.2 | BW-VGM likelihood 3.2 |
|---|---|---|---|---|
| θ(h) — confidence interval covers the true curve | 95.5 ± 0.5 | 94.2 ± 0.6 | 96.6 ± 0.4 | 95.2 ± 0.6 |
| log₁₀ K(h) — confidence interval covers the true curve | 95.5 ± 0.7 | 95.8 ± 0.8 | 97.2 ± 0.4 | 93.4 ± 0.8 |
| K(θ) — confidence interval covers the true curve | 95.8 ± 0.7 | 95.8 ± 0.8 | 98.3 ± 0.3 | 97.1 ± 0.5 |
| θ AND K at the same pF — both confidence intervals cover | 91.0 ± 1.1 | 89.1 ± 1.2 | 94.1 ± 0.7 | 89.5 ± 1.0 |
| θ — prediction interval, new measurement at the measured pF | 95.2 ± 0.3 | 93.9 ± 0.4 | 95.8 ± 0.3 | 95.4 ± 0.3 |
| θ — prediction interval, new measurement at random pF | 95.5 ± 0.3 | 94.3 ± 0.3 | 96.2 ± 0.2 | 95.3 ± 0.3 |
| log₁₀ K — prediction interval, new measurement at the measured pF | 94.4 ± 0.5 | 94.9 ± 0.5 | 95.7 ± 0.5 | 94.1 ± 0.6 |
| log₁₀ K — prediction interval, new measurement at random pF | 94.0 ± 0.4 | 94.9 ± 0.4 | 96.7 ± 0.3 | 95.7 ± 0.4 |
| θ AND K — both prediction intervals hold a new pair (random pF) | 90.0 ± 0.5 | 90.1 ± 0.5 | 93.2 ± 0.4 | 90.8 ± 0.4 |
| K(θ) — prediction interval, new log₁₀ K at known θ | 94.9 ± 0.4 | 95.2 ± 0.4 | 97.7 ± 0.2 | 96.5 ± 0.3 |
| K(θ) — same, point plotted at a measured θ | 87.8 ± 0.6 | 88.5 ± 0.5 | 93.9 ± 0.4 | 91.5 ± 0.5 |
| mean width, confidence interval θ [vol. %] | 1.98 | 1.64 | 2.39 | 1.77 |
| mean width, prediction interval θ [vol. %] | 4.72 | 4.40 | 5.05 | 4.53 |
| mean width, confidence interval log₁₀ K | 0.43 | 0.39 | 0.76 | 0.68 |
| mean width, prediction interval log₁₀ K | 0.97 | 0.98 | 1.23 | 1.17 |
Confidence interval by pF region (3.2):
| Confidence interval, pF region | VGM HYPROP bootstrap | VGM HYPROP likelihood | BW-VGM HYPROP bootstrap | BW-VGM HYPROP likelihood | VGM sparse bootstrap | VGM sparse likelihood | BW-VGM sparse bootstrap | BW-VGM sparse likelihood |
|---|---|---|---|---|---|---|---|---|
| log₁₀ K, pF0-1 | 91.2 ± 1.5 | 94.0 ± 1.3 | 94.6 ± 1.2 | 94.6 ± 1.2 | — | — | — | — |
| log₁₀ K, pF1-2 | 91.2 ± 1.4 | 93.6 ± 1.2 | 95.6 ± 0.9 | 96.1 ± 0.8 | 94.1 ± 1.3 | 95.5 ± 1.1 | 97.6 ± 0.6 | 96.9 ± 0.8 |
| log₁₀ K, pF2-3 | 92.9 ± 1.0 | 94.8 ± 1.0 | 94.6 ± 0.7 | 93.4 ± 0.9 | 96.1 ± 0.8 | 95.9 ± 0.9 | 97.0 ± 0.5 | 92.1 ± 1.0 |
| θ, pF0-1 | 93.8 ± 1.3 | 95.4 ± 1.1 | 97.4 ± 0.8 | 95.1 ± 1.1 | 95.1 ± 1.1 | 94.8 ± 1.2 | 95.4 ± 1.1 | 95.8 ± 1.0 |
| θ, pF1-2 | 93.4 ± 1.0 | 93.7 ± 1.0 | 96.4 ± 0.6 | 94.8 ± 0.9 | 97.9 ± 0.5 | 96.3 ± 0.7 | 97.6 ± 0.6 | 95.5 ± 0.8 |
| θ, pF2-3 | 93.3 ± 1.1 | 93.0 ± 1.1 | 95.4 ± 0.8 | 95.4 ± 0.8 | 94.5 ± 1.0 | 92.1 ± 1.2 | 96.4 ± 0.7 | 95.3 ± 1.0 |
| θ, pF3-4.2 | 93.0 ± 1.2 | 95.3 ± 1.0 | 95.2 ± 0.9 | 93.7 ± 1.1 | 94.7 ± 0.9 | 93.7 ± 1.1 | 96.9 ± 0.7 | 94.3 ± 1.0 |
Reading the table. “θ AND K” counts a pF as covered only if both intervals cover; two independent 95 % intervals give about 0.95² ≈ 90 % jointly, so ≈ 90 % is the expected value (the intervals are pointwise, one per branch, not simultaneous). Old versus new. The 3.1 likelihood confidence interval covered the true log₁₀ K curve only 55–60 % of the time and K(θ) only ≈ 50 % (its covariance ridge shrank the variance of Ks to almost nothing, σ was the biased maximum-likelihood value, and draws were clipped to the bounds); 3.1 had no likelihood prediction interval. The 3.1 bootstrap prediction band (confidence band ± 1.96 σ) was too wide for θ (97–98 %) and the 3.1 bootstrap confidence interval too narrow for log₁₀ K (86–87 %). In 3.2 both modes are within about 1–3 points of 95 % for θ, log₁₀ K and K(θ), for both models and both designs. The least accurate case is the bootstrap confidence interval of log₁₀ K for VGM with the HYPROP design (≈ 92 %): with 13 K points, one of them the saturated K at pF 0, a third of the resamples lose that point, and percentile intervals stay slightly short even after the small-sample expansion; the likelihood intervals are closer to 95 % there. With few points and the many-parameter BW-VGM the bootstrap intervals err on the safe side (up to ≈ 98 %). Limits: the coverage holds inside the measured pF range — outside it the intervals reflect only the model's shape and are not validated; the test assumes that the fitted model family is the true one and that the errors are independent and Gaussian (correlated HYPROP sensor errors or a wrong model make every interval too narrow); when a fitted parameter sits on its bound (e.g. θr at its minimum) its likelihood interval is one-sided by construction; and the K(θ) prediction interval does not contain the error of the θ at which a new K is measured (≈ 86–94 % coverage when the new point is placed at a measured θ).
For the selected model: RMSE · NSE · KGE · NLL for each branch (θ and K), the corrected AICc (lower = better, penalises extra parameters), the calibrated/fixed σ, and water-content / plant-available-water summaries at standard suctions. When several models are fitted, a dropdown lets you inspect each one.
Select several models (§5.2: tick Select several models, or Ctrl/⌘+click) — they may mix modalities and variants, e.g. unimodal VGM + bimodal VGM + unimodal BW-VGM — and press Fit. All of them are fitted together (× every ticked K model in Power user mode). Each model gets its own colour in the plots and legend (the primary model is blue); every model gets its own 95 % confidence interval and 95 % prediction interval (its own bootstrap, or its own likelihood draws). To keep the plots readable only the primary ★ model shows its intervals at first; under each model in the legend two ticks — confidence interval and prediction interval — show or hide that model’s intervals, and the all models row switches them for every model at once. The choice applies to all plots, the full-screen view, ⬇ Figure and the PDF report (which lists the models whose intervals it draws); a new fit starts again with the primary model only. The Ranking tab orders them by AICc with ΔAICc and Akaike weights; click a row for its statistics. The parameter and curve CSV exports and the PDF report contain every fitted model. A plain click resets to a single model.
interval_method
(bootstrap / likelihood), theta_conf_lo/hi and theta_pred_lo/hi (95 % confidence / prediction
interval of θ, volume fraction), log10K_conf_lo/hi and log10K_pred_lo/hi (the same for
log₁₀ K [cm d⁻¹]) and log10K_at_theta_conf_lo/hi, log10K_at_theta_pred_lo/hi (the K(θ)
intervals at the row's fitted θ). Empty cells = not available (bootstrap: primary model only).In the desktop app a Save dialog appears; in the browser files download normally.
Tick 🎓 Learner mode under the model matrix to reveal two teaching tools:
A short, student-ready walkthrough lives in the classroom guide.
These use the downloadable sample files from §3. Grab RetMeas.csv, CondMeas.csv, and two_samples.csv first.
RetMeas.csv and CondMeas.csv together (select both, or drop both).pF→pF, θ→theta; Conductivity pF→pF, K→K. Sample column = none (fit all rows).0, max iter 150. Press Fit.100 and re-fit to add the 95 % confidence intervals and 95 % prediction intervals (curves) and the parameters' 95 % confidence intervals.If the curve looks under-fitted, raise max iter (e.g. 300). Differential evolution is global, so more generations = a more accurate optimum.
two_samples.csv. Set the Sample ID column to sample_id and
pick Loam_A (the dropdown fits one sample at a time).pF_theta/theta and pF_K/K.| Function | Shape parameters | Note |
|---|---|---|
| van Genuchten (m = 1−1/n) | α, n | The default; smooth sigmoid. |
| van Genuchten (m, n free) | α, n, m | Extra flexibility near saturation. |
| Brooks–Corey | α, λ | Sharp air-entry break. |
| Kosugi | hm, σ | Lognormal pore-size distribution. |
| Fredlund–Xing (constrained & m free) | α, n (, m) | Good over a wide suction range. |
| Campbell (1974) | α, b | Power form / Brooks–Corey-like. |
| Vogel–Císlerová (air-entry vG) | α, n, hae | vG with an explicit air-entry head. |
Each comes in unimodal / bimodal / trimodal (1–3 superimposed pore systems, mixed by weights w) and four variants (original / Brunswick / PDI / Wang): 8 × 3 × 4 = 96 retention models.
| Model | Exponents | Reference |
|---|---|---|
| Mualem ⭐ (recommended) | q=1, r=2 | Mualem 1976 |
| Burdine | q=2, r=1 | Burdine 1953 |
| Alexander–Skaggs | q=1, r=1 | Alexander & Skaggs 1986 |
| Childs–Collis-George | moment integral | Childs & Collis-George 1950 |
The HCC adds saturated conductivity Ks and a tortuosity τ; Brunswick and PDI add film/non-capillary terms (Ksnc, a). Any conductivity model combines with any retention curve.
| Metric | Range / best | Meaning |
|---|---|---|
| RMSE | ≥ 0, lower | Root-mean-square error in the branch's own units (θ, or log₁₀K). |
| NSE | ≤ 1, best = 1 | Nash–Sutcliffe efficiency; 1 = perfect, 0 = no better than the mean. |
| KGE | ≤ 1, best = 1 | Kling–Gupta efficiency; balances correlation, bias, and variability. |
| NLL | lower | Gaussian negative log-likelihood; rewards an accurate mean and a small calibrated σ. |
| AICc | lower | Corrected Akaike criterion — fit quality penalised by the number of parameters. Use it to pick between models. |
Which model is “best”? Prefer the lowest AICc — it stops you from over-fitting with a model that simply has more parameters. NSE/KGE near 1 and small RMSE confirm the fit visually.
| Symptom | Fix |
|---|---|
| Nothing happens after upload | Map at least one full branch: (pF + θ) or (pF + K). Check the column dropdowns. |
| Fit looks too coarse / under-optimised | Increase max iter (200–400). Differential evolution improves with more generations. |
| No confidence / prediction interval | For nRMSE/NSE set bootstrap ≥ 100. For NLL both intervals are automatic. A branch without data (e.g. no K points) has no prediction interval. |
| K won't fit / errors | K must be positive (it is fitted in log space). Remove zeros/negatives. |
| Curves vanish in the dry range | Use the Brunswick or PDI variant — they keep film conductivity and θ→0. |
| One sample only | The sample dropdown fits one sample at a time by design; switch it to fit another. |
| Kosugi, PDI, Wang, Burdine … are missing | You are in Simple mode — switch to Power user at the top of the model pane. |
| Text too small or too large | Use browser zoom (Ctrl + / Ctrl −, also in the desktop app). On small screens the page scrolls rather than shrinking the text. |
| A plot is too small to read | Open it with its full-screen button (corner of the plot); Esc closes it. |
pF = log₁₀ of suction in cm of water. pF 2 = 100 cm (~10 kPa, field-capacity-ish); pF 4.2 ≈ 1500 kPa (permanent wilting point); pF 6.8 ≈ oven dryness.
No. Fit either branch alone, or both together. With both, the chosen metric balances them on a common scale.
The web app processes data in a transient session and does not store it; the desktop app runs entirely on your machine.
That is the Gaussian maximum-likelihood estimate: σ̂ = √(SSE/N) = RMSE. NLL calibrates the mean and σ jointly.
Mualem (q=1, r=2) is the recommended default and works well with most retention curves.
How to cite. If you use SWRC/HCC Fitter, please cite: Shojaeezadeh, S.A. SWRC/HCC Fitter tool for fitting soil water retention and hydraulic conductivity curves over the full moisture range (under review).
Built on the pyspsh forward model · numerical fitting in NumPy + SciPy. Released under the MIT License.