A method for computing horizontal pressure-gradient force in an oceanic model with a nonaligned vertical coordinate

Authors


Abstract

[1] Discretization of the pressure-gradient force is a long-standing problem in terrain-following (or σ) coordinate oceanic modeling. When the isosurfaces of the vertical coordinate are not aligned with either geopotential surfaces or isopycnals, the horizontal pressure gradient consists of two large terms that tend to cancel; the associated pressure-gradient error stems from interference of the discretization errors of these terms. The situation is further complicated by the nonorthogonality of the coordinate system and by the common practice of using highly nonuniform stretching for the vertical grids, which, unless special precautions are taken, causes both a loss of discretization accuracy overall and an increase in interference of the component errors. In the present study, we design a pressure-gradient algorithm that achieves more accurate hydrostatic balance between the two components and does not lose as much accuracy with nonuniform vertical grids at relatively coarse resolution. This algorithm is based on the reconstruction of the density field and the physical z coordinate as continuous functions of transformed coordinates with subsequent analytical integration to compute the pressure-gradient force. This approach allows not only a formally higher order of accuracy, but it also retains and expands several important symmetries of the original second-order scheme to high orders [Mellor et al., 1994; Song, 1998], which is used as a prototype. It also has built-in monotonicity constraining algorithm that prevents appearance of spurious oscillations of polynomial interpolant and, consequently, insures numerical stability and robustness of the model under the conditions of nonsmooth density field and coarse grid resolution. We further incorporate an alternative method of dealing with compressibility of seawater, which escapes pressure-gradient errors associated with interference of the nonlinear nature of equation of state and difficulties to achieve accurate polynomial fits of resultant in situ density profiles. In doing so, we generalized the monotonicity constraint to guarantee nonnegative physical stratification of the reconstructed density profile in the case of compressible equation of state. To verify the new method, we perform traditional idealized (Seamount) and realistic test problems.

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,

equation image

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 ∂/∂xz 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,

equation image

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

equation image

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

equation image

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,

equation image

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

equation image

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:

  1. In each vertical column compute a set of values of pressure equation image1 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.
  2. Following Blumberg and Mellor [1987] and Song [1998], equations (1.1)(1.5) are first transformed into
    equation image
    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.

2. Second-Order Density Jacobian

[9] The density-Jacobian discretization is based on a continuous expression for the PGF,

equation image

where

equation image

ζ is free-surface elevation, ρs is density at the surface, and g is acceleration of gravity. POM/SCRUM use the most straightforward second-order accuracy method to approximate (2.2),

equation image

where placement of values with indices 1, 2, 3, 4 is shown in Figure 1 (Here we follow notation of Song [1998]. Equation (5) from Mellor et al. [1994] becomes equivalent to (2.3) after it is recognized that zi,k = Hiσk in their notation.). Since (2.3) treats ρ and z in a symmetric way, it has the property of antisymmetry,

equation image

and, obviously, it vanishes identically if ρ is a linear function of z.

Figure 1.

An elementary computational stencil of POM density Jacobian.

[10] This discretization can be rewritten in four algebraically equivalent forms:

  1. “Diagonal” Jacobian:
    equation image
  2. Horizontal (along-geopotential) differencing of ρ linearly interpolated or extrapolated within each vertical column to a common level z*:
    equation image
    where
    equation image
    is the area of trapezoidal element (z1, z3, z4, z2),
    equation image
    and
    equation image
    which coincides with the level of intersection of diagonals of trapezoidal element (Figure 1). This choice of z* also has the property,
    equation image
    which implies that offsets from midlevel to z* are proportional to grid-box height in each vertical column of ρ locations. The possibility to rewrite (2.3) into (2.6)(2.8) indicates that, unlike what Mellor et al. [1994, 1998] and Song [1998] stated, Jacobian formulation by itself does not offer any relief from violation of hydrostatic consistency condition [Haney, 1991] when
    equation image
    becomes greater than one and vertical interpolation of ρ turns into extrapolation. However, this choice of z* delays this moment as much as possible among all possible schemes using the stencil shown in Figure 1, since proportionality (2.9) makes the transition from interpolation to extrapolation occur at the same time for both left and right vertical columns at ρ locations. (Any choice of z* other than (2.8) would cause the transition to occur earlier at one end.) Note that violation of the hydrostatic consistency criterion (2.10) does not mean immediate hydrostatic instability because after vertical integration of �� (ρ, z) is performed, the overall PGF scheme retains positive definiteness in sense that the addition of a positive ρ perturbation at any point on one side and above the velocity point at which the PGF is evaluated always causes an increment in PGF directed away from that side, as it should be; instead it merely degrades the accuracy of the scheme. Another consequence of (2.9) is the effect of cancellation of hydrostatic error if either z2 = z3 or z1 = z4 [cf. Mellor et al., 1998]; in this case, z* is equal to common value of z2 = z3 or z1 = z4, and ρ interpolation to z* becomes exact. This property is also obvious from the diagonal form (2.5).
  3. “Pseudo-flux” form:
    equation image
    where
    equation image
    are called fluxes because they are shared by two grid elements adjacent either in horizontal or vertical direction. This form is not equivalent to a true finite-volume flux form [Lin, 1997], where the net force applied to a control volume element around velocity point is expressed as sum of P fluxes applied to all facets of the element; e.g., (2.11)(2.12) does not have property that summation of PGFs applied to adjacent velocity elements can be expressed in terms of integral along the outer surface enclosing all elements included into summation. The rewriting of (2.3) into (2.11) is a discrete analog of Green's theorem,
    equation image
    or, more simply,
    equation image
    where k is the unit vector pointing in positive z-direction (upward) and l is unit vector along the contour of trapezoidal element. Equations (2.11)(2.12) can be viewed as trapezoidal rule approximation to (2.14), which leads to graphical explanation of leading-order hydrostatic error second-order Jacobian resulting from terms associated with second vertical derivative of ρ (Figure 2).
  4. σ-Coordinate primitive form:
  5. Since F21 and F43 involve points only within their respective vertical columns and, since during vertical summation of �� (ρ, z) cancellations occur such that only the first and the last vertical fluxes are present in the resultant expression for PGF, one can rearrange the order of operation of vertical integration and horizontal differencing and evaluate P at all ρi,k locations first, using
    equation image
    then
    equation image
    This shows that density Jacobian is just a special form of straightforward discretization of σ-coordinate PGF that naturally appears to be in the form of a P derivative along a σ surface and compensating hydrostatic term, which is the product of ρ and coordinate slope (A B-grid version of (2.15)(2.16) appears in the work of Gerdes [1993], which in effect brings that study into the framework discussed here.).
  6. In (2.15)Pi,N is pressure in the middle of the topmost grid box, where a special formula must be used (similarly, PGF at the topmost grid box cannot be computed via regular Jacobian scheme because this would require values of ρ above or at the surface that are not available). POM/SCRUM simply use the nearest available value ρi,N,
    equation image
    which is equivalent to the assumption that ρ is vertically uniform within the topmost grid box. In terms of the resultant PGF at the topmost grid box, this assumption neglects the hydrostatic compensation term, effectively neglecting the σ-coordinate slope within the topmost grid box. A more accurate treatment of the topmost grid box is given by (A21) in Appendix A.
  7. Representation of (2.3) in pseudo-flux form (2.11)(2.12) and in σ-coordinate primitive form opens the possibility to proof that a model which uses this PGF discretization and a second-order centered advection scheme for the density equation is energetically consistent in the sense that it conserves exactly the sum of discrete kinetic and potential energy [Song and Wright, 1998]. This property is often invoked as useful for long-term stability of integration. The practical usefulness of this property, as well as the possibility to extend its proof to higher orders of accuracy, will is discussed later.

3. Weighted Jacobian of Song [1998]

[11] Song [1998] proposes replacing equal-weight vertical averages in (2.3) with weighting according to

equation image

where α and β ≡ 1 − α are chosen from the condition that the scheme is able to produce exact dynamic PGF at the location

equation image

if ρ is a bi-linear function of x and z. This choice results in α = equation image − ϵ, β = equation image + ϵ, where

equation image

which is (2.15) from Song [1998], rewritten in our notation.

[12] The weighting (3.1) destroys the antisymmetry property (2.4) of the original Jacobian, as well as the possibility to rewrite it into diagonal, pseudo-flux, and sigma-coordinate primitive forms. Hence, it is no longer possible to prove energetic consistency in a manner similar to Song and Wright [1998]. Also lost is the property of hydrostatic error cancellation when z2 = z3 or z1 = z4. However, the property of zero error if ρ is linear function of z is maintained. Examination of (3.3) reveals that the scheme is equivalent to (2.6)(2.8), when z* is replaced with zC, the derivation of which is evident from Figure 3.

Figure 3.

Explanation of Weighted Jacobian of Song [1998]: at each side density is interpolated or extrapolated linearly toward common level zC, which is chosen to be at the midlevel, after which the interpolated values are differenced horizontally.

[13] In retrospect one can conclude that the original equally weighted Jacobian evaluates the horizontal (along-geopotential) ρ gradient exactly at level z*, which is the level of intersection of diagonals, if ρ is a bilinear function of x and z. Therefore, contrary to the claim of Song [1998], weighted Jacobian does not offer any theoretical advantage over the standard Jacobian in the case where a more general ρ perturbation is present; instead, these two schemes correspond to just two ad hoc choices for the common level z* (or zC) to which ρ is interpolated before horizontal differencing, and they both are exact in special cases described above.

4. Sensitivity to Choice of z*: Seamount Test Problem

[14] One might guess that the difference between standard and weighted Jacobians is minor, because it is nothing more than a particular choice of the common level z*, and neither one has obvious advantage. It turns out that this is not the case, and the choice of z* produces a significant effect in practice. To illustrate this we set up a seamount test problem and run test cases corresponding to different choices of common level according to

equation image

where γ = {0, 0.1, 0.2, … 0.9, 1}; if γ = 0, the scheme is equivalent to the original Jacobian, while if γ = 1, it becomes the weighted Jacobian. The seamount problem set up is similar to that of Beckmann and Haidvogel [1993], Chu and Fan [1997], Mellor et al. [1998], and Song [1998], with a few exceptions specified below.

[15] The bottom topography is defined as

equation image

where D0 = 5000 m is the depth far away from the seamount; H = 4500 m and L = 40 km are the seamount height and width, respectively; and the model domain is 320 × 320 km wide and has horizontal boundary conditions of periodicity in x and walls in y. An f-plane approximation is made with Coriolis frequency 10−4s−1. The uniform horizontal grid resolution for the base case is 48 × 48, implying 6.7 km grid spacing. The vertical resolution for the base case is 11 nonuniformly spaced σ-levels generated by the transformation [Song and Haidvogel, 1994],

equation image

where

equation image

−1 ≤ σ ≤ 0 is discretized uniformly, and θ and θb are two nondimensional parameters controlling the vertical coordinate stretching. In all calculations performed here we use values θ = 3, θb = 0 and hmin = 500 m, which results in violation of hydrostatic consistency (2.10) with a maximum value

equation image

(this is comparable to, but somewhat smaller than that used by Song [1998] and Mellor et al. [1998]). A vertical cross section of the grid and distributions of rx and geometric parameter ϵ defined by (3.3) are shown in Figure 4. Since ϵ is well correlated with rx, it is naturally expected that method of Song [1998] deviates most from the original Jacobian where rx is the largest. Figure 4 also shows that in such places biases from equal weighting in (3.1) may be significant, especially where vertical interpolation turns into extrapolation. To examine further this correlation we note that

equation image

where ΔzL and ΔzR are grid-box heights on the left and right sides of the trapezoidal element. In the case of a separable σ-coordinate, these two are proportional to total depth D, hence

equation image

where the approximation is valid as long as DRDLDR + DL. The expression on the right is recognized as the topographic-stiffness ratio [Beckmann and Haidvogel, 1993] which relates change in topography per horizontal grid point to locally averaged depth. Since this ratio proportionally decreases with increase of horizontal resolution and rx stays the same as long as refinements of vertical and horizontal grids are proportional, one can see that ϵ decreases with grid refinement, which means that coefficients of weighted Jacobian asymptotically converge to that of the original one. This also means that in the seamount experiments, extreme values of ϵ occur on the coarsest grid and decline with refinement.

Figure 4.

Vertical cross section of grid for the seamount test problem. On the left half of the plot, elements where hydrostatic consistency criterion is violated are shaded according to their value of rx defined by (2.10), and color scheme below (with corresponding values shown above color bar). Shading on the right half of the plot shows values of geometric parameter ϵ defined by (3.3).

[16] The initial ρ profile is defined by

equation image

where, as in the more oceanographically realistic study of Beckmann and Haidvogel [1997], we chose δ = 500 m which results in twice as steeper stratification of ρ in comparison with previous idealized studies cited above. Equation (4.7) results in a Burger number,

equation image

which is a typical midrange value among those used by Beckmann and Haidvogel [1993] and Mellor et al. [1998].

[17] A horizontal Laplacian viscosity is set to 50 m2/s in all calculations presented here. This value is chosen to be comparable with that used in realistic simulations at similar resolution, and it is 40 times smaller that reported by Mellor et al. [1998], and 10 times smaller than by Song [1998]. Vertical viscosity, and horizontal and vertical diffusivities for tracers are all set to zero.

[18] Tracer advection (here for ρ) is discretized using monotonized, fourth-order, centered scheme, i.e., in order to compute advective flux at the velocity component location ui+equation image,j,k, we use an interpolation scheme,

equation image

where δρi,j,k is mean slope defined at the location of ρi,j,k using a harmonic average,

equation image

if Δρi+equation image,j,k and Δρiequation image,j,k have the same sign and

equation image

if the signs are different, and

equation image

are elementary differences of ρ. Obviously, if (4.10) is replaced with algebraic mean of equation image and Δρiequation image,j,k, then (4.9) becomes equivalent to a more familiar fourth-order interpolation scheme,

equation image

The use of (4.10) guarantees that the averaged value of slope never exceeds twice the smaller of the two adjacent elementary differences. It also makes the interpolated value equation image be always between ρi,j,k and ρi+1,j,k regardless of sharp changes in the slope of the interpolated field [cf. van Leer, 1977]. In places where the advected field ρi,j,k is sufficiently smooth, these consecutive differences are comparable, and the difference between algebraic and harmonic means disappears, making the scheme behave like a fourth-order accurate scheme. In the next section we will discuss the effect of using harmonic averaging in more detail. The ρ advection used here is nondissipative, since neither explicit diffusion nor an upstream-biased advection scheme is used.

[19] The present setup differs substantially from all similar previous studies in two aspects:

  1. We do not subtract any background ρ(z) profile when computing PGF; rather the full in situ ρ is used.
  2. Our primary criterion in evaluating the results is not the initial hydrostatic error, but rather long-term behavior of the solution. Therefore we carry out all our test runs to relatively large time of 6 months, which is sufficient to ensure that there is no further error growth (typically the duration of the test runs was 5, 10, 20 and 30 days in the previous studies cited here).

[20] In our seamount experiments we compute time histories of the following quantities:kinetic energy,

equation image

barotropic kinetic energy fraction,

equation image

where ℰbar is barotropic kinetic energy,

equation image

maximum velocity,

equation image

maximum barotropic velocity,

equation image

maximum baroclinic velocity,

equation image

(In (4.14)(4.19) above Δ��i,j,k, equation image, and equation imageare control volumes of ρ and velocity component grid boxes,

equation image

is total volume of the domain,

equation image

are barotropic velocity components, and

equation image

are barotropic control volumes.)

[21] From our experiments we find four of these quantities, equation imagekin, fbar, Vmax, and ∣V −〈V〉∣max, as the most informative, Figure 5 Behavior of the remaining equation imagebar and 〈Vmax qualitatively follow equation imagekin and Vmax, hence we chose not to report them. We might also report on the baroclinic part of kinetic energy,

equation image

but it is redundant with (4.14) and (4.16), since equation imagebcn = equation imagekinequation imagebar.

Figure 5.

Time histories of net kinetic energy equation imagekin; fraction of barotropic kinetic energy equation imagebar/equation imagekin; maximum velocity Vmax; and maximum baroclinic velocity ∣V − 〈V〉∣max for a coarse-resolution Seamount test problem on a (48 × 48 × 11 grid) for different values of weighting parameter γ. Solid lines are for 0 ≤ γ ≤ 0.5, dashed are for γ > 0.5. Bold lines are for γ = 0 (POM Jacobian), γ = 1 (weighted Jacobian of Song [1998]) and γ = 0.5 (“optimum” weighting). Note that baroclinic velocity error is relatively insensitive to the choice of γ, and after long-term integration the error becomes predominantly barotropic.

[22] Since ideally the fluid should remain at rest, values above zero should be interpreted as due to numerical errors, Figure 5 leads to the following observations:

  1. The overall level of error after long time exceeds by at least one order of magnitude the initial hydrostatic PGF error (measured by holding the ρ field at its initial state and then running the model in a so-called diagnostic regime, resulting in velocity field geostrophically balanced with spurious PGF).
  2. The long-term error is predominantly barotropic, with 90% of total kinetic energy. Compared to barotropic energy, the energy of the baroclinic component (not shown) and maximum baroclinic velocity error show lesser sensitivity to the choice of z*. Furthermore, evolution of baroclinic error shows evidence of advective compensation [Mellor et al., 1998], so that after initial growth it reaches a maximum and then relaxes to a smaller level. No such compensation occurs for the barotropic error measures.
  3. The results show a major sensitivity to the choice of z*, with total velocity error differences among the cases as much as factor of 4 and error kinetic energy one order of magnitude.
  4. γ = 0.5, which corresponds to the “half-and-half” blend of standard and weighted Jacobians, clearly shows the optimum levels of error by all measures.

[23] The first remark partially explains the fact that many attempts to introduce better PGF schemes failed to produce a practically useful result: most of the effort was spent in trying to improve accuracy of hydrostatic balance, while the error level in realistic simulations is controlled primarily by the behavior of the whole model, including not only PGF, but also tracer advection scheme, forms of diffusivity, and viscosity operators.

[24] This might suggest that the solution to the PGF error dilemma lies in the consideration of energetic consistency, which links the design of PGF discretization with the form of advection scheme for tracers [Mesinger and Arakawa, 1976; Janjic, 1977; Arakawa and Suarez, 1983; Michailovich and Janjic, 1986; Song and Wright, 1998] (Song and Wright [1998], contains proof of energetic, momentum, and bottom torque consistency for the standard Jacobian only. No such proof is available for the weighted Jacobian.). This consideration appeals to the fact that in a stratified fluid ρ is redistributed predominantly by vertical velocity, and since vertical velocity is obtained from divergence of horizontal velocities, which in turn is controlled by the horizontal PGF, failure to obtain cancellation of potential and kinetic energy conversion terms (the “omega-alpha” terms [Janjic, 1977]) for the discretized of ρ and momentum equations may cause computational instability (In the case of linearized momentum equations, the only mechanism for changing ρ is due to interaction of background stratification and vertical velocity. This is often the dominant mechanism in the general case too.). As the result, the discrete computation of P from ρ is linked with vertical interpolation of ρ to compute vertical advective fluxes. This relation exists in any model, including those with a z-coordinate. However, in addition to that, due to coordinate slopes in a σ-model, there is a similar link between midpoint interpolations of ρ in along-σ directions in PGF and horizontal advection schemes (cf. (A13) in Appendix A). However, experience to date shows that in practice an energetically consistent pair of PGF and advection schemes can be easily defeated in terms of error level by an energetically nonconsistent pair (e.g., Beckmann and Haidvogel [1993], as well as experience reported here). Another difficulty here is that analytical proof of energetic consistency is possible only for relatively simple schemes for advection and PGF, and for idealized linear Equation of State of seawater.

[25] The existence of γ corresponding to the minimal error and optimality of the half-and-half blend is very striking, especially after similar behavior was observed in different model configurations (e.g., Figure 6, where grid resolution is doubled in comparison with Figure 5, and γ = 0.5 still maintains its one-order-of-magnitude edge over γ = 0 or 1). After discovering this phenomenon, practical oceanic modelers did not waste any time in search for its explanation before putting it to use, making it by far the most heavily used PGF scheme in the SCRUM/ROMS community (ROMS—Regional Oceanic Modeling System.). Yet, it has to be emphasized that this choice has no mathematical foundation and is purely empirical in its nature, for example there is no reason to expect that γ = 0.5 will be universally optimal for any combination of stratification, bottom topography and grid resolution.

Figure 6.

Time history of total energy equation imagekin for Seamount test problem on 96 × 96 × 22 grid (all conditions are the same as in Figure 5, except the grid resolution).

5. A Density-Jacobian With Monotonized Cubic Polynomial Fits

[26] Sensitivity to the choice of z* as well as consideration of alternative forms of density Jacobian lead us to a conclusion that all means to solve the σ-coordinate PGF problem, while staying within the second-order accurate methods, have been exhausted without producing a decisive result. In this section we seek an extension of the Jacobian scheme to higher orders of accuracy. As shown before, the original second-order Jacobian retains a high degree of symmetry and can be equivalently represented in several different forms. Since it is unlikely that a high-order scheme would retain all these symmetries, different versions may be derived depending which second-order prototype is used as the starting point.

[27] We find that a particularly attractive path is to start with the pseudo-flux form (2.11) stemming from Green's theorem (2.14). The proposed approach is based on cubic polynomial reconstruction for z and ρ and subsequent analytical integration. Therefore, our goal is to compute

equation image

where �� is the shaded area in Figure 7. This problem is equivalent to computation of the contour integral,

equation image

which consists of four segments, two along the side facets,

equation image

and two along the upper and lower facets,

equation image

In both cases integrals are understood as line integrals and (ξ, s) are the transformed curvilinear coordinates onto which the physical coordinates (x, z) are mapped. In the case where both ρ and z are approximated by segments of linear functions, analytical integration of (5.3)(5.4) leads to (2.11).

Figure 7.

Stencil for pressure-gradient scheme with cubic polynomial fits. Bullets indicate ρ and z points involved in computation of integral of equation image over shaded area. Because cubic interpolation is used to reconstruct coordinate lines, this appears to be a smooth version of Figure 1.

[28] The next possibility is to use 4-point cubic Lagrange polynomial fit for ρ, which passes exactly through points ρi,k−1, ρi,k, ρi,k+1, and ρi,k+2 (z is treated similarly), and then integrate analytically between the points ρi,k and ρi,k+1:

equation image

where

equation image

Here we introduce a local fractional coordinate ξ ∈ (−equation image; +equation image) for the distance between the points. The coefficients (5.6) coincide with fourth-order approximations for midpoint value f(0) and first derivative f(1) and second-order approximations for the second f(2) and third derivatives f(3); this is sufficient to approximate the integral,

equation image

with fourth order of accuracy. An obvious drawback of this approach is that it is not guaranteed that the right-side limit of the first derivative of the polynomial segment used between points k and k + 1 matches the left-side limit of segment between k + 1 and k + 2 (since these polynomials are obtained from different quartets of points). We therefore abandon the requirement that the cubic polynomial fit pass exactly through extreme points of its stencil, and instead demand that derivatives at ξ = ±equation image are equal to prescribed values equation image (whose approximation will be separately specified). This leads to an alternative set of coefficients for (5.5),

equation image

It can be verified that (5.5)(5.8) guarantees that

equation image

[29] Substitution of polynomial fits (5.5) for both ρ(ξ) and z(ξ) into integrals (5.3)(5.4) and integration yields

equation image

which can be used in conjunction with either (5.6) or (5.8).

[30] After substitution of expressions for ρ(0) … ρ(3) and z(1)z(3) via (5.8), (5.10) becomes

equation image

where

equation image

The terms in curly brackets in (5.11) can be interpreted as high-order correction to the trapezoidal integration rule used in (2.11). The remarkable antisymmetry of these terms stems from the property

equation image

leading to exact antisymmetry of the discrete Jacobian,

equation image

now extended to potentially higher orders of accuracy.

[31] The formulation of the PGF algorithm (5.2), (5.3), (5.4), and (5.11) is now complete, with the exception that application of (5.11) requires an estimate of derivatives equation image and equation image These can be computed, for example, from the condition of continuity of the second derivatives using cubic spline formalism, which leads to a tridiagonal problem

equation image

where j = 1, …, N is either horizontal or vertical grid index. This results in a compact fourth-order interpolation, which is generally more accurate than conventional finite difference methods [McCalpin, 1994; Chu and Fan, 1997] as long as the interpolated fields are sufficiently smooth on the grid, but, as we will soon demonstrate, it is prone to oscillations and is not robust if there are sudden changes in gradient of the field from one grid interval to the next. In the simplest case derivatives equation imageare estimated as finite differences,

equation image

where

equation image

are the elementary differences on the left and right sides from point equation image. Substitution of (5.16) into (5.8) leads to the same expressions for f(0) and f(2) as in (5.6), and consequently the same integral approximation (5.7). However, f(1) and f(3) are different; moreover, f(1) in (5.8) using (5.16) approximates the first derivative with only second-order accuracy, while f(3) is off by a factor of 3 in comparison with the corresponding value from (5.6). Although the polynomial fit defined by (5.5)(5.16) already produces fourth-order accuracy, it has the disadvantage of producing spurious oscillations if the grid values are not smooth.

[32] If alternatively to (5.16) we define

equation image

as long as Δ+ and Δ have the same sign, and

equation image

if Δ+Δ ≤ 0, then it is guaranteed that both equation image and equation image have the same sign as equation image equation image and

equation image

i.e., at least no more than 2ȣequation imageequation image∣ in both cases, which is sufficient to prove that the first derivative of cubic polynomial fit (5.5)(5.8),

equation image

maintains its sign to be the same as equation imageequation image throughout the whole interval of ξ within its area of definition,

equation image

In its turn, it guarantees that

equation image

regardless of the values equation image and equation image at the extreme points of the stencil.

[33] Another advantage of (5.18) over (5.16) is its ability to “absorb” nonuniformity of the grid without loss of accuracy in a manner described by Treguier et al. [1996]. Suppose that discretized field {ρk, k = 1, N} is defined at locations {ρk, k = 1, N}, such that equation imagezk+1zkequation imagezkzk−1. Then the second-order accurate approximation for ∂ρ/∂z at location k is

equation image

which is derived by assuming a parabolic fit for ρ = ρ(z) (such that it produces exact values of ρk−1, ρk and ρk+1 in their respective locations), analytically differentiating, and substituting z = zk. Since

equation image

(5.16) leads to

equation image

which is only first-order accurate because it evaluates the derivative at the location (zk+1 + zk−1)/2 rather than the desired zk. Similarly, (5.25) in conjunction with (5.18) leads to

equation image

where equation image and equation image = ρk+1 − ρk are elementary differences of z and ρ respectively. For the purpose of analysis of (5.27) we assume that field ρ = ρ(z) is locally represented as the sum of linear background and small perturbation,

equation image

and prove that under such conditions (5.27) agrees with (5.24) within second-order accuracy.

[34] Substitution of (5.28) into (5.24) yields

equation image

where we have introduced

equation image

[35] Substitution of (5.28) into (5.27) yields

equation image

so far without any approximation. Now we assume that the second term in square brackets is much smaller than the preceding 1 and apply a Taylor expansion,

equation image

retaining only linear terms with respect to Δρ′:

equation image

which then can be easily transformed into (5.29). In its turn, this verifies that harmonic averaging of elementary differences (5.18) results in second-order accurate evaluation of the first derivative on a nonuniform grid as long as the approximated function is smooth in the sense that change of its first derivative within two consecutive unequal grid intervals is small relative to the derivative itself.

[36] Cubic spline (5.15), algebraic (5.16), and harmonic (5.18) averaging require boundary conditions for the interpolated fields, since their respective formulas cannot be applied near the boundaries directly. These boundary conditions arise from the need to use an extended stencil (in comparison with basic second-order schemes) and are essentially artificial; this is a common problem for high-order discretizations. In principle, these boundary conditions can be avoided by shortening the stencil near the boundary, which is equivalent to lowering the order of accuracy there. Lateral boundaries present somewhat lesser difficulty since one often applies Neumann (no-normal-gradient) conditions to the elementary differences ρi+1,j,k − ρi,j,k on the coast line, which are typically implemented via an appropriate masking rules for a coast line of arbitrary shape. These boundary conditions are physically justifiable even in a stratified case, if it is implied that the corresponding differences zi+1,j,kzi,j,k also vanish, hence differencing of ρ is horizontal, and no-normal-gradient is physically consistent with no-flux lateral boundary conditions for heat and salt. Vertical boundaries are more difficult to treat, especially near the bottom, because grid resolution is often coarse, and physically justifiable conditions are elusive. In this case an extrapolation rule must be used near the boundary.

  1. Neumann: ∂f/∂s = 0 at locations corresponding to equation image and equation image i.e., on the physical boundaries of the domain, which are at half-intervals outside fN and f1, respectively,
    equation image
    equation image
  2. Linear extrapolation: ∂2f/∂s2 = 0 at locations of fN and f1),
    equation image
    equation image
    where we have assumed that all quantities on the r.h.s. are known.

The use of (5.34)(5.35) is justified only if Neumann boundary conditions are physically justified; otherwise, the use of (5.34)(5.35) can be interpreted as formal reduction of order of accuracy (to the first order) near the boundary. Similarly, (5.36)(5.37) is equivalent to assumption of a linear distribution of the interpolated field within the grid box adjacent to the boundary, which is formally second-order accurate. In principle, formally more accurate extrapolation formulas can be derived; however, according to our practical experience, going beyond second-order accuracy near the boundary makes the resultant algorithm extremely nonrobust in the case of coarse resolution. Note that harmonic averaging (5.18) guarantees that

equation image

and that dN−1 has the same sign as fNfN−1. Therefore (5.36) guarantees that (1) dN always maintains the same sign as both fNfN−1 and dN−1, and (2) dN does not exceed equation image (fNfN−1), regardless of nonsmoothness of grid data within the three points adjacent to the boundary.

[37] Figure 8 compares density profiles ρ(z) reconstructed by the three interpolation methods discussed here for the case of step-like profile. As expected, on a hydrostatically inconsistent grid, interpolation along σ-slope results in greater vertical distances between grid points (Figure 8, second column), making it more difficult for the interpolation scheme. As the result, spline and algebraic averaging tend to oscillate, while harmonic averaging produces a robust (though not very accurate) monotonic profile.

Figure 8.

Comparison of three interpolation methods for a step-like profile: upper row—both z and ρ are interpolated as functions of s or ξ using cubic (5.15); black dots correspond to the actual data points; solid curves represent interpolated profiles, and dashed—the exact profiles. middle row—local cubic polynomial based on algebraic averaging of elementary differences (5.16). bottom row—using harmonic averaging (5.18). Left column—interpolation in vertical direction; right column—interpolation along σ-slope across the location of extreme rx in Figure 4 resulting in a more concentrated placement of points near the bottom, where σ-surfaces tend to be more horizontal, but effectively coarser resolution near the thermocline; the uppermost data point on the profile corresponds to the horizontal location above the top of Seamount.

5.1. Density-Jacobian Algorithm

[38] We summarize the proposed algorithm as the following sequence:

  1. Compute and store in provisional arrays elementary vertical differences of equation image = ρi,k+1 − ρi,k and equation image = zi,k+1zi,k for all k = 1, …, N − 1.
  2. Compute di,k and dzi,k, which are harmonic averages of equation image and equation image respectively, using (5.18) for all k = 2, …, N − 1.
  3. Apply boundary conditions at top and bottom to d and dz using an appropriate extrapolation rule, say (5.36)(5.37). (Once computation d and dz is complete, provisional variables Δρ and Δz are no longer needed and may be discarded).
  4. At the upper half of top-most grid box, compute and store in a provisional array,
    equation image
    (derived from the assumption of a linear profile for ρ within the upper half of the top-most grid box), after which compute and store
    equation image
    for k = 1, …, N − 1. (Once all FXs are computed, d and dz may be discarded).
  5. Compute and store elementary differences along σ-coordinates, Δ′ρi+equation image,k = ρi+1,k − ρi,k and Δ′zi+equation image,k = zi+1,kzi,k Apply masking rules to them similar to rules for horizontal velocity components;
  6. Compute di,k and dzi,k, which are harmonic averages of equation image and equation image respectively using (5.18). (Once this step is performed, discard Δ′ρ and Δ′z.)
  7. Compute and store
    equation image
    for all k = 1, …, N.
  8. Finally, assuming that equation image ≡ 0, compute
    equation image
    and perform its vertical integration
    equation image
    for all k = N, N − 1, …, 1 (starting from top and proceeding downward), after which all FXs and FCs may be discarded (This algorithm is known as prsgrd32.F in the ROMS code.). (Since sums in (5.39) for different k can be computed recursively, there is no need to store equation image in a temporary array.)

5.2. Sigma-Coordinate Primitive Form

[39] As with the second-order Jacobian, this algorithm can be algebraically transformed into a σ-Coordinate primitive form which resembles (1.1). This implies that the Pi,k field is computed first at all ρi,k points by means of vertical integration,

equation image

and

equation image

for all k = N − 1, …, 1 going downward, after which

equation image

where equation image is computed the same way as in the previous section (This algorithm is known as prsgrd32A.F in the ROMS code.).

[40] Note that equation image has obvious similarity with the second term in the r.h.s. of (1.6), and within second-order accuracy it is interpreted simply as the product of ρ and local slope of σ-coordinate. The more accurate fourth-order scheme (5.40) computes equation image as the integral of the last term in (1.6) along the lower facet of curvilinear trapezoidal element shown as the shaded area in Figure 7. Although it produces a result algebraically identical to the algorithm described in the previous section, the present form offers some technical advantages by eliminating the need to store FCi+equation image,k in provisional arrays, since no differencing of FCs is present in (5.40). This results in a more compact code overall.

6. Further Seamount Tests

[41] Figure 9 shows time histories of all six error measures defined above in a format similar to Figure 5 Among the previously tested schemes we retain for comparison are the original γ = 0 (labeled as POM), the optimal density-Jacobian with γ = 0.5, and the Lin [1997], finite-volume method. We include two versions of our proposed schemes, one using harmonic averaging of elementary slopes (labeled Cubic H in Figure 9) and one using algebraic averaging (labeled Cubic A). At coarse resolution Cubic H shows the lowest error by all measures with a substantial edge. At the same time, Cubic A and γ = 0.5 results are comparable, consistent with the previous experience that straightforward attempts to increase the order of accuracy of the scheme do not produce any actual gain in accuracy under realistic simulation conditions like those in the present test problem. Note that the vertical grid spacing in Figure 4 reaches 1200 m near the bottom, which exceeds the e-folding scale of 500 m for the initial ρ(z) in (4.7); similarly, in places with extreme values of rx = 2.4, the vertical distance between consecutive grid points along σ-coordinate lines may reach 800 m. In both cases the consecutive differences of ρ in (5.16) may be different by more than a factor of three, which unavoidably causes oscillation of cubic interpolant and a corresponding increase of error of the PGF scheme. In contrast to Cubic A, harmonic slope averaging (5.18) used by Cubic H effectively suppresses oscillations, resulting in smallest error on the coarse grid.

Figure 9.

Same as Figure 5, but for a different set of pressure-gradient schemes. Cubic H–method described in the previous section using (5.11) as integration rule with harmonic averaging of elementary slopes by (5.18); Cubic A–the same as Cubic H, but harmonic averaging is replaced with algebraic mean (5.16); POM-POM scheme (same as γ = 0); γ = 0.5-optimum “half-and-half” blend of standard and weighted Jacobians; Lin97Lin's [1997] finite-volume method (pressure Jacobian scheme). Note that maximum velocity error Vmax is outside the plotted range for Lin97.

[42] In comparison with γ = 0 and γ = 0.5, Cubic H and Cubic A produce somewhat smaller error in the barotropic mode relative to total kinetic energy (cf. panels equation imagebar/equation imagekin and 〈Vmax, especially in the fine resolution case where equation imagebar/equation imagekin falls below 40%). This is encouraging because erroneous barotropic flow does not have tendency to decrease due to advective compensation mechanism [Mellor et al., 1998], which makes it potentially more dangerous type of error in comparison with the baroclinic one.

[43] Our results for improved PGF accuracy invite comparisons with the previously published ones [Beckmann and Haidvogel, 1993, 1997; McCalpin, 1994; Chu and Fan, 1997, 1998; Mellor et al., 1998; Song, 1998]. Doing so, however, is difficult because despite the similarity of the problem set up, crucial differences remain, and we find that the results are highly sensitive to values and forms of viscous operators used, topographic roughness parameters rD(4.6), differences in vertical grid stretching resulting in different extreme values of rx(2.10), many of which are not reported in the original papers. Producing such a comprehensive comparison is beyond the scope of this study, and we just restrict ourselves here to demonstrating the sensitivity of the velocity error to the value of the horizontal viscosity; see Figure 10, where in all cases we use the Cubic H PGF scheme. As expected, increase of horizontal viscosity results in the decrease of erroneous velocity amplitude; however most of the sensitivity occurs at early times, where the error can be easily reduced by an order of magnitude by choosing viscosity well within the range of that is reported in the literature cited above. Long-term error exhibits a somewhat weaker sensitivity, and increasing viscosity does not decrease the error as much as at early times. We believe that this is partly attributable to the form of discretized viscous operator, which itself can produces spurious currents. (In all computations presented here we used a lateral viscous operator in form of symmetric stress tensor, Shchepetkin and O'Brien [1996], which is also similar to that of POM, but not of Beckmann and Haidvogel [1993, 1997] and McCalpin [1994].)

Figure 10.

Sensitivity of equation imagekin to viscosity. Labels ν = 25, 50, …, 1600 at the end of each curve indicate value of viscosity in m2/s. Diagnostic-in this test run density field was kept constant, resulting in flow geostrophically balanced with spurious pressure gradient. This error level provides comparative measure of the error in hydrostatic balance for the initial density field. Grid resolution is 48 × 48 × 11.

[44] In all cases the levels of energy are at least one order of magnitude higher than that of geostrophically balanced flow caused by the hydrostatic error produced by initial ρ field, which supports a primarily dynamic cause for the errors shown in Figures 5 and 9.

7. Effect of Seawater Compressibility

[45] Most previously known PGF schemes, including standard and weighted Jacobians, Lin 97, etc, are linear algorithms in the sense that an additive change to a given set of density values {ρk} causes an additive change in the reconstructed profile equation imagek] and the pressure gradient,

equation image

where {ρ(1)i,j,k} and {ρ(2)i,j,k} are two arbitrary sets of grid-box values. This property is a basis for the common practice in σ-modeling of subtracting a predefined background stratification from in situ ρ in order to reduce PGF errors. However, the property (7.1) is no longer valid for algorithms which use monotonicity constraints, such as (5.18), and, as we will see, adding or subtracting an arbitrary background ρ profile may significantly degrade the accuracy of computation of PGF. Nonlinear monotonicity constraints usually detect and prevent situations where the derivatives of the reconstructed interpolants have the opposite sign to the difference of the nearest adjacent grid point values. Taking into account the compressibility of seawater causes difficulty because the only physically meaningful principle of monotonicity here is positive gravitational stability of a stratified fluid, which is not equivalent to maintaining the sign of the derivative of the reconstructed in situ ρ profile.

[46] The Equation of State (EOS) for seawater, e.g., Millero et al. [1980], is usually written as

equation image

where ρ, T, S and P are in situ density, temperature, salinity, and pressure respectively. This equation was reformulated by Mellor [1991] and Jackett and McDougall [1995] to allow input of potential temperature, salinity, and depth instead of P,

equation image

which is more suitable for use in oceanic models because potential temperature (not in situ temperature) and salinity are the advectively conserved quantities. Replacement of in situ P by depth effectively neglects the effects of baroclinicity due to compressibility in computation of ρ by replacing g∫ρd z with gρ0z. The resultant difference is formally within the accuracy of the Boussinesq approximation and is acceptably small for any realistic oceanographic situation. In the case of an incompressible EOS,

equation image

the monotonicity constraint of the reconstruction algorithm guarantees that if all differences,

equation image

are positive, then the reconstructed profile is also everywhere positively stratified. This can no longer be guaranteed if EOS includes compressibility. The discretized (7.3) is

equation image

while the compressible analog of the stability condition (7.5) translates into

equation image

where differencing is performed in an adiabatic fashion, since ρ(θk, Sk, equation image) and ρ(θk+1, Sk+1, zk+equation image) are brought to the common level of equation image, which in the simplest case is equal to equation image (zk + zk+1). Because of this feature (7.7) is not equivalent to just

equation image

where ρk are computed by (7.6). In fact, because of compressibility,

equation image

there is the possibility that the r.h.s. can become negative while the l.h.s. remains positive.

[47] To address this problem we decompose the EOS [cf. Jackett and McDougall, 1995],

equation image

where ρ1(θ, S) is the density at the pressure of 1 atmosphere (i.e., z = 0) and K(θ, S, z) is the bulk secant modulus, which takes compressibility into account. Both ρ1(θ, S) and K(θ, S, z) are approximated by polynomial fits of θ, S, S1/2, and z. Furthermore, (7.9) may be rewritten as

equation image

where ρ0 and K0 are the leading-order, constant terms in the original polynomial fits for ρ1(θ, S) and K(θ, S, z). Since ρ′1(θ, S, z) ≪ ρ0 = 999.84 kg/m3 and K′(θ, S, z) ≪ K0 = 190,925 m, as well as zK0 for any reasonable depth within the range of 0–11,000 m, one can expand (7.10) in a Taylor series,

equation image

The first term on the second line is the usual baroclinic ρ perturbation, while the first term on the third line is the leading-order contribution to PGF due to the joint effect of compressibility and baroclinicity (commonly known as thermobaricity). All terms on the first line depend on z only, and, therefore, they should not contribute to PGF; however, as we will demonstrate, they turn out to be a major source of PGF error in σ models. In principle, both second-order Jacobian and our new scheme produce zero error, if density is a linear function of z (such as the leading term on the first line of (7.11)), but the remaining terms are nonlinear and their polynomial fits are not exact, resulting in nonzero PGF error.

[48] To illustrate the severity of the problem we set up a Seamount test problem in which temperature and salinity are set to be uniform, θ = 4°C and S = 33‰, and ρ is computed using the full EOS (7.9); thus, ρ is a function of z only and varies only due to compressibility. The results are shown on Figure 11, in a format similar to Figure 5 The overall level of errors is comparable with that on Figures 59 for similar algorithms and resolutions, with some qualitative differences in spatial distributions and temporal behavior of this new type of error, resulting in a maximum erroneous velocity of 2 and 5 cm/s for coarse-resolution implementations of the γ = 0.5 and Cubic H schemes, respectively. This indicates that the inclusion of compressibility in the straightforward way most likely causes more inaccuracy in the velocity field due to σ-coordinate PGF errors than the inaccuracy caused by unphysically neglecting compressibility effects altogether (i.e., using just ρ1(θ, S) instead of ρ(θ, S, z) from (7.9) for the purpose of PGF computation). The problem is further aggravated by the fact that there is no advective compensation mechanism [cf. Mellor et al., 1994] for this kind of error, resulting in an erroneous velocity field determined purely from geostrophic balance with hydrostatic PGF error generated by nonlinear terms on the first line of (7.11). If the Coriolis frequency is set to zero (as on the Equator), there is nothing to balance the erroneous PGF and the model becomes unstable. Unlike the case of Figure 5, now we do not observe any significant sensitivity to the choice of reference level z* (see (4.1), nor do we see any significant growth of energy of the barotropic mode.

Figure 11.

Time history of kinetic energy equation imagekin and maximum velocity error Vmax for Seamount test problem with uniform temperature and salinity (θ = 4°C and S = 33‰) using full, nonlinear compressible EOS 1. Two upper curves labeled Cubic H and γ = 0.5 correspond to the resolution of 48 × 48 × 11, grid points, while two lower curves are for the doubled resolution of 96 × 96 × 22.

[49] To cure this problem, one must somehow exclude the large terms in (7.11), which are functions of z only [cf. Mellor et al., 1994; Dukowicz, 2001]. Thus, within the accuracy of the Boussinesq approximation and for the purpose of PGF computation, we therefore can use a simplified equation of state,

equation image

which still retains a nonlinear dependency of ρ on T and S. Alternatively, one may subtract

equation image

from (7.10), which, after cancellation of all large terms yields,

equation image

which can be used as an alternative to (7.10) without any EOS approximation at all. Furthermore, one can absorb further leading terms depending only from z into K0 in (7.13), K0 = K0(0) + K0(1)z + K0(2)z2, which produces an even more accurate cancellation of the vertical ρ gradient due solely to compressibility.

[50] A ρ field computed by (7.12) or (7.14) can be considered to be the dynamically relevant density, since it retains only terms which have a nontrivial contribution to the PGF. In both cases an effort has been made to remove the dominant terms which cause the distinction between adiabatic (7.7) and in situ (7.8) ρ gradients, and therefore they are more appropriate for use in a monotonicity-preserving reconstruction algorithm. To demonstrate the practical consequences of replacing (7.10) with (7.12) and (7.14), we compute ρ using the realistic data shown on the left in Figure 12 using incompressible EOS (7.4) and three different versions for treatment of compressibility, (7.9), (7.12), and (7.14). In this example the vertical gradient of in situ ρ is at least one order of magnitude greater than the adiabatic gradient below z = 500 m depth. Although reasonably close in the upper 500 m, vertical derivatives of the newly introduced quantities may differ significantly from the desired adiabatic derivative in the abyssal part and may even have a different sign, which makes them unsuitable for the use in a monotonicity-preserving reconstruction algorithm (The fact that it is impossible to define a field whose spatial derivatives are equivalent to adiabatic derivatives of in situ ρ (i.e., a globally defined potential density) is discussed by Jackett and McDougall [1995]. They show that “potential density” may be defined only locally in the context of adiabatic differentiation.).

Figure 12.

Left—An example of typical measured profiles of in situ temperature, salinity, and potential density (with the effect of compressibility removed and ρ0 = 1000 subtracted). These profiles are measured within CalCOFI domain off the California coast. Courtesy of John Moisan. Middle—Effect of compressibility in different versions of EOS: thick solid line–ρ1–density with effects of compressibility removed (this is the same profile on the left); thin solid line–ρ–density in situ using full nonlinear EOS (7.9); dotted line–simplified EOS (7.12) with linearized compressibility effect; dashed line–-dynamically relevant density ρ − ρbak defined by (7.14). Right—Vertical derivatives of the corresponding profiles in the middle computed using simple finite differences for all cases, except for in situ density ρ (thin solid line), where adiabatic differencing (7.7) is used instead. Note stepped horizontal scale.

[51] The fundamental limitation of the techniques described thus far is that they rely upon additive cancellation of errors by subtracting an a priori chosen function of z from ρ, which is assumed to be close enough to the actual in situ ρ. Hence, errors may be reduced significantly but not eliminated completely, and the whole approach remains too sensitive to the choice of global parameters such as ρ0, K0 (which implicitly depend on globally chosen reference values for potential temperature and salinity). We therefore are motivated to develop a new EOS representation which does not rely on such cancellation. To do this, we first note that

equation image

which translates into

equation image

where

equation image

are thermal expansion and saline contraction coefficients defined (by EOS) in the usual thermodynamical sense, and P = gρ0z is hydrostatic pressure. Equation (7.16) has an advantage over computing in situ ρ via EOS and then using it to compute equation image (ρ, z) because the nonlinearity of EOS (associated with nonlinear θ- and S-dependency as well as with compressibility) no longer contributes to errors of hydrostatic balance in the discretized Jacobian. Equation (7.16) generates no erroneous flow if θ and S are spatially uniform (e.g., as in Figure 11).

[52] The remaining problem with (7.16) is the fact that it does not prevent spurious oscillations of the interpolated potential density, even if a nonoscillatory algorithm is used to interpolate θ and S (This may occur, for example, if gradients of θ and S tend to cancel each other in the sense of α∇θ − β∇ S ≈ 0, so that a nonoscillatory interpolation algorithm applied to θ and S separately does not “feel” the nonsmoothness of potential density field in a situation where consecutive differences are much larger for θ and S than for potential density.). And it almost doubles the computational cost, because two Jacobians are required. To address the first issue and to mitigate the cost, we note that the flux-difference algorithm (2.11) along with a cubic polynomial fit (5.11) and harmonic averaging (5.18) can be expressed entirely in terms of elementary differences of ρ,

equation image

and similar differences of ρ values adjacent in the horizontal (along-σ, with indices i + 1, k and i, k) and diagonal (i + 1, k + 1 and i, k) directions. This is evident from the fact that all terms in curly brackets in (5.11) already depend only on such differences, and any combination of the preceding terms—the second-order fluxes (2.12)—can be rewritten into the diagonal Jacobian (2.5), which contains only simple diagonal differences but no midpoint averages. Then (7.16) can be discretized by replacing elementary ρ differences with adiabatic differences,

equation image

which are harmonically averaged in a manner of (5.18), hence enforcing the nonoscillatory property of the cubic interpolant (5.11) and maintaining the sign of the stratification.

[53] The algorithm just described bypasses computation of ρ completely at the expense of the need to compute two fields, α and β as functions of θ, S, and z. Although it does not involve any approximation to EOS, the passive compressibility terms (cf. (7.11)) are “differentiated out” at the stage of replacing ρin situ with α and β. The computational cost is still very high, in part because of extra work the modified PGF algorithm due to replacement of elementary ρ differences with adiabatic ones via (7.19), and, more significantly, in the EOS part, where the cost is doubled because both α and β are approximately as expensive as ρin situ. Therefore, we seek practical simplifications that efficiently capture the dynamical effects of compressible EOS. We first note that (7.10) can be approximated by an expansion [cf. Sun et al., 1999],

equation image

with, in principle, an arbitrary accuracy, depending on the value of nmax, and (7.12) can be viewed as the simplest truncation with nmax = 1. A detailed assessment of the accuracy of this truncation relevant to the PGF computation—i.e., the ability to produce accurate α and β—is given in Appendix B. We furthermore note that for each n taken separately,

equation image

hence,

equation image

which can be used as an alternative to (7.16) or to the straightforward computation of PGF from in situ ρ. On the other hand,

equation image

so instead of first computing in situ ρ [or any substitute quantity for it in the framework of (7.12)(7.14)] and then using it for computation of horizontal ρ gradient, we can directly compute the contribution from each individual qn term in �� (ρ(θ, S, z), z).

[54] A remarkable consequence of (7.23) in the case n = 1 is that a linear combination of discrete Jacobians,

equation image

vanishes identically if q1 itself is a linear function of z, even if both Jacobians in the r.h.s. fail to vanish if taken separately. This leads to a replacement of pseudo-fluxes (2.12) with

equation image

where prime and double prime stand for the corresponding pairs of indices 21, 42, 43, and 31 in (2.12) (An identical result may be obtained by analytical integration of quadratic fit [q′ (z″ − z) + q″ (zz′)] z/(z″ − z′) over the interval from z′ to z″.). The resulting scheme produces no PGF error, not only if ρ is a linear function of z (as in the case of second-order Jacobian), but also if q1 is linear in z, hence in situ density ρ1 + q1z is quadratic in z, even though we use the same 2 × 2-point stencil of the second-order scheme. This property is especially valuable since most of the PGF errors associated with compressibility occur in the abyss, where one cannot rely solely on the order of accuracy of the PGF scheme because the vertical resolution is typically quite coarse there.

[55] We now describe modifications to the Cubic H algorithm in the case of compressible EOS (7.20) that prevent spurious negative stratification due to oscillation of cubic polynomial fits for ρ. For the sake of simplicity and computational efficiency we restrict ourselves to the choice of nmax = 1 (The method described here can easily be generalized to the case of nmax > 1 in EOS (7.20) by computing elementary adiabatic differences and the compressible term in (7.26) via

equation image

and

equation image

To illustrate the practical accuracy of this choice, we note that the adiabatic derivative of (7.20) (cf. (7.7)) with respect to transformed coordinate s (similarly ξ) is

equation image

where the contribution of all terms under summation is expected to be much smaller than the leading term on the r.h.s. This is manifested by the fact that these terms are responsible for the difference between the thick and thin solid lines in the right panel of Figure 12, and these two lines are very close to each other. This leads to the approximation of adiabatic differences (7.19) with

equation image

which in turn can be used to estimate in situ ρ derivatives at the nonstaggered locations,

equation image

which are needed by (5.11) in order to compute pseudo-fluxes using cubic polynomial fits. The first r.h.s. term is harmonically averaged adiabatic differences of ρ. As in the case of (5.18)(5.19), this term is reset to zero if equation image and equation imagehave opposite signs. Since the same harmonic averaging algorithm is used for both vertical and horizontal (along σ) directions, different signs may occur even if the stratification is positive everywhere. (The expressions for adiabatic differences in the horizontal direction are exactly the same as the vertical ones, except that the index i gets increments ±1, while the index k is kept constant.) The second term in the r.h.s. of (7.26) is proportional to the gradient of ρ caused by compressibility and P changes in a neutrally stratified fluid. This adiabatic gradient separates positive and negative stratification, so that replacing the harmonic averaging (5.18) with (7.26) changes the monotonicity constraint (5.20) into

equation image

where di,k is the in situ ρ derivative, di,k(0)image

equation image

and the function minmod is equal to the smallest of its arguments by absolute value, if all of them have the same sign, or zero, if the signs are different.

[56] The new compressible EOS PGF scheme differs from the original Cubic H scheme only in the procedure of computing ρ derivatives via harmonic averaging of adiabatic differences (7.26), while all subsequent steps in the algorithm remain the same. This method has the following properties:

  1. PGF error due to compressibility of seawater with uniform θ and S has been eliminated completely, regardless of particular choice of reference values ρ0, K0, etc. Hence, it is not necessary to repeat the experiment of Figure 11 using the new approach;
  2. Unlike ρ(θ, S, z), both ρ′1(θ, S) and q1(θ, S), do not explicitly depend on z which allows us to split the derivative of in situ ρ into adiabatic and compressible parts. Hence, a straightforward application of harmonic averaging (5.18) to the adiabatic term guarantees positive stratification along the interpolated profile as long as the discrete values are positively stratified.
  3. The computational cost of this new PGF scheme and the associated EOS does not exceed significantly the cost of the original Cubic H scheme and EOS.

8. Realistic Tests for the Atlantic Ocean

[57] In order to illustrate the practical effects of the new PGF scheme and alternative treatment of compressibility, we include results from several realistic Atlantic Ocean simulations. The model bathymetry shown in Figure 13 is the same as in the work of Haidvogel et al. [2000], with 3/4 degree spatial resolution and S-coordinate stretching parameters ϑ = 5, ϑb = 0.4, and hmin = 200 m, which translate into a maximum topographic “r-factor” of 0.195 and a maximum σ-grid stiffness ratio of rx = 3.82. Hence, despite its relatively smooth appearance, this model topography causes a strong violation of the hydrostatic consistency criterion and a relatively large change of bottom depth per horizontal grid interval compared to common σ-modeling practices. The test results reported here may be also considered as verification of robustness of the newly designed algorithm with respect to coarse vertical resolution and a nonsmooth ρ field, which has been recognized as a major concern for PGF schemes with higher than second-order accuracy [Kliem and Pietrzak, 1999].

Figure 13.

Model Bathymetry for a 3/4 degree-resolution Atlantic Ocean simulation.

[58] For the flat-stratification test problem, the wind stress and surface heat and fresh-water fluxes are set to zero, and we choose a horizontally uniform potential temperature profile (in °C),

equation image

and a uniform salinity S = 35‰. The amplitude and e-folding scales for this profile are representative of an instantaneous profile in a selected location in the tropical Atlantic (where, as we will see, the largest PGF errors occur), rather than basin-scale averaged profile. We believe that this is more appropriate, since PGF errors are controlled by local profiles, while a horizontally averaged profile tends to be much smoother. (For a similar test, Mellor et al. [1994] chose an e-folding scale of 1000 m, which is also comparable with horizontally averaged profiles reported by Haidvogel et al. [2000].) A comparison of our idealized profile with measurements is shown in Figure 14. Note that our profile has comparable abyssal stratification, thermocline depth, and steepness of transition from the abyss to the thermocline. The advection scheme for material tracers is 4th-order, centered, and with harmonic averaging of elementary differences—similar to that for the Seamount problem. There is no material diffusion of any kind, neither vertical, horizontal, nor implicit via upstream-biased advection. A 4th-order centered scheme is used for momentum advection. The horizontal viscosity is 500 m2/s.

Figure 14.

Potential temperature cross-section at 30°W: left—from Levitus data; right—profile (8.1) for flat stratification tests. In both cases the contour interval is 1°C.

[59] The flow pattern after a 60-day spin up using POM Jacobian (γ = 0) and realistic EOS with compressibility turned OFF is shown in the top-left panel of Figure 15. We find that the maximum errors for this test problem (as well the other tests reported later) occur between depths of 1000 to 1500 meters, so we choose 1500 meters as the representative level to display. The error pattern on the top-left panel is typical for σ-models. It is characterized by spurious flow along topographic slopes especially near the Equator. The error is around 3 cm/s near the Gulf-Stream area and off the North-American coast. We see a visualized mid-Atlantic ridge, closed circulation in the Caribbean abyss, and strong jets along the Equator. The largest errors occur off the Brazilian coast near Equator, 15 cm/s, which is not surprising, since stronger currents are required to achieve geostrophic balance with a given spurious PGF at lower latitudes. The weighted γ = 0.5 scheme produces comparable, but approximately 40% larger, currents and an overall similar error pattern in this test (Figure 15, top right). Remarkably, the direction of spurious currents is reversed in comparison with the γ = 0 results. Varying the weighting factor reveals an optimal choice of γ = 0.21 for minimum mean error. This is similar to the Seamount problem experiments, except that here the optimal value is different, indicating that there is no universally optimal choice. Finally, the Cubic H scheme (Figure 15, lower left) results in a dramatic decrease of errors and an overall change in the error pattern. It is no longer possible to see coherent currents along topographic slopes and mid-Atlantic ridge. The largest errors still occur near Equator, but now the flow pattern there has a more random character.

Figure 15.

Spurious currents from a flat-stratification, pressure-gradient error test problem for a realistic bathymetry Atlantic Ocean model configuration after 60 days of simulations, starting from rest initial condition. In all three cases shown here, EOS compressibility effects were turned OFF completely by setting ρin situ (θ, S, z) = ρ1(θ, S); Velocity scale is in cm/s; vectors with magnitude smaller that 0.05 cm/s are not shown. Top–left—POM Jacobian (γ = 0); Top–right—γ = 0.5-scheme; Note that for γ = 0 and 0.5 flow directions are opposite near Brazilian coast, where the largest errors occur. Lower–leftCubic H pressure-gradient algorithm.

[60] Turning compressibility back ON causes a dramatic increase of errors almost everywhere, which is manifested by appearance of currents along topographic slopes (Figure 16, top left). Although still, with somewhat smaller amplitude, the compressible Cubic H errors are more comparable with that for the second-order γ = 0 and γ = 0.5 schemes, rather than for the Cubic H case shown in the previous incompressible Figure 15. Again, the most significant errors occur near the Equator. There is no advective compensation mechanism for PGF errors generated by a vertical ρ profile due to compressibility of seawater with uniform θ, S. Consequently, this kind of error may be balanced only by Coriolis or viscous forces. Subtraction of the dominant part of the mean passive compressibility term, ρ0/(1 − ∣z∣/K00), reduces the error to some extent, but it fails to produce any significant benefit in the Equatorial region (Figure 16, top right). On the other hand, splitting EOS into an incompressible part and a term proportional to depth (7.20) and computing derivatives of ρ via harmonic averaging of adiabatic differences (7.26) avoids any noticeable increase of error associated with compressibility (Figure 16, lower left).

Figure 16.

The same as in Figure 15, except that now Cubic H-family algorithms are used in combination with different treatment of compressibility: top–left—EOS (7.9) retaining all nonlinear compressibility terms; top-right-same as on the left, but most of the passive vertical density gradient is removed by subtracting ρ0/(1 − 0.1∣z∣/K00) resulting in (7.14); lower–left—modified Cubic H algorithm in combination with EOS split into incompressible and compressible parts ρ = ρ1(θ, S, z) + q1(θ, S, z)∣z∣, thus allowing computation of derivative of density via harmonic averaging of adiabatic differences (7.26); lower–right—control experiment where EOS is the same as on the left, but ρ1 and q1 terms are combined at the stage of computation of in situ density, which is then used in the original nonsplit version of Cubic H. This is equivalent to just linearization of compressibility effects.

[61] One might suggest that this reduction of error, in comparison with a straightforward computation of PGF using in situ ρ, is explained mainly by the effective linearization of compressibility effects in the first-order truncation of (7.20) with nmax = 1. To explore this possibility, we made an alternative calculation in which we used the same EOS, ρ = ρ1(θ, S) + q(θ, S) · z (cf. (7.20) with nmax = 1), but now the ρ1 and q1z terms were combined into in situ ρ, which is then used in the original Cubic H scheme. The result is shown in Figure 16, lower right. Although the level of error there is slightly smaller than when using full nonlinear EOS (cf. Figure 15, lower right), it is closer to it than it is to the results with the split or incompressible EOS (i.e., Figure 16, lower left, or Figure 15, lower left). Since the two compressible algorithms here differ only in the computation of ρ derivatives-specifically the choice of the reference gradient considered “neutral” by the monotonicity-enforcement algorithm, (7.27) versus (5.20)—this indicates that the main influence on the PGF error is this feature, not the linearization of the compressibility terms in EOS. Despite the striking similarity of incompressible Cubic H errors (Figure 15, lower left) and compressible, split-EOS (7.26), Cubic H errors (Figure 16, lower left), these two methods actually produce quite different solutions under conditions of realistic temperature, salinity and forcing, where, in addition to small hydrostatic error, the scheme should be accurate in the dynamically relevant PGF. Moreover, we will see that neglecting compressibility results in a completely wrong dynamical response.

[62] Figure 17 shows six-month averaged, near-surface currents from two different solutions for the Atlantic Ocean under realistic wind stress, heat, and fresh-water flux forcing, starting from a Levitus (θ, S) climatology and running for a three-year spin-up period before the time-averaging begins. The averaging period corresponds to the spring-summer season. Unlike the flat-stratification test problem, where there is no mixing of temperature and salinity, the realistic simulation cannot be made without material diffusion due to both physical and numerical reasons. So in all the realistically forced simulations reported here, fourth-order centered advection is replaced with third-order, upstream-biased advection, but still with no explicit horizontal diffusion. The KPP scheme is used as the parameterization of the vertical mixing processes [Large et al., 1994]. The first solution uses the modified Cubic H PGF algorithm with harmonic averaging of adiabatic differences (7.26) of ρ and split EOS (7.20) with nmax = 1 (i.e., the same combination as for Figure 16, lower left). This combination produces what we consider a physically plausible result in the sense that all primary features—such as correct Gulf Stream separation point—are present and broadly consistent with measurements. The second solution differs from the first one only by turning OFF compressibility terms (the same EOS and PGF combination as in Figure 15, lower left). Although qualitatively similar in its main features to the first solution, the second solution is characterized by an approximately 40% weaker and prematurely separating Gulf Stream, as well as a spurious eastward current near the Azores heading toward Gibraltar. We do not show the near-surface velocities from two other solutions—γ = 0 and γ = 0.5 schemes with EOS (7.14), which retains nonlinear compressibility, but does not contain passive vertical ρ gradient—with the exception of minor differences in Gulf Stream separation site, these are rather similar to the first solution in Figure 17 and interpreting their differences is not straightforward. On the other hand, comparing the middepth currents from all four solutions is more informative since there are larger differences (Figure 18). Among these solutions the one on the lower–right panel, [Cubic H + incompressible EOS], is anomalous among the others: it has a narrower and more intense Deep Western Boundary Current (DWBC), especially in the Gulf Stream area; a spurious current system off coast of Portugal, which extents toward the northwest; and a northward current along the African coast, which is completely absent on the other three solutions. Examination of temperature and salinity fields (not shown here) reveals that the spurious current off coast of Portugal is due to the response to the Mediterranean outflow combined with erroneous α and β because of neglect of the thermobaric effect (In this model configuration Mediterranean outflow is simulated by specifying point-sources in the vicinity of Gibraltar Strait, where θ, S are artificially maintained at their climatological values.). When these two coefficients are correct, the PGF contributions due to temperature and salinity gradients approximately cancel each other, resulting in a very small PGF gradient (as occurs in the other three solutions), hence weak geostrophically balanced currents. In fact, under these conditions (as seen in Appendix B), α may be off by as much as 50%, if its compressibility dependence is neglected. As the simulation continues, the temperature and salinity fields adjust toward a new state, resulting in a different circulation—the narrow jet along the coast of Portugal continuing northwestward. This current advects the Mediterranean water northward along the coast, ultimately maintaining a strong cross-shore gradient, which maintains the current itself in a “self-locking” mechanism. No such current occurs in the solution shown on the right. Instead there is much weaker current going northwestward from Gibraltar, separating from the coast at approximately 38°N, and heading toward the west. This is the expected behavior from observations [Haidvogel et al., 2000]. The three remaining solutions—top left, top right, and lower left—are qualitatively similar to each other. This indicates that they are predominantly controlled by the underlying physics, not by their numerical errors, but there are still differences worth pointing out. The most striking distinction is the intensity of DWBC off the Brazilian coast.

Figure 17.

(a) Near-surface currents time-averaged over 6-month period after 3-year spin up of North-Atlantic model simulation starting from Levitus climatological initial conditions and running under realistic wind and thermodynamic forcing, using modified Cubic H + (7.26) pressure-gradient algorithm and split EOS (7.20) with nmax = 1 (same combination as on lower-left panel of Figure 16). (b) The same, except that now compressibility terms are turned OFF. Although qualitatively similar in its main features, energetics and maximum values of velocity to the case shown in Figure 17a, this solution is characterized by approximately 40% weaker, and prematurely separating, Gulf Stream, and a spurious east-bound current near Azores heading toward the Gibraltar.

Figure 17.

(continued)

Figure 18.

Same as in Figure 17, but at depth 1500 m, instead of near-surface, and for four different pressure-gradient algorithms: top–left—POM Jacobian (γ = 0), EOS by 2; top–right—γ = 0.5, same EOS as on top-left. Note the difference in amplitude of Deep Western Boundary Current (DWBC) off coast of Brazil; lower–left—modified Cubic H + (7.26) in combination with EOS (7.20); lower–rightCubic H, compressibility terms turned OFF. Note spurious northward current off coast of Portugal, which continues toward north–west along the topographic slope. This current is due to model response to θ, S of Mediterranean outflow, and is caused by wrong temperature expansion and saline contraction coefficients because of neglect of thermobaric effect. This current is completely absent in the other three solutions. Also note artificially intensified and narrower DWBC in comparison with lower–left panel.

[63] POM scheme (γ = 0) gives approximately twice the peak velocity there and a noticeable increase in the energy (indicated by the increase in RMS velocity from approximately 2.3 cm/s to 3.0 cm/s). The other two schemes—[Cubic H + (7.26)] and γ = 0.5—are quite similar by these measures. Comparison of these results with the flat-stratification test (cf. Figure 15) suggests that a plausible explanation of the difference between γ = 0 and γ = 0.5 results in Figure 18 lies in the hydrostatic PGF error: γ = 0 produces southward flow near the Brazilian coast in the flat stratification test problem, which is in the same direction as the stronger DWBC in Figure 15. On the other hand, the hydrostatic error of γ = 0.5 is opposite to DWBC, which is consistent with its smaller velocities in the realistic forcing experiment. The overall sensitivity of DWBC to the choice of weighting parameter γ is comparable to the differences among the three major classes of models, z-, sigma-, and isopycnic coordinate [Beckmann, 1998; Willebrand et al., 2001]. The DWBC results with [Cubic H + (7.26)] are in between the other two, but closer to γ = 0.5. Besides the intensity of the DWBC, Figure 18 shows other differences between γ = 0 and γ = 0.5: the appearance of possibly spurious vortex structures off the African coast in the Gulf of Guinea and Canary Islands, as well as the generation of Rossby waves near the Equator manifested by alternating east-west bands in the velocity field, which are tracks of stronger, westward-traveling vortex structures in the case of γ = 0.

[64] Making a firm conclusion about which of the three solutions is physically the most accurate is beyond the scope of this paper, so we merely point out that the sensitivity of the answers to the choices among the POM Jacobian and γ = 0, …, 0.5 in the Song [1998] family of schemes and the nonrobustness of the “optimal” choice of γ in different configurations all motivate the search for higher-order alternatives, such as Cubic H. We also notice that evaluating a PGF scheme solely by its hydrostatic error, (i.e., the flat-stratification test problem) does not necessarily guarantee an accurate simulation in realistic cases. For example, POM Jacobian performs better than γ = 0.5 in the flat-stratification test shown in Figure 15; however, γ = 0 results in the realistic simulation (Figure 18) has some features that seem likely to be spurious.

[65] Our experience also shows that the straightforward inclusion of compressibility in in situ ρ calculations for PGF causes a significant increase of hydrostatic PGF error compared to EOS without compressibility. This error results in spurious currents that are the largest near the Equator, due to the diminished Coriolis frequency there. On the other hand, disregarding compressibility completely (motivated by the desire to reduce PGF error) causes significant errors in realistic simulations due to physically wrong responses of the model to temperature and salinity forcing. Our new method for splitting the compressibility terms allows us to obtain physically correct responses without increase of hydrostatic error.

9. Summary

[66] Although PGF errors can be eliminated completely only if isosurfaces of the vertical coordinate are aligned with either geopotential surfaces or isopycnals, these two choices of the vertical coordinate have difficulties in accurately representing the top and bottom boundary conditions. This leaves σ-models as preferred, if accurate topographic and shallow-water, free-surface effects are the highest priority. Therefore, the goal of minimizing PGF errors in σ-models remains important for oceanic modeling.

[67] An analysis of one the more successful PGF schemes to date, the second-order Jacobian, shows that, in addition to approximating the desired terms of the continuous equations with second-order accuracy, it also has important symmetries and can be written in several alternative but equivalent forms. The latter lead to different versions of high-order accuracy generalizations, depending of which form is chosen as the prototype. We find the pseudo-flux form particularly attractive. This gives the possibility of rewriting the Jacobian in the form of a contour integral, and we propose a fourth-order accurate method based on this form. In doing so we preserve the property of the original scheme that treats ρ and z as functions of transformed coordinates in a symmetric, mutually interchangeable way. Our new approach is based on reconstruction of ρ and z as continuous and continuously differentiable polynomial functions of transformed coordinates with subsequent analytical integration. Similarly to its prototype, our new method can be equivalently transformed between Density-Jacobian and σ-coordinate primitive forms. We analyze the causes of previous experience of nonrobustness and limited applicability of high-order schemes designed in the past, and we pay special attention to the prevention of the appearance of spurious oscillations of polynomial interpolants in the cases where ρ can no longer be treated as a smooth field on the grid. We also develop special measures to avoid loss of accuracy associated with the use of spatially nonuniform grids that are commonly used in oceanic modeling.

[68] Historically σ-coordinate PGF errors have been attributed mainly to hydrostatic cancellation errors. Thus, the primary focus of many previously proposed schemes has been to address this particular problem while much less attention has been paid to derived conservation properties of the discretized PGF. Our experience shows that it is not entirely the right perspective because as the model's ρ field evolves the actual magnitude of spurious velocities may become very much larger than that determined from geostrophic balance with the erroneous PGF associated with a horizontally uniform initial density field ρ = ρ(z). Specifically we observe significant growth of erroneous barotropic flow in a manner previously described as “a σ error of the second kind” [Mellor et al., 1998].

[69] Realistic oceanic modeling requires taking into account the compressibility of seawater. Accurate representation of this effect is especially difficult in σ-models, because the straightforward inclusion of compressibility into the EOS causes a large, dynamically passive, background vertical profile of in situ ρ associated with compressibility of seawater with uniform temperature and salinity. Although in theory this background profile should not generate any PGF, it is shown to be a major source of PGF error in models due to the combination of the usual numerical noncancellation in the absence of compressibility (σ-error) and the largeness of this passive compressibility effect compared to the stable stratification, particularly in the abyss where vertical resolution is typically very coarse. Furthermore, this background compressibility interferes with nonoscillatory interpolation algorithms because physically neutral stratification is no longer equivalent to the absence of a vertical gradient in ρ. To address these difficulties, we have devised a new treatment of compressibility effects that splits ρ into terms evaluated at atmospheric surface pressure and terms with compressibility, in order to isolate the latter from adding to the PGF error as it does when total ρ is used in the calculation. The new EOS formulation is shown to be sufficiently accurate, compared to the standard EOS formulation, for reliable usage in oceanic models.

Appendix A.: On Discrete Energetic Consistency of High-Order PGF Schemes

[70] Song and Wright [1998] (hereafter SW98), show that the second-order equal-weighted density-Jacobian scheme in combination with second-order, centered advection for density guarantees exact conservation of total (kinetic + potential) energy of the discretized system (also called Standard Jacobian in SW98.). In this Appendix we show that their derivation can be extended to a more general case where two-point, linear interpolation of ρ in both PGF and advection schemes is replaced with a more general, potentially high-order accurate interpolation. For brevity we present here only discrete equations. Reader should be refered to SW98 for their continuous prototypes.

[71] Since both the original second-order and our new scheme can be rewritten in pseudo-flux form, the x-component of the PGF with sign and scaling as it appears in the r.h.s. of the finite-volume momentum equation for equation image is

equation image

where δx denotes elementary 2-point differencing over one grid interval, δxqi+equation image = qi+1qi and δxqi = qi+equation imageqiequation image hence the result is always placed halfway between the points at which the original quantity is defined. For notational simplicity we also assume a Cartesian grid with Δx = Δy = 1, and we omit the factor g0 from the definitions of PGF and potential energy below; equation image denotes height of control volume element surrounding ui+equation image,k, which in the simplest case can be approximated by second-order midpoint averaging equation image = (ΔHi,k + ΔHi+1,k)/2, but in general it may be done by an arbitrary interpolation scheme, e.g., a fourth-order scheme. In any case equation imageequation image is vertical spacing of arbitrarily stretched vertical grid, so neither zi,k+equation image ≠ (zi,k + zi,k+1)/2 nor zi,k ≠ (zi,kequation image + zi,k+equation image)/2; Further in (A1)FX and FCX are “pseudo-fluxes” which in the simplest case are computed as

equation image

where equation images and equation imagex are midpoint averaged values of density. It is implied that the surface value FCXi+equation image,N+1 ≡ 0 in the first line of (A1). Model variables are placed on a C-grid and their permissible index ranges and boundary conditions are given by

equation image

[72] After substitution of (A2) into (A1), the latter becomes equivalent to Equation (2.6) and, ultimately, (2.22) from SW98, with the exception of the top-most grid interval: it should be noted that Equations (2.6), (2.7), (2.22), and (2.25) from SW98 overshoot vertical index inside the summation by requiring values of ρ (b in their notation) and z at vertical index N + 1 (via equation image and δszN+equation image), which are not available. This means that a special rule for the computation of FXN+equation image is required to fix this problem. We do not specify this rule at this moment, but assume that PXi+equation image,N can be still cast in pseudo-flux form (Strictly speaking this is not the case for the POM and SCRUM models. Although to our best knowledge, the algorithm for computation of PXi+equation image,N has never been published in the literature, it can be easily recovered from the code itself: PXi+equation image,N = −equation imagegequation imageizi,N + ζi+1zi+1,N)(ρi+1,N − ρi,N), which simply neglects the fact that ρi+1,N and ρi,N are placed at different geopotential surfaces. (The finite-difference version of SPEM (v. 5.1) and SCRUM have a similar treatment.) Besides the usual “leak” of vertical stratification into horizontal PGF, this formulation does not provide pseudo-flux continuity between the elements N and N − 1 of the vertical grid. In the derivation presented here we assume that both these drawbacks are repaired.).

[73] In the following analysis we assume that instead of using (A2), equation image and equation image, are computed by an arbitrary, potentially high-order accurate, interpolation method. Another distinction from SW98 is that we do not restrict ourselves to the case of zero free-surface disturbance, despite the fact that (A1) does not explicitly contain the free-surface term equation image, as it occurs in (2.6)(2.7) from SW98. Below in (A21)(A22)(A23) we also show that the free-surface contribution can be naturally cast in flux-difference form of (A1).

[74] Multiplication of (A1) by ui+equation image,k and summation over all indices i yields,

equation image

where in order to obtain the second line from the first we have applied summation by parts in a manner similar to the transition from Equation (2.22) to (2.23) in SW98, where we assume no-flux boundary conditions uequation image = uL+equation image = 0, so that the index range in the leftmost sum in the second line can be extended as necessary to include side velocity points (it should be noted that the expressions inside the leftmost sum and its inner sum in the second line are now placed at density point ρi,k on horizontally staggered C-grid).

[75] After similar manipulation with PY-terms, we derive the contribution of PGF into net kinetic energy tendency,

equation image

Applying discrete continuity equation

equation image

where ΔHi,j,k and levels zk+equation image follow evolution of free surface,

equation image

(hence (A6) should be understood as the definition of vertical velocities equation image as the mass fluxes across moving grid-box interfaces equation image), the first term in the r.h.s. of (A5) may be further rewritten as

equation image

To derive this we have used top and bottom kinematic boundary conditions ωN+equation image = equation image = 0, and ∂zequation image/∂t = 0 [note that ∂zN+equation image/∂t ≡ ∂ζ/∂t ≠ 0 due to evolving free surface].

[76] The discretized density equation is

equation image

where equation imagei+equation image,j,kx the result of midpoint interpolation of ρ (to the location of ui+equation image,j,k) using an arbitrary interpolation method, which is not necessarily linear and not necessarily the same for all directions x, y, s. Multiplying (A9) by zi,j,k and applying summation by parts, we derive

equation image

Also note that

equation image

[77] Comparison of (A10) with (A5), along with (A8) and (A11), indicates that in order to guarantee energetic consistency,

equation image

it is sufficient to ensure that

equation image

and

equation image

which leads to the following set of conclusions:

  1. Discrete energetic consistency can be shown if: (1) discrete PGF scheme can be written in pseudo-flux form; and (2) ρ used in PGF is the same, or linearly related to that in the advection equation; and (3) interpolation algorithms used in computation of pseudo-fluxes FX, FCX, and FCY are the same as corresponding interpolations in discrete advection for density. Details of the vertical coordinate (such as vertical stretching or order of interpolation) to compute equation image from ΔHi,j,k do not destroy the consistency, as long as the same method is used in continuity, density, and momentum equations.
  2. The second-order scheme corresponds to the setting of equation imagei+equation image,j,kx = equation imagei+equation image,j,kx in (A13) (similarly in other two directions), which is energetically consistent. Alternatively one can chose
    equation image
    or even a more sophisticated method (e.g., using harmonic averaging of elementary slopes to prevent spurious oscillations) and still retain energetic consistency. However, no choice results in fourth-order accuracy for both PGF and advection. This fundamental limitation stems from the second-order accurate definition of potential energy,
    equation image
  3. Violation of the pseudo-flux form in the uppermost grid element, common practice of subtracting background profile ρ = ρbak(z) from density field before computing PGF (motivated by the desire to reduce hydrostatic errors in PGF) as well as the use of nonlinear (realistic) equation of state of seawater destroy energetic consistency [cf. Gerdes, 1993].
  4. Since both sums (A14) are at least second-order discrete approximations to the same continuous integral,
    equation image
    this equation already holds within the order of accuracy.
  5. Assuming that zi,j,k = equation image(zi,j,k+equation image + zi,j,kequation image), the second sum in (A14) may be rewritten as
    equation image
    which suggests
    equation image
    to achieve exact cancellation in (A14) (This choice corresponds to the finite-volume interpretation of nonuniform vertical grid, where zi,j,k±equation image are coordinates of grid-box interfaces, while zi,j,k are grid-box averaged z.). Unless vertical grid spacing is uniform, this choice is different from FXk+equation image = (ρk + ρk+1)(ΔHk + ΔHk+1)/4 used in the original second-order scheme. This discrepancy comes from the fact that definition of discrete potential energy (A11) corresponds to the assumption of a piecewise-constant distribution of ρ within each vertical grid box ΔHk, while second-order Jacobian assumes linear profiles between each pair of zk and zk+1.

[78] Equation (A13) does not restrict the algorithm for computation of FXi,j,N+equation image at the uppermost grid point. We therefore propose the following method:

equation image

where zN+equation image ≡ ζ corresponds to free surface, after which

equation image

and

equation image

which repairs the inaccuracy of the original scheme at the top-most grid level (e.g., PGF now vanishes identically everywhere if ρ is a linear function of z). Equation (A22) already contains the contribution due to PGF due to free-surface disturbance: e.g., assuming that equation image = equation imagei,N + ρi+1,N)(zi+1,Nzi,N) and setting ρ(surf)i = ρ(surf)i + 1 = ρi,N = ρi+1,N = ρ0 results in

equation image

[79] The usual argument in favor of using an energetically consistent pair of PGF and advection schemes is based on oceanic simulations being typically long-term integrations, so that one can be fearful of accumulation of erroneous energy conversion even when it is within the numerical order of accuracy at each time step. However, the potential energy defined above is computed with respect to a state where all mass is concentrated at z = 0, i.e., the unperturbed free surface. This state is not achievable, because PE is defined without taking into account constraints of incompressibility and Lagrangian conservation of density. A more physically meaningful definition of potential energy is available potential energy (APE), which respects both these constraints. The main argument behind this concept lies in the fact that as long as fluid parcels are move up and down while maintaining their density, potential energy released in such rearrangement is converted into kinetic energy, and once a state in which each fluid parcel is in hydrostatic equilibrium with its surrounding is achieved, no more potential energy can be released. Although exact Eulerian mass conservation is often imposed in oceanic models, maintaining ρ for each Lagrangian parcel is usually possible only within the numerical accuracy of the advection scheme (With the exception of isopycnic-coordinate models, where it can be done exactly by conserving the volume of each isopycnal layer.). This leads to a situation in which an energetically consistent pair does not guarantee the absence of spurious generation of kinetic energy, because numerical advection can alter PE and APE in a nonphysical way (via advective errors), making it available for KE production while maintaining KE + PE. This agrees with practical experience to date, where one can modify either PGF or advection independently (thus abandoning exact KE + PE conservation) and observe an overall beneficial outcome for the accuracy of model solution.

Appendix B.: Assessment of Taylor Expansion for Seawater Compressibility

[80] To facilitate our analysis we rewrite seawater EOS from Jackett and McDougall [1995] (hereafter JM95) as

equation image

so far without any approximation. Here ρ0 = const, K00 = const, K′ = K0 + K1z + K2z2, where K0 = K0(θ, S), K1 = K1(θ, S), K2 = K2(θ, S), as well as ρ′1 = ρ′1(θ, S) are expressed in as polynomials of powers of θ, S and S1/2; z > 0 is depth, which in the context of EOS substitutes for in situ pressure P = ρ0g z (thus neglecting nonuniformity of ρ field when computing compressibility effects); ρ0 = 1000 kg/m3 is reference density; and g = 9.81 m/s2 is acceleration of gravity. Since ρ′1 ≪ ρ0 = const with an associated small parameter ρ′10 ≤ 3 × 10−3, and since

equation image

the r.h.s of (B1) is dominated by its first term, ρ0/(1 − 0.1 z/K00), which does not contribute to the horizontal PGF, because it is a function of z only. The smallness of the leftmost inequality in (B2) can be estimated from a typical value speed of sound c of seawater,

equation image

where we use z = 6000 m, and c = 1500 m/s2 for this estimate. The terms 0.1z and K1z are assumed to be of the same order. The other two inequalities in (B2) mean that terms proportional to z and z2 never dominate K0. Furthermore, K0(θ, S) = K00 + K0(θ, S) ≈ 19,092.6 + 209.8θ + 104.4 S + …, hence K0K00 = const in the sense that terms dependent on θ and S never dominate the preceding K00; however, they are not sufficiently small to be used in a Taylor expansion accurate enough for practical purposes. This estimate also explains why removing a background ρ(z) profile, essentially ρ0/(1 − 0.1 z/K00), has only limited success in reducing PGF errors.

[81] Retaining only terms which contribute to horizontal PGF and using the two small parameters identified above, the Taylor series expansion of (B1) results in

equation image

which has a form appropriate for computation of PGF (cf. (7.20)). As follows from (7.15)(7.17), for accurate computation of horizontal ρ and PGF, it is sufficient that EOS produces correct estimate for temperature-expansion α and saline-contraction β coefficients, while in situ ρ is irrelevant for this purpose. Therefore, to assess possible errors associated with the use of (B4), we compare the α and β it produces with the original coefficients produced by the EOS from JM95.

[82] Properties of the original EOS from JM95 are illustrated in Figure 19, where ρin situ, α, and β are plotted as function of potential temperature θ and salinity S at four different depths z = 0. There is overall increase of ρin situ with depth z, and in addition to that, there is change in slope of isopycnals with depth on the left column in Figure 19, which is primary due to the thermobaric effect. There is a local maximum of freshwater ρ at θ = 4°C, z = 0, which shifts to smaller temperature and eventually disappears with increase of P (depth). Middle column shows a significant dependency of α on depth; e.g., for θ = 5°C and S = 33‰, α changes from 0.1 to 0.25 when z goes from 0 to 6000 m. β is more uniform in θ,S-space, with the exception of the limit of low salinity, and it has a relatively weak dependency on depth. As follows from Figure 19, disregarding the thermobaric effect completely, hence using just ρ′1(θ, S) for computation of PGF, results in an underestimate of the ρ gradient in the abyss by as much as 60%. Therefore, one needs to retain terms linear and perhaps quadratic in z in (B4). In both approximations the resulting α and β are quite close to their values produced by EOS from JM95; so, we show only deviations of α and β from the original ones in Figure 20. The errors are quite significant within the whole range of possible values of θ and S, especially at maximum depth z = 6000 m and in the limit of largest temperature and small salinity (right-bottom corner of each plot). Indeed, errors in α may be as large as 30%, while errors in β about 15%. Fortunately in realistic oceanographic conditions temperature has a tendency to decrease with depth, resulting in a much smaller range of possible values, and a similar tendency occurs in salinity field. This fact is reflected by the dashed rectangle on each plot in Figure 20, which outlines the domain of relevance, meaning that nearly all realistic combinations of θ, S should occur within it, and which shrinks with depth. Within this rectangle the errors are much smaller, and, remarkably, its location coincides with the area of minimal errors. The ranges of errors in α and β for θ, S within the domain of relevance are summarized in the following table:

Figure 19.

Density in situ ρ (left), thermal expansion α (middle) and saline contraction coefficient β (right) as functions of potential temperature θ and salinity S at four different depths z = 0, 1000, 3000 and 6000 m. Light shading indicates availability (at least one record) of water with given temperature and salinity at each specified depth from annual database for World Ocean, Levitus 1994, while dark shading corresponds to the area containing at least 90% of all data at specified depth. Thermobaric effect is manifested by the change of angle of isopycnals with depth on ρ(θ, S) plot, left column.

Figure 20.

Errors in evaluation of thermal expansion α and salinity contraction β at three different depths, z = 1000, 3000, and 6000 m for linear (left two columns) and quadratic (right two columns) truncations of z-series of EOS from JM95. Errors are defined as deviations of α and β from their values computed form the original EOS (see Figure on the previous page), which are considered as “exact” in this comparison. Dashed rectangle on each plot shows the domain relevance, meaning that for realistic oceanographic conditions θ and S can occur only within this rectangle at each depth z.

Table 1.  
DepthEOS
ρ′ + q1zρ′ + q1z + q2z2
Error in αError in βError in αError in β
1000−0.0026 … −0.0008+0.0004 … +0.0012−0.003 … −0.001+0.0004 … 0.0012
2500−0.0040 … +0.00050.0 … +0.003−0.007 … −0.003+0.002 … +0.001
5000−0.008 … +0.007−0.008 … −0.006−0.005 … −0.015−0.004 … 0.0

[83] This means that, at a maximum depth of z = 5000 m, given characteristic values of α = 0.25 and β = 0.8, the errors do not exceed 3% for α and 3% for β for linear truncation and slightly less for quadratic. These estimates can be viewed as the worst-case realistic scenario, and, as seen from the table above, the errors are much smaller within the upper 2500 m, which is dynamically the most active part of the ocean. Both truncations provide viable approximations for EOS and offer significant reduction of errors in comparison with neglecting compressibility completely; however, the quadratic version offers no significant improvement to justify its extra complexity.

Acknowledgments

[84] This study was supported by grants N00014-98-1-0165 and N00014-00-1-0249 from the Office of Naval Research. All computations presented here were performed in National Center for Supercomputing Applications (NCSA) sponsored by National Science Foundation.

Ancillary