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¶
| Resource | Level | Notes |
|---|---|---|
| Python.org Official Tutorial | Beginner | The official tutorial—comprehensive and authoritative |
| Real Python | All levels | Excellent articles and tutorials on every Python topic |
| Codecademy Python | Beginner | Interactive browser-based learning |
| Python for Everybody | Beginner | Free course by Dr. Chuck (University of Michigan) |
Books (Free Online)¶
| Book | Author | Best For |
|---|---|---|
| Automate the Boring Stuff | Al Sweigart | Practical automation tasks |
| Think Python | Allen Downey | Computer science concepts |
| Python Data Science Handbook | Jake VanderPlas | Data analysis with Python |
Data Analysis & Visualization¶
Essential libraries for working with hydrological data:
pandas (Data Manipulation)¶
| Resource | Description |
|---|---|
| pandas Documentation | Official docs with tutorials |
| 10 Minutes to pandas | Quick start guide |
| pandas Cheat Sheet | PDF reference card |
| Real Python: pandas Tutorials | Step-by-step learning path |
matplotlib (Plotting)¶
| Resource | Description |
|---|---|
| matplotlib Gallery | Examples of every plot type |
| matplotlib Tutorials | Official tutorials |
| Scientific Visualization Book | Beautiful scientific plots (free) |
NumPy & SciPy (Numerical Computing)¶
| Resource | Description |
|---|---|
| NumPy Quickstart | Getting started with arrays |
| SciPy Lecture Notes | Scientific Python ecosystem |
| From Python to NumPy | Advanced NumPy techniques |
Hydrology-Specific Python Resources¶
Courses & Tutorials¶
| Resource | Organization | Description |
|---|---|---|
| Python for Hydrology GitHub | USGS | Jupyter notebooks and exercises |
Python Packages for Hydrology¶
| Package | Purpose | Install |
|---|---|---|
| HydroFunctions | Access USGS NWIS data | uv add hydrofunctions |
| PyGeoHydro | Hydrological data access (CAMELS, etc.) | uv add pygeohydro |
| HyRiver | Suite of hydrological tools | uv add py3dep pynhd pygeohydro |
| xarray | Multi-dimensional arrays (NetCDF) | uv add xarray |
| hydroeval | Hydrological evaluation metrics | uv add hydroeval |
Groundwater Modelling with FloPy¶
If you work with MODFLOW, FloPy is essential:
Getting Started¶
| Resource | Description |
|---|---|
| FloPy Documentation | Official docs and tutorials |
| FloPy GitHub | Source code and examples |
| USGS FloPy Page | Official USGS overview |
Tutorials & Training¶
| Resource | Description |
|---|---|
| MODFLOW 6 + FloPy Training (Princeton 2024) | Excellent workshop notebooks |
| FloPy Tutorial Notebooks | Official example notebooks |
Installation¶
# Install FloPy
uv add flopy
# You'll also need MODFLOW executables
# See: https://github.com/MODFLOW-USGS/executablesRelated Tools¶
| Tool | Purpose |
|---|---|
| MODFLOW 6 | Latest MODFLOW version |
| Model Muse | GUI for model setup |
| PEST++ | Parameter estimation |
Hydrological Data Sources¶
Open datasets for your projects:
Global Datasets¶
| Dataset | Coverage | Access |
|---|---|---|
| GRDC | Global river discharge | Registration required |
| Caravan | Global large-sample dataset | Open access |
| GloFAS | Global flood monitoring | Copernicus |
| ERA5 | Global reanalysis | Copernicus Climate Data Store |
CAMELS Family (Catchment Attributes and Meteorology)¶
| Dataset | Region | Access |
|---|---|---|
| CAMELS-US | United States | Open access |
| CAMELS-GB | Great Britain | Open access |
| CAMELS-CH | Switzerland | Open access (Zenodo) |
| CAMELS-CL | Chile | Open access |
| CAMELS-BR | Brazil | Open access |
| CAMELS-AUS | Australia | Open access |
National Databases¶
| Country | Database | Notes |
|---|---|---|
| USA | USGS NWIS | Comprehensive, API available |
| Switzerland | FOEN Hydrology | Federal discharge data |
| Germany | BfG GRDC | Federal waterways data |
| UK | NRFA | National River Flow Archive |
Version Control with Git¶
Essential for managing your code professionally:
Getting Started¶
| Resource | Description |
|---|---|
| Git Handbook (GitHub) | Quick introduction |
| Pro Git Book | Comprehensive free book |
| GitHub Skills | Interactive 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 mainCommunity & Support¶
Connect with other water modellers using Python:
Forums & Discussion¶
| Platform | Community |
|---|---|
| Stack Overflow | General Python Q&A |
| MODFLOW Users Group | MODFLOW & FloPy discussions |
| Hydrology GitHub Discussions | Open source hydrology projects |
| Reddit r/Hydrology | Hydrology community |
Conferences & Workshops¶
| Event | Focus |
|---|---|
| AGU Fall Meeting | Sessions on Python in hydrology |
| EGU General Assembly | Computational hydrology sessions |
| MODFLOW & More | Groundwater modelling conference |
Curated Package Lists¶
| List | Description |
|---|---|
| Python | Comprehensive list of hydrology packages |
Suggested Learning Paths¶
Based on your interests, here are recommended next steps:
Path A: Surface Water Hydrology¶
Deepen pandas skills → 10 Minutes to pandas
Learn HyRiver → HyRiver Documentation
Time series analysis → scipy.signal, statsmodels
Rainfall-runoff modelling → Explore conceptual models (HBV, GR4J)
Path B: Groundwater Modelling¶
Learn FloPy basics → FloPy Tutorials
MODFLOW 6 concepts → MODFLOW 6 Documentation
Parameter estimation → PEST++ basics
Advanced visualization → matplotlib + FloPy plotting utilities
Path C: Data Science & Machine Learning¶
Statistics with scipy → SciPy Stats Tutorial
Machine learning basics → scikit-learn Getting Started
Deep learning for hydrology → NeuralHydrology
Large datasets → xarray, Dask
Path D: Automation & Productivity¶
Command-line tools → argparse, click
Scheduled tasks → cron jobs, Windows Task Scheduler
Report generation → Jupyter to PDF, automated plots
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 environmentGit (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 updatesVS Code Shortcuts¶
| Shortcut (Windows) | Shortcut (Mac) | Action |
|---|---|---|
Ctrl+Shift+P | Cmd+Shift+P | Command palette |
Ctrl+` | Cmd+` | Toggle terminal |
Shift+Enter | Shift+Enter | Run cell (notebook) |
Ctrl+/ | Cmd+/ | Toggle comment |
F5 | F5 | Run/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:
Automate a repetitive task you currently do in Excel
Analyze your own data using the techniques from Module 4
Create a visualization of discharge data from your region
Build a simple calculator for a hydraulic formula you use often
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!
- 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
- 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
- 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