The exact geostrophic streamfunction for neutral surfaces
McDougall (1989) proved that neutral surfaces possess an exact geostrophic streamfunction, but its form has remained unknown. The exact geostrophic streamfunction for neutral surfaces is derived here. It involves a path integral of the specific volume along a neutral trajectory. On a neutral surface, the specific volume is a multivalued function of the pressure on the surface, $\underset{\sim}{p}$. By decomposing the neutral surface into regions where the specific volume is a single-valued function of $\underset{\sim}{p}$, the path integral is simply a sum of integrals of these single-valued functions. The regions are determined by the Reeb graph of $\underset{\sim}{p}$, and the neutral trajectory is encoded by a walk on this graph. Islands, and other holes in the neutral surface, can create cycles in the Reeb graph, causing the exact geostrophic streamfunction on a neutral surface to be multivalued. Moreover, neutral surfaces are ill-defined in the real ocean. Hence, the topobaric geostrophic streamfunction is presented: a single-valued approximation of the exact geostrophic streamfunction for neutral surfaces, for use on any well-defined, approximately neutral surface. Numerical tests on several approximately neutral surfaces reveal that the topobaric geostrophic streamfunction estimates the geostrophic velocity with an error that is about an order of magnitude smaller than that for any previously known geostrophic streamfunction. Also, the Montgomery potential is generalized, leading to an alternate form of the exact geostrophic streamfunction for neutral surfaces. This form is used to construct the orthobaric Montgomery potential, an easily computable geostrophic streamfunction that estimates the geostrophic velocity more accurately than any previously known geostrophic streamfunction, but less so than the topobaric geostrophic streamfunction.