Giter Site home page Giter Site logo

jenskiesel / swatrunr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chrisschuerz/swatrunr

0.0 0.0 0.0 30.23 MB

Running SWAT projects within R

Home Page: https://chrisschuerz.github.io/SWATrunR/

License: GNU General Public License v3.0

R 100.00%

swatrunr's Introduction

SWATrunR

DOI

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.

plot of chunk workflowfig

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.

swatrunr's People

Contributors

chrisschuerz avatar nanhung avatar dependabot[bot] avatar willemvervoort avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.