View source: R/sw_OutputDerived_Functions.R
get_soiltemp | R Documentation |
Extract soil temperature
get_soiltemp(
x,
timestep = c("Day", "Week", "Month", "Year"),
levels = c("min", "avg", "max"),
surface = TRUE,
soillayers = NULL,
keep_time = FALSE,
verbose = FALSE
)
x |
An object of class |
timestep |
A character string. One of the rSOILWAT2 time steps. |
levels |
A character string indicating which within-day minimum, average, or maximum values are requested. |
surface |
A logical value. Output surface soil temperature as first
column in returned matrices;
equivalent to requesting a |
soillayers |
An integer vector of requested soil layers.
|
keep_time |
A logical value. Include time information in the returned object. |
verbose |
A logical value. Issue warnings if requested |
A named list of length levels
where elements are
numeric matrices of soil temperature [C]
with time steps as rows
and (requested) soil surface and soil layers as columns.
Requested soillayers
that are not available in x
are ignored
(with a warning if verbose
).
Requested levels
that are not available
(e.g., "min"
before rSOILWAT2
v5.3.0
)
are replaced by values from the average level
(with a warning if verbose
).
sw_out <- sw_exec(inputData = rSOILWAT2::sw_exampleData)
get_soiltemp(sw_out, "Month")
get_soiltemp(sw_out, "Month", "avg")
get_soiltemp(sw_out, "Month", "avg", surface = TRUE, soillayers = NA)
get_soiltemp(sw_out, "Month", "avg", soillayers = 0)
get_soiltemp(sw_out, "Month", "avg", surface = FALSE, soillayers = NULL)
get_soiltemp(sw_out, "Month", "avg", surface = FALSE, soillayers = c(1, 3))
get_soiltemp(sw_out, "Month", "avg", surface = FALSE, soillayers = c(1, 30))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.