Abstract
The mean ocean density field resembles the state of maximum entropy with given values for the upper water mass, total energy and potential enstrophy. Numerical experiments confirm that the thermocline of a freely evolving two-layer model spontaneously assumes the observed double-lobe shape.