The Golden State’s had a harsh winter. Between October 1 and March 3, most California weather stations across the state were reporting greater-than-normal amounts of precipitation. And the state’s snowpack has grown to be the fifth largest in 40 years, with up to 25 feet of powder in some places.

It’s needed moisture after a six-year-long drought from 2011 to 2017 and last year’s dry winter. Snowpack and reservoirs are stocked right now. But persistent rain has flooded many areas, including towns along Northern California’s Russian River. In Guerneville, residents paddled around after the river swelled to 45 feet high. Rain, floods, and mudslides have also wrecked homes and roads in areas across the state.

The dramatic shift from dry to wet this winter hints at what’s to come. Scientists predict that California’s total precipitation will remain close to constant in the future, but it will fall in a shorter window of time, with more of it as rain. The state will also experience greater variability—more very wet and more very dry years. These findings highlight the need to capture rainfall and improve aging infrastructure.

Here’s what to expect from California’s wet seasons, now and in the future:

An already-variable climate

When it comes to rain and snow, California tends to be all-or-nothing. “We have the most variable climate in the continental U.S.,” says Heather Cooley, director of research at the Pacific Institute, a water policy think tank. “We have very, very wet years, and we have very, very dry years.”

The timing of California’s precipitation is unique, too. The state has a Mediterranean climate, which means wet, mild winters and warm, dry summers. But California uses most of its water in the summer, a lot of it to grow irrigated crops. (Much of the United States’ fruit, vegetables and nuts are grown in the California’s Central Valley.) To help boster water supplies in summer, farms and cities alike rely on water melted from Sierra Nevada snowpack. Californians also store surplus water in reservoirs and underground aquifers.

A lot of the state’s rain and snow falls from atmospheric rivers, “long, ephemeral corridors of intense moisture transport” in the sky, says Alexander Gershunov, research meteorologist at the University of California, San Diego. Fed by moisture from the ocean, these rivers flow with winds, holding their moisture until it’s somehow squeezed out. In California, that happens when the atmospheric rivers crash into the Sierra Nevada mountains, raining and snowing across the western Sierras and leaving the eastern part of the state relatively dry.

“We’ve seen a large number of colder [atmospheric rivers]” this winter, says Daniel Swain, climate scientist at the University of California, Los Angeles. Atmospheric rivers are usually associated with warm storms, but this year California had both warm and cold storms. Swain traces these cold storms to the stratospheric polar vortex breakdown, which led to a mass of polar air sitting over Canada, occasionally moving south. Additionally, this winter’s polar vortex disruption led to a wavy jet stream, a bend of which is located the West Coast. Because of the jet stream’s position, “we’ve had this persistent region that favors increased storminess,” says Swain.

Droughts and floods in the future

While California’s climate has always been variable, this century’s big swings from wet to dry foreshadow an overall shift to an even more dramatic future climate.

Because the planet’s poles are warming faster than the tropics, the difference in temperature between these two climate zones is becoming smaller. This leads to an expanding subtropical, arid region. This subtropical zone is pushing into Mediterranean climates, including those in Chile, South Africa, Australia, and the Mediterranean Basin, causing total precipitation in these places to decrease.

California is defying this trend—it’s annual average precipitation is expected to remain about the same, according to a study by Gershunov in 2017. But the intensity of rain is expected to increase, meaning more will fall in less time. This is thanks to atmospheric rivers. As temperatures warm, the atmosphere holds more water. So while California’s overall dry season will lengthen, due to expanding subtropics and warming temperatures, its winter atmospheric rivers will dump more water than before.

In a 2018 study, Swain’s team evaluated the number of extreme storms and droughts expected as the climate warms, projecting that wet extremes will go up by 100 to 200 percent by the end of this century. Extreme dry years, similar to the 2013 to 2014 drought year, will become more common by 2050, especially in Southern California. “Precipitation whiplash,” or the immediate shift from a drought to flooded winter will go up by about 50 percent. This will eliminate the so-called “shoulder season” that typically acts a buffer between weather extremes.When it does rain, it’ll be within a shorter window in the winter. “We’re making an already narrow season more concentrated, at the expense of the shoulder season,” says Swain.

These changes could have disastrous consequences. In his study, Swain considered the risk of floods like the 1862 Great Flood—which killed thousands of people and formed a 300-mile-long inland sea. There’s about a 50-50 chance of another event of the same scale occurring again by 2060, he found. “It would essentially inundate land that is now home to millions of people,” says Swain.

Opportunities to adapt

Heavy rains could cause catastrophes if they overwhelm the state’s aging dams. A recent Army Corps of Engineers report found that a rare, powerful storm could cause the Whittier Narrows Dam, near Los Angeles, to breach, threatening lives in downstream communities.

Future droughts will also test California’s water reserves. And they’ll be made worse by the fact that temperatures will be warmer, drying out landscapes. A single wet winter like the one California’s having is not enough to restore the state’s groundwater aquifers, says Pacific Institute’s Cooley. Groundwater is key to weathering droughts, when snowpack and surface water are less and less available. And much of the water raining down on the Golden State right now is funneled straight to the ocean, thanks to paved surfaces and channelized waterways.

The good news is, there’s a lot that the state can do—or is already doing—to adapt to a wet and dry warmer future. “I think there are huge opportunities for us to rethink how we manage water and land use,” says Cooley.

Officials in California are looking to a number of ways to enhance recharge, including infiltration basins and directly injecting water into the ground. Requiring industrial and commercial developments to design with permeable surfaces and add features like bioswales can help store stormwater, too, says Cooley.

According to a 2014 Pacific Institute report, Southern California and the San Francisco Bay Area could store an extra 420,000 to 630,000 acre-feet of water per year by capturing stormwater, close to the amount of water Los Angeles uses annually.

Swain says the Yolo Bypass, located outside Sacramento, is also a great example of flood control. Officials route excess flows from the Sacramento River to this floodplain, where the water saturates rice farms and creates wetland habitat. It’s a win for farmers, wildlife, and flood prevention. It’s cheaper and less risky than building more dams, too, says Swain. “It certainly seems like there may be opportunity to harness one extreme to mitigate the risks of the other.”