This repository contains a GUI-based tool designed to streamline the processing and modification of SWAT+ TxtInOut files. It includes features for filtering Hydrologic Response Units (HRUs), modifying key SWAT+ files, and optionally running simulations using user-selected SWAT+ executables. The tool aims to make SWAT+ workflows more accessible and efficient for users.
gui_main.py: Handles the main application logic and user interactions.gui_layout.py: Defines the layout and structure of the graphical user interface (GUI).gui_logic.py: Implements the backend logic tied to user actions in the GUI.toggle_switch.py: Custom toggle switch widget for enabling/disabling features.tooltip.py: Provides hover-based tooltips for better user guidance.
swat_main.py: Central processing logic for SWAT+ TxtInOut files, including simulation execution.FileModifier.py: Handles modifications to SWAT+ input files likehru.con,object.cnt, andfile.cio.TxtinoutReader.py: A wrapper from the pySWATPlus project for managing SWAT+ TxtInOut files and handling simulations.FileReader.py: A utility from pySWATPlus for reading and processing SWAT+ files.utils.py: General utility functions to support file operations and input validation.
TxtinoutReaderandFileReadermodules are adapted from the pySWATPlus project, providing robust file-reading capabilities tailored for SWAT+.
- HRU Filtering: Modify SWAT+ input files for a single HRU or a range of HRUs.
- Simulation Execution: Run SWAT+ simulations directly from the GUI with support for selecting multiple executable files.
- File Modifications: Update core SWAT+ files (e.g.,
hru.con,object.cnt,file.cio) based on user inputs. - User-Friendly Interface: A GUI with tooltips and toggles to simplify SWAT+ workflows.
- Launch the GUI application.
- Select a source directory containing SWAT+ TxtInOut files.
- Configure HRU filters and file modification settings.
- Optionally, run simulations by selecting a SWAT+ executable.
- SWAT+ TxtInOut files in the source directory.
- Python 3.x and required dependencies (if running from source).
This project integrates key modules from the pySWATPlus project, a comprehensive library for managing and processing SWAT+ files.
-
Download the Executable:
- Go to the Releases page of this repository.
- Download the latest release of the executable for your operating system.
-
Run the Executable:
- Locate the downloaded executable file on your computer.
- Double-click the executable to launch the application.
- Follow the on-screen instructions to use the SWAT+ TxtInOut Processor.