Skip to main content

A Python interface for interacting with the SWAT+ hydrological model

Project description

pySWATPlus

DOI

PyPI - Version GitHub Release Date PyPI - Python Version PyPI - Status PyPI - Format

GitHub last commit GitHub commit activity

docs flake8 mypy pytest pytest Codecov

GitHub Repo stars GitHub forks GitHub Created At

Pepy Total Downloads PyPI - License

📦 About

pySWATPlus is an open-source Python package that provides a programmatic interface to the SWAT+ model, allowing users to run simulations and conduct custom experiments.

✨ Key Features

  • Modify model parameters through the calibration.cal file.
  • Run SWAT+ simulations seamlessly.
  • Compute performance metrics using widely adopted indicators.
  • Perform sensitivity analysis on model parameters using the SALib Python package, with support for parallel computation; currently, only Sobol sampling and Sobol indices are supported.

📥 Install pySWATPlus

To install from PyPI repository:

pip install pySWATPlus

To install the latest development version from GitHub:

pip install git+https://github.com/swat-model/pySWATPlus.git

To install from source in editable mode within your desired conda environment:

# Activate your Conda environment
conda activate <environment_name>

# Install required tools and clone the repository
pip install build
cd C:\Users\Username\Folder  # Replace with your actual path
git clone https://github.com/swat-model/pySWATPlus.git
cd pySWATPlus

# Build the package
python -m build

# Install in editable mode
pip install --editable .

✅ Verify Installation

The installation is successful if no error is raised when importing the module using the following command:

import pySWATPlus

📚 Documentation

For a guide to setting up first SWAT+ project and other functionalities with examples, refere to the pySWATPlus documentation.

📖 Citation

If you use pySWATPlus in your research, please cite it using the following concept DOI, which always points to the latest version:

@software{joan_salo_pyswatplus_latest,
  author       = {Joan Saló and
                  Debasish Pal and
                  Oliu Llorente},
  title        = {swat-model/pySWATPlus},
  year         = 2025,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.14889319},
  url          = {https://doi.org/10.5281/zenodo.14889319},
  note         = {This DOI always points to the latest version of pySWATPlus.},
}

🙏 Acknowledgments

We acknowledge the University of Oulu and ICRA research center for their support and the collaborative environment that made this project possible.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyswatplus-1.2.0.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyswatplus-1.2.0-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file pyswatplus-1.2.0.tar.gz.

File metadata

  • Download URL: pyswatplus-1.2.0.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pyswatplus-1.2.0.tar.gz
Algorithm Hash digest
SHA256 ebc7a724fdcfa81325603a2e6b1eef8d6290fd0212d8f890dabcfe64fb90f305
MD5 bc7a1669ecb89d9a39ab5ed84abf8ad1
BLAKE2b-256 6a20e4f84153fec40aa93e437b59fd9811a6a8c51ba78b7708fecab6f49df0ed

See more details on using hashes here.

File details

Details for the file pyswatplus-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyswatplus-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 43.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pyswatplus-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 393513c0680242831e81c0a6f2a6508ca977161cf3c61e6b560d2e7f7baef986
MD5 59ed3c71a87a84893ba201255febbc43
BLAKE2b-256 a9b1c5ae478f2f818682a568c10db764f61a274af15238f7c62db46159332b78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page