This project analyzes the downstream flow conditions at low-head dams using location and width data. It integrates functionality from the RathCelon and ARC packages.
The application is structured as a Python package (lhd_processor) and is run directly from your terminal.
This guide provides instructions for setting up the required environment using Conda, which is the recommended method for ensuring all dependencies (especially complex GIS packages) are installed correctly on Windows, macOS, and Linux.
-
Install Miniconda:
- Go to the Miniconda documentation and download the installer for your operating system (Windows or macOS).
- Run the installer and accept all the default settings.
-
Download the Project Code:
- Download this repository as a ZIP file (or use
git clone). - Unzip the folder. It already contains an
environment.yamlfile.
- Download this repository as a ZIP file (or use
-
Create the Conda Environment:
- Open Terminal/Anaconda Prompt and navigate to the root project folder that contains
environment.yaml. - Run the following command to create the environment (named
lhd-environment). This step will take 5-10 minutes.conda env create -f environment.yaml
- Open Terminal/Anaconda Prompt and navigate to the root project folder that contains
To use the LHD Processor effectively, it is recommended to set up a dedicated folder for your project. The application is designed to auto-populate paths based on this structure.
Create a folder (e.g., My_Dam_Project) and place your input CSV file inside it. When you run the application and select this "Project Folder" in the GUI, the tool will automatically create the standard subdirectories for you.
My_Dam_Project/
│
├── my_dams_database.csv <-- Your required input file
│
├── LHD_Results/ <-- Auto-generated: Stores DEMs, analysis outputs, and figures
│ ├── [Dam_ID]/
│ │ ├── DEM/
│ │ ├── FIGS/
│ │ └── ...
│
├── LHD_STRMs/ <-- Auto-generated: Stores downloaded flowline data (NHD/GEOGLOWS)
│
└── my_dams_database.json <-- Auto-generated: Input file created for the RathCelon step
-
Activate the Environment:
- Open your terminal (Anaconda Prompt on Windows, Terminal on macOS).
- Type the following command:
conda activate lhd-environment
- The prompt will show
(lhd-environment)when active.
-
Run the Processor (as a Module):
- Navigate to the root project directory where the
lhd_processorfolder is located. - Use the module execution command (
-m) to launch the GUI:python -m lhd_processor
- Navigate to the root project directory where the
-
Deactivate (When you are done):
- When you close the program, you can "deactivate" the environment by running:
conda deactivate
- When you close the program, you can "deactivate" the environment by running: