Generation of electricity is the second largest source of carbon dioxide and other planet-warming gases in the United States.