## 1. Introduction

There are two fundamental design constraints that a numerical model must satisfy if it is to converge to the solution of the continuum equations as the grid is refined (Lax and Richtmyer 1956). First the model must be stable. Second, the model must be consistent with the continuum equations so that the truncation error tends to zero as the grid is refined.

In spite of the authoritative analysis of Leonard (1979b), many ocean models still use even-order centered advection schemes (Dietrich 1997; Weaver and Eby 1997; Pacanowski 1995; Shchepetkin and McWilliams 1998; among many others). Such schemes have dispersive truncation error, which causes spurious wiggles. These spurious wiggles are usually controlled by incorporating some sort of artifical eddy-viscosity in the model, *which amounts to adding an inconsistency in order to control an instability.* This is not an optimal strategy. Such models pose fundamental problems when used in large eddy simulations (LES) and studies of subgrid-scale parameterizations because the instability and the nonphysical eddy-viscosity used to control it interact with truncation error in a seemingly intractable tangle. Nevertheless, Browning et al. (1998) demonstrate that when the resolution is increased sufficiently, the molecular viscosity is more than enough to control the dispersive wiggles and convergence is possible. Such studies are sometimes referred to as direct numerical simulation (DNS).

The goal of the present study is to formulate a numerical model that is consistent, accurate, and stable. Eddy-viscosity is banished in favor of ensuring the numerical truncation error is dissipative rather than dispersive. Margolin et al. (1999) observe that nonoscillatory advection schemes appear to include an effective subgrid scale model.

In an efficient finite difference model a grid refinement reduces the truncation error at least as quickly as the computational cost is increased. (In spectral models the truncation error reduces exponentially with grid refinement.) Sanderson (1998) demonstrates that to achieve a computationally efficient finite difference numerical model, the order of accuracy must be at least equal to the space–time dimensionality of the problem being solved. Many geophysical flows are slowly varying in time (relative to stability constraints on the model time step) and have little vertical motion relative to the horizontal motion. Such flows might be well modeled at second order (with advection at third order). Nonhydrostatic turbulent flows, on the other hand, are fully four-dimensional and require a model that treats all important dynamical terms at fourth order or better.

The DieCAST ocean model (Dietrich and Kuo 1994) and the barotropic model of Sanderson and Brassington (1998) both ensure accurate treatment of geostrophy by using a fourth-order explicit calculation of the barotropic pressure gradient followed by second-order implicit correction to satisfy continuity. Here this design principle is extended to the treatment of nonhydrostatic pressure gradients. Further, pressure gradient calculations adjacent boundaries are also extended to fourth order.

A primary motivation for the present model development was to enable better estimation of the parameterization required to represent subgrid-scale processes. Remember, high-order models calculate the solution at sufficiently resolved scales (e.g., >4Δ) much more accurately than low-order models (see Fig. 1 of Sanderson and Brassington 1998). Of course features in the solution with 2Δ scales are not accurately treated regardless of order of accuracy. Indeed, high-order methods will not be monotonic if the solution contains shocks. The numerical dissipation associated with a high-order model acts selectively on the highest wavenumbers so shocks tend to be suppressed, whereas slightly larger scale features in the solution suffer much less numerical dissipation at higher orders than at lower orders. A high-order model that better calculates the solution at the above sufficiently resolved scales will likely require less intervention in the form of a subgrid-scale parameterization than a low-order model. Thus subgrid-scale parameterization might be expected to be a function of the numerical methods employed. Similarly, a model that relies on eddy-viscosity to control numerical instabilities (or bounded computational modes) will require a subgrid-scale parameterization tuned to the unphysical eddy-viscosity.

The present model has design features appropriate for subgrid-scale studies of some (not all) dynamical systems found in the ocean. One example will be given that demonstrates calculation of the subgrid-scale forces in a convecting fluid.

Convection is fundamentally important in climate studies. Yet models that run on climatological scales usually have anisotropic grids that cannot even remotely resolve such convection. With anisotropic grid spacing the Courant number associated with the vertical motion can become much larger than that associated with horizontal motion. The feasibility of using a hybrid advection scheme that removes the time step restriction associated with the vertical component of motion is explored, but not analyzed in detail. Anisotropic grid spacing is also exploited to demonstrate the efficient solution to the three-dimensional elliptic equation for nonhydrostatic pressure by iterating on a sequence of one-dimensional tridiagonal equations.

## 2. Equations

*u,*

*υ,*and

*w,*respectively. Salinity, potential temperature, and pressure are represented by

*S,*Θ, and

*P,*respectively. The Coriolis parameter

*f*is set constant but can be trivially generalized to be a function of space or to include its vertical component. An explicit, fourth-order accurate treatment of molecular viscosity is discussed in section 2h. The total derivative is represented by

*D*/

*Dt.*

The average density is *ρ*_{0}. Density *ρ* = *ρ*(*T,* *S,* *P*) is given by the UNESCO (1981) equation of state (Gill 1982), which is a function of in situ temperature. The in situ temperature *T* can be efficiently found by using a fixed-point iteration to invert the Bryden (1973) equation for potential temperature Θ. For shallow water applications, Θ and *T* are treated as being the same and pressure correction terms in the UNESCO equation of state are omitted. A local fit to the full UNESCO equations is used for deep convection (Sanderson et al. 2002).

*P*is therefore split into three parts: hydrostatic pressure due to the free surface, hydrostatic pressure due to the departures of

*ρ*from

*ρ*

_{0}, and a nonhydrostatic pressure

*Q.*The hydrostatic pressure at

*z*for a fluid with a free surface at

*h*can be written

*ρ*′ =

*ρ*−

*ρ*

_{0}. Vertically integrating (2.7) gives

*ρ*

_{0}. The coordinate system is chosen so that the undisturbed surface

*h*= 0 is at

*z*= 0 and

*z*is positive upward. The equations of motion can be rewritten in terms of these three pressure contributions as

*ρ*

_{0}is absorbed into the nonhydrostatic pressure

*Q*to create a new variable

*q*=

*Q*/

*ρ*

_{0}. Fluctuations of the free surface

*h*are obtained from of the divergence of the velocity vertically integrated over the water column's depth

*U,*

*V*:

### a. Time stepping

Incremental updates to sealevel and nonhydrostatic pressure are calculated implicitly, but all other updates are done explicitly within *N*-cycle integration (Lorenz 1971) at either third or fourth order according to the users discretion. Sanderson and Brassington (1998) and Brassington (2000) demonstrate the performance of *N* cycle relative to other commonly used time stepping schemes and illustrate the phase and amplitude properties of truncation error. The *N* cycle iterates using a sequence of first-order Euler updates. The details of an Euler update are presented below.

### b. Control-volume discretization and indexing

Physical conservation laws are naturally formulated using a control-volume cell. Here the control volume cell will be a cuboid with dimensions (Δ*x,* Δ*y,* Δ*z*). The conserved quantity is represented as an average throughout the volume of the cell. Flux of a quantity through a cell face is represented as an average over that cell face. Divergence of the fluxes through the six cell faces gives the temporal rate of change of the quantity in the cell. Equations (2.1)–(2.6) can be represented as conservation laws for salt, heat, the three components of momentum, and volume (conservation of mass in an incompressible flow). Roache (1982) notes that control-volume discretizations are based on macroscopic physical laws and this “appears to give them the best batting average.” Advective terms, Coriolis, and continuity are all well described as macroscopic physical laws using the control volume. In this sense, the control-volume discretization treats some of the most important terms in a *physically exact* manner without having to appeal to either the continuum hypothesis or the limit of infinitesimal grid spacing.

Another advantage of the control-volume formulation is the unambiguous physical treatment of land–water boundaries. Modern versions of FORTRAN enable efficient vector and parallel use of logical masking (sometimes in combination with gather-and-scatter operations) to distinguish calculations at cells and cell-faces depending on their proximity to boundaries.

In the following, *h,* *u,* *υ,* *w* will be values at time *t* whereas *u*^{+}, *υ*^{+}, *w*^{+} will be values at *t* + Δ*t.* In between there will be partially updated quantities *u*^{+1}, *u*^{+2}, *u*^{+3}, etc. The velocity (*u,* *υ,* *w*) and scalar quantities Θ, *S* are all time-stepped as cell averages. The cell-averaged velocity of the (*i,* *j,* *k*) cell is written (*u*_{i,j,k}, *υ*_{i,j,k}, *w*_{i,j,k}). Indices are sometimes dropped when they are the same for all variables within an equation. Half integer indexing is used for quantities averaged over cell faces so *u*_{i+0.5,j,k} is an average over the face joining the (*i,* *j,* *k*) cell to the (*i* + 1, *j,* *k*) cell.

In a crude sense, the control-volume formulation is like using both the A grid and the C grid. Descriptions of various grid schemes, including the A grid and C grid, are presented in Arakawa and Lamb (1977). The A grid plus C grid description is metaphorical for orders of accuracy greater than 2.

### c. Control-volume advection

_{i+0.5}by the face-averaged velocity component

*u*

_{i+0.5}gives the flux through the face. The advective update is obtained from the divergence of fluxes into the control volume. Conservation is ensured to within machine round-off error. Cell-averaged velocity components that have been updated only for advection will be represented (

*u*

^{+1}

_{i,j,k}

*υ*

^{+1}

_{i,j,k}

*w*

^{+1}

_{i,j,k}

The stability of control-volume advection using (2.14) is illustrated in Fig. 1, which shows amplification factor as a function of Courant number and wavelength *λ* normalized by the grid spacing Δ*x.* Values were obtained by numerically calculating the amplification of a single Fourier mode for one-dimensional advection with constant velocity. The advection scheme has been demonstrated in applications involving rotation and deformation in Sanderson and Brassington (1998). The advection scheme is stable only for unacceptably small Courant numbers when used with forward Euler time stepping (equivalent to 1-cycle Lorenz time stepping). Second-order (2-cycle) time stepping improves the stability, but is still unacceptably restrictive on the time step. Third-order (3-cycle) time stepping is stable for Courant numbers as high as 1.5. At fourth-order Courant numbers as high as 2 are stable.

The grid spacing in each plot of Fig. 1 shows values of *λ*/Δ*x* = 2, 3, 4, 5, … , 19, 20. The advection scheme totally dissipates a 2Δ*x* signal, which is often the fastest growing mode in unstable numerical computations and is also an entirely inaccurate representation of the continuum solution. At moderate Courant numbers (∼0.5) the dissipation is very selective for advection with third- or fourth-order time stepping. Wavelengths greater than 4Δ*x* suffer very little attenuation.

Other advection schemes exist for which the time step is not restricted by stability constraints. Best known are the semi-Lagrangian advection schemes (Leslie and Purser 1995; McGregor 1993) and a control-volume scheme using Conservative Operator Splitting in Multidimensions with Inherent Consistency (COSMIC) reported by Leonard et al. (1996). Lin and Rood (1996) independently developed a multidimensional flux-form transport scheme similar to that of Leonard et al. (1996). Brassington and Sanderson (1999) and Brassington (2000) report further on the performance of the semi-Lagrangian and COSMIC schemes. COSMIC and semi-Lagrangian advection have similar computational cost for a given order of accuracy. Bartello and Thomas (1996) argue that semi-Lagrangian calculations have no computational cost advantage over time step–limited advection schemes with similar accuracy. Explicit treatment of the baroclinic mode is more restrictive for the time step than the advection scheme used here.

### d. Geostrophy on the collocated cell volumes (heuristic A grid)

*h*

^{+}

*h*

*δh,*

*h*is the value from the previous time step and

*δh*is the increment from

*h*over the time step. Similarly the nonhydrostatic pressure can be broken into

*q*and an update

*δq*so that

*q*

^{+}

*q*

*δq.*

*u*

^{+2},

*υ*

^{+2}are obtained by considering Coriolis, the old surface gradient, and the hydrostatic pressure gradient associated with the perturbation density field as in the two following equations:

*h*

_{i−1,j,k}=

*h*

_{i,j,k}when the

_{i−1,j,k}cell is on land and the

_{i,j,k}cell is in water. Thus, when the

*i*th cell is directly adjacent to land, the second-order operator ∂

*h*/∂

*x*(

*i,*

*j*) = (

*h*

_{i+1,j}−

*h*

_{i−1,j})/(2Δ

*x*) becomes

*i*th cell is the second cell from a left-hand boundary, then (2.19) becomes

Sanderson and Brassington (1998) demonstrate that using a second-order version of (2.19) everywhere can cause nonphysical computational modes that grow slowly. Computational modes could be controlled by filtering, increasing eddy-viscosity, or detuning other parts of the calculation (that have dissipative truncation terms) to be second order. None of the above strategies are consistent with present objectives. In circumstances where the flow near the boundaries is not of negligible importance it is, therefore, desirable to use fourth-order accurate boundary conditions.

*h*

_{ℓ,j,k}and cells to the left of

*h*

_{ℓ,j,k}are on land, whereas cells to the right are in water. In this circumstance the boundary condition

*u*

_{ℓ+0.5,j,k}= 0 requires the

*x*derivative of

*h*be zero at the ℓ + 0.5 cell face. This derivative can be constructed from the cell-averaged values of

*h*by using a cumulative summation to obtain the exact integral up to cell faces, followed by second differencing using the fourth-order accurate (6-point) off-centered collocated operator

*y*

^{″}

_{1}

*y*

_{0}− 30

*y*

_{1}− 8

*y*

_{2}+ 28

*y*

_{3}− 12

*y*

_{4}+ 2

*y*

_{5})/(24Δ

^{2}) (which is easily derived from Taylor series expansions about the point where

*y*

_{1}is given). Thus the following derivative at the cell face is obtained:

*h*/∂

*x*)(ℓ + 0.5,

*j*) = 0 the fourth-order accurate boundary condition gives

*h*/∂

*x*)(

*i,*

*j*) when the

*i*th cell and cells to the right are in water (but cells to the left are on land), consider the off-centered, five-point, fourth-order collocated differencing operator (Berezin and Zhidkov 1965)

*i*− 1) may be written

*h*/∂

*x*)(

*i,*

*j*) when the (

*i*− 1)th cell and cells to the right are in water (but cells to the left are on land), use (2.23) with ℓ =

*i*− 2 to eliminate

*h*

_{i−2}from (2.19), which gives

*r,*which is required in (2.17) and (2.18). First,

*r*is calculated by using a cumulative summation to vertically integrate the perturbation density according to (2.9) without truncation error. This gives

*r*

_{i,j,k+0.5}at cell faces. Second, the horizontal differencing operator (2.19) is applied to

*r*

_{i,j,k+0.5}which gives baroclinic pressure gradients

*R*

_{i,j,k+0.5}= ∂

*r*

_{i,j,k+0.5}/∂

*x*at cell faces. Third, a fourth-order integration from the

*k*− 0.5 face to the

*k*+ 0.5 face gives the cell-averaged baroclinic pressure gradient

*F*

_{f2a}that converts face-averaged quantities

*R*

_{k+0.5}to cell-averaged quantities

*R*

_{k}(Sanderson and Brassington 1998). Changing the sequence of the above horizontal differencing and vertical integration operations will cause spurious currents near sloping bathymetry in a fluid in static equilibrium with a vertical density gradient. When the

*k*th cell is adjacent, the bottom (2.27) can be written

### e. Control-volume update of the hydrostatic free surface

*δh*is obtained by solving the continuity equation implicitly in order to avoid time step restrictions associated with the fast barotropic mode, although this reduces the temporal order of accuracy with which the barotropic gravity wave is calculated. The vertically integrated continuity equation is most naturally expressed using a control volume, which requires velocity components (

*u*

^{+2}

_{i+0.5,j,k}

*υ*

^{+2}

_{i,j+0.5,k}

*δh*averaged over the top surface of a column of cells. Face-averaged horizontal velocity is obtained from the cell-averaged velocity (

*u*

^{+2}

_{i,j,k}

*υ*

^{+2}

_{i,j,k}

*F*

_{a2f}. This effectively gives face-averaged velocity updated for advection and geostrophy. The cell-average to face-average conversion function

*F*

_{a2f}

*u*

^{+2}

_{i,j,k}

*i*to obtain exact values for the integral up to cell faces. Applying the fourth-order differencing operator (2.19) to the resulting integral gives the above fourth-order estimate of the face-averaged quantity

*u*

^{+2}

_{i+0.5,j,k}

*δh*uses staggered second-order differencing and is determined so as to adjust the face velocities to satisfy the vertically integrated continuity equation. The gradient in

*δh*is small (second order) compared to gradients in

*h,*so this second-order adjustment for continuity does not necessarily negate the fourth-order accuracy of previous calculations of spatial gradients (see section 3a). Cell-averaged velocity can be updated using either second- or fourth-order accurate averaging of the gradients in (2.31) and (2.32) onto cell volumes.

*δh.*The integral

*U*

^{+2}

_{i+0.5,j}

^{\[mu4\]hi+0.5,j\[md4\]}

_{−Di+0.5,j}

*u*

^{+2}

_{i+0.5,j,k}

*dz*is obtained using vertical summation of the cell-face velocity. This integral is exact to within the accuracy with which

*h*

_{i+0.5,j}is known, and the error in

*h*

_{i+0.5,j}is very small compared to Δ

*z.*Vertically integrating (2.31) and (2.32) in the same manner gives

*δh*:

*D*

_{i+0.5,j}+

*h*

_{i+0.5,j}) in (2.34) be replaced by (

*D*

_{i+0.5,j}+

*h*

_{i+0.5,j}+

*δh*

_{i+0.5,j}) and similarly for (2.35). This would lead to a nonlinear version of (2.36), where the nonlinearity is small and could be solved for by iterating about the solution for (2.36). This correction is not made here.

It is possible to formulate a spatially fourth-order accurate version of (2.36) and solve it using a defect correction (Sanderson and Brassington 1998) but little is gained by doing so. Elliptic equations in two or more dimensions are computationally expensive to solve, so it is convenient to avoid solving them at fourth-order accuracy.

If the physics of the problem being modeled has a timescale much slower than the fast barotropic waves then it is reasonable to achieve larger time steps by using the implicit calculation of *δh* as given in (2.36). An explicit calculation of *δh* restricts the time step to be less than the time *t*_{c} for the barotropic wave to propagate across one cell, *t*_{c} = *x**gD**x**gK*Δ*z**K*) and great water depth restrict the time step. In such circumstances, (2.36) provides an implicit treatment of the barotropic mode so the model is time step limited by the much slower baroclinic waves. Applications with time steps greater than 50*t*_{c} may, however, require double precision arithmetic when solving (2.36) with algebraic accuracy beyond truncation error of the finite differencing scheme.

The implicit treatment of the barotropic mode requires solution of an elliptic equation which can be computationally expensive. An alternative approach is to use a mode splitting scheme (Bryan 1969; Blumberg and Mellor 1987) in which the equations for the external mode are solved using shorter time steps. Clearly, this approach may become relatively advantageous in shallow waters that are strongly stratified. A split-explicit version of our model has not yet been coded.

*w*

^{+3}

_{i,j,K−0.5}

*w*

^{+1}

_{i,j,k}

### f. Nonhydrostatic update

*w*

^{+3}

_{i,j,k+0.5}

*F*

_{a2f}

*w*

^{+1}

_{i,j,k}

*F*

_{a2f}must be fourth-order accurate, as given by the operator in (2.29).

*q*:

*u*

^{+3}

_{i+0.5,j,k}

*υ*

^{+3}

_{i,j+0.5,k}

*w*

^{+3}

_{i,j,k+0.5}

*u*

^{+4}

_{i+0.5,j,k}

*υ*

^{+4}

_{i,j+0.5,k}

*w*

^{+4}

_{i,j,k+0.5}

*F*

_{a2f}operator to do a fourth-order accurate conversion of the above cell-averaged nonhydrostatic pressure gradients onto the cell face. Note this is

*not*the same as using the (1, −27, 27, −1)/24 staggered differencing stencil. Such a staggered differencing stencil is only second-order accurate in the present context because it computes a difference averaged over the volume that extends half a cell each side of the cell face.

*δq*is expected to be small compared to

*q.*The final cell-face velocity update therefore uses staggered second-order differencing (heuristically C-grid differencing):

*δq.*Substituting (2.42), (2.43), and (2.44) into the control-volume form of the continuity equation (2.6) gives the following second-order elliptic equation for

*δq*:

*no change*in the nonhydrostatic flow through the boundaries—including the surface boundary. The surface boundary does have a flow through it, but this can be computed by integrating the horizontal divergence from the bottom

*z*= −

*D*to

*z*= 0. The boundary condition eliminates short wavelength (nonhydrostatic) surface gravity waves. Substituting the value obtained for

*δq*into (2.42), (2.43), and (2.44) gives the adjustment for face-averaged velocity to satisfy continuity. Similarly, the cell-averaged velocities can be adjusted for continuity by doing a second-order averaging of the gradients in

*δq*onto cell volumes. Providing

*δq*is sufficiently smaller than

*q*then the second-order staggered difference in

*δq*does not lead to an error greater than the collocated fourth-order difference in

*q,*as discussed in section 3a.

### g. Full multigrid elliptic equation solvers

Elliptic equations with more than one dimension are generally computationally expensive to solve. Full multigrid methods provide a solution with a computational cost proportional to the number of grid points. This basic property makes the full multigrid method highly competitive with other iterative and explicit methods for solving large three-dimensional problems such as (2.45) (Roache 1995).

All that is required for present purposes is a sketch of the full multigrid technique. A more substantial introduction can be found in Briggs (1994). Gauss–Seidel and weighted Jacobi iteration both have rapid convergence for high-wavenumber parts of the solution. Signals that have low wavenumber on a fine grid will have high wavenumber when a restriction operator is used to repose the problem on a coarse grid. The multigrid method exploits the rapid convergence of high-wavenumber signals by solving the problem on a sequence of coarsened grids. The solution on a coarse grid is prolongated to finer grids (using an interpolation operator) and smoothed using Gauss–Seidel relaxation. The residual is then restricted back to the coarse grid where a coarse grid correction is calculated which is in turn prolongated and relaxed to provide a correction on finer grids.

The full multigrid algorithm used here is based on that of Press et al. (1996) with Gauss–Seidel relaxation instead of red–black Gauss–Seidel relaxation. The Press et al. (1996) algorithm has also been modified to treat staggered Neumann boundary conditions (i.e., zero derivative at the cell face, which is staggered between *δq* grid positions). Particular attention must be given to the fact that the stencil for the derivative becomes off centered as the grid is coarsened otherwise the boundary condition is only formally accurate to first order (Sanderson and Brassington 1998).

The grid is coarsened by factors of 2 and the Press et al. (1996) algorithm discretizes each dimension so it is spanned by *n*2^{m} + 1 points where *n* and *m* are integers. This grid is optimal for Dirichlet boundary conditions and achieves a most coarse grid that is spanned by a minimum of three points (two points on the boundary plus one internal point that is solved for) when *n* = 1 and *m* = 1. When using staggered Neumann boundary conditions, the most coarse grid must have a minimum of two points internal to the domain in order to be well posed. This is done using a fine mesh that divides a linear dimension into *n*(2^{m} + 2^{m−1}) + 1 points—of which *n*(2^{m} + 2^{m−1}) − 1 points are internal to the domain and 2 points are outside the domain and are used to do boundary calculations.

When Δ*x* = Δ*y* = Δ*z* it is appropriate to restrict and prolongate in all three dimensions simultaneously. Thus, the first restriction reduces the number of grid points by a factor of eight. Geophysical applications often have Δ*x* = Δ*y* ≫ Δ*z.* In this case one restricts and prolongates in the *z* direction until coarsened grids are arrived at where the grid scale is the same (or very similar) in each direction. At this stage one can restrict and prolongate in all three dimensions.

Finally, it should be noted that for many applications the domain has far more points in the horizontal dimensions than in the vertical dimension. Thus when the grid has been coarsened to span the vertical with the coarsest mesh (*m* = 1) we proceed further by restricting the three-dimensional problem only in the horizontal dimensions. In a channel one might end up restricting and prolongating in only the along-channel direction. The guiding principle is that the grid spacing must be the same (or nearly the same) along all dimensions which are simultaneously restricted or prolongated. Violation of this principle seldom causes catastrophic failure of the algorithm, but it will result in suboptimal performance, and can sometimes cause insidious errors.

Direct solvers would, at great computational cost, provide an exact answer to the algebraic problem posed in (2.45). As such, they provide face velocities in (2.42), (2.43), and (2.44) that exactly satisfy continuity on the finite control-volume (to within machine round-off error). The full multigrid solver is iterative. It is not sufficient to iterate to within an error comparable to the truncation error of the finite differencing scheme. *Any* error relating to satisfying continuity in the control volume is serious. It can lead to a slowly growing 2Δ error through feedback with the control-volume advection. Such errors can be controlled by weak application of a high-order low-pass filter (Purser 1987) but this degrades the usefulness of the model for studying the subgrid-scale problem (for the same reason eddy-viscosity must be rejected). A more specific approach is to build the small compressibility changes into the control-volume advection algorithm, which adds a trivial computational cost, totally removes the 2Δ instability, and does not further increase the truncation error.

### h. Molecular viscosity

Eddy-viscosity is not included in the model because it is unphysical. Molecular viscosity and diffusivity are, unarguably, physical and should be included in simulations that are at a sufficiently high resolution. Thus, molecular fluxes are treated using accurate control-volume calculations. An explicit treatment is used since molecular diffusivity and viscosity are small and do not place any undue restriction on the time step for most applications.

*u*across the

*i*+ 0.5 cell face might be calculated from the cell-averaged values

*u*as follows:

*u*

_{i,j,k}in the

*i*th direction to obtain the exact integral evaluated at cell faces then taking a fourth-order accurate second-difference (based on node points). Berezin and Zhidkov (1965) give an appropriate stencil for the second difference (−2, 32, −60, 32, −2)/24.

*u*across the other cell faces can be obtained similarly to (2.46) in which case the divergence of these fluxes,

*u*

_{i,j,k}due to molecular viscosity. The other molecular terms can be treated similarly. Updates for molecular fluxes are conveniently carried out immediately following the advective update.

## 3. Hydrostatic and nonhydrostatic convection

Small-scale convection has vertical accelerations that are just as large as horizontal acceleration and is therefore a fundamentally nonhydrostatic process. Many practical applications of ocean models use horizontal grid spacing that is much larger than the vertical grid spacing and make the hydrostatic approximation. Often, convection might be isolated to a small portion of the domain. Hydrostatic models can relieve buoyancy instability by hydrostatic convection, although such instability is often relieved by a parameterization scheme. Typically the parameterization involves vertical mixing until the buoyancy instability is relieved (Chen et al. 1994).

Here, hydrostatic and nonhydrostatic convection are compared without any parameterization scheme but with a robust and accurate numerical model. The comparisons will be done at various resolutions and different ratios of horizontal to vertical grid scale. The convection will be for basins with uniform depth and impermeable walls. In runs 0–8, a constant uniform heat flux of 200 W m^{−2} is removed from the surface of a small basin in which the planetary rotation plays little role. In runs 9–10, the heat loss is increased to 1000 W m^{−2} for a larger basin in which planetary rotation is dynamically important.

### a. Testing assumptions regarding δh and δq

The barotropic and nonhydrostatic pressure are both calculated implicitly. Momentum updates associated with gradients in *h* and *q* are obtained using a collocated fourth-order differencing operator. On the other hand, gradients in *δh* and *δq* are obtained using a staggered second-order differencing operator. This mix of second-order and fourth-order spatial differencing operators can still be argued to yield an effectively fourth-order accurate calculation in some circumstances.

Figure 1 of Sanderson and Brassington (1998) shows error as a function of the ratio of wavenumber to grid scale for various differencing operators. Errors *ε*_{2,C} of second-order staggered differencing (2, *C* grid) and errors *ε*_{4,A} of fourth-order collocated differencing (4, A grid) are relevant to the present discussion. Staggered second-order differencing results in an error within a factor of 10 of the error of the collocated fourth-order differencing (*ε*_{2,C} < 10*ε*_{4,A}) for a signal with a wavelength less than 20Δ*x.* Providing gradients in *δh* and *δq* have a magnitude at least one order less than gradients in *h* and *q,* respectively, then it follows that the second-order differencing will not degrade the fourth-order differencing operators for features in the solution with scales less than 20Δ*x.* Solution features with scales greater than 20Δ*x* might be somewhat degraded relative to a strictly fourth-order treatment of *δh* and *δq,* but such features are so accurately calculated, and vary so little from time step to time step, that no significant error is introduced.

Thus, it is the size of gradients in *h* and *q* relative to gradients in *δh* and *δq* that fundamentally determines whether the spatially second-order treatment of the adjustment for continuity can be justified in (2.34)–(2.36) and (2.42)–(2.45).

Accurate treatment of geostrophy is a fundamental design feature of the model. Indeed, the assumption that *δh* ≪ *h* is guaranteed for quasigeostrophic flow. Similarly, the assumption *δq* ≪ *q* is required if the second-order implicit equation for *δq* is not to degrade the solution in flows where vertical accelerations are important. Thus a simulation of convection at scales much smaller than those for which planetary rotation play a role will provide a nontrivial test of the above assumptions.

Table 1 summarizes the relative magnitudes of spatial derivatives of *q* to those of *δq* and similarly for *h* and *δh.* The ratio of the root-mean-square value of derivatives of *q* (or *h*) to the root-mean-square value of derivatives of *δq* (or *δh*) are presented. Also, the ratios of maximum absolute derivatives max(|∂*q*|)/max(|∂*δq*|) are shown. Clearly, updates in both the barotropic pressure and the nonhydrostatic pressure are small relative to values from the previous time step, although less so as the time step Δ*t* increases. (Runs 4, 5, 6 compare the ratio of barotropic pressure updates to barotropic pressure at three different values of Δ*t.* Runs 5, 7, 8 compare the ratio of nonhydrostatic pressure updates relative to nonhydrostatic pressure at two different values of Δ*t.*) This justifies using second-order spatial differencing to formulate elliptic equations for *δh* and *δq.*

The relative cost of the most computationally expensive algorithms in the model are given in Table 2 below. Values are presented as a percentage of the total computational cost. These calculations were done on a 200-MHz Pentium II scalar processor with 64 Mb of RAM. It should be noted that solving (2.45) for *δq* accounts for 53% of the computational cost of the model. Using a defect correction, or a fourth-order multigrid solver, to obtain *δq* at fourth-order would, therefore, increase computational cost out of proportion to any improvement in accuracy.

It is possible to use a defect correction to calculate *δh* to fourth-order spatial accuracy (Sanderson and Brassington 1998). This would involve a second application of the 2D full multigrid solver which would not require undue additional computational expense. Such an upgrade resulted in little accuracy improvement in the barotropic simulations of Sanderson and Brassington (1998) and has not been implemented here.

### b. Hybrid control-volume advection

Ocean models usually have Δ*x* ≈ Δ*y* ≫ Δ*z.* Runs 4, 5, and 6 all have Δ*x* = Δ*y* = 64Δ*z.* Once the convection had settled to a statistical equilibrium the maximum sinking speeds were 0.0059, 0.0062, 0.0064 m s^{−1} for each of these runs. Maximum horizontal velocities were 0.046, 0.043, 0.045 m s^{−1}. These should be compared to run 0 (Δ*x* = Δ*y* = Δ*z*), which had a maximum sinking speed of 0.014 m s^{−1} and a maximum horizontal speed of 0.016 m s^{−1}. Clearly, the sinking speed is reduced and the horizontal speed is increased as the horizontal dimension is made larger than the vertical dimension. These changes in speed are not in proportion to the change in the ratio Δ*x*/Δ*z.* The ratio of the vertical Courant number to the horizontal Courant number (*w*/Δ*z*)(Δ*x*/*u*) increases with increasing Δ*x*/Δ*z.* Time step limited advection schemes can, therefore, put an unreasonable limitation on the time step when an anisotropic grid Δ*x* ≈ Δ*y* ≫ Δ*z* is used to model convectively unstable flow.

To avoid the above limitation on the time step, it is common to use parameterization schemes (Chen et al. 1994) that increase vertical mixing which relaxes the convective forcing. Alternatively advection schemes that are not time step limited might be used. As noted earlier, three-dimensional advection schemes that are not time step limited are sufficiently computationally expensive that it is arguable that they present any advantage (Bartello and Thomas 1996). Note, however, that the vertical Courant number places by far the greatest restriction on the time step. Thus, a hybrid control-volume advection calculation might be used to good effect. Horizontal advective fluxes are obtained using time step–limited control-volume advection with (2.14). Vertical advective fluxes can be obtained using the Nonoscillatory, Integrally Reconstructed, Volume-Averaged Numerical Advection (NIRVANA) advection scheme (Leonard et al. 1995). NIRVANA is an explicit one-dimensional control-volume advection scheme that is not time step–limited.

In run 6, a fifth-order accurate NIRVANA calculation was used to calculate the vertical flux. The maximum vertical Courant number was >2 whereas the maximum horizontal Courant number was <0.25. Calculating the vertical advective flux with NIRVANA increased the computational cost of the nonhydrostatic model by 13% (or about 26% for a hydrostatic version of the model). This may be computationally cost effective because it enables substantially larger time steps. In oceanic applications one could, perhaps, use domain decomposition so that NIRVANA was only used in regions where large vertical velocities are likely, with the less computationally expensive time step limited vertical advection used elsewhere.

The order of accuracy of the above composite advection scheme is certain to be reduced from that of its component parts for at least two reasons. First, application of NIRVANA requires more careful consideration within *N*-cycle time stepping (Sanderson and Brassington 1998). Second, cross terms (Leonard et al. 1996) are omitted. Brassington and Sanderson (1999) raise a relevant issue relating to calculation of field accelerations in rotational flows.

### c. Temperature profiles: Horizontal resolution and the hydrostatic approximation

Runs 0, 1, 2, 3, 4, 5, and 6 consider convection in response to a steady heat loss. Convecting fluids are observed to have very weak vertical temperature gradients. Figure 2 shows horizontally averaged vertical profiles of temperature. The mean temperature has also been removed from each profile and the profiles averaged with respect to time (at times after adjustment to a statistical equilibrium). The coldest water is at the surface, as might be expected. As Δ*x* is increased relative to Δ*z* we observe that the surface water gets colder before it is advected away from the heat source (i.e., stronger buoyancy forcing is required to initiate fluid convection as Δ*x*/Δ*z* is increased). The cooler water at depth arises from the asymmetry of vertical motion, whereby cold water is transported downward at higher speed than warm water is transported upward. Clearly, the cold water falls through narrow streams and pools at the bottom. Whether the convective adjustment is hydrostatic or nonhydrostatic is of little consequence to the temperature profile when Δ*x*/Δ*z* is large (≥8 based on the present calculations). Indeed, making the calculation nonhydrostatic simply adds inertia to vertical motion which slightly exacerbates the already unrealistically slow convection and unrealistically large temperature gradients caused by Δ*x* being much greater than Δ*z.*

Figure 3 shows vertical *x* sections of temperature and velocity for nonhydrostatic calculations. Figure 3a is from a calculation with Δ*x* = Δ*y* = Δ*z* ≪ *D.* The convective motion has horizontal meanders that are substantial relative to the horizontal scale of the convecting cells. Figure 3b shows results from a model run with lower horizontal resolution Δ*x* = Δ*y* = 8Δ*z* which cannot resolve the horizontal meanders seen in Fig. 3a. Convection is much more anisotropic when using an anisotropic model grid.

Clearly the steady-state convection problem reduces to vertically mixing heat from top to bottom. In this sense it matters little whether one properly resolves the nonhydrostatic dynamics. The timescale for advecting cooler water from the surface is too long when Δ*x*/Δ*z* ≫ 1, but this is of little consequence when the surface heat flux forcing varies on still larger timescales.

Mixing cannot, however, represent convection associated with cooling on timescales that are small (or similar) to those for convection. The extreme case is when a surface-layer of fluid is instantaneously cooled. Figure 4 shows results from a nonhydrostatic simulation of the adjustment of a cold layer 9.75°C over a warm layer 10°C. The simulation used Δ*x* = Δ*y* = Δ*z* = 0.05 m. Cold water only partly mixes with warm water during the convective adjustment. After convective adjustment warm water overlays cold water. (The extent of the mixing will depend on the relative mixing of momentum and *T,* which is largely determined by truncation terms in the present simulation.)

### d. The anisotropic nonhydrostatic approximation

Column 9 of Table 1 shows the root-mean-square hydrostatic forces rms(*g*∂*h*) are similar to the root mean square nonhydrostatic forces rms(∂*q*) for all ratios of Δ*x*/Δ*z* tested here. Circumstances may, therefore, arise when it is desirable to include the nonhydrostatic pressure even though Δ*x* ≈ Δ*y* ≫ Δ*z.* The solution of a three-dimensional elliptic equation is computationally onerous (Table 2). Scaling considerations suggest that ∂^{2}*δq*/∂*z*^{2} ≫ ∂^{2}*δq*/∂*x*^{2} + ∂^{2}*δq*/∂*y*^{2} in equation (2.45), providing Δ*x* ≈ Δ*y* ≫ Δ*z.* Run 5 gives solutions for *δq* for convection with Δ*x* = Δ*y* = 64Δ*z.* These solutions for *δq* were obtained using a fully three-dimensional elliptic equation solver. Calculating the root-mean-square value of ∂^{2}*δq*/*δz*^{2} we find it to be 113 times the root-mean-square value of the horizontal Laplacian ^{2}_{H}*δq* = ∂^{2}*δq*/∂*x*^{2} + ∂^{2}*δq*/∂*y*^{2}.

The above anisotropy is fundamentally a function of the ratio of the length scales of horizontal modes to vertical modes of the flow—not merely a function of the ratio of Δ*x* to Δ*z.* Clearly the smallest horizontal scales are controlled by Δ*x* but the largest vertical scales are controlled by the depth. Certainly, if the depth is smaller than Δ*x* then the anisotropy is guaranteed, although Fig. 3 demonstrates that anisotropy applies in less restricted circumstances.

^{2}

_{H}

*δq*≪ ∂

^{2}

*δq*/∂

*z*

^{2}, then (2.45) might be reposed as a one-dimensional implicit problem:

*δ*

*q*

^{n}

_{i,j,k}

*δ*

*q*

^{n+1}

_{i,j,k}

*βδq*from the previous time step, where 0 ≤

*β*≤ 1. If the ratio of Δ

*x*to Δ

*z*is sufficiently large then only one iteration might be sufficient. Otherwise,

*δq*

^{n+1}

_{i,j,k}

*δq*

^{n}

_{i,j,k}

The boundary conditions are ∂*δq*/∂*z* = 0 at the surface and bottom. Note that each vertical column of cells is solved independently of the other columns. Each vertical column is only solved to within an arbitrary constant because both surface and bottom have Neumann boundary conditions. The vertical constant is determined as follows.

Vertically integrating ∂^{2}*δq*/∂*z*^{2} from the bottom to the surface and imposing the boundary conditions ∂*δq*/∂*z*^{z=0}_{z=−D}

*δq*is zero:

^{2}

_{H}

*δ*

*q*

*δ*

*q*= 0 if the horizontal boundary conditions are homogeneous Neumann. Here

*δ*

*q*is the vertical integral of

*δq.*Thus

*δ*

*q*= 0 is the constraint that can be used to remove the arbitrary constants in the solution of (3.1).

The above anisotropic nonhydrostatic calculation was used in a simulation with Δ*x* = Δ*y* = 64Δ*z* and is denoted run 7 in Table 1. The computational cost of the total nonhydrostatic calculation is reduced by slightly more than a factor of 3 when the above anisotropic calculation of *δq* is used with three iterations. Thus, a 45% savings in total model computational cost was achieved by replacing the full nonhydrostatic calculation with the anisotropic calculation.

Run 8 demonstrates the anisotropic nonhydrostatic pressure update with NIRVANA advection in the vertical. Now much larger time steps are possible. Each time step costs 32% less than for the standard model with time step limited advection (2.14) and a fully three-dimensional nonhydrostatic calculation (2.45).

### e. Convection and Coriolis

The length scales of convection in runs 0–8 were too small for the convection to be influenced by the earth's rotation. In runs 9 and 10, the convection is modeled in an enclosed volume with horizontal dimensions of 9.5 km and a depth of 1.1 km. Coriolis corresponding to a latitude of 75°S was used, giving an inertial period of about 12.4 h. The convection is driven by surface cooling of 1000 W m^{−2}. Initially the fluid was at rest with a constant potential temperature of 10°C and salinity 35 ppt. Compressibility should not be ignored for deep convection, so a local fit to the full UNESCO equation of state was used (Sanderson et al. 2002).

The model was integrated for more than two inertial periods using a grid resolution of 100 m in all three dimensions. Convecting cells had typical horizontal scales of about 0.5 km. This low-resolution (100 m) solution was then reconstructed onto a grid with resolution of approximately 49.74 m in the horizontal and 47.83 m in the vertical. A conserving fourth-order accurate control-volume integral reconstruction was used for this approximate doubling of resolution. Integrating the model with high resolution for an additional 2 h did not change the pattern of convecting cells, but did lead to more intense eddies with sharper fronts and higher peak flow speeds (20 vs 15 cm s^{−1}) than in the low-resolution calculation.

Figure 5a shows detail of the surface current and temperature over a small portion of the total domain. Some cold regions have strong horizontal convergence and little rotation and others have strong rotation and little horizontal convergence. Vortex stretching results in potential energy being converted to rotational kinetic energy which arrests sinking and forms eddies with strong cyclonic rotation.

The crosses on the *y* axis of Fig. 5a show west–east transects along which the vertical cross sections in Fig. 5b and Fig. 5c are taken. The southern cross section (at *y* = 4.3274 km) shows a developing zone of convection near *x* = 6.6 km in an area with little rotation evident in Fig. 5a. The convection of cold water is arrested where Fig. 5a shows strong cyclonic rotation, although cold water obviously leaks from the edges of these cyclonic eddies and subsequently sinks.

### f. Convection and the subgrid scale

Subgrid-scale effects in rotational deep-sea convection might be directly estimated as follows. Integral reconstruction is used to represent the high-resolution solution on a coarsened grid. This is shown in Fig. 6a, titled “initial.” The above initial condition was integrated forward in a low-resolution model for 16 time steps each of 20 s. (This time step is far from being limited by stability constraints.) This gives the solution plotted in Fig. 6b, which is titled “Lo-res update.” The high-resolution solution was used to initialize a high-resolution model which was also integrated forward for 16 time steps each of 20 s. The high-resolution solution obtained after this integration can be reconstructed onto the coarse grid to obtain Fig. 6c, which is labeled “Hi-res update.”

The difference between Fig. 6b (low-resolution update) and Fig. 6c (high-resolution update reconstructed onto the low resolution grid) is plotted in Fig. 6d and titled “Subgrid scale.” Dividing the velocity differences in Fig. 6d by the time interval gives the subgrid-scale accelerations. A subgrid-scale parameterization should produce such accelerations based on information contained in the low-resolution fields. Obviously, the subgrid-scale acceleration is a very noisy signal and has very little correlation with the low resolution fields. Certainly, applying a smoothing operator to the low resolution fields *could never* reproduce the appropriate subgrid-scale accelerations. Indeed, any smoothing operator would push the solution the wrong way.

## 4. Summary

The DieCAST strategy of dividing the barotropic component of the hydrostatic pressure gradient updates into an explicit part calculated at fourth order using *h* from the previous time step followed by a second-order implicit update for *δh* has been used. The idea behind this strategy is that gradients in *h* will be much greater than those in *δh* for quasigeostrophic flows in which the local time derivative is small compared to the field accelerations and very small compared to Coriolis (Sanderson and Brassington 1998). Further, the magnitude of the truncation error resulting from staggered second-order differencing of *δh* is less than the truncation error resulting from fourth-order collocated differencing of *h*—at least for the band of wavenumber signals that most require a high-order treatment. This idea is extended for the nonhydrostatic calculation, where an explicit update using a fourth-order gradient in *q* is followed by an implicit lower-order update based on the increment *δq* in nonhydrostatic pressure. Here it has been demonstrated that even for small scale convecting flow the pressure updates (*δh,* *δq*) cause small gradients relative to those of the old values (*h,* *q*). The advantage of this strategy is that it enables *δq* to be calculated at second order without greatly reducing the accuracy of the solution but with substantial savings in computational cost. Thus second-order spatial differencing of *δq* does not necessarily degrade accuracy, but greatly reduces computational cost.

In the present version of this model an iterative method is used to solve the implicit equations for *δh* and *δq.* Iterative methods do not provide an exact solution to the algebraic equations resulting from the discretization—rather they are usually converged to be accurate to within truncation error. Small violations of incompressibility can cause a weak 2Δ instability via feedback from the control-volume advection term. This instability is avoided by modifying the advection scheme to explicitly accommodate these small errors in continuity.

For convective flows, the vertical Courant number becomes larger than the horizontal Courant number as the horizontal grid spacing is made greater than the vertical grid spacing. This anisotropy in the advection can unnecessarily limit the time step when time step restricted advection schemes are used. Multidimensional advection schemes that are not time step limited have substantial computational cost that counteracts any advantage obtained by increased stability with large time steps. In this anisotropic situation, however, we have demonstrated an amalgamation of a low-cost two-dimensional horizontal advection scheme that is time step limited with a somewhat higher cost one-dimensional NIRVANA vertical advection scheme that is not time step–restricted by stability constraints. This composite control-volume scheme is conservative, but its order of accuracy will be degraded relative to the constituent schemes from which it is composed.

It is not uncommon for ocean models to have horizontal grid spacing comparable to or greater than the water depth. The hydrostatic approximation is probably quite acceptable in almost all such circumstances, although a computationally inexpensive calculation of the nonhydrostatic pressure is possible. Given the anisotropy of the grid, it turns out that the horizontal Laplacian is small, which reduces the elliptic equation for *δq* to a quasi–one-dimensional implicit equation that reduces to iterating on a tridiagonal system.

A control-volume, nonhydrostatic ocean model has been formulated with many features that are fourth- or fifth-order accurate. Implicit calculation of changes in surface elevation *δh* reduces the formal accuracy with which the barotropic gravity wave is calculated, so the model is not ideal for all dynamical systems. Efforts are ongoing to address weaknesses in the model; specifically a split-explicit formulation is being considered which would enable the barotropic gravity wave to be calculated at fully fourth-order accuracy with respect to temporal and spatial differencing.

The model does not require any artificial damping or eddy-viscosity for stability. For at least some dynamical systems the model is computationally efficient in the sense that it has an effective order of accuracy at least as great as its dimensionality and the computational cost is directly proportional to the number of grid points in the model domain. In such circumstances fourth-order accuracy and consistency with the continuum equations make this model well suited for unambiguously addressing questions relating to subgrid-scale parameterizations. A preliminary calculation shows that diffusive or otherwise dissipative subgrid-scale parameterizations are likely to be counterproductive when modeling convecting cells.

## Acknowledgments

Three anonymous reviewers identified misleading and unclear material in the earlier draft. We thank them for their care and insight.

## REFERENCES

Arakawa, A., and Lamb V. R. , 1977: Computational design of the basic dynamical processes of the UCLA general circulation model.

,*Methods of Comput. Phys.***17****,**174–265.Bartello, P., and Thomas S. J. , 1996: The cost-effectiveness of semi-Lagrangian advection.

,*Mon. Wea. Rev.***124****,**2883–2897.Berezin, I. S., and Zhidkov N. P. , 1965:

*Computing Methods*. Vol. 1. Pergamon Press, 464 pp.Blumberg, A. F., and Mellor G. L. , 1987: A description of a three-dimensional coastal ocean circulation model.

*Three-Dimensional Coastal Ocean Models,*N. S. Heaps, Ed., Amer. Geophys. Union, 1–16.Brassington, G. B., 2000: High order methods for computational geophysical fluid dynamics. Ph.D. thesis, School of Mathematics, University of New South Wales, 310 pp.

Brassington, G. B., and Sanderson B. G. , 1999: Semi-Lagrangian and COSMIC advection in flows with rotation or deformation.

,*Atmos.–Ocean***37****,**369–387.Briggs, W. L., 1994:

*A Multigrid Tutorial*. Lancaster Press, 90 pp.Browning, G. L., Henshaw W. D. , and Kriess H-O. , 1998: A numerical investigation of the interaction between large and small scales of the two-dimensional incompressible Navier–Stokes equations. UCLA CAM Rep. 98-23, 67 pp.

Bryan, K., 1969: A numerical model for the study of the circulation of the World Ocean.

,*J. Comput. Phys.***4****,**347–376.Bryden, H. L., 1973: New polynomials for thermal expansion, adiabatic temperature gradient and potential temperature gradient in sea water.

,*Deep-Sea Res.***20****,**401–408.Chen, D., Rothstein L. M. , and Busalacchi A. J. , 1994: A hybrid vertical mixing scheme and its application to tropical ocean models.

,*J. Phys. Oceanogr.***24****,**2156–2179.Dietrich, D. E., 1997: Application of a modified Arakawa “A” grid ocean model having reduced numerical dispersion to the Gulf of Mexico circulation.

,*Dyn. Atmos. Oceans***27****,**201–217.Dietrich, D. E., and Kuo D-S. , 1994: A semi-collocated ocean model based on the SOMS approach.

,*Int. J. Numer. Methods Fluids***19****,**1103–1113.Gill, A. E., 1982:

*Atmosphere–Ocean Dynamics*. Academic Press, 662 pp.Lax, P. D., and Richtmyer R. D. , 1956: Survey of the stability of linear finite difference equations.

,*Commun. Pure Appl. Math.***9****,**267–293.Leonard, B. P., 1979a: A stable and accurate convective modelling procedure based on quadratic upstream interpolation.

,*Comput. Methods Appl. Mech. Eng.***19****,**59–98.Leonard, B. P., . 1979b: A survey of finite differences of opinion on numerical muddling of the incomprehensible defective confusion equation.

*Finite Element Methods for Convection Dominated Flows,*T. J. R. Hughes, Ed., AMD-34, ASME, 1–17.Leonard, B. P., . 1995: Order of accuracy of QUICK and related convection–diffusion schemes.

,*Appl. Math. Model***19****,**640–653.Leonard, B. P., Lock A. P. , and MacVean M. K. , 1995: The NIRVANA scheme applied to one-dimensional advection.

,*Int. J. Numer. Methods Heat Fluid Flow***5****,**341–377.Leonard, B. P., . 1996: Conservative, explicit, unrestricted time step, multidimensional, constancy-preserving advection schemes.

,*Mon. Wea. Rev.***124****,**2588–2606.Leslie, L. M., and Purser R. J. , 1995: Three-dimensional mass-conserving semi-Lagrangian scheme employing forward trajectories.

,*Mon. Wea. Rev.***123****,**2551–2556.Lin, S-J., and Rood R. B. , 1996: Multidimensional flux-form semi-Lagrangian transport schemes.

,*Mon. Wea. Rev.***124****,**2046–2070.Lorenz, E. N., 1971: An

*N*-cycle time-differencing scheme for step-wise numerical integration.,*Mon. Wea. Rev.***99****,**644–648.Margolin, L. G., Smolarkiewcz P. K. , and Sorbjan Z. , 1999: Large-eddy simulations of convective boundary layers using nonoscillatory differencing.

,*Physica D***133****,**390–397.McGregor, J. L., 1993: Economical determination of departure points for semi-Lagrangian models.

,*Mon. Wea. Rev.***121****,**221–230.Pacanowski, R. C., 1995: MOM2 documentation, users's guide and reference manual. GFDL Ocean Group Tech. Rep. 3, 232 pp. [Available online at http://www.gfdl.gov~smg/MOM/MOM.html.].

Press, W. H., Teukolsky S. A. , Vettering W. T. , and Flannery B. P. , 1996:

*Numerical Recipes in Fortran 90: The Art of Parallel Scientific Computing*. Cambridge University Press, 1486 pp.Purser, R. J., 1987: The filtering of meteorological fields.

,*J. Climate Appl. Meteor.***26****,**1764–1769.Roache, P. J., 1982:

*Computational Fluid Dynamics*. Hermosa, 446 pp.Roache, P. J., . 1995:

*Elliptic Marching Methods and Domain Decomposition*. CRC Press, 185 pp.Sanderson, B. G., 1998: Order and resolution for computational ocean dynamics.

,*J. Phys. Oceanogr.***28****,**1271–1286.Sanderson, B. G., and Brassington G. , 1998: Accuracy in the context of a control-volume model.

,*Atmos.–Ocean***36****,**355–384.Sanderson, B. G., Dietrich D. , and Stilgoe N. , 2002: A numerically effective calculation of sea water density.

,*Marine Models Online***2****,**19–34.Shchepetkin, A. F., and McWilliams J. C. , 1998: Quasi-monotone advection schemes based on explicit locally adaptive dissipation.

,*Mon. Wea. Rev.***126****,**1541–1580.UNESCO, 1981: Tenth report of the joint panel on oceanographic tables and standards. UNESCO Tech. Papers Mar. Sci. 36, UNESCO.

Weaver, A. J., and Eby M. , 1997: On the numerical implementation of advection schemes for use in conjunction with various mixing parameterizations in the GFDL ocean model.

,*J. Phys. Oceanogr.***27****,**369–377.

Temperature profiles in a convecting fluid. Profiles have been averaged with respect to the horizontal coordinates. See legend at bottom of figure for runs 0, 1, 3, and runs 4, 5, 6. Run 0 used an isotropic grid and is a fully nonhydrostatic calculation. Run 0 is plotted using a solid line and is most nearly isothermal. Run 4 (hydrostatic) is also plotted with a solid line. Runs 1 and 5 are plotted with dashed lines and are nonhydrostatic. Runs 3 and 6 are plotted with dash–dot lines and are hydrostatic. Runs 1 and 3 used Δ*x* = 8Δ*z* and are much more nearly isothermal than runs 4, 5, and 6 for which Δ*x* = 64Δ*z.* Stratification increases as the grid is made more anisotropic. Comparing 1 with 3 and 4, 6 with 5 it is clear that the stratification is little effected by the hydrostatic approximation

Citation: Journal of Atmospheric and Oceanic Technology 19, 9; 10.1175/1520-0426(2002)019<1424:FAFOFD>2.0.CO;2

Temperature profiles in a convecting fluid. Profiles have been averaged with respect to the horizontal coordinates. See legend at bottom of figure for runs 0, 1, 3, and runs 4, 5, 6. Run 0 used an isotropic grid and is a fully nonhydrostatic calculation. Run 0 is plotted using a solid line and is most nearly isothermal. Run 4 (hydrostatic) is also plotted with a solid line. Runs 1 and 5 are plotted with dashed lines and are nonhydrostatic. Runs 3 and 6 are plotted with dash–dot lines and are hydrostatic. Runs 1 and 3 used Δ*x* = 8Δ*z* and are much more nearly isothermal than runs 4, 5, and 6 for which Δ*x* = 64Δ*z.* Stratification increases as the grid is made more anisotropic. Comparing 1 with 3 and 4, 6 with 5 it is clear that the stratification is little effected by the hydrostatic approximation

Citation: Journal of Atmospheric and Oceanic Technology 19, 9; 10.1175/1520-0426(2002)019<1424:FAFOFD>2.0.CO;2

Temperature profiles in a convecting fluid. Profiles have been averaged with respect to the horizontal coordinates. See legend at bottom of figure for runs 0, 1, 3, and runs 4, 5, 6. Run 0 used an isotropic grid and is a fully nonhydrostatic calculation. Run 0 is plotted using a solid line and is most nearly isothermal. Run 4 (hydrostatic) is also plotted with a solid line. Runs 1 and 5 are plotted with dashed lines and are nonhydrostatic. Runs 3 and 6 are plotted with dash–dot lines and are hydrostatic. Runs 1 and 3 used Δ*x* = 8Δ*z* and are much more nearly isothermal than runs 4, 5, and 6 for which Δ*x* = 64Δ*z.* Stratification increases as the grid is made more anisotropic. Comparing 1 with 3 and 4, 6 with 5 it is clear that the stratification is little effected by the hydrostatic approximation

Citation: Journal of Atmospheric and Oceanic Technology 19, 9; 10.1175/1520-0426(2002)019<1424:FAFOFD>2.0.CO;2

Vertical sections showing velocity vectors and temperature. Darker shading indicates lower temperatures. The temperature range is indicated above each plot: (a) horizontal meanders in the convecting flow when it is modeled in run 0 at high resolution with Δ*x* = Δ*y* = Δ*z*; (b) the convection in run 1 becomes much more anisotropic when modeled on a grid with Δ*x* = Δ*y* = 8Δ*z*

Vertical sections showing velocity vectors and temperature. Darker shading indicates lower temperatures. The temperature range is indicated above each plot: (a) horizontal meanders in the convecting flow when it is modeled in run 0 at high resolution with Δ*x* = Δ*y* = Δ*z*; (b) the convection in run 1 becomes much more anisotropic when modeled on a grid with Δ*x* = Δ*y* = 8Δ*z*

Vertical sections showing velocity vectors and temperature. Darker shading indicates lower temperatures. The temperature range is indicated above each plot: (a) horizontal meanders in the convecting flow when it is modeled in run 0 at high resolution with Δ*x* = Δ*y* = Δ*z*; (b) the convection in run 1 becomes much more anisotropic when modeled on a grid with Δ*x* = Δ*y* = 8Δ*z*

Profiles of temperature at 320-s intervals. Initially cold water lays over warm water as shown by the thick line. The model was started from rest with a small random perturbation to initiate the convective instability. The line with intermediate thickness shows the temperature profile after 360 s. After 720 s the thin line shows that, although there has been significant mixing, there has also been an advective overturning so warm water now lays over cold water

Profiles of temperature at 320-s intervals. Initially cold water lays over warm water as shown by the thick line. The model was started from rest with a small random perturbation to initiate the convective instability. The line with intermediate thickness shows the temperature profile after 360 s. After 720 s the thin line shows that, although there has been significant mixing, there has also been an advective overturning so warm water now lays over cold water

Profiles of temperature at 320-s intervals. Initially cold water lays over warm water as shown by the thick line. The model was started from rest with a small random perturbation to initiate the convective instability. The line with intermediate thickness shows the temperature profile after 360 s. After 720 s the thin line shows that, although there has been significant mixing, there has also been an advective overturning so warm water now lays over cold water

(a) Surface temperature and velocity vectors for convection driven by a 1000 W m^{−2} surface heat flux. The model resolution is approximately 50 m in all three dimensions. Only a small portion of the total 9.5 km by 9.5 km horizontal domain is shown. (b) Vertical cross section of temperature and velocity vectors along the transect corresponding to *y* = 5.173 km. The end points of this transect are indicated by the northern crosses in (a). (c) Vertical cross section of temperature and velocity vectors along the transect corresponding to *y* = 4.327 km. The end points of this transect are indicated by the southern crosses in (a)

(a) Surface temperature and velocity vectors for convection driven by a 1000 W m^{−2} surface heat flux. The model resolution is approximately 50 m in all three dimensions. Only a small portion of the total 9.5 km by 9.5 km horizontal domain is shown. (b) Vertical cross section of temperature and velocity vectors along the transect corresponding to *y* = 5.173 km. The end points of this transect are indicated by the northern crosses in (a). (c) Vertical cross section of temperature and velocity vectors along the transect corresponding to *y* = 4.327 km. The end points of this transect are indicated by the southern crosses in (a)

(a) Surface temperature and velocity vectors for convection driven by a 1000 W m^{−2} surface heat flux. The model resolution is approximately 50 m in all three dimensions. Only a small portion of the total 9.5 km by 9.5 km horizontal domain is shown. (b) Vertical cross section of temperature and velocity vectors along the transect corresponding to *y* = 5.173 km. The end points of this transect are indicated by the northern crosses in (a). (c) Vertical cross section of temperature and velocity vectors along the transect corresponding to *y* = 4.327 km. The end points of this transect are indicated by the southern crosses in (a)

(a) Initial temperature and velocity vector conditions shown on a low-resolution grid (averaged from a high-resolution solution). (b) An update of the temperature and velocity field after sixteen 20-s time steps of the low-resolution (100-m) model. (c) After sixteen 20-s time steps of the high-resolution model (grid scale ≈ 50 m), the updated temperature field is averaged to the low-resolution grid and plotted. (d) The difference between the low-resolution update and the high-resolution update averaged onto the low-resolution grid

(a) Initial temperature and velocity vector conditions shown on a low-resolution grid (averaged from a high-resolution solution). (b) An update of the temperature and velocity field after sixteen 20-s time steps of the low-resolution (100-m) model. (c) After sixteen 20-s time steps of the high-resolution model (grid scale ≈ 50 m), the updated temperature field is averaged to the low-resolution grid and plotted. (d) The difference between the low-resolution update and the high-resolution update averaged onto the low-resolution grid

(a) Initial temperature and velocity vector conditions shown on a low-resolution grid (averaged from a high-resolution solution). (b) An update of the temperature and velocity field after sixteen 20-s time steps of the low-resolution (100-m) model. (c) After sixteen 20-s time steps of the high-resolution model (grid scale ≈ 50 m), the updated temperature field is averaged to the low-resolution grid and plotted. (d) The difference between the low-resolution update and the high-resolution update averaged onto the low-resolution grid

Gradients of δ*h* and δ*q* relative to gradients of *h* and *q* for various resolutions and model configurations

Computational cost of model components as a percentage of total computational cost