Water flows through break in the wall of the Oroville Dam spillway during heavy rains on Thursday, Feb. 9, 2017.
© Rich Pedroncelli /APWater flows through break in the wall of the Oroville Dam spillway during heavy rains on Thursday, Feb. 9, 2017.
Massive floods hit Houston and devastating hurricanes struck Puerto Rico and the Caribbean. Yet one of the more remarkable stories in the past year is the catastrophe that did not happen: massive flooding in California.

California experienced its wettest water year on record in 2016-17. In previous decades, that huge volume of water would have caused lethal floods, particularly in the Central Valley.

In part, we were lucky. Reservoirs were empty from drought so they had abundant capacity, and there was sufficient time between big storms so the rainfall didn't stack up. Dams and major levees held, though the near-failing of Oroville Dam's spillway and the flooding of the small town of Maxwell in February showed it could have been much worse.

Beyond luck, a legacy of good planning helped spare California. Our flood management system makes room for the rivers to flood on bypasses. This green infrastructure, which provides wildlife habitat and allows for farming, is the key to managing future floods, in California and across the world.

Despite the region's good fortune this past year, a bad-luck winter is only a matter of time. Even with bypasses, Sacramento is rated as having the second-highest risk of major flooding among American cities.

Much of the valley faces similar or higher risk. Counting on good luck may suit gamblers, but not planners, scientists or forward-thinking leaders. We know that in a warming world, floods will become more frequent and intense.

Even though Sacramento's current flood risk is still too high, it used to be dramatically worse. After a massive flood inundated the city in 1850, municipal leaders were confident that they could solve the challenge.

A Sacramento newspaper, Placer Times, opined that, "it will be seen that Sacramento City can be easily protected against inundations and that, too, at comparatively small expense." This breezy prediction was proven to be wildly optimistic. The city was inundated at least four more times in the next 70 years.

During those decades, private landowners and various levels of government embarked on an epic battle against the inland sea, an adversary that stubbornly refused to sign any form of a ceasefire.

From the heated debates among landowners, engineers and politicians about how to conquer the river, the battle strategy that emerged was a levees-only approach. Levees were built flanking the river, striving to fully contain floods - and to open up vast areas of former swampland to farming.

Continued flooding revealed the fallibility of this strategy. Congress in 1917 authorized the Sacramento River Flood Control Project, which included, notably, projects that allowed the river to reconnect to its historic floodplain, previously walled off by levees. Reconnected areas include the Yolo and Sutter bypasses.

The project also included strengthening levees and building major flood-control reservoirs. Through the combination of these components, Sacramento avoided major flooding for more than a century, even as large floods passed through the valley in 1986 and 1997.

Bypasses remain essential components of the system. During major floods, 80 percent of floodwater leaves the Sacramento River and flows through the bypasses, inundating 80,000 acres of seasonal cropland, wetland, and forest. Water flowing through bypasses reduces pressure on the levees as the Sacramento River flows past its namesake city.

People who built the project did not realize that they were also embarking on massive environmental restoration. Bypasses host vast flocks of birds and provide habitat for native fishes, including juvenile salmon, which grow far larger on floodplains than they do in the river.

Most land in the bypasses is productive cropland, demonstrating synergies among flood management, agriculture, and environmental resources.

The Department of Water Resources acknowledged these multiple benefits in its 2017 Central Valley Flood Protection Plan Update. The update calls for expanding the Yolo Bypass, creating a new bypass for the San Joaquin River, and setting levees back further from the river in various places in the system.

The plan is wise, continuing California's tradition of innovative flood management that makes more room for the rivers, saves lives and restores habitat for fish and wildlife. But for the plan to deliver these benefits to people and nature, California must fund it, an estimated $20 billion during the coming few decades. It is an investment we can't afford not to make. As Sacramento learned in 1850, optimism and luck won't keep people safe.