SWATdoctR
SWATdoctR is a collection of functions and routines for SWAT model calibration and model diagnostics. The R package includes routines for a guided model setup verification, as well as functions for the visualization and diagnosis of simulation outputs. The aim of the SWATdoctR is to identify potential issues in the model setup early in the calibration process and to support the SWAT modeler to focus on a plausible process representation in the model calibration process. Additionally, package is intended to be used as SWAT+ models quality assurance tool in order to increase confidence level in model results and applications. A detailed overview is presented in the article by Plunge, Schürz, et al. (2024).
Most functions were developed for the implementation of modeling tasks in the OPTAIN project. These tools are intended to fill the gaps in the SWAT+ workflow alongside the main tools developed by Christoph Schuerz. Therefore, we highly recommend trying and using these tools:
- SWATprepR - SWAT+ model input data preparation helper. The package is presented in the article Plunge, Szabó, et al. (2024);
- SWATbuildR - R tool for building SWAT+ setups.
- SWATfarmR - R tool for preparing management schedules for the SWAT model.
-
SWATrunR - R tool for running SWAT models for different parameters and scenarios. Please install branch names remove_legacy. It could be done using line like this
remotes::install_github("chrisschuerz/SWATrunR@remove_legacy") - SWATtunR - R tool for soft & hard calibration, validation of SWAT+ models.
- SWATmeasR - R tool for implementing Natural/Small Water Retention Measures (NSWRMs) in the SWAT+ models and running scenarios.
Additionally, we recommend checking out the following packages, which can be used to build scripted workflows for SWAT+:
- SWATreadR - Read and write SWAT+ input and output files.
- SWATdata - SWAT project datasets for SWATrunR and SWATfarmR.

Detailed information about packages, workflow steps, input data, SWAT+ parameters, model calibration, validation, etc., could be found in the SWAT+ modeling protocol Christoph et al. (2022).
Installation
You can install the development version of SWATdoctR from GitHub.
# If the package 'remotes' is not installed run first:
install.packages("remotes")
# The installation of `SWATprepR`.
remotes::install_github("biopsichas/SWATdoctR")Getting started
To get started with SWATdoctR, please refer to the vignettes available at: https://biopsichas.github.io/SWATdoctR/.
