This function allows to run a SWAT2012 project in R. Basic settings for the SWAT run such as the simulation period or the time interval for the outputs can be done directly. SWAT simulation outputs can be defined that are returned in a 'tidy' format in R. Functionality such as model parametrization, parallel execution of simulations, or incremental saving of simulation runs is provided.
Usage
run_swat_verification(
project_path,
outputs = c("wb", "mgt", "plt"),
start_date = NULL,
end_date = NULL,
years_skip = NULL,
nostress = 1,
keep_folder = FALSE
)Arguments
- project_path
Path to the SWAT+ project folder (i.e. TxtInOut).
- outputs
Define the outputs that should be read after the simulation run. The outputs that are defined here depend on the verification steps that should be performed on the outputs.
- start_date
(optional) Start date of the SWAT simulation. Provided as character string in any ymd format (e.g. 'yyyy-mm-dd'), numeric value in the form yyyymmdd, or in Date format.
- end_date
(optional) End date of the SWAT simulation. Provided as character string in any ymd format (e.g. 'yyyy-mm-dd'), numeric value in the form yyyymmdd, or in Date format.
- years_skip
(optional) Integer value to define the number of simulation years that are skipped before writing SWAT model outputs.
- nostress
nostress parameter in the 'codes.bsn' file to activate/deactivate plant stresses for plant growth. Set
nostress = 0to activate all stress factors,nostress = 1to deactivate all stress factors, andnostress = 2to only activate nutrient plant stress.- keep_folder
(optional) If
keep_folder = TRUE'.model_run/verification' is kept and not deleted after finishing model runs. In this case '.model_run' is reused in a new model run ifrefresh = FALSE.Default = FALSE
