Thermal energy transfer in the ocean