Skip to contents

Repeatedly cycles the first year of monthly driving data in a RothC .dat input file until the total carbon pool (TOC) stabilises (or the maximum number of cycles is reached), to obtain equilibrium pool sizes used to initialise ROTH_C()'s main run.

Usage

ROTH_C_SPIN_UP(
  filename,
  my.sep = "",
  timeFact = 12,
  op.spin.up.sensitivity = 1e-06,
  op.split.oa = "classic",
  op.return = "list.end.values",
  op.log.screen = FALSE,
  op.adjust.cinput = NULL
)

Arguments

filename

Path to a RothC input file in the native .dat format (header row of clay/depth/iom/nsteps plus monthly driving data) – see RothC_input.dat for the reference layout.

my.sep

Field separator passed to read.csv() when reading filename (default '', i.e. whitespace).

timeFact

Number of months in one spin-up cycle (default 12, i.e. the first year of the input file is replayed each cycle).

op.spin.up.sensitivity

Convergence threshold on the year-on-year change in TOC; spin-up stops once below this value.

op.split.oa

Organic amendment input format: "classic" (single OA_inp column) or any other value to read the extended OA_kh/OA_rdpm columns.

op.return

What to return: "list.end.values" (default) for the pool sizes and model state at convergence, used to feed ROTH_C(); "list.all.values" to additionally keep every intermediate cycle's state.

op.log.screen

Whether to print progress to the console.

op.adjust.cinput

Optional named list overriding the first year's PC/FYM/C_inp/DPM_RPM driving data – used when calibrating a carbon-input parameter (see f.optim.param.c.input() in R/socmo-optim-params.R).

Value

A list of the model environment at spin-up end, including the pool sizes (DPM, RPM, Bio, Hum, IOM), SOC_spinup, and the soil parameters read from filename (clay, depth, nsteps, ...). Intended to be passed as op.spin.up.list to ROTH_C().

References

Vendored/adapted from the official RothC_R implementation (Prout, Milne, Coleman) – see RothC_R_LICENSE.txt.