Abstract
A general primitive equation model with non-uniform layers is set up by simply vertically averaging the density, horizontal pressure gradient and velocity fields in ech layer; these averaged fields remain a function of horizontal position and time. The evolution equations are those of the model with homogeneous layers, with the addition of a rotational horizontal force proportional to the density gradient. Potential vorticity is not conserved because of this extra term or, alternatively, because of the loss of information on the vertical shear, produced by the averaging. However, energy and momenta are conserved, as well as an infinite number of Casimirs, which depend on arbitrary functions of density, rather than potential vorticity.