Giter Site home page Giter Site logo

joelz575 / swatplus Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 0.0 147.06 MB

A mirror of the GitLab project swatplus.

License: GNU Affero General Public License v3.0

Fortran 73.84% Shell 0.04% Makefile 10.71% C 0.21% CMake 0.08% Python 0.44% Forth 0.66% Gnuplot 14.01% Smalltalk 0.01%

swatplus's Introduction

Dynamic SWAT+

A SWAT+ Model repository (almost) clone.

Build Status

This repository is (mostly) a clone of the official SWAT+ one available here. A few major differences are:

  • We only store source code in the git repository. This means that documentation, compiled executables, and example data are not included. It also means that you will not accidently download a git repo over 1 GB in size when you try to clone it.
  • Releases for MacOS, Windows and Linux are all automatically compiled and published in the releases tab (magic!)
  • Added option for dynamic model linking (documentation to follow)

We will always try to keep this repostitory as up to date as possible compared to the main SWAT+ code. Pull requests are welcome!

How to compile

If you feel like recompiling SWAT+ from source yourself (what could possibly go wrong?), you will need CMake. Check the .travis.yml file for an example of how it works on Windows versus Linux/OSX.

Dynamic linking

SWAT+ (as well as SWAT, and nearly all other hydrological models) do not support dynamic linking at runtime. In other words, if you wanted to connect a SWAT+ model with another model (e.g., an agriculture, landuse, system dynamics, or groundwater model) dynamically, with output from one becoming the input for the other, and vice versa, you had to stop the simulation after a year, rewrite input files, and restart it. Unfortunately, SWAT+ has a lot of internal state variables (such as water balances) that are not saved to output files, nor can be specified in input files...

That is why Dynamic SWAT+ was invented. Run normally, it behaves exactly like SWAT+ (we hope). However, by specifying port and host arguments at runtime, you can now tell SWAT+ to pause after a specific amount of time and exchange data with a different model according to the Tinamït data exchange specification (disclaimer: in progress). When the model is given the signal to continue, simulation will resume exactly where it left off.

For instance, when in the SWAT+ project directory, running

$ SwatPlus 12345 127.0.0.1

will execute SWAT+ in dynamic mode on port 12345 on the local machine.

License

The AGPL license provided here, naturally, only applies to our original work on DynamicSWAT+ (such as src/CMakeLists.txt, src/tinamit_module.f90 and src/socket.c) and not to the rest of the original SWAT+ code. For information on SWAT+ code licensing, please contact the SWAT+ team directly.

swatplus's People

Contributors

joelz575 avatar julienmalard avatar

Stargazers

 avatar  avatar  avatar Ruben Molina avatar Xinchen He (何新辰) avatar  avatar  avatar Daniel Hardesty Lewis avatar

Watchers

James Cloos avatar  avatar  avatar

swatplus's Issues

LICENSE file missing

Please LICENSE your original work, such as CMakeLists.txt, so that I can properly credit you and derive your work.

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.