Skip to content

pySWATPlus is a Python library tailored for seamless interaction with the Soil and Water Assessment Tool Plus (SWAT+), empowering users to efficiently manage input and output files within Python environments.

License

Notifications You must be signed in to change notification settings

debpal/pySWATPlus

 
 

Repository files navigation

pySWATPlus

DOI

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

GitHub last commit GitHub commit activity

docs flake8 mypy 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, modify input files, and streamline custom experimentation through the model’s TxtInOut folder.

✨ Key Features

  • Navigate and read files in the SWAT+ TxtInOut folder.
  • Modify input parameters and save the updated files.
  • Run SWAT+ simulations either in the main TxtInOut folder or in a user-specified directory.
  • Perform sensitivity analysis on model parameters using the SALib Python package, with support for parallel computation.

📥 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.

About

pySWATPlus is a Python library tailored for seamless interaction with the Soil and Water Assessment Tool Plus (SWAT+), empowering users to efficiently manage input and output files within Python environments.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%