President Trump may have doubts about climate change, but a pair of new federal reports indicate that our planet’s long-term warming trend continues — and that 2017 was one of the hottest years on record.

Global surface temperatures last year were the second hottest since 1880, according to an analysis by scientists with NASA’s Goddard Institute for Space Studies. Average temperatures in 2017 were 1.62 degrees Fahrenheit warmer than the average between 1951 and 1980, the year global temperature measurements became possible.

Only 2016 was warmer, according to NASA.

Get the mach newsletter. This site is protected by recaptcha

A separate analysis by the National Oceanic and Atmospheric Administration pegged 2017 as the third-warmest year on record. The agencies said the discrepancy in the rankings was the result of different methods that they use to analyze global temperature data, but that overall, their assessments on the state of the global climate are in agreement.

Data from both agencies show that the five warmest years on record have all occurred since 2010.

The five warmest years on record have all occurred since 2010. NASA

“Despite colder than average temperatures in any one part of the world, temperatures over the planet as a whole continue the rapid warming trend we’ve seen in the last 40 years," Gavin Schmidt, director of the Goddard Institute, said in a written statement.

Last year was the third consecutive year in which global temperatures were more than 1.8 degrees Fahrenheit above late 19th century levels, NASA said. The warming is most pronounced in the Arctic, where the loss of sea ice continues.

In the East, it could be the COLDEST New Year’s Eve on record. Perhaps we could use a little bit of that good old Global Warming that our Country, but not other countries, was going to pay TRILLIONS OF DOLLARS to protect against. Bundle up! — Donald J. Trump (@realDonaldTrump) December 29, 2017

Every state in the contiguous U.S. and Alaska had above-average annual temperatures in 2017, NOAA said. Arizona, Georgia, New Mexico, North Carolina, and South Carolina had their warmest years on record.

Scientists say global warming is attributable largely to the burning of fossil fuels, which releases carbon dioxide and other greenhouse gases in the atmosphere. Rising temperatures and the extreme weather events they're linked to are already having significant negative impacts on human health and productivity.

NASA’s report is based on temperatures monitored at 6,300 weather stations, along with sea temperatures measured by ocean-going ships and sea buoys, and by temperature measurements made from research stations in Antarctica, the agency said.

FOLLOW NBC NEWS MACH ON TWITTER, FACEBOOK, AND INSTAGRAM.