The erosion of the Oroville Dam’s emergency spillway, which triggered the evacuation of 188,000 people, was just the first in a series of notable dam-related events in California last week. Further south in the Central Valley, about halfway between Modesto and Yosemite National Park, the spillway gates of the Don Pedro reservoir opened on Monday afternoon for the first time in two decades. A torrent of blue-green water rushed through into the Tuolumne River and began to flow through the Central Valley.

California’s dams now have to contend with a climate they weren’t designed for.

Even before the reservoir’s spillover reached an agricultural area outside of Manteca, all that rain meant the river was close to flooding. Local firefighters heard a nearby levee shudder, according to Jenny Rich, a San Joaquin county public information officer. And then, they saw a crack spreading through the earth. Farmers rushed to patch the damage before the levee fully ruptured, saving nearby homes from flooding. Still, about 500 people were evacuated on Monday night — and the river will likely continue to rise. California, it would seem, is in dam trouble.

California is home to more than 1,500 dams, which plug the vast majority of its waterways. These dams store water for thirstier months (it rarely rains in the summer), hold back flood waters, and generate some hydroelectric power. Though California’s vast dam system has transformed the state, many of these structures are getting old: more than three-quarters of them were built before 1969. And old dams aren’t always safe dams. The US Army Corps of Engineers categorizes 833 dams in California alone to have “high hazard potential.”

In addition to their age, California’s dams now have to contend with a climate they weren’t designed for. Warming global temperatures are exacerbating droughts, and upping the severity of the atmospheric rivers that have been pummeling the state for the past few months. And while California’s snowpack is now a healthy 180 percent of normal, just two years ago it sank to the lowest levels seen in half a millennium. That fluctuation poses a challenge to the primary roles of California dams: storing water and mitigating threats of flood.

833 dams in California have “high hazard potential”

While California is well-known for its bone-dry summers and years of droughts, what only a few people realize is how the landscape reacts to a deluge: badly. In fact, floods have devastated every single county in California, multiple times, according to the Public Policy Institute of California. In the 1860s, a massive flood turned California’s central valley into a shallow lake — and it could happen again. That’s why the dams are crucial; they help provide water and prevent flooding at the same time. Except, they weren’t built for current conditions.

“Our dams and infrastructure are supposed to work in coordination with our snow pack,” says Newsha Ajami, director of Urban Water Policy at Stanford University. The snowpack acts like a backup reservoir, providing about 30 percent of the state’s water supply as it melts during the spring and summer. That means that when reservoir operators open the spillways during the winter to make room for storm runoff, they don’t have to worry that the state will go thirsty over the summer.

Don Pedro Controlled Spillway Gate has been opened. #DonPedroSpill pic.twitter.com/ejvzkmb71C — TID (@TurlockID) February 20, 2017

But now, warmer temperatures mean that more of our precipitation comes down as rain rather than snow — which floods into the reservoirs instead of sticking to the mountains. “That combination means that reservoirs are under much more pressure, to both store water and make room to hold water for the next storm,” says Stanford’s Noah Diffenbaugh.

So, how do you store as much water as possible, while still using the reservoir system to soak up runoff? “The temptation is to build more dams to catch all this water,” says Laura Feinstein with the Pacific Institute, a nonprofit organization that specializes in environmental policy. But, she says, more dam construction isn’t necessarily the best choice. “There are other less expensive, and less environmentally problematic ways to do more with the water that we have.”

“Reservoirs are under much more pressure.”

That includes updating the calculations that reservoir operators use to determine when to release water, and by how much, Ajami says — because those equations can be decades out of date.

One update would be to make these calculations more responsive to inclement weather. That’s why scientists are scrambling to improve forecasting of atmospheric rivers, which provide about a third to a half of California’s annual precipitation. These atmospheric rivers have been linked to massive flood events in California’s history. If reservoir operators know when a massive storm is coming, it’s easier to know whether to dump precious water to make room for flood runoff.

Don Pedro Spillway flow over Bonds Flat Road. pic.twitter.com/m2pWTZKO8s — Tuolumne Co. Sheriff (@TuolumneSheriff) February 21, 2017

Marty Ralph, the director of the Center for Western Weather and Water Extremes at the University of California, San Diego, is currently testing out methods to predict atmospheric rivers, but says the study is still in its early stages. “Although we’re optimistic, we have to wait till the hard results come through,” Ralph says.

“It takes an extreme event to think about alternative options.”

And for water retention in the absence of snowpacks, California has to get creative with catching the stormwater and funneling it back into desiccated aquifers. Between 40 and 60 percent of the state’s water is pumped out of aquifers, and the underground reservoirs are being wrung dry faster than surface water can trickle down to rehydrate them. As a result, parts of California are sinking, according to a NASA report released earlier in February. What’s more, the rapid shift in ground level is damaging parts of the aqueduct that carries water to 25 million Californians.

In the meantime, communities are experimenting with alternative methods. In Lodi, scientists and water managers have swapped out restrictive levees for ones that let the river spill over. Flood waters soak into farm fields and undeveloped areas, and slowly trickle back down into the aquifers. In Kern County, percolation ponds let storm runoff seep back down into the ground, reports Erica Gies for Yale Environment 360.

“It takes an extreme event to think about alternative options, and when you are not in these extreme events, there are so many other things that the water resource managers and decision makers have to deal with,” Ajami says. And there’s a big barrier to implementing those alternative options, she adds: “Nothing comes for free.”