  Explicit expressions of the 3D velocity field in terms of the conserved
quantities of ideal fluid thermocline theory, namely Bernoulli function,
density, and potential vorticity, are generalised here to a compressible ocean
with a realistic nonlinear equation of state. The most general such expression
is the `inactive wind' solution, an exact nonlinear solution of the inviscid
compressible Navier-Stokes that satisfies the continuity equation as a
consequence of Ertel's potential vorticity theorem. Such expressions are shown
to be non-unique due to the non-uniqueness of the choice of Bernoulli function
and in general approximately differ by the magnitude of their vertical velocity
component. Due to the thermobaric nonlinearity of the equation of state, the
expression of the 3D velocity field for a compressible ocean is found to
resemble its ideal fluid counterpart only if constructed in terms of the
available form of Bernoulli function as per Lorenz theory of available
potential energy (APE). APE theory also naturally defines a quasi-material
approximately neutral density variable called Lorenz reference density, which
in turn defines a potential vorticity variable minimally affected by
thermobaric production, thus providing all necessary tools for extending most
results of ideal fluid thermocline theory to a compressible ocean.
