Transfer of thermal energy in the oceans