Former UN secretary-general Ban Ki-moon has urged Donald Trump to return to global efforts to fight climate change.