BY WEDNESDAY afternoon, much of the water that had flooded New York City during Hurricane Sandy had receded into the harbor. But recovery crews were still furiously pumping water out of the city’s subterranean arteries. Four East River subway tunnels remained inundated. Electricity was still out south of 39th Street, along with many traffic lights, and the city’s death toll stood at 22. With New Yorkers scrambling to get around, Mayor Michael R. Bloomberg (I) announced that only cars carrying three or more people would be allowed on bridges or into open tunnels. New York is just one portrait of a disaster that largely spared the Washington region but pummeled areas north.

Now imagine if New York’s water level were two, three, four feet higher. That’s what the New York City Panel on Climate Change predicts could happen later this century, depending on how global warming affects the harbor.

Sandy reminded Americans not only of the importance of cooperation in times of crisis and the promise that great cities such as New York will restore themselves. It also demonstrated the vulnerability of the seawalls, bulkheads and electrical wires upon which Americans rely. The job now is not simply to pump water out of inundated subway lines. It is also to figure out how to harden the United States’ vital coastal infrastructure, particularly in the face of rising seas, big storms and other predicted consequences of climate change.

New York city planners have begun looking at options. A municipal report last year suggested updating building codes and other regulations to encourage flood-proof structures, ensuring that permitting is predictable for upkeep on seawalls and bulkheads, and building barriers such as dikes and levees. These must also be high enough to withstand truly brutal weather, as New Orleans can attest. Proposals for massive storm-surge barriers to ring off upper New York Harbor are also on the table, as is the idea to build small barrier islands, though both these approaches no doubt would be very expensive. Of course, New York is not the only vulnerable population center. Rising sea levels are already imperiling Virginia’s Hampton Roads, including a dry dock built to construct aircraft carriers. Municipalities up and down the East Coast should be planning.

Fortification may well be needed outside cities, too. Three nuclear reactors shut off during the hurricane, and the Nuclear Regulatory Commission (NRC) issued an alert at a fourth site. None resulted in any big problems. The industry pointed out that facilities are designed to withstand hurricane-strength winds. The NRC said that extensive upgrades following the Sept. 11, 2001, terrorist attacks have made U.S. nuclear plants even safer than before and that ensuring the resilience of critical backup systems to flooding has been a priority since the Fukushima Daiichi meltdowns in Japan. Sandy should heighten the industry’s diligence.

National leaders need to get serious about slowing climate change. But the country must also plan to adapt to a warming world, anticipating not just the historically unusual, but also the historically unprecedented.