Soil water balance
The soil water balance module implements the water balance, including above-ground processes (canopy interception, surface runoff) and subsurface soil processes (infiltration, percolation, lateral flow).
Overview
The module simulates water balance across four reservoirs:
- Capillary (Wc): Water held by capillary forces in soil small pores
- Gravitational (Wg): Drainable water in soil large pores
- Plants (Wp): Canopy interception storage (optional)
- Surface (Ws): Surface depression storage
Key processes simulated:
- Surface processes: Canopy interception, throughfall, surface ET
- Subsurface processes: Horton infiltration (stochastic), Dunne runoff
- Soil ET: Single-parameter S-curve for soil moisture stress
- Capillary absorption: Wg → Wc transfer
- Percolation: Deep drainage with optional capillary rise feedback
- Lateral flow: Subsurface lateral drainage
- Capillary rise: Optional upward flux from groundwater (Salvucci 1993)
- Surface routing: Depression storage with linear routing
Functions
Perform hillslope water balance for one time step.
This function simulates water balance across four reservoirs: - Capillary (Wc): Water held by capillary forces in soil - Gravitational (Wg): Drainable water in soil - Plants (Wp): Canopy interception storage - Surface (Ws): Surface depression storage
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wc
|
NDArray[float64]
|
Initial water in capillary reservoir [m] |
required |
wc0
|
NDArray[float64]
|
Maximum capacity of capillary reservoir [m] |
required |
wg
|
NDArray[float64]
|
Initial water in gravitational reservoir [m] |
required |
wg0
|
NDArray[float64]
|
Maximum capacity of gravitational reservoir [m] |
required |
wp
|
NDArray[float64] | None
|
Initial water in plant canopy reservoir [m] (None to disable) |
required |
wp0
|
NDArray[float64] | None
|
Maximum capacity of plant canopy reservoir [m] (None to disable) |
required |
ws
|
NDArray[float64]
|
Initial water in surface depression reservoir [m] |
required |
ws0
|
NDArray[float64] | None
|
Maximum capacity of surface depression reservoir [m] (unused in current version) |
required |
wtot0
|
NDArray[float64]
|
Total soil capacity (wc0 + wg0) [m] |
required |
precipitation
|
NDArray[float64]
|
Precipitation [m] |
required |
surface_runoff_in
|
NDArray[float64]
|
Total surface runoff from upstream cells [m] |
required |
lateral_flow_in
|
NDArray[float64]
|
Lateral (subsurface) flow from upstream cells [m] |
required |
potential_et
|
NDArray[float64]
|
Potential evapotranspiration [m] |
required |
hydraulic_conductivity
|
NDArray[float64] | None
|
Saturated hydraulic conductivity [m] (None to use min/max) |
required |
hydraulic_conductivity_min
|
NDArray[float64] | None
|
Minimum hydraulic conductivity [m] |
required |
hydraulic_conductivity_max
|
NDArray[float64] | None
|
Maximum hydraulic conductivity [m] |
required |
channelized_fraction
|
NDArray[float64]
|
Fraction of channelized runoff [-] |
required |
surface_flow_exp
|
NDArray[float64]
|
Exponential parameter for surface flow (exp(-alpalpsurdt)) [-] |
required |
lateral_flow_coeff
|
NDArray[float64]
|
Lateral flow parameter (bet*dt) [-] |
required |
percolation_coeff
|
NDArray[float64]
|
Percolation parameter (gam*dt) [-] |
required |
absorption_coeff
|
NDArray[float64]
|
Capillary absorption parameter (kap*dt) [-] |
required |
rainfall_fraction
|
NDArray[float64]
|
Fraction of rainfall area (f0) [-] |
required |
et_shape
|
float
|
Shape parameter for ET (0-5, default=0, recommended=3) [-] |
required |
capillary_rise_enabled
|
bool
|
Enable capillary rise simulation |
required |
soil_depth
|
NDArray[float64] | None
|
Depth of modeled topsoil [m] |
None
|
depth_to_water_table
|
NDArray[float64] | None
|
Depth from surface to groundwater table [m] |
None
|
capillary_conductivity
|
NDArray[float64] | None
|
Capillary hydraulic conductivity [m] |
None
|
bubbling_pressure
|
NDArray[float64] | None
|
Bubbling pressure head [m] |
None
|
capillary_param_a
|
NDArray[float64] | None
|
Capillary rise parameter a [-] |
None
|
capillary_param_n
|
NDArray[float64] | None
|
Capillary rise parameter n [-] |
None
|
capillary_multiplier
|
NDArray[float64] | None
|
Binary multiplier for capillary rise [-] |
None
|
test_mode
|
bool
|
Enable mass balance checking (default=False) |
False
|
alpsur
|
NDArray[float64] | None
|
Surface flow parameter (alpsur*dt) [-] |
None
|
no_aquifer_indices
|
NDArray[int_] | None
|
Indices of cells outside aquifer |
None
|
Returns:
| Type | Description |
|---|---|
NDArray[float64]
|
Tuple containing: |
NDArray[float64]
|
|
NDArray[float64] | None
|
|
NDArray[float64]
|
|
NDArray[float64]
|
|
NDArray[float64]
|
|
NDArray[float64]
|
|
NDArray[float64]
|
|
NDArray[float64]
|
|
NDArray[float64]
|
|
tuple[NDArray[float64], NDArray[float64], NDArray[float64] | None, NDArray[float64], NDArray[float64], NDArray[float64], NDArray[float64], NDArray[float64], NDArray[float64], NDArray[float64]]
|
|
Note
All fluxes and parameters are assumed to be pre-multiplied by dt (time step). Time basis is 1 time step or dt seconds. Fluxes have units of meters (not m/s).
Source code in mobidic/core/soil_water_balance.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | |
Calculate capillary rise from groundwater table.
Uses the Salvucci (1993) approximate solution for steady vertical flux of moisture through unsaturated homogeneous soil.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
NDArray[float64]
|
Volumetric soil moisture content / porosity [-], = (Wr+Wc+Wg)/(Wr+Wc0+Wg0), range [0-1] |
required |
z
|
NDArray[float64]
|
Distance from soil center to water table [m] |
required |
ksat
|
NDArray[float64]
|
Saturated hydraulic conductivity [m/dt] |
required |
psi1
|
NDArray[float64]
|
Bubbling pressure head [m] |
required |
a
|
NDArray[float64]
|
Brooks-Corey parameter a = -1/m [-] |
required |
n
|
NDArray[float64]
|
Brooks-Corey parameter n = m*c [-] |
required |
Returns:
| Type | Description |
|---|---|
NDArray[float64]
|
Capillary rise flux [m/dt] |
References
- Salvucci, G. D. (1993), An approximate solution for steady vertical flux of moisture through an unsaturated homogenous soil, WRR 29(11), pp. 3749-3753
- Bras, R. L. (1990), Hydrology: an introduction to hydrologic science, Addison-Wesley Publishing Company, pp. 350-352
Note
- Returns 0 for cells where z <= 0
- Handles NaN values by setting them to 0
- Uses real part only (discards imaginary components if any)