A theory of the wind-driven ocean circulation is presented in which the key feature is strong deformation of interior density layers and consequent production of closed geostrophic-contours by the flow itself. The constraint imposed on the subsurface flow by the imposition of a no flux condition where a geostrophic contour strikes a coastal boundary is thus removed. Within regions where the geostrophic contours close the potential vorticity is uniform....