You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
A few weeks after unveiling rules to limit carbon emissions from power plants, Obama used a commencement address for the University of California, Irvine, to rally support from young people and slam opponents for denying that climate change is real.
"When President Kennedy ... set us on a course for the moon, there were a number of people who made a serious case that it wouldn't be worth it ... but nobody ignored the science. I don't remember anybody saying that the moon wasn't there, or that it was made of cheese," he said.
"Today's Congress, though, is full of folks who stubbornly and automatically reject the scientific evidence about climate change. They will tell you it is a hoax, or a fad."
Obama said some climate questioners ducked the issue by asserting they were not scientists themselves.
"I'm not a scientist either, but we've got some really good ones at NASA. I do know that the overwhelming majority of scientists who work on climate change, including some who once disputed the data, have put that debate to rest."
Most scientists say the earth is warming and human beings are contributing to it, but the issue is politically controversial. Many Republicans and some Democrats oppose Obama's plans to limit emissions from power plants because of the potential economic consequences.
Obama's record on climate change is also under fire from some environmentalists, who are pressing his administration to deny approval for the Keystone XL pipeline, which would bring oil from Canada to the US Gulf Coast.
Young people make up a critical part of the Democratic Party's political base, and Obama urged the graduates to be motivated to fight global warming as they left the world of academia.
Climate change is becoming a major legacy issue for Obama and a hot topic in this year's congressional elections. Before the commencement ceremony, the president attended a Democratic fundraiser at the home of environmental activist Anne Earhart.
About 25 supporters attended, contributing up to $32,400 each, according to the Democratic National Committee.
In his speech, Obama announced a competition for communities hit by extreme weather to compete for $1 billion in funds to rebuild from and inoculate themselves against natural disasters.