Thermodynamics in Earth and Planetary Sciences