calibrate_yasso: Calibrate the YASSO model

Description Usage Arguments Details Value Examples

View source: R/calibrate_yasso.R

Description

calibrate_yasso() runs the YASSO model in a way intended for model calibration at the Finnish Meteorological Institute. For most users, it is recommended to instead use run_yasso for simulating soil carbon.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
calibrate_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_cal for now.

time

-||-

temp

-||-

prec

-||-

init

-||-

litter

-||-

wsize

-||-

leac

-||-

sspred

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

Details

calibrate_yasso() wraps the Fortran90-release of the soil carbon model YASSO15 into a simple R-function. The function is intended for calibrating the model using the data sets and methods applied at the Finnish Meteorological Institute.

The function provides YASSO with the initial soil carbon values in the matrix init and runs the model one time step at a time. The initial value of each time step is read from the matrix. The model runs until it has looped over all the time steps.

Value

A matrix containing simulated soil carbon. Each row corresponds to a row in the matrix of initial states provided to the model.

Examples

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

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