Los Angeles derives much of its charm from its diversity, both of its people and its amenities—rolling hills here, lovely architecture there, a national forest to the north and legendary beaches to the west. But much of it is in trouble: Sea level rise is coming for Los Angeles County and its 74 miles of coast.

According to a new report from the New York Academy of Sciences, it’ll take LA as much as $6.4 billion to fortify itself against an impending increase in coastal flooding, with moves such as nourishing its beaches with extra sand and elevating its ports. The tricky thing about sea level rise, however, is the uncertainty. Climate models are getting better at predicting how high seas will rise and how quickly, but no model can deliver guarantees. Maybe sea levels will rise by a foot by 2050. Or the water might end up rising 7 feet, but not for another 200 years.

“The key threat is actually the acceleration,” says climate scientist Jeroen C.J.H. Aerts of Vrije Universiteit Amsterdam, coauthor of the study. If sea level rise accelerates, infrastructure improvements might not be able to keep up, especially considering the magnitude of the engineering required to, say, raise the elevation of a whole port.

One scenario is that the neighboring ports of Los Angeles and Long Beach will get knocked offline by storm surges from future nasty weather events—and could eventually stop functioning completely if waters rise high enough. Together, these ports handle half of the containers coming into the United States, infusing the California economy with more than $60 billion a year and the national economy with $230 billion. Losing them to sea level rise would have staggering economic effects, so the only option is to adapt.

“If the port is one day or two days out of business, that means that trains cannot run in the direction of Utah or Nevada,” says Aerts. “And it means all other businesses that rely on the port are out of business as well.” We’re talking about a hit of a billion dollars each day the ports are out of commission.

But how do you fight back against a force like the sea? “What we suggested for the Port of LA and Long Beach is actually that they expand the ports toward the sea and raise those new facilities to anticipate future sea level rise,” says Aerts. You could then turn the old port facilities into a residential area, which would itself be lifted to stay dry.

Then there’s the matter of people. Think of Malibu and you think of rich people, who may well have the money to pay for seawalls or to retrofit their homes. But many lower-income folk also live near LA County’s 74 miles of coastline, and their homes may one day be in danger of inundation as well.

Coastal businesses, too, are likely suffer. California’s legendary beaches rake in $40 billion a year up and down the state. But here there’s actually a proven way to fight back: beach nourishment. The idea is to supplement eroded beaches with sand dredged offshore to keep them from washing out to sea. It’s a constant battle, as you have to keep adding sand that then gets washed away, but nourishment works to maintain the bulwark that is a healthy beach. That keeps infrastructure and homes safe from the ravages of the sea.

The problem in Southern California, though, is that engineers have already dammed the rivers, cutting off a major source of sand, which typically gets washed out to sea, thus replenishing coastlines. A workaround is to dredge harbors and other places where sand tends to build up and relocate it to a beach, replicating the natural process of rivers depositing new sediment on beaches.