When officials in New York City began to piece together how Superstorm Sandy had managed to flood the subway last October, they found that the storm had driven a bundle of lumber from a construction site right through a plywood barrier built around one of the entrances to the South Ferry subway station. It was a seemingly random act of violence, but in reality, the barriers probably never stood a chance. With a standing-water height of up to 1.5 metres at Battery Park on Manhattan’s southernmost tip, the rising tide skirted a second plywood blockade and poured over a waist-high concrete wall at another entrance.

Preparing for hurricanes is hard. But the fact that core infrastructure in a global metropolis such as New York was protected by plywood should trigger alarms. South Ferry is a reminder of just how ill-prepared New York was for a storm of this magnitude — and it underscores the scale of the challenge ahead.

It wasn’t supposed to be this way. New York City has engaged scientists while working to reduce emissions and prepare for a warmer world. In 2008, Mayor Michael Bloomberg created the New York City Panel on Climate Change, and in August the city council gave the panel a permanent place in its long-term planning process. PlaNYC, a planning document that offers a vision of what the city will look like in 2030, includes a comprehensive chapter on climate change. But none of this prepared the city for Sandy. Nor could it have — the surge that Sandy brought ashore was off the charts.

Legions of scientists are now assessing what happened and projecting future risks. The latest, and perhaps best, estimate, based on models by researchers at Princeton University in New Jersey and the Massachusetts Institute of Technology in Cambridge, is that the storm surge at Battery Park was a 1-in-500-year event. But the size of a surge is not the only measure of a dangerous storm, nor is Battery Park the only location that matters. Scientists also know that the baseline is changing with the climate. All of which leaves the city, its residents and businesses in the unenviable position of rebuilding in the face of an uncertain future.

As this process unfolds, several lessons can be learned from Sandy (see page 162). In many places, premises erected under newer building codes survived the storm with only limited damage at ground level. A new generation of waterfront parks and developments also weathered the storm quite well, showing that there are ways to manage the risks of occasional flooding. But given the predicted sea-level rise and the likelihood of more powerful storms in the future, a more comprehensive strategy is clearly needed.

Some positive signs have emerged. The Federal Emergency Management Agency is updating the city’s flood maps, and the city has announced steps to strengthen its building codes. As directed by Congress last year, the agency will also be incorporating long-term climate projections, including for sea-level rise, into its rate structure for the federal flood insurance programme. Until now, the programme has served as a government subsidy for risky coastal development — so risky that private insurance companies refused to enter the market.

One of the big questions facing the region is whether to spend billions of dollars on a storm-surge barrier. Scientists and engineers should clearly include a barrier in their analysis, but a surge is just one of many threats posed by many kinds of storm. Moreover, how fast New York bounces back will depend not only on damage to infrastructure but also on the strength of social networks and the general health of the communities affected. Farther afield, as sea levels rise, coastal cities will have little choice but to learn to live with more water than they are used to today.