% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R, R/summary.soil.R
\name{soil}
\alias{soil}
\alias{summary.soil}
\title{Soil initialization}
\usage{
soil(x, VG_PTF = "Toth")

\method{summary}{soil}(object, model = "SX", ...)
}
\arguments{
\item{x}{A data frame of soil parameters (see an example in \code{\link{defaultSoilParams}}).}

\item{VG_PTF}{Pedotransfer functions to obtain parameters for the van Genuchten-Mualem equations. Either \code{"Carsel"} (Carsel and Parrish 1988) or \code{"Toth"} (Toth et al. 2015).}

\item{object}{An object of class \code{soil}.}

\item{model}{Either 'SX' or 'VG' for Saxton or Van Genuchten pedotransfer models.}

\item{...}{Additional parameters to \code{summary}.}
}
\value{
Function \code{soil} returns a data frame of class \code{soil} with the following columns:
\itemize{
\item{\code{widths}: Width of soil layers (in mm).}
\item{\code{sand}: Sand percentage for each layer (in percent volume).}
\item{\code{clay}: Clay percentage for each layer (in percent volume).}
\item{\code{om}: Organic matter percentage for each layer (in percent volume).}
\item{\code{nitrogen}: Sum of total nitrogen (ammonia, organic and reduced nitrogen) for each layer (in g/kg).}
\item{\code{ph}: pH in water of each layer (0-14).}
\item{\code{rfc}: Percentage of rock fragment content for each layer.}
\item{\code{macro}: Macroporosity for each layer (estimated using Stolf et al. 2011).}
\item{\code{Ksat}: Saturated soil conductivity for each layer (in mmol·m-1·s-1·MPa-1, estimated using function \code{\link{soil_saturatedConductivitySX}}.}
\item{\code{VG_alpha}, \code{VG_n}, \code{VG_theta_res}, \code{VG_theta_sat}: Parameters for van Genuchten's pedotransfer functions, for each layer, corresponding to the USDA texture type.}
\item{\code{W}: State variable with relative water content of each layer (in as proportion relative to FC).}
\item{\code{Temp}: State variable with temperature (in Celsius) of each layer.}
}
}
\description{
Initializes soil parameters and state variables for its use in simulations.
}
\details{
Function \code{summary} prompts a description of soil characteristics and state variables (water content and temperature)
according to a water retention curve (either Saxton's or Van Genuchten's).
Volume at field capacity is calculated assuming a soil water potential equal to fieldCapacityPsi MPa.
Parameter \code{Temp} is initialized as missing for all soil layers.

If available, the user can specify columns \code{VG_alpha}, \code{VG_n}, \code{VG_theta_res}, \code{VG_theta_sat} and \code{K_sat},
to override Van Genuchten parameters an saturated conductivity estimated from pedotransfer functions when calling function \code{soil}.
}
\examples{
# Default parameters
df_soil <- defaultSoilParams()

# Initializes soil
s <- soil(df_soil)
s

# Prints soil characteristics according to Saxton's water retention curve
summary(s, model="SX")

# Prints soil characteristics according to Van Genuchten's water retention curve
summary(s, model="VG")

# Add columns 'VG_theta_sat' and 'VG_theta_res' with custom values
df_soil$VG_theta_sat <- 0.400 
df_soil$VG_theta_res <- 0.040 

# Reinitialize soil (should override estimations)
s2 <- soil(df_soil)
s2
summary(s2, model="VG")
}
\references{
Carsel, R.F., and Parrish, R.S. 1988. Developing joint probability distributions of soil water retention characteristics. Water Resources Research 24: 755–769.

\enc{Tóth}{Toth}, B., Weynants, M., Nemes, A., \enc{Makó}{Mako}, A., Bilas, G., and \enc{Tóth}{Toth}, G. 2015. New generation of hydraulic pedotransfer functions for Europe. European Journal of Soil Science 66: 226–238.

Stolf, R., Thurler, A., Oliveira, O., Bacchi, S., Reichardt, K., 2011. Method to estimate soil macroporosity and microporosity based on sand content and bulk density. Rev. Bras. Ciencias do Solo 35, 447–459.
}
\seealso{
\code{\link{plot.soil}}, \code{\link{soil_redefineLayers}}, \code{\link{soil_psi2thetaSX}}, \code{\link{soil_psi2thetaVG}}, \code{\link{spwb}}, \code{\link{defaultSoilParams}}
}
\author{
Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF
}
