How wet has it been recently in Northern California?

New rainfall totals show that no person alive has experienced a three-week period in the Bay Area as wet as these past 21 days. The last time it happened, Abraham Lincoln was president.

From Dec. 26 to Jan. 15, 17 inches of rain fell in downtown San Francisco. That’s the second-wettest three-week period at any time in San Francisco’s recorded history since daily records began in 1849 during the Gold Rush. And it’s more than five times the city’s historical average of 3.1 inches over the same time.

The only three-week period that was wetter in San Francisco — often used as the benchmark for Bay Area weather because it has the oldest records — came during the Civil War when a drowning 23.01 inches fell from Jan. 5 to 25, 1862, during a landmark winter that became known as “The Great Flood of 1862.”

“The rainfall numbers over the past three weeks just kept adding up. They became a blur,” said Jan Null, a meteorologist with Golden Gate Weather Services in Half Moon Bay, who compiled the totals. “We had a strong jet stream that was bringing in storms, one after another. It was hard along the way to separate the individual storms.”

So much rain fell since Christmas in Northern California that some cities, including Oakland, Stockton, Modesto and Livermore, already have reached their yearly average rainfall totals. In other words, if it didn’t rain another drop until October, they would still have a normal precipitation year.

The parade of soaking storms, which have caused flooding in the Central Valley, Salinas Valley and Santa Cruz Mountains, along with power outages, mudslides and at least 20 deaths statewide, left the Sierra Nevada with a statewide snowpack 251% of normal on Tuesday.

Light rain is expected tonight, but otherwise forecasts call for dry conditions for much of the rest of January. River levels now are dropping.

“We’ve gotten so much water and so much snow,” said Daniel Swain, a climate scientist at UCLA. “It’s going to help us dry out and dig out heading into late January. It’s really good news because it takes off the trajectory toward worsening flooding.”

For a sense of how much worse it has been, consider the winter of 1861-62.

Between November 1861 and January 1862, it rained so much that the Central Valley became a vast inland sea, 30 feet deep, for 300 miles. Leland Stanford, who had been elected governor, took a rowboat through the streets of Sacramento to reach his inauguration.

Warm storms on a massive snowpack that winter caused immense flooding, wiping farms, mills, bridges and in some cases whole towns off the map. An estimated 4,000 people died, roughly 1% of California’s population at the time, and more than the death toll in the 1906 San Francisco earthquake.

Now, California has large dams and reservoirs that limit flooding in wet years. There also are thousands of miles of levees and pumps, weirs and other flood control projects that were not in place in the 1860s.

And despite the recent wet weeks, Northern California is nowhere near the final yearly rainfall total of 1861-62. San Francisco on Tuesday had 21.75 inches of rain since Oct. 1. That total would have to more than double in the coming months to reach the 49.27 inches that fell in 1861-62, or the 47.19 inches that fell in the second-wettest year in history, 1997-98.

Weather experts have become increasingly concerned that if another massive winter like 1861-62 hit — and tree rings and other historical records show they have occurred roughly every 100 to 200 years — millions of people could be trapped by floods, freeways could be shut for weeks, and the damage could reach into the hundreds of billions of dollars.

A study last summer by scientists at UCLA found that the chances of such a series of huge storms, while still remote, have roughly doubled due to climate change. Climate change has warmed ocean waters, allowing more moisture to be absorbed in atmospheric river storms.

Swain, a co-author of that study, said that climate change is already increasing the amount of moisture in such storms by about 5%, and that will climb as temperatures continue to warm.

Very wet winters are nothing new in California. Since July 1, San Francisco has had the fifth most rainfall on record. But all four of the wetter periods were in the 1800s.

“California has always had big storms like this,” said Park Williams, an associate professor of geography at UCLA, whose research has shown that droughts and wildfires are becoming more severe due to warming. “Climate change can make them more intense. But we might have had a year this wet whether or not we had climate change. And 1862 proves that.”