tidysoilwater 1.2.0
New functions
-
fit_swrc_hcc()— joint simultaneous fitting of the Van Genuchten SWRC and Mualem-Van Genuchten K(h) function. Minimises a combined weighted residual (θ on linear scale, K on log₁₀ scale). Estimates θ_r, θ_s, α, n, Ks, and τ. Supportslower/upperbounds,fixedparameters,wrc_weight/hcc_weightscalars, grouping, and parallel fitting. -
confint.fit_swrc()— profile-likelihood confidence intervals for parameters fitted byfit_swrc(). Uses the F-statistic profile approach (more reliable than normal-approximation intervals for nonlinear models). Returns a tidy tibble of (param, estimate, lower, upper, level) per group.
Changes to existing functions
-
fit_swrc()— three new optional arguments:-
lower/upper— named vectors of box constraints; usesnls(algorithm = "port")internally (SEs from Jacobian, unchanged). -
fixed— named vector of parameters to hold at specified values; switches tostats::optim(method = "L-BFGS-B")with approximate SEs from the numerical Hessian. -
weights— bare column name or scalar for per-observation weights. - Return type gains class
fit_swrc(a tibble subclass) with metadata attributes enablingconfint(). Fully backward-compatible.
-
tidysoilwater 1.1.0
New functions
-
soil_water_capacity()— analytical soil water capacity C(h) = −dθ/dh from the Van Genuchten (1980) model. Coverssoilwater::cap(). -
saturation_index()— effective saturation S_e(h) = [1 + (α|h|)^n]^(−m). Dimensionless (0–1); equivalent tosoilwater::swc(..., saturation_index = TRUE). -
soil_water_diffusivity()— soil water diffusivity D(h) = K(h)/C(h). Coverssoilwater::diffusivity().
Changes
-
hydraulic_conductivity()— newtauargument (tortuosity/connectivity parameter, default0.5). Previously hardcoded at 0.5 (Mualem 1976); now exposed as a free parameter matchingsoilhypfit::hc_model(). Defaulttau = 0.5is fully backward-compatible.
tidysoilwater 1.0.0
Initial release.
New functions
-
swrc_van_genuchten()— Van Genuchten (1980) soil water retention curve. Returns volumetric water content θ(h) for any combination of scalar parameters and tidy data columns. Handles 1 M rows in < 20 ms. -
hydraulic_conductivity()— Mualem-Van Genuchten unsaturated hydraulic conductivity K(h). Handles 1 M rows in < 40 ms. -
fit_swrc()— fits Van Genuchten parameters to observed (h, θ) data via nonlinear least squares. Supports grouped tibbles (one fit per group) and optional parallel fitting viaparallel::mclapply()on Unix systems.
Notes
- All functions accept bare column names (tidy evaluation) or scalar numeric values interchangeably.
-
fit_swrc()withworkers > 1delivers near-linear parallel speedup on Unix; silently falls back to sequential on Windows. -
broom::tidy()output is used internally so fitted parameters, standard errors, and convergence status are all returned in a single tidy tibble.
