Skip to contents

With this function you can load data sets for SWAT2012 and SWAT+ demo projects. The provided data includes demo projects, discharge observation data and spatial data such as the subbasin boundaries, the river networks, and the HRUs of the SWAT setups.

Usage

load_demo(dataset, path = NULL, version = NULL, revision = NULL)

Arguments

dataset

Character string to define data set to load. Valid inputs are dataset = c('project', 'observation', 'subbasin', 'river', 'hru'). dataset = 'project' loads a SWAT demo project in the defined path location and returns the final project path as a text string in R. The definition of the version is required. dataset = 'observation' returns a tibble with discharge observation data at the main outlet of the demo watershed. The options 'subbasin', 'river', and 'hru' return the paths of the respective subbasin, river network and HRU shape files. See examples how to load shapes unsing e.g. the sf package. These options require a definition of the version.

path

Character string that defines the path where copy the SWAT demo project.

version

Character string that defines the SWAT version. Options are version = c('2012', 'plus'). This argument is required to load SWAT projects and shape files.

revision

Numeric value to define the model revision ofthe loaded SWAT project. See SWATdata for valid revision numbers. When loading a SWAT project and leaving revision = NULL, then the most recent model revision is loaded by default.

Examples

To learn how to load the different demo data sets with SWATplusR see the section Loading demos on the package's Get Started page.