We examine a dynamical method for estimating subsurface fields (density, pressure, horizontal and vertical velocities) in the upper ocean using sea-surface temperature (SST) and a climatological estimate of the stratification. The method derives from the "surface quasi-geostrophic" (SQG) approximation. The SST is used to generate a potential vorticity (PV) field which is then inverted for the pressure. We examine first the standard SQG model, in which the PV is assumed trapped in a delta-function layer at the surface. We then modify the model by introducing a subsurface PV which is proportional to the surface density and decays exponentially with depth. We derive the subsurface density from the hydrostatic relation, the horizontal velocities from geostrophy and the subsurface vertical velocities from the quasi-geostrophic omega equation.We compare the predicted densities and velocities with those from a three-dimensional (3D) ocean model, and from in situ measurements in the Mediterranean, Eastern Pacific and the Azores Current. In most cases the standard SQG model predicts the qualitative structure of the subsurface flow. But it also underestimates its strength. The modified model yields better estimates of both the strength and vertical structure of the subsurface flow.