make_lpjml: Compile LPJmL model

View source: R/make_lpjml.R

make_lpjmlR Documentation

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
)

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.

Value

A list with process status, see run.

Examples

## Not run: 
model_path <- "./LPJmL_internal"
make_lpjml(model_path = model_path)

## End(Not run)


lpjmlkit documentation built on March 31, 2023, 9:35 p.m.