Projects & Software
Open-source software, datasets, and educational materials I have developed or co-developed. Everything here is available on my GitHub unless otherwise noted.
SynHydro
Documentation · GitHub · Lead developer · MIT license
SynHydro is a Python library for stochastic (synthetic) streamflow generation for hydrologic and water systems analysis. It brings a broad set of generation methods from the literature together under a single, consistent, scikit-learn-style API: every generator is used through the same fit() and generate() workflow.
- Generators: parametric (Thomas-Fiering, Matalas, ARFIMA, SPARTA, SMARTA, multi-site hidden Markov model), hybrid (Kirsch, WARM, phase randomization, multi-site phase randomization), and non-parametric (KNN bootstrap) methods, spanning classic approaches (Thomas & Fiering, 1962; Matalas, 1967) through recent innovations
- Disaggregation: temporal disaggregation methods (e.g., Nowak, Valencia-Schaake) and pre-built pipelines that chain generation and disaggregation
- Single- and multi-site generation at daily through annual timescales
- Diagnostics: verification/validation statistics, drought characterization, and plotting utilities, plus ensemble data management
import synhydro
Q_daily = synhydro.load_example_data()
Q_monthly = Q_daily.resample("MS").sum()
gen = synhydro.KirschGenerator()
gen.fit(Q_monthly)
ensemble = gen.generate(n_realizations=50, n_years=30, seed=42)
Install with pip install git+https://github.com/TrevorJA/SynHydro.git. A companion repository, SynHydroGeneratorComparison, performs multi-basin, multi-metric diagnostic comparisons of the different generators.
Pywr-DRB
Documentation · GitHub · Co-developer · MIT license
An open-source Python model for water availability and drought risk assessment in the Delaware River Basin, built on the pywr simulation framework. Pywr-DRB represents the basin’s major reservoirs, New York City’s diversions, and the Flexible Flow Management Program operating rules, and can be driven by observed, hydrologic-model, reconstructed, or synthetic streamflows, including large ensembles run in parallel with MPI.
- Paper: Hamilton, Amestoy & Reed (2024), Environmental Modelling & Software
- Tutorial: Running ensemble simulations with the DRB reconstruction ensemble
- Related: a custom Model Context Protocol server for LLM-assisted development with the Pywr-DRB codebase
Delaware River Basin Streamflow Reconstruction Ensemble
Zenodo data release · CC BY 4.0
A 1,000-member probabilistic reconstruction of daily streamflow at 33 locations across the Delaware River Basin for 1945–2023, generated by combining the USGS National Hydrologic Model, a flow-duration-curve based prediction in ungauged basins method, and Bayesian bias correction. The release also includes Pywr-DRB inputs and simulation outputs. Methods are described in Amestoy, Hamilton & Reed (2026).
Smaller tools and tutorials
- example_python_project — A template for structuring scientific Python projects (blog post).
- example_hpc_project — A template for organizing projects that run on HPC systems.
- Rodionov_regime_shifts — Python implementation of the Rodionov regime shift detection algorithm (blog post).
- PC_daymet_retrieval — Retrieve Daymet data from the Microsoft Planetary Computer (blog post).
- ThomasFieringModelDemo — A Python implementation of the Thomas-Fiering synthetic streamflow model (blog post).
- Reservoir-LP-Demo — Linear programming for reservoir operations with Pyomo (part 1, part 2).
- Folium_Interactive_Map_Demo — Interactive watershed maps with Folium (blog post).
- QPPQ_Streamflow_Prediction_Tutorial — Streamflow prediction in ungauged basins with the QPPQ method (blog post).
- harvested_predator_prey_system_tutorial_series — Training series on decision making under deep uncertainty in a harvested fishery (blog post).
Education & Outreach
- AquaticAlgorithms — Materials for an introductory course/internship that introduces high school students to hydrology, water resource systems analysis, and modeling in Python.
- WaterProgramming blog — Frequent contributor of tutorials on hydrologic data retrieval, statistical and Bayesian methods, optimization, and scientific Python. Copies of my posts are collected under Blog Posts.
