View source: R/fnc_get_params.R
fnc_get_params | R Documentation |
This function creates a list of parameter settings. Vegetation settings, by default, represent the findings of the WHH-KW project.
fnc_get_params(
df.ids,
tree_species = "spruce",
df.ind.info = NULL,
BW_or_D = "BW"
)
df.ids |
a data frame that contains at least the following columns:
|
tree_species |
name of the tree species to be modelled with. Either a single species name that is then used for all points in |
df.ind.info |
a data frame containing individual site information for each ID or if parameters are presumed to be different than the default settings of |
wuchsmaechtigkeit |
function in progress. provides an approximation for the mean growth of an area in BW. Adjusts LAI, SAI and max height of the vegetation. Default is |
Returns a list of parameter settings that can be read and further processed by run_multisite_LWFB90
or run_LWFB90
ls.param <- fnc_get_params(df.ids = test.ids.bds,
tree_species = c("beech", "spruce", "pine", "douglasfir", "beech"))
# as we're working with a list of long lists. For comparative reasons, this function returns the n-th object of each list element
fun1 <- function(lst, n){
sapply(lst, `[`, n)
}
# tree-species
fun1(ls.param, which(names(ls.param[[1]]) == "budburst_species"))
fun1(ls.param, which(names(ls.param[[1]]) == "glmax"))
fun1(ls.param, which(names(ls.param[[1]]) == "coords_x"))
# all oaks, but change height and age of stands at begin of simulation (parameter "height" & "age.ini")
df.infos <- data.frame("ID_custom" = LETTERS[5:1],
"height" = c(10, 15, 30, 20, 20),
"age.ini" = c(10, 20, 25, 70, 90))
ls.param <- fnc_set_params(df.ids = test.ids.bds,
tree_species = "oak",
df.ind.info = df.infos)
# tree-species
fun1(ls.param, which(names(ls.param[[1]]) == "budburst_species"))
fun1(ls.param, which(names(ls.param[[1]]) == "height"))
fun1(ls.param, which(names(ls.param[[1]]) == "age_ini"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.