Simulation of Soil Water Flow Based on Darcy's Law

Provides a simple model to simulate soil water content and water flux changes at multiple soil depths. Calculations mainly follow Allen et al. (1998, ISBN:92-5-104219-5) and Teh (2017, ISBN:9789673447626).


soilwatR

Simulation of multi-layer soil water content and water fluxes (Darcy-style unsaturated flow), with FAO-56 helpers for reference and crop evapotranspiration.

Installation

# From a local source tarball
install.packages("soilwatR_0.1.0.tar.gz", repos = NULL, type = "source")

# Or from the package directory
# install.packages("path/to/soilwatR", repos = NULL, type = "source")

Optional combined plotting panels require ggpubr (Suggests).

Quick start

library(soilwatR)

data(SIalfalfa)

param <- list(
  initialRootingDepth = 1.2,
  RootGrowthRate = 0.0035,
  has_watertable = FALSE,
  subintervals = 20,
  maxsteps = 5
)

SIalfalfa_T1 <- SIalfalfa$Input[SIalfalfa$Input$Tre2 == "T1", ]
soilProfileSet_T1 <- SIalfalfa$soilProfileSet
soilProfileSet_T1["THETA_v_curr", ] <- c(0.12, 0.13, 0.28, 0.31, NA)

result <- soilwatr(
  data = SIalfalfa_T1,
  param = param,
  soilProfileSet = soilProfileSet_T1
)

head(result)
# plot_result(result)  # uses ggpubr if installed

Main functions

  • soilwatr() — daily multi-layer soil water simulation
  • cal_ET0() / cal_PET() — FAO-56 style ET helpers
  • plot_result() — ggplot2 visualization of model output

References

  • Allen, R. G., Pereira, L. S., Raes, D., & Smith, M. (1998). Crop evapotranspiration — Guidelines for computing crop water requirements. FAO Irrigation and Drainage Paper 56. ISBN: 92-5-104219-5.
  • Teh, C. (2017). Introduction to Mathematical Modeling of Crop Growth: How the Equations Are Derived and Assembled into a Computer Model (2nd ed.). ISBN: 9789673447626.

License

GPL (>= 3)

Maintainer

Minguo Liu [email protected]

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("soilwatR")

0.1.1 by Minguo Liu, 5 hours ago


Browse source code at https://github.com/cran/soilwatR


Authors: Minguo Liu [aut, cre]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports dplyr, ggplot2, magrittr, rlang, stringr, tidyr

Suggests ggpubr, testthat


See at CRAN