Real-World Focus
Every lesson works through daily H&H tasks (time series, vector watersheds, DEMs, USGS stream gauges, precipitation frequency storms, soils, land cover, imagery, and snowpack volume) with real public datasets.
A practical Python course for water resources engineers who want usable scripting skills for hydrologic and hydraulic modeling without turning into software engineers. Learn with real USGS streamflow, spatial vector and raster layers, Atlas 14 design storms, soils, NLCD, NAIP imagery, and snowpack grids directly in Google Colab.
Designed for practicing engineers who already understand runoff, gauges, and watersheds and want clear code that fits daily engineering work.
Every lesson works through daily H&H tasks (time series, vector watersheds, DEMs, USGS stream gauges, precipitation frequency storms, soils, land cover, imagery, and snowpack volume) with real public datasets.
The emphasis stays on readable, commented code that replaces repetitive spreadsheet steps, documents engineering assumptions, and creates reproducible tables and figures.
AI assistants have changed how engineers write and debug scripts. Each module includes practical prompts that help you inspect unfamiliar libraries, spot unit or projection mistakes, and adapt code with engineering judgment.
Select a learning track, filter by level or keyword, and open any notebook straight into Google Colab. Check off lessons as you finish them to track progress in this browser.
Inspect four real patterns taught across the course and compare manual workflows against short, repeatable Python scripts.
Everything runs online in a free Google Colab account, or locally if you prefer cloning the GitHub repository.
Many examples use U.S. customary units alongside SI units (such as cfs alongside cms, or inches alongside millimeters) to match USGS and NOAA agency conventions. Practice converting between systems as you work through the notebooks.
| Level | Expectations |
|---|---|
| Beginner | No prior Python experience needed. Concepts are explained from scratch with H&H analogies. |
| Intermediate | Assumes comfort with Python basics (variables, loops, functions, pandas). Focuses on applied workflows. |
| Advanced | Assumes working knowledge of Python and H&H modeling tools for large mosaics or model classification. |
Once you are comfortable with the core workflows in Modules 1 to 10, explore these actively maintained open-source libraries used across hydrology and hydraulics.
Feedback from water resources engineers and learners who completed early course modules.
Participants have also suggested upcoming topics including running Python inside QGIS, HDF5 workflows, and reusable pipeline templates for probabilistic and simulation-based modeling.
This course has been assembled and reviewed manually with AI-assisted coding tools helping check explanations, formatting consistency, and edge cases. Every lesson is reviewed by the author before publication.
Because Python geospatial libraries update over time, a cell that runs cleanly today may need an adjustment later. If you encounter an issue or outdated server URL, please open an issue on GitHub.
mohsennasab/python-fundamentals-hh and build your lesson on a feature branch.data/ folder.Every dataset committed to the course repository must be safe for open educational distribution.
Disclaimer. This course, including its notebooks, code, datasets, and examples, is provided for educational purposes only without warranty of any kind. Independently verify all inputs, assumptions, calculations, and outputs before applying them to engineering design, modeling, or regulatory submittals.
| You May | You May Not (Without Written Permission) |
|---|---|
| Use all materials for personal learning and self-study | Redistribute, republish, or mirror the course materials |
| Contribute pull requests and improvements to the repo | Use materials to instruct others, free or paid, online or in person |
| Link others directly to the repository or course page | Sell, monetize, or build derivative training products |
License for Personal Educational Use Copyright (c) 2026 Mohsen Tahmasebi Nasab. All rights reserved. Permission is hereby granted, free of charge, to any individual obtaining a copy of these materials and associated documentation files (the "Course Materials"), to access and use the Course Materials solely for that individual's own personal, non-commercial learning and self-study, subject to the following conditions. All rights not expressly granted here are reserved by the copyright holder. 1. PERSONAL USE ONLY: The Course Materials may be used by individuals for their own self-study, personal skill development, and private educational purposes. This grant is personal to each user and is not transferable. 2. NO REDISTRIBUTION OR INSTRUCTIONAL USE WITHOUT PERMISSION: The Course Materials may not be redistributed, republished, mirrored, or used to teach, train, present to, or otherwise instruct any other person or group, whether free or paid, online or in person, without prior written permission from the copyright holder. 3. NO DERIVATIVE WORKS WITHOUT PERMISSION: Adapted, translated, or derivative versions of the Course Materials may not be created for distribution, publication, or presentation without prior written permission from the copyright holder. 4. NO COMMERCIAL USE: The Course Materials may not be sold, licensed, or used as part of any paid training program, commercial product, or for-profit service. This includes, without limitation, monetized video content, online courses, and ad-supported tutorials that reproduce or are derived from the Course Materials. 5. CONTRIBUTIONS: Submitting a contribution (such as a pull request) to this repository is permitted and encouraged. By doing so, you grant the copyright holder the right to use and publish your contribution as part of the Course Materials under these same license terms, with attribution to you as the contributor. 6. PERMISSIONS: Requests to teach with, adapt, redistribute, or otherwise use the Course Materials beyond personal self-study may be directed to the author at https://hydromohsen.com. Any such use requires written permission granted in advance, and where granted must credit the original author and link to the original repository at https://github.com/mohsennasab/python-fundamentals-hh THE COURSE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE COURSE MATERIALS OR THE USE OR OTHER DEALINGS IN THE COURSE MATERIALS.