This story was originally published by WIRED and is reproduced here as part of the Climate Desk collaboration.

Earlier this month, the future fell on Los Angeles. A long band of moisture in the sky, known as an atmospheric river, dumped 9 inches of rain on the city over three days — over half of what the city typically gets in a year. It’s the kind of extreme rainfall that’ll get ever more extreme as the planet warms.

The city’s water managers, though, were ready and waiting. Like other urban areas around the world, in recent years L.A. has been transforming into a “sponge city,” replacing impermeable surfaces, like concrete, with permeable ones, like dirt and plants. It has also built out “spreading grounds,” where water accumulates and soaks into the earth.

With traditional dams and all that newfangled spongy infrastructure, between February 4 and 7 the metropolis captured 8.6 billion gallons of stormwater, enough to provide water to 106,000 households for a year. For the rainy season in total, L.A. has accumulated 14.7 billion gallons.

Grist thanks its sponsors. Become one.

Long reliant on snowmelt and river water piped in from afar, L.A. is on a quest to produce as much water as it can locally. “There’s going to be a lot more rain and a lot less snow, which is going to alter the way we capture snowmelt and the aqueduct water,” says Art Castro, manager of watershed management at the Los Angeles Department of Water and Power. “Dams and spreading grounds are the workhorses of local stormwater capture for either flood protection or water supply.”

Centuries of urban-planning dogma dictates using gutters, sewers, and other infrastructure to funnel rainwater out of a metropolis as quickly as possible to prevent flooding. Given the increasingly catastrophic urban flooding seen around the world, though, that clearly isn’t working anymore, so now planners are finding clever ways to capture stormwater, treating it as an asset instead of a liability. “The problem of urban hydrology is caused by a thousand small cuts,” says Michael Kiparsky, director of the Wheeler Water Institute at UC Berkeley. “No one driveway or roof in and of itself causes massive alteration of the hydrologic cycle. But combine millions of them in one area and it does. Maybe we can solve that problem with a thousand Band-Aids.”

Or in this case, sponges. The trick to making a city more absorbent is to add more gardens and other green spaces that allow water to percolate into underlying aquifers — porous subterranean materials that can hold water — which a city can then draw from in times of need. Engineers are also greening up medians and roadside areas to soak up the water that’d normally rush off streets, into sewers, and eventually out to sea.

As the American West and other regions dry out, they’re searching for ways to produce more water themselves, instead of importing it by aqueduct. (That strategy includes, by the way, recycling toilet water into drinking water so cities reduce water usage in the first place.) At the same time, climate change is supercharging rainstorms, counterintuitively enough: For every 1 degree Celsius of warming, the atmosphere can hold 6 to 7 percent more water, meaning there’s often more moisture available for a storm to dump as rain. Indeed, studies have found that the West Coast’s atmospheric rivers, like the one that just hit L.A., are getting wetter.

Grist thanks its sponsors. Become one.

To exploit all that free water falling from the sky, the LADWP has carved out big patches of brown in the concrete jungle. Stormwater is piped into these spreading grounds and accumulates in dirt basins. That allows it to slowly soak into the underlying aquifer, which acts as a sort of natural underground tank that can hold 28 billion gallons of water.

During a storm, the city is also gathering water in dams, some of which it diverts into the spreading grounds. “After the storm comes by, and it’s a bright sunny day, you’ll still see water being released into a channel and diverted into the spreading grounds,” says Castro. That way, water moves from a reservoir where it’s exposed to sunlight and evaporation, into an aquifer where it’s banked safely underground.

On a smaller scale, LADWP has been experimenting with turning parks into mini spreading grounds, diverting stormwater there to soak into subterranean cisterns or chambers. It’s also deploying green spaces along roadways, which have the additional benefit of mitigating flooding in a neighborhood: The less concrete and the more dirt and plants, the more the built environment can soak up stormwater like the actual environment naturally does.

As an added benefit, deploying more of these green spaces, along with urban gardens, improves the mental health of residents. Plants here also “sweat,” cooling the area and beating back the urban heat island effect — the tendency for concrete to absorb solar energy and slowly release it at night. By reducing summer temperatures, you improve the physical health of residents. “The more trees, the more shade, the less heat island effect,” says Castro. “Sometimes when it’s 90 degrees in the middle of summer, it could get up to 110 underneath a bus stop.”

LA’s far from alone in going spongy. Pittsburgh is also deploying more rain gardens, and where they absolutely must have a hard surface — sidewalks, parking lots, etc. — they’re using special concrete bricks that allow water to seep through. And a growing number of municipalities are scrutinizing properties and charging owners fees if they have excessive impermeable surfaces like pavement, thus incentivizing the switch to permeable surfaces like plots of native plants or urban gardens for producing more food locally.

So the old way of stormwater management isn’t just increasingly dangerous and ineffective as the planet warms and storms get more intense — it stands in the way of a more beautiful, less sweltering, more sustainable urban landscape. L.A., of all places, is showing the world there’s a better way.