make_lpjml: Compile LPJmL model
Description
Compiles the LPJmL source code and creates an executable by executing
"make all" on the operating system shell.
Usage
make_lpjml(
model_path = ".",
parallel_cores = NULL,
make_clean = FALSE,
raise_error = TRUE,
debug = NULL
)
Value
A list with process status, see run.
Arguments
- model_path
Character string providing the path to LPJmL
(equal to LPJROOT environment variable). Defaults sto ".".
- parallel_cores
Numeric defining the number of available CPU cores for
parallelization.
- make_clean
Logical. If set to TRUE, calls "make clean" first to
remove previous installation. Defaults to FALSE.
- raise_error
Logical. Whether to raise an error if sub-process has
non-zero exit status, hence if compilation fails. Defaults to TRUE.
- debug
NULL or Logical. Whether to compile LPJmL with "-debug" flag.
Defaults to NULL. If set to FALSE or TRUE, make_clean is set
automatically and compilation configuration is reset with/without "-debug".
Also the "configure.sh" file is rewritten.
Examples
Run this codeif (FALSE) {
model_path <- "./LPJmL_internal"
make_lpjml(model_path = model_path)
}
Run the code above in your browser using DataLab