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

References

License

GPL (>= 3)

Maintainer

Minguo Liu liumg@nwafu.edu.cn