Run the RothC monthly simulation
ROTH_C.RdRuns 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
.datformat (same file used for the spin-up, read again here for the monthly driving data).- my.sep
Field separator passed to
read.csv()when readingfilename(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, leavingIOMuntouched.NULL(default) runs with the spin-up pools as-is.- op.spin.up.sensitivity
Convergence threshold forwarded to
ROTH_C_SPIN_UP()whenop.spin.up.listis 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"(singleOA_inpcolumn) or extended (OA_kh/OA_rdpmcolumns).- op.spin.up.list
Pre-computed spin-up state, as returned by
ROTH_C_SPIN_UP(). WhenNULL(default), the spin-up is run here fromfilename.- 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, anddeltaC.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 factorfapplied whenop.soc.initial.adjis 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.