Energy in the Earth system