Hi!

Featured

My name is Matt and I’m a hydrologist, water manager, and computer programmer. Through 2024, I lived in Paris, France with my family, as I recently earned a PhD in hydrology and remote sensing at Sorbonne University.

I created this site to house some projects and maybe a few ideas. Check out the the Global Watersheds web app, which I’m particularly proud of. I think it is by far the fastest and easiest way to find the drainage basin upstream of (almost) any point on Earth.

Thanks for dropping by. Get in touch if you have any comments or are interested in collaborating!

The most important map for understanding pollution in the Seine River

The water quality of the Seine has been making headlines, thanks to the 2024 summer Olympics in Paris. A few days ago, I discussed these issues with Kelly Yu from Radio Hong Kong.

I did my Master’s thesis on bacteria contamination of urban rivers, so it’s something I know a bit about… Paris has invested massively in improvements to the wastewater system, but much more needs to be done before the Seine will be consistently able to meet water quality standards for swimming.

This map shows the watershed, or drainage basin, upstream of Pont Alexandre III in Paris, where the Olympic open-water swimming events will be held:

The watershed covers 44,000 square kilometers, and includes cities, suburbs, farms, and forests. The watershed is an important determinant of the water quality in a river. In this case, every time it rains, pollutants are washed off of land surfaces and into lakes, rivers, and streams. Here is what I wrote about nonpoint source pollution in my MS thesis in 2003:

Runoff from land areas in the watershed is also a significant pathway by which bacteria enter surface waters. Urban runoff typically contains a variety of pollutants, including organic matter, oil and grease, nutrients, pesticides and herbicides, as well as bacteria and viruses. Bacteria in runoff can come from waste from pets and wildlife or may be attached to soil particles. In an urban setting, where storm drains are designed to get water away from roads and buildings as quickly as possible, nonpoint source pollutants are quickly delivered to surface waters, with little time for settling or decay to occur.

Paris also has a major illicit discharge problem, where boats and homes discharge sewage water directly to rivers or streams. I learned about this in an excellent article from the NY Times; this topic has received scant coverage in French-language media.

How to make high-quality watershed maps for Wikipedia

Wikipedia has thousands of articles about rivers. What are the most important facts about a river? Some can be described with numbers, such as its length, width, or average flow.

I think that every Wikipedia article about a river should include a watershed map. A map can tell you so much, including the landscape features that affect a river’s flow and water quality.

You can make a high-quality map using the free Global Watersheds web app. It is fast and easy. The best part is that you can include a link to a live, interactive map. Below is an example, followed by step-by-step instructions.

Map of the Onibe River watershed in Madagascar. Created with the free Global Watersheds web app. Permalink to interactive map: https://mghydro.com/watersheds/shared/1711C5.html
Continue reading

My PhD Dissertation online

I defended my PhD thesis* in January, and decided it would be nice to put it online in HTML format. I have posted it here. The PDF is available via France’s open science portal HAL.

Heberger, Matthew. 2024. Improved observation of the global water cycle with satellite remote sensing and neural network modeling. PhD thesis. Sorbonne University, Paris, France. https://theses.hal.science/tel-04517802v1

My research had to do with using remote sensing data to describe the water cycle at the global scale, and explored methods to improve these data. There have been quite a few studies on this subject in the last several years, but we did a few things differently, namely using a much larger database of observations than previous studies, and using neural network models with some unique features. A few members of my committee said found my writing “pedagogic” and plan to share certain parts with their students. I hope that it is of some use to students or others interested in hydrology and remote sensing.

The PDF is formatted nicely and better for print. But the web version is nicer to read on a wider range of devices. It can also be resized or reformatted for easier reading. (When I’m reading long online documents, I like to use Firefox’s reader view.)

I used Latex and Overleaf to prepare the manuscript. I was hoping that it would be straightforward to convert to HTML. Unfortunately, it was not! I used the software pandoc to convert the document, but it required a lot of manual cleanup. Please let me know if you see any weird formatting or typos!

* In the US, it is customary to talk about a Master’s thesis, and a PhD dissertation. Under the British educational system, it’s the opposite. And in France, to obtain a doctoral degree, one writes une thΓ¨se.

New Features in the Global Watersheds Web App

I’m pleased to announce some new features and enhancements in the Global Watersheds web app.

You can now delineate watersheds that drain to a polyline or polygon feature. This is useful for finding the total drainage area for a section of coastline or for an inland lake — also known as “endorheic” lakes.

To use this feature, under Options, check the box for Delineate watersheds for a lake or coastline. On the left side of the map, you will see a new drawing toolbar. Select one of the drawing tools, and create a polyline, polygon, rectangle or circle. You can only draw one feature at a time. There are also little buttons to edit your feature or to delete it. Then click on the feature and then click the button Delineate! This feature is only available using MERIT data (not HydroSHEDS), and only in “lower-resolution” mode.

In the example below, I found the area that drains to the Gulf of Bejaia on the Mediterranean coast in Algeria, by drawing a line over the land near the coast:

The resulting drainage area includes two larger rivers or “wadis,” as well as many smaller coastal drainages.

The second new feature allows you to view the MERIT-Basins layers on the map. There are separate layers for “river reaches” and “unit catchments.” These are the data layers that the app uses to construct watersheds when you choose “MERIT” as your data source. To activate these layers, just click on these new layers. They are overlays, which will display on top of your chosen basemap.

Finally, a small but fun new feature: you can now change the color of your rivers and watershed boundaries. You’ll find the color selectors near the bottom of the Options pane on the left. I’m not sure this is very useful, but you can create some interesting effects:

Please let me know what you think of these new features. Did you find any bugs? How could you use them?

Copy editing Latex documents

During my PhD research, I became a convert to Latex for scientific writing, specifically using the website Overleaf.com. However, one feature that is missing is a good spelling and grammar checker. I like to use Microsoft Word for copyediting, as it has good built-in tools, and there are also plenty of addins available, like grammarly and ProWritingAid.

But first you need to get a clean export from Latex to Word, which is not straightforward.

Here is a method that works using Google Drive. It does not do a good job converting figures, tables, and equations, so I suppress those before continuing. It also helps to turn off hyphenation.

  1. Add the following block to the preamble of the Latex document.
\usepackage[document]{ragged2e}
\usepackage[none]{hyphenat} % Turn off hyphenation
\usepackage{environ}
\RenewEnviron{figure}{} % Removes figures
\RenewEnviron{table}{} % Removes tables
\usepackage[nolists,nomarkers]{endfloat}
\renewcommand{\processdelayedfloats}{}
\pagestyle{empty} % Removes page numbers

2. Create a PDF document.

3. Upload the PDF to Google Drive.

4. In Drive, click the file to view it. At the top, click “Open with Google Docs.”

5. Choose File > Download > Microsoft Word (.docx)

Now you can download the Word file and copy edit at your leisure.

My AGU 2023 Highlights

If you are interested in the Earth Sciences, you should consider attending the annual American Geophysical Union annual meeting. It is massive, with over 50,000 attendees, and thousands of scientific presentations, posters, lectures, and films. This can also make it feel overwhelming. Here are some highlights of the December 2023 conference in San Francisco from my point of view.

A former professor of mine, Rich Vogel from Tufts University, gave the Langbein Lecture. Being invited to give a named lectures is a big deal, equivalent to a lifetime achievement award. Even though he retired several years ago, he still publishes tons of papers and hasn’t lost any of his pep. It was a lot of fun.

I have really mixed feelings about poster sessions. On the one hand, it can be fun to get a quick view of a huge amount of research, and to meet researchers in person and talk to them about their work. On the other hand, it can be hard to learn much given the format. The Better Poster movement seems to have made very little impact. A good 95% of the posers are inscrutable walls of text.

Continue reading

My AGU presentation

I was honored to present my PhD research at the Annual Meeting of the American Geophysical Union in San Francisco, California, on December 15, 2023. My research is in the field of remote sensing and large scale hydrology. Here’s a copy of my slides if you’re interested:

Heberger_AGU_2023-12-15.pdf (2.5 MB)

For those interested in a deep dive, here is a link to the draft of my thesis (to be finalized after my defense in January). Here is a link to the final version of my PhD thesis:

Suppose you are interested in recreating my calculations or doing something related. The input datasets I used can be freely obtained via the sources listed in thesis Section 2, Datasets. The Appendix contains a much longer list of all the datasets I reviewed or considered using. I think it’s a good snapshot of remote sensing datasets describing the hydrologic cycle that were available circa 2023. The compiled data and Matlab scripts needed to perform the analysis can be downloaded from: https://doi.org/10.5281/zenodo.8101659.

Watersheds as art

I was delighted by the look of this watershed. Can you figure out where it is?

Just a few kilometers west of Bolivia’s capital, Sucre, lies the Maragua Crater, the site of a long-ago asteroid impact.

All of the top search results are about hiking out to visit it. There are 2,000 year old cave paintings, fossil dinosaur footprints, and incredible multicolor rock formations. Wow, new place to add to the bucket list!

Photo by Cody Hinchliff, flickr.

Web hosting expenses have gone up

I recently became aware that the Global Watersheds app occasionally goes down when it’s under heavy load. At its peak, the app is delivering a watershed every 1.2 seconds. You all are loving the site to death! πŸ™‚

I’ve upgraded my hosting plan to 2GB of RAM. Let’s see how much that helps. It costs a few hundred dollars per year, which is a lot for a hobby project by a full-time student. If you’ve enjoyed using the app, or it’s been valuable in your work, would you please support it by sending a few dollars? Thank you! πŸ™ πŸ’•