Getting rid of water that fell during a thunderstorm used to be a simple thing. The ground took its share, downspouts drained rooftops, and much of the rest found its way into gutters and storm sewers and on into the nearest body of water. The sun took care of the puddles.

That’s still the general idea, but things are more complicated today. A civil engineer, faced with a deluge from the sky, is likely to see opportunities, too – to relieve stress on sewer infrastructure, to keep it out of basements and other places where it’s unwelcome, to keep rivers and streams cleaner, even to enliven a boulevard with something other than yet another median strip covered with grass.

And there’s so much more rainwater these days, not overall, but all at once; the U.S. Environmental Protection Agency reports that “heavy precipitation” events,in which large amounts of rain or snow fall in a short period, are steadily increasing. Ask anyone in Louisiana, where near-apocalyptic rainfall in early August brought never-before-seen levels of flooding to Baton Rouge. Or ask the residents of Detroit, who were flooded by a 500-year storm in 2014 that dumped more than four inches of rain – over six inches in some areas – in 12 hours.

When that kind of rain comes down, every drop that can be diverted to a retention pond, infiltration basin or rain garden can keep a city’s sewer and stormwater system from being overwhelmed. And when that kind of rain isn’t coming down, these manmade structures keep pollutants, solid waste and other unwelcome substances out of a river or lake where a city draws its drinking water, swims or plays.