Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Module 5: Resources & Next Steps

Your Continued Python Journey

Congratulations! You’ve completed the core tutorial series. You now have:

  • A working Python development environment (VS Code + uv)

  • Understanding of Python fundamentals through hydraulic examples

  • Skills to use AI assistants effectively for coding

  • Experience analyzing real hydrological data

This module provides curated resources to continue your learning journey, organized by topic and skill level.


Python Fundamentals

If you want to deepen your general Python knowledge:

Interactive Tutorials

ResourceLevelNotes
Python.org Official TutorialBeginnerThe official tutorial—comprehensive and authoritative
Real PythonAll levelsExcellent articles and tutorials on every Python topic
Codecademy PythonBeginnerInteractive browser-based learning
Python for EverybodyBeginnerFree course by Dr. Chuck (University of Michigan)

Books (Free Online)

BookAuthorBest For
Automate the Boring StuffAl SweigartPractical automation tasks
Think PythonAllen DowneyComputer science concepts
Python Data Science HandbookJake VanderPlasData analysis with Python

Data Analysis & Visualization

Essential libraries for working with hydrological data:

pandas (Data Manipulation)

ResourceDescription
pandas DocumentationOfficial docs with tutorials
10 Minutes to pandasQuick start guide
pandas Cheat SheetPDF reference card
Real Python: pandas TutorialsStep-by-step learning path

matplotlib (Plotting)

ResourceDescription
matplotlib GalleryExamples of every plot type
matplotlib TutorialsOfficial tutorials
Scientific Visualization BookBeautiful scientific plots (free)

NumPy & SciPy (Numerical Computing)

ResourceDescription
NumPy QuickstartGetting started with arrays
SciPy Lecture NotesScientific Python ecosystem
From Python to NumPyAdvanced NumPy techniques

Hydrology-Specific Python Resources

Courses & Tutorials

ResourceOrganizationDescription
Python for Hydrology GitHubUSGSJupyter notebooks and exercises

Python Packages for Hydrology

PackagePurposeInstall
HydroFunctionsAccess USGS NWIS datauv add hydrofunctions
PyGeoHydroHydrological data access (CAMELS, etc.)uv add pygeohydro
HyRiverSuite of hydrological toolsuv add py3dep pynhd pygeohydro
xarrayMulti-dimensional arrays (NetCDF)uv add xarray
hydroevalHydrological evaluation metricsuv add hydroeval

Groundwater Modelling with FloPy

If you work with MODFLOW, FloPy is essential:

Getting Started

ResourceDescription
FloPy DocumentationOfficial docs and tutorials
FloPy GitHubSource code and examples
USGS FloPy PageOfficial USGS overview

Tutorials & Training

ResourceDescription
MODFLOW 6 + FloPy Training (Princeton 2024)Excellent workshop notebooks
FloPy Tutorial NotebooksOfficial example notebooks

Installation

# Install FloPy
uv add flopy

# You'll also need MODFLOW executables
# See: https://github.com/MODFLOW-USGS/executables
ToolPurpose
MODFLOW 6Latest MODFLOW version
Model MuseGUI for model setup
PEST++Parameter estimation

Hydrological Data Sources

Open datasets for your projects:

Global Datasets

DatasetCoverageAccess
GRDCGlobal river dischargeRegistration required
CaravanGlobal large-sample datasetOpen access
GloFASGlobal flood monitoringCopernicus
ERA5Global reanalysisCopernicus Climate Data Store

CAMELS Family (Catchment Attributes and Meteorology)

DatasetRegionAccess
CAMELS-USUnited StatesOpen access
CAMELS-GBGreat BritainOpen access
CAMELS-CHSwitzerlandOpen access (Zenodo)
CAMELS-CLChileOpen access
CAMELS-BRBrazilOpen access
CAMELS-AUSAustraliaOpen access

National Databases

CountryDatabaseNotes
USAUSGS NWISComprehensive, API available
SwitzerlandFOEN HydrologyFederal discharge data
GermanyBfG GRDCFederal waterways data
UKNRFANational River Flow Archive

Version Control with Git

Essential for managing your code professionally:

Getting Started

ResourceDescription
Git Handbook (GitHub)Quick introduction
Pro Git BookComprehensive free book
GitHub SkillsInteractive learning
Oh My Git!Game-based learning

Why Version Control Matters for Water Modellers

  • Reproducibility: Track exactly which code produced your results

  • Collaboration: Share code with colleagues safely

  • Backup: Never lose your work

  • History: See what changed and when

  • Branches: Experiment without breaking working code

Basic Git Workflow

# Initialize a repository
git init

# Stage changes
git add my_script.py

# Commit with a message
git commit -m "Add discharge analysis script"

# Push to GitHub
git push origin main

Community & Support

Connect with other water modellers using Python:

Forums & Discussion

PlatformCommunity
Stack OverflowGeneral Python Q&A
MODFLOW Users GroupMODFLOW & FloPy discussions
Hydrology GitHub DiscussionsOpen source hydrology projects
Reddit r/HydrologyHydrology community

Conferences & Workshops

EventFocus
AGU Fall MeetingSessions on Python in hydrology
EGU General AssemblyComputational hydrology sessions
MODFLOW & MoreGroundwater modelling conference

Curated Package Lists

ListDescription
Python-Hydrology-ToolsComprehensive list of hydrology packages

Suggested Learning Paths

Based on your interests, here are recommended next steps:

Path A: Surface Water Hydrology

  1. Deepen pandas skills10 Minutes to pandas

  2. Learn HyRiverHyRiver Documentation

  3. Time series analysis → scipy.signal, statsmodels

  4. Rainfall-runoff modelling → Explore conceptual models (HBV, GR4J)

Path B: Groundwater Modelling

  1. Learn FloPy basicsFloPy Tutorials

  2. MODFLOW 6 conceptsMODFLOW 6 Documentation

  3. Parameter estimation → PEST++ basics

  4. Advanced visualization → matplotlib + FloPy plotting utilities

Path C: Data Science & Machine Learning

  1. Statistics with scipySciPy Stats Tutorial

  2. Machine learning basicsscikit-learn Getting Started

  3. Deep learning for hydrologyNeuralHydrology

  4. Large datasets → xarray, Dask

Path D: Automation & Productivity

  1. Command-line tools → argparse, click

  2. Scheduled tasks → cron jobs, Windows Task Scheduler

  3. Report generation → Jupyter to PDF, automated plots

  4. Web dashboards → Streamlit, Panel

Quick Reference: Essential Commands

uv (Package Management)

uv init my-project      # Create new project
uv add pandas           # Add a package
uv remove pandas        # Remove a package
uv sync                 # Install all dependencies
uv run script.py        # Run with correct environment

Git (Version Control)

git status              # Check what's changed
git add .               # Stage all changes
git commit -m "msg"     # Save changes
git push                # Upload to GitHub
git pull                # Download updates

VS Code Shortcuts

Shortcut (Windows)Shortcut (Mac)Action
Ctrl+Shift+PCmd+Shift+PCommand palette
Ctrl+`Cmd+`Toggle terminal
Shift+EnterShift+EnterRun cell (notebook)
Ctrl+/Cmd+/Toggle comment
F5F5Run/debug script

Final Thoughts

You’ve Built a Strong Foundation

Through this tutorial series, you’ve learned:

  • ✅ How to set up a professional Python environment

  • ✅ Why virtual environments matter for reproducible research

  • ✅ Python fundamentals through hydraulic engineering examples

  • ✅ How to use AI assistants effectively (and safely)

  • ✅ How to access and analyze real hydrological data

Keep Practicing

The best way to learn programming is by doing. Here are project ideas:

  1. Automate a repetitive task you currently do in Excel

  2. Analyze your own data using the techniques from Module 4

  3. Create a visualization of discharge data from your region

  4. Build a simple calculator for a hydraulic formula you use often

  5. Contribute to open source by reporting bugs or improving documentation

Remember

Every expert was once a beginner.

Programming is a skill that improves with practice. Be patient with yourself, use AI assistance when stuck, and don’t hesitate to ask questions in community forums.


Thank you for completing this tutorial series!

If you found it helpful, consider:

  • ⭐ Starring the GitHub repository

  • 📣 Sharing with colleagues who might benefit

  • 🐛 Reporting issues or suggesting improvements

Good luck on your Python journey!

References
  1. Höge, M., Kauzlaric, M., Siber, R., Schönenberger, U., Horton, P., Schwanbeck, J., Floriancic, M. G., Viviroli, D., Wilhelm, S., Sikorska-Senoner, A. E., Addor, N., Brunner, M., Pool, S., Zappa, M., & Fenicia, F. (2023). Catchment attributes and hydro-meteorological time series for large-sample studies across hydrologic Switzerland (CAMELS-CH). Zenodo. 10.5281/ZENODO.7784633
  2. Vinícius B. P. Chagas, Pedro L. B. Chaffe, Nans Addor, Fernando M. Fan, Ayan S. Fleischmann, Rodrigo C. D. Paiva, & Vinícius A. Siqueira. (2020). CAMELS-BR: Hydrometeorological time series and landscape attributes for 897 catchments in Brazil - link to files. Zenodo. 10.5281/ZENODO.3964745
  3. Fowler, K., Acharya, S. C., Addor, N., Chou, C., & Peel, M. (2020). CAMELS-AUS v1: Hydrometeorological time series and landscape attributes for 222 catchments in Australia. PANGAEA. 10.1594/PANGAEA.921850