Now, of course, everything is in flux. In the worst case, with a sufficiently pliant Congress, Mr. Trump could roll back a decade of progress on climate change. Barring some miraculous conversion on Mr. Trump’s part, his election cannot be interpreted as anything but bad news for the climate agenda.

Yet despair might be an overreaction.

For starters, when Mr. Trump gets to the White House, he will find that the federal government actually has relatively little control over American energy policy, and particularly over electricity generation. The coal industry has been ravaged in part by cheap natural gas, which is abundant because of technological changes in the way it is produced, and there is no lever in the Oval Office that Mr. Trump can pull to reverse that.

The intrinsically weak federal role was a source of frustration for Mr. Obama and his aides, but now it will work to the benefit of environmental advocates. They have already persuaded more than half the states to adopt mandates on renewable energy. Efforts to roll those back have largely failed, with the latest development coming only last week, when Gov. John Kasich of Ohio, a Republican, vetoed a rollback bill.

The federal government does offer important subsidies for renewable energy, and they will surely become a target in the new Congress. But those subsidies are already scheduled to fall drastically over five years, in a deal cut a year ago that gave the oil industry some favors and that passed Congress with many Republican votes.

If Mr. Trump pushes for an early end to the subsidies, he will find that renewable energy has friends in the Republican Party. Topping that list is Charles E. Grassley, the senior senator from Iowa. That state — all-important in presidential politics, let us remember — will soon be getting 40 percent of its electricity from wind power.

“Senator Grassley has been and continues to be an extraordinary leader and champion for the wind industry,” said Tom Kiernan, the head of the American Wind Energy Association, a trade group.

When I spoke with him last week, Mr. Kiernan did not sound like a man gnashing his teeth about the impending Trump era. By his group’s calculations, $80 billion of wind industry investment is in the pipeline for the United States over the next few years. “We are creating jobs throughout America, good-paying jobs, and we think President-elect Trump will want that to continue,” he said.