run_yasso: Run the YASSO model

Description Usage Arguments Details Value Examples

View source: R/run_yasso.R

Description

run_yasso() runs the YASSO model and returns simulated soil carbon.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
run_yasso(
  par,
  n_runs,
  time,
  temp,
  prec,
  init,
  litter,
  wsize,
  leac,
  sspred = 0L
)

Arguments

par

A numeric vector of YASSO parameters.

n_runs

Input data. Refer to sample_data_run for now.

time

-||-

temp

-||-

prec

-||-

init

-||-

litter

-||-

wsize

-||-

leac

-||-

sspred

Optional integer, should steady state mode be used (1 = yes).

Details

run_yasso() wraps the Fortran90-release of the soil carbon model YASSO15 into a simple R-function. The function is a convenient way to call the Fortran-release.

The function provides YASSO with the initial soil carbon values in the vector init and runs the model one time step at a time. The simulated carbon of the current time step is used as the initial value of the next time step. The model runs until it has looped over all the time steps.

Value

A matrix containing the initial soil carbon on the first row and simulated soil carbon on the following rows.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
soil_c <- run_yasso(
 par = sample_parameters,
 n_runs = sample_data_run$n_runs,
 time = sample_data_run$time,
 temp = sample_data_run$temp,
 prec = sample_data_run$prec,
 init = sample_data_run$init,
 litter = sample_data_run$litter,
 wsize = sample_data_run$wsize,
 leac = sample_data_run$leac
)

jpusa/Ryassofortran documentation built on Sept. 1, 2021, 6:03 p.m.