View source: R/Functions_Metrics_009_DailyClim.R
calc_SWP_MPa | R Documentation |
Determine soil water potential SWP
calc_SWP_MPa(
sim_swc_daily,
time,
soils,
used_depth_range_cm = NULL,
method = c("across_profile", "by_layer"),
out = c("ts_years", "across_years"),
fun_aggs_across_yrs = mean
)
sim_swc_daily |
A numeric two-dimensional object with daily "swc" for each soil layer in units of centimeters. |
time |
A numeric vector. Time for each row of |
soils |
A named list with soil parameters "depth_cm", "sand_frac","clay_frac", and "gravel_content" as numeric vectors with values for each soil layer. |
used_depth_range_cm |
A numeric vector of length two. |
method |
A character string. |
out |
A character string. |
fun_aggs_across_yrs |
A function that calculates across-year summaries that returns a named or unnamed vector. |
A list with elements "time" and "values" where values represent
soil water potential in units MPa
:
if method
is “across_profile”,
then summed across used_depth_range_cm
,
if method
is “by_layer”,
then columns contain values for each soil layer within
used_depth_range_cm
;
if out
is "ts_years
,
then rows contain values for each time step,
if out
is "across_years"
,
then rows contain averaged values across unique time steps.
After soil moisture has been aggregated across soil layers
if requested (method
is "across_profile"
) and
aggregated across years if requested (out
is "across_years"
), then
the water release curve employed during the simulation run is used to
translate volumetric water content VWC
into SWP
, i.e.,
SWP[i,matric] = f(VWC, SWRCp[i])
where SWRCp
are the parameters describing the water release curve.
Note, the translation is only valid for the matric soil, i.e.,
the component without coarse fragments.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.