On the low plains where the Chicago River meets Lake Michigan sits the city of Chicago. The lake is the city’s source of fresh water; the river is where it dumps its (usually treated) sewage. With heavy rain, though, that distinction sometimes gets blurred. (Read Danielle Paquette’s story on l0w-income Chicagoans struggling with a changing climate here.)

It used to be worse. Over a century ago, the Chicago River flowed directly into the lake, which meant that raw sewage would pool in the harbor and kiss up against intake pipes for the city’s drinking water. In response, the city built tunnels to draw in water from farther and farther out — but in a downpour, even those pipes would get inundated with raw human waste.

Something more drastic had to be done. In 1900, engineers accomplished a remarkable feat: They reversed the flow of the Chicago River. The city’s sewage would now flow away from the lake, toward the Mississippi. It’s been that way ever since, but the problem of wastewater, and what to do with it, remains Chicago’s bugbear.

Chicago's race to outbuild the rain

These days, waste is treated before it’s released, but heavy rain can flush the raw sewage into the river before it reaches the treatment plant. This is because the city’s storm drains share pipes with the city’s sewage, and there’s only so much capacity. Less than an inch of rain in a 12-hour window can cause the whole system — storm water, sewage, and all — to overflow into the river. At around 1.4 inches of rain, the sewage can even go the other way, backing up into people’s homes.

At 5 inches of rain, the entire Chicago River gets overwhelmed, and to prevent flooding, engineers will reverse the River again — now teeming with raw sewage — right back into Lake Michigan. These “re-reversals” aren’t that common, but when they do happen, beaches close and people are warned not to swim in the lake.

Scientists believe that in the next century, climate change will cause intense storms to become more frequent in the Midwest. For Chicago, that means more sewage flowing into the waterways, and so the city is rushing to upgrade its network of tunnels.

One way to combat the rain is to build dedicated pipes to separate sewage from stormwater. Cities like Boston and Vancouver are working with this expensive solution. But the city of Chicago has a simpler idea. It will simply dig out more tunnels and reservoirs to hold the excess water until it can get processed. The reservoirs will be able to hold billions of gallons of water, which will help the Chicago with its flooding problem (a consequence of the city’s flatness).

In fact, all of these issues can be blamed on Chicago’s geography. Chicago is so pancake-flat that water is ambivalent about where it flows. That’s why it was possible to coax the river to flow the other way. The same flatness also leaves the city vulnerable to the whims of the weather, which scientists say will only get more volatile in the grip of climate change.

Jeff Guo is a staff writer for Storyline. He's from Maryland (but outside the Beltway). Follow him on Twitter: @_jeffguo.