LOS ANGELES — Cities across the country that live with the threat of disaster — from earthquakes in San Francisco to hurricanes in Miami — are anxiously watching the catastrophe unfolding in Houston for lessons learned, cautionary tales, anything to soften the blow when their residents are the ones in danger.

“We know we are racing against the clock,” said Elaine Forbes, the executive director of the Port of San Francisco, her office buttressed by a century-old sea wall that could collapse in an earthquake. “Seeing Houston stoked the fire.”

Emergency disaster officials in cities like Baltimore, Boston and Seattle have spent the last week and a half monitoring how Texan government officials and storm-affected residents are responding to a crisis that destroyed homes and disrupted electricity, drinking water and communications.

The causes might be different, but the devastation and social disruption can be similar from disaster to disaster. As such, Houston is offering other cities a real-life run-through of their own emergency plans as well as a stark reminder of the inevitability of such events.