SWATrunR
Allows the user to control the essential parameters of a SWAT simulation run, such as model parameter changes, simulation time periods, or time intervals for printing output used for global soil and water assessment.
https://github.com/chrisschuerz/swatrunr
Category: Hydrosphere
Sub Category: Freshwater and Hydrology
Keywords from Contributors
transforms measur archiving animals conversion observation optimize projection compose generic
Last synced: about 1 hour ago
JSON representation
Repository metadata
Running SWAT projects within R
- Host: GitHub
- URL: https://github.com/chrisschuerz/swatrunr
- Owner: chrisschuerz
- License: gpl-3.0
- Created: 2018-08-16T19:03:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-11T14:42:41.000Z (19 days ago)
- Last Synced: 2025-04-25T18:37:27.667Z (5 days ago)
- Language: R
- Homepage: https://chrisschuerz.github.io/SWATrunR/
- Size: 29.4 MB
- Stars: 73
- Watchers: 13
- Forks: 33
- Open Issues: 15
- Releases: 7
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
README.md
SWATrunR
SWATrunR
integrates your SWAT2012 and SWAT+ projects in R
modeling workflows. SWATrunR
's key function is to execute SWAT in a project folder located on a hard drive and return simulation results in R
. Running SWAT models with SWATrunR
allows the user to control the essential parameters of a simulation run, such as model parameter changes, simulation periods, or time intervals for output printing. The formatting of SWAT simulation outputs in R
follow the tidy data principle. This clear output data structure facilitates an efficient processing of the simulation outputs in any data analysis workflow in R
and promotes a compatibility with many other R
packages. SWATrunR
provides some great features, such as parallel processing to run simulations with different parameter sets in parallel, or incremental writing of simulation outputs to SQLite data bases to store large outputs and safely perform computationally expensive simulation experiments.
Installation
You can install the SWATrunR
from the package's GitHub repository:
# If the package remotes is not installed run first:
install.packages("remotes")
remotes::install_github("chrisschuerz/SWATrunR")
SWATrunR
will be constantly updated and new features will find their way into the R
package from time to time. Any updates and fixed issues are documented in the Changelog. Bugs and open issues are documented in the R
package's issue section. If you encounter any issues, or want to suggest any new features I encourage you to do so there. Please also check the closed issues to see if your question is related to anything that was already solved before.
Package workflow
run_swatplus()
and run_swat2012()
are the core SWATrunR
functions to perform simulations in the SWAT project folder located on the local hard drive and to return the simulation results back to the R
environment. The simulation outputs that are returned in R
are defined with the function define_output()
. define_output()
translates easily readable output definitions into commands to extract the simulation results from a SWAT+ or a SWAT2012 simulation run, by maintaining the same syntax for both models. SWATdata
is an accompanying R
package that provides SWAT+ and SWAT2012 demo projects that you can instantly start working with SWATrunR
. With load_demo()
you can access the SWAT demo projects and other useful demo data such as observation data. With load_swat_run()
and scan_swat_run()
you can load or just get an overview of SWAT simulations that were stored incrementally in SQLite databases.
Getting started
The Get started page is a good starting point to learn the basics for working with a SWAT project in R
. It covers the following basics:
- Loading a demo project >>
- Performing first SWAT model runs in R >>
- Performing parameter changes in a SWAT run >>
- Saving and loading SWAT simulations >>
- A short overview of further
run_swat*()
input arguments >>
The Reference pages document all functions of SWATrunR
and provide descriptions of the function input arguments and short examples on how to use the functions.
Additional materials on the usage of SWATrunR
and short tutorials how you can integrate SWATrunR
in typical SWAT modelling workflows will be added in the Articles section over time.
Owner metadata
- Name: Christoph Schuerz
- Login: chrisschuerz
- Email:
- Kind: user
- Description:
- Website:
- Location: Berlin, Germany
- Twitter:
- Company: UFZ Leipzig, Germany
- Icon url: https://avatars.githubusercontent.com/u/13539163?u=9e19a86244e0a898918b9ce57e2c828aacc9da5a&v=4
- Repositories: 2
- Last ynced at: 2023-03-01T23:36:04.939Z
- Profile URL: https://github.com/chrisschuerz
GitHub Events
Total
- Issues event: 7
- Watch event: 2
- Issue comment event: 11
- Push event: 4
- Fork event: 3
Last Year
- Issues event: 7
- Watch event: 2
- Issue comment event: 11
- Push event: 4
- Fork event: 3
Committers metadata
Last synced: about 19 hours ago
Total Commits: 436
Total Committers: 5
Avg Commits per committer: 87.2
Development Distribution Score (DDS): 0.016
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Christoph Schuerz | c****z@b****t | 429 |
dependabot[bot] | 4****] | 2 |
Nan-Hung Hsieh | n****3@h****m | 2 |
Edberto Moura Lima | e****a@g****m | 2 |
willem | w****t@g****m | 1 |
Committer domains:
- boku.ac.at: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 79
Total pull requests: 6
Average time to close issues: 4 months
Average time to close pull requests: 18 days
Total issue authors: 46
Total pull request authors: 5
Average comments per issue: 3.08
Average comments per pull request: 0.17
Merged pull request: 6
Bot issues: 0
Bot pull requests: 2
Past year issues: 9
Past year pull requests: 0
Past year average time to close issues: 19 days
Past year average time to close pull requests: N/A
Past year issue authors: 5
Past year pull request authors: 0
Past year average comments per issue: 1.33
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- seyounger (7)
- mgf-unige (6)
- jsacerot (5)
- rafaelnavas (4)
- Jakirullah (3)
- jmule88 (3)
- insight4d-connect (2)
- AMAS-89 (2)
- Svenja-vS (2)
- EdM44 (2)
- florentpapini (2)
- hinckleyb (2)
- MOG91 (2)
- waterhanBsu (2)
- chrisschuerz (2)
Top Pull Request Authors
- dependabot[bot] (2)
- EdbertoLima (1)
- nanhung (1)
- chrisschuerz (1)
- WillemVervoort (1)
Top Issue Labels
Top Pull Request Labels
- dependencies (2)
Dependencies
- R >= 4.0 depends
- RSQLite >= 2.1.1 imports
- dbplyr >= 1.3.0 imports
- doSNOW >= 1.0.16 imports
- dplyr >= 0.8.0.1 imports
- foreach >= 1.4.4 imports
- lubridate >= 1.7.4 imports
- parallel >= 3.5.3 imports
- processx >= 3.4.5 imports
- purrr >= 0.3.2 imports
- readr >= 2.0 imports
- stringr >= 1.4.0 imports
- tibble >= 2.1.1 imports
- tidyselect >= 1.1 imports
- devtools * suggests
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests
Score: 6.086774726912307