Skip to contents

Superimposes the yearly SOC trajectories of every run in l.res on a single plot and writes it to the case's shared fig/ folder (see init.container()). Optionally overlays historic observed SOC points.

Usage

f.compare.socmo.res(
  l.res,
  input.sim.run,
  input.case,
  id.to.compare = "all",
  years.range = "all",
  op.res = "res",
  op.hist.soc = NULL
)

Arguments

l.res

Named list of per-treatment results, as returned by run.socmo().

input.sim.run, input.case

Same simulation run/case identifiers passed to run.socmo(); used to build the output path ./data_out/<input.sim.run>/<input.case>/fig/compare_<op.res>_ids_<id.to.compare>.png.

id.to.compare

Subset of IDs (names of l.res) to compare, or "all".

years.range

Subset of years to keep, or "all".

op.res

Which result list to read from each l.res[[id]] ("res" by default, i.e. l.res[[id]]$res$output_years).

op.hist.soc

Optional data frame of historic observed SOC points (columns id, Year, SOC_t_C_ha) to overlay as a second figure (..._historic.png).

Value

Invisibly the string "ok fred"; the real output is the PNG file(s) written as a side effect.