
Set inflow data for a Simstrat-AED2 simulation directory
Source:R/set_simstrat_inflows.R
set_simstrat_inflows.RdThin, aeme-free wrapper around the internal inflow writer used by
build_aeme(). Writes Qinp.dat/Tinp.dat/Sinp.dat (and, if BGC is
coupled, AED2_inflow/*.dat) into path_simstrat.
Usage
set_simstrat_inflows(
path_simstrat,
inf,
inf_factor = 1,
use_bgc = NULL,
model_controls = NULL,
ref_year = NULL,
par_file = file.path(path_simstrat, "simstrat.par")
)Arguments
- path_simstrat
filepath; to Simstrat-AED2 directory
- inf
named list of data.frames, one per inflow. Each must have a
Datecolumn plusHYD_flow,HYD_temp,CHM_saltcolumns – seeadd_inflow()for the expected schema. Multiple inflows are merged into a single series (Simstrat only accepts one): flow is summed and the scalars (temperature, salinity, BGC) are flow-weighted so total load is conserved – seemake_inf_simstrat().- inf_factor
numeric; scaling factor applied to all inflow flow rates. Default is
1.- use_bgc
logical; also write AED2 inflow concentration files. Defaults to the existing
ModelConfig.CoupleAED2setting insimstrat.par.- model_controls
data.frame of loaded model controls (see
get_model_controls()), required whenuse_bgc = TRUE.- ref_year
integer; Simstrat's
Simulation.Reference year. Defaults to the value already insimstrat.par.- par_file
filepath; path to the
simstrat.parfile to readuse_bgc/ref_yeardefaults from. Defaults tosimstrat.parinpath_simstrat.
Examples
if (FALSE) { # \dontrun{
set_simstrat_inflows(path_simstrat, inf = list(stream1 = inflow_df))
} # }