Skip to contents

Runs the full monthly RothC simulation described by a .dat input file, starting from spin-up equilibrium pool sizes (computed internally via ROTH_C_SPIN_UP(), or supplied via op.spin.up.list to avoid recomputing it).

Usage

ROTH_C(
  filename,
  my.sep = "",
  timeFact = 12,
  op.soc.initial.adj = NULL,
  op.spin.up.sensitivity = 1e-06,
  op.split.oa = "classic",
  op.spin.up.list = NULL,
  op.log.screen = FALSE,
  op.adjust.cinput = NULL
)

Arguments

filename

Path to a RothC input file in the native .dat format (same file used for the spin-up, read again here for the monthly driving data).

my.sep

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

timeFact

Number of months in one year (default 12); used to group monthly output into yearly output.

op.soc.initial.adj

Optional observed total SOC (t C/ha) to rescale the spin-up's active pools (DPM/RPM/Bio/Hum) against, leaving IOM untouched. NULL (default) runs with the spin-up pools as-is.

op.spin.up.sensitivity

Convergence threshold forwarded to ROTH_C_SPIN_UP() when op.spin.up.list is not supplied.

op.split.oa

Organic amendment input format, forwarded to ROTH_C_SPIN_UP() and used to pick the input file's column layout here too: "classic" (single OA_inp column) or extended (OA_kh/OA_rdpm columns).

op.spin.up.list

Pre-computed spin-up state, as returned by ROTH_C_SPIN_UP(). When NULL (default), the spin-up is run here from filename.

op.log.screen

Whether to print progress to the console (forwarded to ROTH_C_SPIN_UP() when the spin-up runs here).

op.adjust.cinput

Optional override of the spin-up year's driving data, forwarded to ROTH_C_SPIN_UP() (see there).

Value

A list with:

  • output_years – one row per year, with pool sizes (*_t_C_ha), SOC_t_C_ha, CO2_t_C_ha, and deltaC.

  • output_months – the same, at monthly resolution.

  • output_extra – additional per-month diagnostics (e.g. radiocarbon ages).

  • model_other_infos – spin-up pool sizes and the SOC rescaling factor f applied when op.soc.initial.adj is used.

Pass this list to EXPORT_ROTHC_RES() to write the results to disk.

References

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