## 1. Introduction

[2] Discrete approximation of horizontal pressure-gradient force (PGF) topography-following coordinates has been a long-standing problem in atmospheric and oceanic modeling [*Gary*, 1973; *Mesinger and Arakawa*, 1976; *Janjic*, 1977, 1998; *Mesinger*, 1982; *Arakawa and Suarez*, 1983; *Mesinger and Janjic*, 1985; *Michailovich and Janjic*, 1986; *Blumberg and Mellor*, 1987; *Haney*, 1991; *Mellor et al.*, 1994, 1998; *Stelling and van Kester*, 1994; *Song and Haidvogel*, 1994; *Lin*, 1997, 1998; *Slordal*, 1997; *Song*, 1998; *Song and Wright*, 1998; *Kliem and Pietrzak*, 1999]. The main difficulty is attributed to *hydrostatic inconsistency*, i.e., failure of the discretized PGF to vanish in the case when isopycnals are horizontal. This effect causes spurious geostrophically balanced flows, which in oceanic model applications may be as large as 10 cm/s or more, degrading the quality of the solution beyond an acceptable limit. The problem arises from the deviation of quasi-horizontal coordinates from either geopotential or isopycnal surfaces, so that the PGF in the momentum equations appears in the form of two large terms which tend to cancel each other,

where *P* is pressure, ρ_{0} = const is mean density in a Boussinesq approximation, and *z* is vertical coordinate in nontransformed (i.e., physical) space. Subscript *z* in ∂/∂*x*∣_{z} means that the associated partial derivative is computed with respect to a constant geopotential surface, *z* = const, and a similar subscript *s* means that the differentiation is performed along the transformed coordinate surface, *s* = const.

[3] In the present study we are not limited to the traditional σ-coordinate,

where *h*(*x*, *y*) is oceanic bottom depth, and *f*(σ) is a monotonic mapping function independent of horizontal coordinates that controls vertical-coordinate (hence grid) stretching. Instead we assume that the three-dimensional mapping function *z* = *Z*(*x*, *y*, *s*, *t*) is both monotonic (i.e., ∂*Z*/∂*s* > 0) and nonseparable, while usually

Moreover, it is assumed that (1.1) may be stiff in the sense that

which indicates that special precautions need to be taken to avoid loss of accuracy(We will use the terminology of σ-coordinate and σ-modeling throughout this paper in a broad sense referring to the whole class of models with a nonaligned vertical coordinate).

[4] *P* is computed from the hydrostatic equation,

where ρ(*x*, *y*, *z*) is density; ζ is free-surface elevation; and *g* is gravitational acceleration. One might be tempted to replace (1.1) with

and discretize it in a straightforward way using second-order averaging and differencing operators. This was shown to be prone to hydrostatic consistency error [cf. *Mesinger and Arakawa*, 1976], caused mainly by the vertical averaging of *P* and horizontal averaging of ρ in (1.6) in order to colocate them with horizontal velocity components on a staggered grid.

[5] Practical experience has resulted in essentially two approaches to overcome this problem:

- In each vertical column compute a set of values of pressure 1 naturally located halfway between the density points on a staggered vertical grid; then for each two neighboring columns, interpolate this
*P*field to an appropriate common geopotential level; and then subtract the interpolated values. Note, that after computation of*P*, the density field ρ_{k}does not participate in any further computation. Obviously, in this approach the two terms in (1.1) become inseparable. The different methods of this family may vary in details of the choice of the common level as well as interpolation technique, which is linear in most cases [*Janjic*, 1977;*Arakawa and Suarez*, 1983;*Lin*, 1997] or parabolic [*Michailovich and Janjic*, 1986]. Overall, the overwhelming majority of atmospheric models use schemes belonging to this class. - Following
*Blumberg and Mellor*[1987] and*Song*[1998], equations (1.1)–(1.5) are first transformed into where the expression in square brackets is similar to (1.1), except that*P*is replaced with ρ. Equation (1.7) is then discretized in a manner similar to that described above, except that now vertical integration becomes the second step rather than the first and*P*never appears explicitly in the model. Because of the form of (1.7), these methods are often referred as*density-Jacobian*, opposite to the*pressure-Jacobian*family described above. The PGF schemes in two commonly used terrain-following oceanic models (POM and SCRUM) belong to this class (POM—Princeton Ocean Model [*Blumberg and Mellor*, 1987]; SCRUM—S-Coordinate Rutgers University Model [*Song and Haidvogel*, 1994]).

[6] *Song* [1998] and *Song and Wright* [1998], argue that a density-Jacobian method is inherently more accurate than a pressure-Jacobian. Indeed, it is easy to see that, if the basic second-order approximations (2-point differencing, interpolation and trapezoidal integration) are used and if ρ is a linear function of *z*, then the error of a density-Jacobian method vanishes identically, while a linear ρ corresponds to a quadratic *P*; therefore, discretizations based on a linear fit for *P* [cf. *Janjic*, 1977, 1998; *Lin*, 1997] are not able to capture this correctly resulting in hydrostatic error for this particular profile. On the other hand, *Lin* [1997], argues that it is advantageous to discretize PGF using a finite-volume method. An attractive feature of this approach is that the discretized PGF naturally appears in flux-divergent form, which makes the proof of momentum and bottom-torque consistency [cf. *Arakawa and Suarez*, 1983; *Song and Wright*, 1998] simple. There is no obvious way to cast a density-Jacobian scheme into the form of a difference of *P* fluxes. This conflict between accuracy and conservation properties of σ-coordinate PGF schemes is not unnoticed in the literature [e.g., *Beckmann and Haidvogel*, 1993; *Song and Wright*, 1998]. It is also not surprising that oceanic models tend to use density-Jacobian, while atmospheric models use pressure-Jacobian. In comparison with the atmosphere, the ocean is often more strongly stratified, and the stratification is much more spatially variable: it is not unusual to see a change of Brunt-Väisäla frequency by two orders of magnitude throughout a vertical column. While most of the vertical density gradient in atmospheric models is due to the compressibility effect, which may be absorbed by special mapping techniques as well as by the choice of vertical coordinate system (e.g., pressure instead of geopotential [*Arakawa and Suarez*, 1983]), the relative complexity of the equation of state for seawater makes such procedures much harder in oceanic models, shifting the priority toward an accurate representation of ρ(*z*) profiles and a preference for the density-Jacobian.

[7] The high-order PGF schemes available to date follow the path of straightforward discretization of (1.6) using a spectral method in the vertical direction in combination with either conventional or compact forth-order finite differences and interpolations in the horizontal [*McCalpin*, 1994] or spectral in combination with compact differencing up to sixth-order accuracy [*Chu and Fan*, 1997, 1998]. The approach relies exclusively on the smallness of the truncation errors of the elementary discretizations (computation of the first derivative and midpoint interpolation), which is justifiable only when the density field is smooth on the grid scale. This is reasonably successful for idealized test problems, but practically useless for real-world simulations where fields are not smooth on affordable grids. A comprehensive comparison of performance of schemes available to date may be found in the work of *Kliem and Pietrzak* [1999] for various test problems. Although one might argue, that the analytical density profiles used in this reference are discontinuous in the first derivatives, and therefore the posedness of the problem is prejudicial against high-order methods, their inherent nonrobustness is consistent with the more general experience in realistic basin-scale simulations, resulting in the fact that, to our best knowledge, to date none of such simulations were performed using PGF scheme of higher than the basic second-order accuracy.

[8] In the present study we describe the symmetry properties of the second-order density-Jacobian scheme and analyze sources of numerical errors. We then seek a high-order accuracy extension to this method which retains most of the symmetries and is both accurate and robust in situations where ρ changes sharply from one grid point to another with nonuniformly stretched grids. The methodology we employ is based on the reconstruction of both ρ and *z* as continuous functions of the transformed coordinates, which are then analytically integrated along the contours bounding the grid cells surrounding the velocity components. Since, in this approach, all steps after ρ reconstruction are exact (since ρ is treated as a continuous analytical function), the resultant algorithm can be equivalently reformulated in either Jacobian (1.7) or σ-coordinate primitive form (1.6) (reflecting the fact that these two are equivalent at the level of continuous equations), which in effect disproves the long-standing belief that a Jacobian formulation is inherently more accurate.