SWAT, Soil and Water Assessment Tool

The Soil and Water Assessment Tool (SWAT) is a hydrological model used to simulate processes such as surface runoff, groundwater flow, and water quality across watersheds of varying scales. It evaluates the effects of land use, management practices, and climate scenarios on water resources. SWAT is widely used to study soil erosion, nonpoint source pollution, and watershed management (https://swat.tamu.edu/). The tool allows users to upload custom TxtInOut folders to model any watershed of interest in SWAT+ or SWAT2012 model version format. Users can define the simulation time range, calibration settings, output variables, and temporal resolution. This tool is using SWATrunR functions ( https://github.com/chrisschuerz/SWATplusR ) with executables rev60.5.7_64rel_linux (for SWAT+) and rev688_64rel_linux (for SWAT2012).

hydrology AquaINFRA R SWAT+ SWAT2012 watershed model

Inputs
Id Title Data Type Description
swat_version SWAT version string Define the SWAT model version 'swatplus' or 'swat2012'. AquaINFRA has integrated the executable version rev60.5.7_64rel_linux for SWAT+ and rev688_64rel_linux for SWAT2012. Example: "swatplus".
TextInOut_URL URL to project folder object Provide URL to zipped TxtInOut SWAT project folder. Important: Do not include the SWAT executable in that folder — AquaINFRA has integrated the executable version rev60.5.7_64rel_linux for SWAT+ and rev688_64rel_linux for SWAT2012. Example, SWAT+ La Tordera watershed (Catalonia, Spain) model calibrated for water quantity (period 2000-2022) (Batlle-Morera, et al, 2026. https://doi.org/10.23728/b2share.am3bh-05a34): https://b2share.eudat.eu/records/am3bh-05a34/files/TxtInOut.zip?download=1 .
par_cal Parameter inputs object (optional) JSON file including the parameter value change as defined by SWATrunR documentation (https://chrisschuerz.github.io/SWATrunR/articles/SWATrunR.html#parameter-inputs). Example format: https://github.com/AmandaBatlle/AquaINFRA_CaseUse_MedInlandModel/blob/main/example_inputs/par_cal.json
unit Output Spatial unit integer Specify the spatial unit for which to generate output. This corresponds to the ID of a river reach, HRU (Hydrologic Response Unit), or LSU (Landscape Unit) as defined in the SWAT+ watershed delineation. The value can be entered as a single number (e.g., 1), a range (e.g., 1:10), or a list of values (e.g., (1, 3, 25, 40)). Example unit for the La Tordera SWAT+ model (Batlle-Morera, et al, 2026) is 1.
file SWAT Output File string Enter output file according to SWAT version. For SWAT+, the output file name consists of three elements separated by underscores (_): spatial unit, output category, and time step. For example, 'channel_sd_day'. The spatial unit defines the scale of the output and can be basin, hru, lsunit, channel, aquifer, or reservoir. The output category specifies the type of data such as wb (water balance), nb (nutrient balance), ls (losses), pw (plant and weather), or sd (streamflow and sediment in channels). The time step indicates the temporal resolution and can be day (daily), mon (monthly), yr (yearly), or aa (annual average). Combining these elements forms the output file name. For more details, refer to the SWAT+ OUTPUT FILES section in the SWAT+ documentation (https://swatplus.gitbook.io/io-docs) and SWATrunR documentation (https://chrisschuerz.github.io/SWATrunR/reference/run_swatplus.html). For SWAT2012 output files, valid inputs are 'rch', 'sub', 'hru', and 'sed', followed by '_', and the required output interval as a character string ('d' for daily, 'm' for monthly, or 'y' for yearly), for example: rch_m. For more details, refer to the SWAT2012 OUTPUT FILES chapter in the SWAT documentation (https://swat.tamu.edu/media/116601/ch32_output.pdf), and SWATrunR documentation (https://chrisschuerz.github.io/SWATrunR/reference/run_swat2012.html). Example for SWAT+: "channel_sd_day". Example for SWAT2012:"rch_d"
variable SWAT Variable string Variable to simulate. Example: "flo_out". For more details and extended capabilities, refer to the SWAT+ OUTPUT FILES section in the SWAT+ documentation (https://swatplus.gitbook.io/io-docs), or SWAT2012 OUTPUT FILES chapter in the SWAT documentation (https://swat.tamu.edu/media/116601/ch32_output.pdf). For one variable, enter the variable name. For multiple variables, enter them separated by a comma. Example for SWAT+: "flo_out,water_temp". Example for SWAT2012: "FLOW_OUT"
start_date Start Date integer Start date of the simulation in the format yyyymmdd. Example: 20160101.
skip_years Number of years of warm-up time integer (optional) Integer value to define the number of simulation years that are skipped before writing SWAT model outputs. Example: 2.
end_date End Date integer End date of the simulation in the format yyyymmdd. Example: 20201231.
Outputs
Id Title Description
swat_output_summary SWAT+ run summary SQLite database (inputs.sqlite) containing all the parameters used in the executed SWAT+ run
swat_output_file SWAT+ Variable Outputs Database SQLite database (thread_1.sqlite) storing the simulated output values based on the defined time range and time step (daily, monthly, yearly, or annual average).

Educational resources and documentation

Jobs

Browse jobs

Links

Execution modes

  • Synchronous
  • Asynchronous