-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
73 lines (56 loc) · 3.29 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
title: "Introduction to svatools"
<!-- output: rmarkdown::html_vignette -->
output: github_document
vignette: >
%\VignetteIndexEntry{Introduction to svatools}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
development:
mode: auto
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/"
)
library(badger)
```
# svatools
`r badge_devel("biopsichas/svatools", "gold")`
`r badge_last_commit("biopsichas/svatools", "green")`
`r badge_lifecycle(stage = "stable")`
`r badge_repostatus("active")`
`r badge_code_size("biopsichas/svatools")`
`r badge_license("MIT")`
`r badge_doi("https://doi.org/10.5281/zenodo.7436013", "yellow")`
The goal of `svatools` is to help with the [SWAT+ model](https://swat.tamu.edu/software/plus/) input data preparation. There are mostly functions, which were developed for the implementation of modeling tasks in the [OPTAIN project](https://www.optain.eu/). These tools are intended to fill the gaps in the SWAT+ workflow along side the main tools developed by [Christoph Schuerz](https://www.ufz.de/index.php?en=49467). Therefore, we highly recommend trying and using these tools:
- [SWATfarmR](http://chrisschuerz.github.io/SWATfarmR/) - R tool for preparing management schedules for SWAT model;
- [SWATplusR](https://chrisschuerz.github.io/SWATplusR/articles/SWATplusR.html) - R tool for sensitivity analyse, model calibration and validation;
- [SWATbuildR](https://git.ufz.de/optain/wp4-integrated-assessment/swat/bildr_script)^[Currently requires access to OPTAIN https://git.ufz.de/optain] - R tool for building SWAT+ setups;
- [SWATdoctR](https://git.ufz.de/schuerz/swatdoctr)^[Currently requires access to OPTAIN https://git.ufz.de/optain] - A collection of functions in R and routines for SWAT model calibration and model diagnostics.
Detailed information about packages, workflow steps, input data, SWAT+ parameters, model calibration, validation, etc., could be found in the [SWAT+ modeling protocol](https://doi.org/10.5281/zenodo.7463395).
## Installation
You can install the development version of svatools from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("biopsichas/svatools")
# euptf2 package is needed and used for soil parameter functions
devtools::install_github("tkdweber/euptf2")
```
## Data
All the data required to run and test package is installed with package in extdata folder. Exact location on computer could be found running lines below. Please run it on your system to get it for you.
```{r data}
library(svatools)
temp_path <- system.file("extdata", package = "svatools")
print(temp_path)
```
## Templates
In order to use *svatools* package functions with your data you should prepare your data to be inline with templates we have provided in *extdata* folder. Such are:
- **calibration_data.xlsx** - template for loading calibration (water flow and water quality variables) data.
- **weather_data.xlsx** - template for loading weather variables.
- **soil_lookup.xlsx** - example of loading soil parameters dataset.
- **GIS/** - folder with GIS layers needed to run some functions.
- **CORDEX-BC/** - folder with example climate data.
Data prepared according to templates can be directly loaded into R and all the functions applied as described.