Open AI-driven Water Intelligence Platform
HydroMind is an open-source Python framework that tackles multi-dimensional water challenges β flood forecasting, drought monitoring, and water quality analysis β using real-world data APIs and locally-runnable AI models. Think of it as an AI agent for water: describe your challenge in plain language and HydroMind fetches the data, recommends the right models, trains them, and returns forecasts.
- Natural language interface β describe a water challenge, get a complete analysis plan
- 4 free water data APIs β USGS NWIS, Open-Meteo (ERA5 + GloFAS), EPA WQP, Copernicus
- AI model recommender β maps challenge type β best model, with rationale
- Auto-implemented models β Prophet, ARIMA, SPI, Random Forest, XGBoost, LSTM
- 3 challenge domains β flood forecasting, drought monitoring, water quality
- 100% CPU-friendly β all models run locally without GPU
- Python SDK + CLI β use as a library or from the terminal
- No API keys needed for basic use (USGS, Open-Meteo, EPA are all free & open)
git clone https://github.com/Rekin226/hydromind.git
cd hydromind
pip install -e ".[all]"Minimum install (no deep learning):
pip install -e .from hydroai import HydroAgent
agent = HydroAgent()
# Flood forecasting β Niger River
result = agent.solve(
"Predict flood risk in the Niger River over the next 7 days",
location_override="13.5,2.1", # lat, lon
start_date="2015-01-01",
)
result.show()
# Drought monitoring β Sahel
result = agent.solve(
"Monitor drought conditions in the Sahel region",
location_override="15.0,0.0",
)
result.show()
# Water quality β US river station
result = agent.solve(
"Detect nitrate pollution and water quality anomalies",
location_override="USGS-01589440",
)
result.show()# Solve a water challenge
hydromind solve "predict flood risk in the Niger River over 7 days" --location "13.5,2.1"
# Explain approach without fetching data
hydromind explain "drought forecasting in sub-Saharan Africa"
# List all data sources
hydromind data list
# Fetch streamflow data
hydromind data fetch --source usgs --site 01589440 --variable streamflow --days 365
# Fetch global precipitation
hydromind data fetch --source openmeteo --site "48.85,2.35" --variable precipitation --days 730
# Fetch river discharge from GloFAS
hydromind data fetch --source copernicus --site "13.5,2.1" --variable river_discharge --days 1825
# Search USGS stations
hydromind data search --source usgs --query "Susquehanna" --state PA
# List available models
hydromind models| Source | Coverage | Variables | Auth Required |
|---|---|---|---|
| USGS NWIS | United States | Streamflow, groundwater, water quality, precipitation | None |
| Open-Meteo | Global | Precipitation, temperature, ET, soil moisture, GloFAS discharge, 16-day forecasts | None |
| EPA WQP | United States | pH, nutrients, metals, pathogens, physical parameters | None |
| Copernicus/GloFAS | Global | River discharge, ERA5 hydrology, flood probability | Optional (free registration) |
| Model | Class | Best For | Uncertainty | Multivariate |
|---|---|---|---|---|
| Prophet | Statistical | Seasonal streamflow, drought monitoring | β | β |
| ARIMA/SARIMA | Statistical | Short-term discharge, stationary series | β | β |
| SPI Drought Index | Statistical | WMO drought monitoring (1, 3, 6, 12-month) | β | β |
| Random Forest | ML | Multi-input flood risk, water quality | β | β |
| XGBoost | ML | High-accuracy tabular hydrology | β | β |
| Isolation Forest | ML | Water quality anomaly detection | β | β |
| LSTM | Deep Learning | Complex temporal sequences | β | β |
hydromind/
βββ hydroai/
β βββ agent/
β β βββ core.py # HydroAgent β main orchestrator
β β βββ planner.py # Natural language challenge parser
β β βββ recommender.py # Model recommendation engine
β βββ data/
β β βββ usgs.py # USGS NWIS connector
β β βββ openmeteo.py # Open-Meteo connector (ERA5 + GloFAS)
β β βββ epa.py # EPA Water Quality Portal
β β βββ copernicus.py # Copernicus/GloFAS connector
β β βββ catalog.py # Unified data catalog + auto-routing
β βββ models/
β β βββ statistical.py # Prophet, ARIMA, SPI
β β βββ ml.py # Random Forest, XGBoost, Isolation Forest
β β βββ lstm.py # Lightweight CPU LSTM (PyTorch)
β βββ challenges/
β β βββ flood.py # FloodChallenge helper
β β βββ drought.py # DroughtChallenge + SPI
β β βββ quality.py # WaterQualityChallenge + WHO guidelines
β βββ cli.py # CLI entry point
βββ examples/
β βββ 01_flood_forecast.py
β βββ 02_drought_monitoring.py
β βββ 03_water_quality.py
β βββ 04_custom_data_fetch.py
βββ tests/
agent = HydroAgent()
# Flood
agent.solve("Predict flash flood risk in the Sahel during monsoon season", location_override="15.0,0.0")
agent.solve("Forecast 7-day streamflow for the Susquehanna River", location_override="01570500")
# Drought
agent.solve("Compute SPI drought index for East Africa over 20 years", location_override="-1.0,37.0")
agent.solve("Assess water stress in the Colorado River Basin", location_override="36.1,-111.5")
# Water quality
agent.solve("Detect nitrate contamination in the Chesapeake Bay watershed", location_override="USGS-01589440")
agent.solve("Monitor pH and dissolved oxygen in the Rhine River", location_override="51.9,4.5")
# Groundwater
agent.solve("Analyze groundwater level trends in the Central Valley", location_override="36.5,-119.5")HydroMind reports standard hydrological performance metrics:
- NSE (Nash-Sutcliffe Efficiency): 1.0 = perfect, < 0 = worse than mean
- KGE (Kling-Gupta Efficiency): accounts for correlation, bias, and variability
- RMSE (Root Mean Square Error)
- MAE (Mean Absolute Error)
- HydroLLM: Fine-tuned language model for hydrology question answering
- Chronos integration: Zero-shot time series forecasting for ungauged basins
- WaterGPT-style chatbot: Conversational hydrological analysis
- Global gauge network: Integration with GRDC, HydroShare, and CAMELS datasets
- Satellite data: Integration with Google Earth Engine for NDWI, GRACE groundwater
- Ensemble forecasting: Multi-model weighted ensembles with uncertainty propagation
- Alert system: Automated early warning notifications for flood/drought thresholds
- REST API: FastAPI-based microservice for embedding in decision support systems
- Web UI: Streamlit dashboard for non-technical users
HydroMind is open to contributions. Priority areas:
- Additional data connectors (GRDC, HydroShare, national agencies)
- Physics-informed model constraints
- Multilingual challenge parser (French, Arabic, Portuguese)
- Coverage of ungauged basins in Global South
MIT License β see LICENSE for details.
HydroMind builds on the research landscape reviewed in:
- Time-LLM (Jin et al., ICLR 2024) β LLM reprogramming for time series
- Chronos (Ansari et al., 2024) β Pre-trained probabilistic forecasting
- ClimaX (Nguyen et al., 2023) β Foundation model for weather/climate
- GloFAS (Nearing et al., Nature 2024) β Global flood forecasting in ungauged basins
- WMO SPI/SPEI guidelines for drought monitoring
Built with β€οΈ for the global water community. HydroMind β because every drop of data matters.