View source: R/Functions_Supporting.R
calc_soillayer_weights | R Documentation |
Determine widths (as weights) of soil layers within a zone
calc_soillayer_weights(
soil_depths_cm,
used_depth_range_cm = NULL,
n_slyrs_has = NULL
)
soil_depths_cm |
A numeric vector. The lower depth limits of soil layers in [cm]. |
used_depth_range_cm |
A numeric vector of length two. The upper and lower depth limit of the zone (depth range) to consider. |
n_slyrs_has |
An integer value. The number of simulated soil layers
(optional). The code throws an error if there are fewer soil layers
than selected by |
A numeric vector of the same length as soil_depths_cm
.
The values correspond to soil layer widths that fall within the
selected zone. Other values, outside the zone, are set to NA
.
calc_soillayer_weights(c(5, 10, 30, 50), NULL)
calc_soillayer_weights(c(5, 10, 30, 50), c(0, 100))
calc_soillayer_weights(c(5, 10, 30, 50), c(0, 40))
calc_soillayer_weights(c(5, 10, 30, 50), c(20, 40))
calc_soillayer_weights(c(5, 10, 30, 50), c(20, 50))
calc_soillayer_weights(c(5, 10, 30, 50), c(20, 30), 3)
## Not run:
calc_soillayer_weights(c(5, 10, 30, 50), c(20, 50), 3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.