El Coquí, the 1-inch musical tree frog that is Puerto Rico’s cultural icon, has more common sense than the island’s public officials. When rising temperatures made the coast uninhabitable and caused the extinction of many of their species, the survivors moved up to the mountains, where it was cooler.

Meanwhile, nearly 70 percent of the island’s human population and all of its power plants are still on Puerto Rico’s coast.

This raises two questions. Why didn’t island officials, like Gov. Ricardo Rosselló and San Juan Mayor Carmen Yulín Cruz Soto, prepare for a disaster they knew was coming? And how did Puerto Rico spend several hundred million dollars in US taxpayer-funded FEMA grants?

The end of the tree frog’s nightly concert was just the first sign of looming catastrophe.

When I visited the island in 2013 after a decade’s absence, the first thing I noticed was the virtual disappearance of the wide beaches for which Puerto Rico was once famous. According to the US Geological Survey, they were washing away at a rate of 3.3 feet per year.

Then in 2013 came a more prosaic warning in the form of a report from the Puerto Rican Climate Change Council and the USGS. It stated: “It is no longer a question of whether the coasts of Puerto Rico and many port cities in the Caribbean will be inundated, but rather, it is a question of when and by how much.”

But history itself should’ve served as warning enough. Between 1956 and 1996, there were 12 disaster declarations from hurricanes and flooding in Puerto Rico. Over the last 20 years there have been 15. FEMA has provided nearly a billion dollars in disaster relief to Puerto Rico since 1998.

By now, you’d think Puerto Rico would be prepared. Instead, Mayor Cruz told the Washington Post, “People are starting to tell us ‘I don’t have my medication. I don’t have my insulin. I don’t have my blood pressure medication. I don’t have food. I don’t have drinking water.’ ”

Puerto Rico’s El Vocero newspaper published a similar quote following Hurricane Hugo in 1989. There was “a lack of and delay in obtaining essential services and resources: for example, sanitary facilities, beds, food, water, prescription drugs, and health services . . . San Juan metropolitan area suffered from a lack of water for nine days.”

Old newspaper reports are not the only sources for what Puerto Rico could expect when a major hurricane hit. Government agencies publish post-incident reports following every hurricane. Many of them are available online.

We know some Puerto Rican officials must have reviewed at least some of them. They would have used the information provided in these reports to win $300 million from FEMA’s hazard mitigation program.

But instead of relocating families whose homes were damaged by Hurricane Georges in 1999, two-thirds of the funding went to rebuilding their homes in the same location.

Cruz ended her interview with the Washington Post with, “Don’t forget us.”

We won’t — for long, anyway. The cycle rolls on: Puerto Rico gets hit by a major hurricane. The island is devastated. There is flooding. The power grid gets knocked out for weeks, if not months. The federal government sends billions of dollars for cleanup and repairs.

Then the next hurricane hits and the cycle starts all over again.

In between hurricanes, public officials never get around to relocating the population or power plants inland, away from the disappearing coast.

This is lunacy.

The federal government has already spent billions in this century shoring up and rebuilding coastal communities. We already knew Puerto Rico has no capacity for managing its finances. Now we also know Puerto Rico has no capacity for planning and protecting its citizens — who are also American citizens.

It’s time officials followed the coquí’s example, learned from Puerto Rico’s history and help residents continue to live on this island as the waters rise around them.

The answer isn’t to simply write another blank check — which local profiteers are drooling to get their hands on. If the priority is to get the power grid up and running again, that’s a job for the Army Corps of Engineers, not for the power company that sited all its power plants on the coast.

More broadly, the United States must develop a real climate-change coastal plan. It can start testing solutions in Puerto Rico.

Eddie Borges negotiated a climate-change action plan with the office of the governor of Puerto Rico, on behalf of the Save El Coquí campaign, in 2013.