Thermodynamics of the carbon dioxide system in the oceans