As President Biden toured the damage from Hurricane Ida in Manville, N.J., on Tuesday, he marveled at the water marks that stretched as high as the windows of some ravaged homes — “Literally over your head, that’s pretty amazing,” he quipped — and consoled a family whose home was destroyed by a fire that began alongside the flooding.

“Well, thank God you’re safe,” Biden told the family.

Biden’s visit to New York and New Jersey to survey damage from Ida marked his second such trip in five days, coming shortly after a Friday visit to New Orleans where he similarly comforted families and inspected the devastation from the Category 4 storm that killed at least 60 people.

In his first year in office, Biden has embraced natural disasters, traveling to snow- and rain- and wind-ravaged communities on trips that not only fulfill his basic duties as president, but also allow him to demonstrate what he casts as his signature calling cards — compassion and competence. The president’s handling of such disasters also lets him push a message that has been central to his appeal since he was a candidate: That government can work for its people and that bipartisanship, at least in moments of crisis, still exists.

And, unlike many of his recent predecessors, Biden came into office having watched previous presidents closely for decades. He has seen how the mishandling of natural disasters can prove politically damaging, as with George W. Bush’s initial inattention to Hurricane Katrina or Donald Trump’s callous disregard for Puerto Ricans hit by Hurricane Maria.

“From the time he was senator to vice president and now president, of all the things he faces, this is one he’s done before, and he understands that in many cases, just showing up sends the message that the federal government is going to be there,” said W. Craig Fugate, who worked closely with Biden as head of the Federal Emergency Management Agency under President Barack Obama. “Particularly for President Biden, he makes connections with people, and he’s trying to understand, ‘Do we truly know what’s happening to people? Do we truly know what needs to be done?’ ”

Biden’s first trip to a major disaster zone came just over a month after taking office, when he traveled to Houston in late February following a wave of damaging winter storms that left more than 40 dead and millions of Texans without power and safe drinking water amid freezing temperatures.

Biden used the visit to make an appeal to unity and bipartisanship, one of the key themes of his candidacy and presidency. “When a crisis hits our states, like the one that hit Texas, it’s not a Republican or Democrat that’s hurting,” Biden said. “It’s our fellow Americans that are hurting, and it’s our job to help everyone in need.”

He also visited a mass coronavirus vaccination facility, again making the case for bipartisanship, especially in moments of crises.

“There’s nothing partisan about this virus,” Biden said, noting he had just met with two “conservative Republicans” — Texas Gov. Greg Abbott and the state’s senior U.S. senator, John Cornyn — and found areas of shared agreement.

“We disagree on plenty of things, and nothing wrong with that,” Biden continued. “But there are plenty of things we can work on together, and one of them is represented right here today, the effort to speed up vaccinations. We’re not giving shots to Democrats or Republicans — I say it again — we’re giving shots to Americans.”

In July, Biden again found himself comforting families in the wake of a disaster during a trip to Surfside, Fla., following the collapse of a 12-story beachfront condominium there that left nearly 100 dead. In private meetings with families who had lost loved ones or whose relatives were still missing amid the rubble, Biden drew from his personal experience with grief and loss — the 1972 death of his first wife and infant daughter in a car crash and, later, the death of his 46-year-old son, Beau, from a brain tumor.

“It’s bad enough to lose somebody,” Biden said. “But the hard part, the really hard part, is to not know whether they’re surviving or not, just not having any idea.”

On the crash that killed his wife and daughter, the president spoke of the devastating uncertainty over whether his two sons, who were also in the car, would survive, offering remarks that at times veered into the pastoral.

“I have, like many of you do, some idea what it’s like to suffer that kind of loss so many of them are suffering,” Biden said, recounting the Surfside families’ “basic heart-wrenching questions: ‘Will I be able to recover the body of my son or daughter, my husband, my cousin, my mom and dad? How can I have closure without being able to bury them if I don’t get the body? What do I do?’ ”

He concluded: “Our message today is that we’re here for you, as one nation. As one nation.”

Biden’s gift for empathy, allies say, allows him to both show leadership and offer comfort in moments of national tragedy — especially those for which he is not blamed.

“Part of the president’s job description that is not in the Constitution but is certainly there is to be compassioner in chief, and he gets what people are going through,” Fugate said.

Ida offers Biden something of a grim respite from the United States’ rocky withdrawal from Afghanistan, which has dominated the news for the past several weeks. Unlike Afghanistan, Biden bears no responsibility for Ida’s wrath, and his visits to New Orleans and the greater New York area allowed him to return to the more comfortable terrain of domestic policy.

Visiting FEMA headquarters, for instance, in late August in preparation for Ida, Biden called for questions from the media but then refused to answer one on Afghanistan, where 13 U.S. service members had just been killed in a suicide bombing at the Kabul airport.

“I’m not going to answer Afghanistan now,” Biden said at the time, brushing off the query to keep his focus squarely on the coming hurricane.

The president used his Friday visit to New Orleans to tout the importance of investing in the nation’s crumbling infrastructure, even as the window for passage of Biden’s infrastructure legislation narrows. Rebuilding the levee system in New Orleans after Katrina, Biden said, was an example of smart infrastructure spending.

“You know I get kind of beat up, criticized,” Biden said at a briefing at St. John the Baptist Parish’s Emergency Operations Center in LaPlace, La. “Things have changed so drastically in terms of the environment. You’ve already crossed a certain threshold. You can’t build back a road, a highway or a bridge to what it was before. You’ve got to build back to what it is now.”

At a briefing Tuesday in New Jersey, Biden similarly used the visit to push a message of fighting climate change, calling the moment “an opportunity.”

“I think the country has finally acknowledged the fact that global warming is real and it’s moving at an incredible pace,” Biden said. “And we’ve got to do something about it.”

Biden’s visits to tour the aftermath of storms, said Jennifer Oetzel, a professor at American University’s Kogod School of Business, allow him to demonstrate the leadership and proficiency that Americans expect from their elected officials.

“The last years have been very difficult for so many reasons, and we desperately need as a nation to see that our government is highly competent,” said Oetzel, who focuses on business response to climate change, particularly natural disasters. “We need to see competence from our government that they understand the nature of the problem and they understand how the losses do not fall evenly across many communities, and that they can reassure people that they’re going to be able to do something and get people back up and running in a timely manner.”

For Biden — who promised the nation competence, empathy and bipartisanship if elected — storm visits offer a rare potion of all three. But they, too, are not without peril.

“Ask President Bush how it went for Katrina,” Fugate said. “Disasters can bite, so they’re not risk-free.”