Climate change can be simplified, in many cases, as putting rain in all the wrong places.

The overall trend is that dry places will likely get drier, and wet places are more likely to get way too wet. And California is set to get both, and oscillate drastically between the two in a cycle of “precipitation whiplash,” according to a paper published this week in the journal Nature Climate Change.

We already know what the whiplash pattern looks like, because it just happened: California endured one of the most extreme multi-year droughts on record from 2012 to 2016. Immediately after, in 2017, the skies opened up with heavy rain for months. That whole winter, northern California saw an “extraordinarily high number of atmospheric river storms” which ravaged the region with flooding and closed many roads, the researchers write. The rains destabilized a bridge, destroyed highways, and broke the spillway of the Oroville dam, forcing the emergency evacuation of 188,000 people.

Extreme flooding will be on the rise

The researchers note that rains of that magnitude have “only occurred a handful of times over the lifespan of California’s modern water infrastructure.” By 2100, they write, California should expect the frequency of rains like that to double or triple: “Extremely heavy precipitation events” that come on suddenly, “of a magnitude comparable” to the flooding of 2017, will go up “100–200%.”

USGS In 1862, California was hit with flooding that left large parts of the state underwater for six months. Researchers now predict a flood of this scale will happen again before 2060.

In fact, they predict a flood on the scale of the “Great Flood of 1862” to hit the state within the next 40 years: “Our results suggest that such an event is more likely than not to occur at least once between 2018 and 2060, and that multiple occurrences are plausible by 2100 on business-as-usual emissions trajectory.”

The 1862 flood followed a 43-day storm at the very end of 1861, and left large parts of central and southern California underwater for up to six months.

“Few of the dams, levees and canals that currently protect millions living in California’s flood plains…have been tested by a deluge as severe as the extraordinary 1861–1862 storm sequence,” the researchers write. A repeat of the catastrophic 1862 flood “would probably lead to considerable loss of life and economic damages approaching a trillion dollars.”

Droughts will happen more often, too

Meanwhile, rising temperatures increase the likelihood of drought, too. According to the models, the occurrence of droughts as bad or worse than that of the 2013-2014 season will go up by 140% across southern California after 2015, and by more than 80% across most of northern California.

Whiplash: When drought and flood come back-to-back

The researchers defined “precipitation whiplash” as two or more years of extreme drought followed by extreme rainfall. That weather pattern is set to double in southern California by the end of the century, and go up by 25% in northern California, they found.

That adds up to “whiplash” events happening roughly eight times per century as the world warms, versus four times per century without the effect of climate change, according to Daniel Swain, the lead author on the paper and a climate scientist at the University of California Los Angeles, who spoke to USA Today.