Check if created LPJmL config JSON files (write_config()) are
valid and are ready to be used for simulations using lpjcheck for multiple
files.
check_config(
x,
model_path = ".",
sim_path = NULL,
return_output = FALSE,
raise_error = FALSE,
output_path = NULL
)job_details object returned by write_config() or
character vector providing the config file names
(hint: returns x as a list entry).
Character string providing the path to LPJmL
(equal to LPJROOT environment variable). Defaults to ".".
Character string defining path where all simulation data are
written, including output, restart and configuration files. If NULL,
model_path is used. See also write_config
Parameter affecting the output. If FALSE print
stdout/stderr message. If TRUE, return the result of the check.
Defaults to FALSE.
Logical. Whether to raise an error if sub-process has
non-zero exit status. Defaults to FALSE.
Argument is deprecated as of version 1.0; use sim_path instead.
NULL.
if (FALSE) {
library(tibble)
library(lpjmlkit)
model_path <- "./LPJmL_internal"
sim_path <-"./my_runs"
# Basic usage
my_params <- tibble(
sim_name = c("scen1", "scen2"),
random_seed = c(12, 404),
`pftpar[[1]]$name` = c("first_tree", NA),
`param$k_temp` = c(NA, 0.03),
new_phenology = c(TRUE, FALSE)
)
config_details <- write_config(
x = my_params,
model_path = model_path,
sim_path = sim_path
)
check_config(x = config_details,
model_path = model_path,
sim_path = sim_path,
return_output = FALSE
)
}