## 1. Introduction

The dynamics of narrow coastal systems, such as estuaries and fjords, may be approximated with laterally averaged governing equations if the domain width is much smaller than the internal Rossby radius of deformation and if the cross-channel flow is small compared to the along-channel flow. Accordingly, many models have been based on laterally averaged equations of motion (Hamilton 1975; Blumberg 1977; Wang and Kravitz 1980; Ford et al. 1990; Lavelle et al. 1991; Gillibrand et al. 1995; Stacey et al. 1995; Wang 1998). Even though the lateral average approach is not much more computationally demanding than a strictly two-dimensional approach, it yields considerable benefits. For example, contracting channels cause flow accelerations, and neglecting this effect may yield incorrect internal Froude numbers, perhaps leading to large errors in the rate at which fluid can be exchanged through contractions (Armi and Farmer 1986, 1987; Farmer and Armi 1986).

*ω*is the internal-wave oscillation frequency,

*N*is the buoyancy frequency, and

*H*and

*L*are the characteristics vertical and horizontal scale of the flow, respectively. The above is identical to the long-wave or “shallow-water” approximation (Gill 1982, p. 159). Consequently, hydrostatic models cannot simulate small-scale (i.e., scale comparable to or smaller than the water depth) physical processes, including important cases such as shear instabilities, high-frequency internal waves, and wave breaking (Farmer and Freeland 1983). So far, these nonhydrostatic geophysical problems have been studied mostly using pure two-dimensional models (e.g., Lamb 1994; Hibiya et al. 1998; Afanasyev and Peltier 2001; Cummins et al. 2003). We are not aware of models that combine the lateral-averaged approach with nonhydrostatic physics.

With this motivation, we present in this paper the details of a model based on the laterally averaged nonhydrostatic equations of motion (section 2). Through a series of process-oriented test cases (section 3) and an oceanographic application (section 4) we show that this new model achieves an efficient compromise for applications in limited domains, such as estuaries, narrow embayments, and lakes, where nonhydrostatic phenomena may be important.

## 2. Model description

### a. Governing equations

*t*is time;

*x*is the horizontal coordinate along the channel;

*z*is the vertical coordinate with its origin at the undisturbed sea surface and positive downward;

*u*(

*x,*

*z,*

*t*) is the horizontal velocity component;

*w*(

*x,*

*z,*

*t*) is the vertical velocity (positive downward);

*η*(

*x,*

*t*) is the surface elevation relative to the local mean sea level (positive upward);

*H*(

*x*) is the water depth;

*p*(

*x,*

*z,*

*t*) is the pressure;

*ρ*

_{0}is a constant reference density;

*ρ*(

*x,*

*z,*

*t*) is the density given by the United Nations Educational, Scientific and Cultural Organization (UNESCO) equation of state of seawater (Gill 1982, p. 599);

*C*(

*x,*

*z,*

*t*) is the concentration of any scalar (e.g., density

*ρ,*temperature

*T,*salinity

*S,*or any other passive tracer);

*B*(

*x,*

*z*) is the width;

*g*is gravity;

*A*

_{H}(

*x,*

*z,*

*t*),

*A*

_{V}(

*x,*

*z,*

*t*),

*K*

_{H}(

*x,*

*z,*

*t*) and

*K*

_{V}(

*x,*

*z,*

*t*) are coefficients of eddy viscosity and diffusivity; and

*S*

_{f}(

*x,*

*z*) is a drag coefficient for quadratic bottom friction along the stepped channel cross sections given by where

*S*

_{0}is a tunable parameter (Lavelle et al. 1991). Depending on the model application, the eddy viscosity is either taken as constant or parameterized as in Smagorinsky (1963), or in term of the Richardson number as in Pacanowski and Philander (1981). The term

*δ*in (4) indicates a computational switch that permits the model to be run in either hydrostatic or nonhydrostatic mode.

*η,*from variations of the mean water level

*a*

_{0}(

*x*) with respect to the geoid (Dronkers 1964), and from longitudinal density variations. The final term in (8) is the nonhydrostatic deviation, indicated with a prime. An analogous term appears in the formulation for the vertical pressure variation, that is, with the first term being the hydrostatic pressure gradient, equal to

*ρg,*and the second being the nonhydrostatic component. These nonhydrostatic deviations are calculated with the pressure-projection method (Jankowski 1999), a numerical technique explained in the next section.

### b. Numerical scheme

A finite-difference scheme is used, with the governing equations discretized on a variable-mesh *z*-coordinate C grid (Arakawa 1966) as in Wang and Kravitz (1980) without the implementation of partial (e.g., Lu et al. 2001) or shaved cells (Adcroft et al. 1997) at the bottom. The topography is thus represented by discrete steps that must fit the vertical grid. The vertical grid is fixed except for the surface grid points, which adjust every time step to the position of the free surface. The surface vertical grid spacing must thus be larger than the maximum expected tidal amplitude, which precludes the representation of processes occurring within thin surface layers. Numerical techniques to resolve thin surface layers subject to large vertical variations on *z*-coordinate models have been developed by Hamilton (1975) and Stacey et al. (1995) but are not implemented here.

Centered differences are used for the spatial derivatives in the momentum and continuity equations, (3), (4), and (5), as well as diffusion terms in the scalar equation (7). A second-order limited upstream differencing scheme is used for the advection of scalar quantities, in order to reduce the numerical dispersion associated with the centered advection scheme and to reduce the excessive smoothing associated with the first-order upstream advection scheme; see Pietrzak (1998) and Roache (1998) for detailed descriptions of this method. For all simulations presented in this paper the van Leer “flux limiter” was used.

All advective and diffusive terms are treated implicitly using the second-order Crank–Nicholson scheme (Ferziger and Perić 1996). To simplify the two-dimensional implicit problem, a two-step fractional method is used with equations being split into their *x* and *z* components (Ferziger and Perić 1996). This reduces the two-dimensional implicit problem to a sequence of one-dimensional problems involving the solution of a tridiagonal matrix by a compact LU decomposition (Press et al. 1992).

*N*is the buoyancy frequency.

*p*′, the integration is carried out in two stages. In the first stage, intermediate velocity fields (

*ũ,*

*w̃*) are calculated by solving (3) and (4) with the nonhydrostatic pressure gradient terms, the last terms in (8) and (9), taken from the previous time step. At this first stage of the calculation, the flow field may be divergent; that is,

*ũ*and

*w̃*may not satisfy the continuity equation. In the second stage, a “pressure-correction” is applied to the flow field, making it divergence-free, by writing where the superscript

*n*+ 1 indicates the desired value for the (

*n*+ 1)-th time step and

*p̃*′ is the nonhydrostatic pressure correction field needed to obtain a divergence-free solution. It remains to calculate

*p̃*′. An equation for

*p̃*′ is obtained by multiplying (11) and (12) by

*B*and by applying the divergence operator. Taking into consideration that the resulting velocity field (

*u*

^{n+1},

*w*

^{n+1}) must fulfill the continuity equation (5), the following elliptic equation for

*p̃*′ is obtained: Solving (13) at every time step represents the main computational challenge in the model algorithm. After some experimentation with alternate techniques, we chose to solve (13) with the preconditioned conjugate gradient method (Press et al. 1992) as in Marshall et al. (1997a, b). This method converges rapidly if the flow is approximately hydrostatic. We refer readers to Marshall et al. (1997b) for a detailed description of this algorithm. As an indication on the convergence property of the algorithm we noted that for the nonhydrostatic simulations presented in the following sections it took roughly 10

^{−2}

*M*iterations to reduce the error by a factor of 10

^{−7}, where here

*N*is the total number of grid points. Once (13) is solved, the nonhydrostatic pressure can be updated—that is,

*p*′

^{n+1}=

*p*′

^{n}+

*p̃*′.

### c. Boundary conditions

*u*

_{b}and

*w*

_{w}are the bottom cell horizontal velocity and vertical velocity in a cell next to a perpendicular solid boundary, respectively, and

*C*

_{D}is a drag coefficient given by the law of the wall (Kundu 1990, p. 454),

*C*

_{D}

*κ*

*l*

*l*

_{0}

^{2}

*κ*= 0.41 is the von Kármán's constant,

*l*is either the height above the bottom [Eq. (14)] or the horizontal distance from the wall [Eq. (15)], and

*l*

_{0}is the roughness length. The surface shear stress from the wind action is given by where

*ρ*

_{a}is the air density,

*W*is the along-channel component of the wind velocity, and

*C*

_{w}=

*f*(|

*W*|) is a drag coefficient (Gill 1982, p. 29). For the nonhydrostatic pressure,

*u*and scalar concentration

*C*(e.g., density) are either imposed or calculated using the following radiation condition (e.g., Stacey et al. 1995), Surface elevation at open boundaries are either imposed or computed using a gravity-wave radiation condition (Chapman 1985); that is, where

*c*=

*gH*

As a measure of the efficiency of the code, we note that each of the simulations presented in the following sections can be done overnight on a typical desktop workstation. It is also worth noting that a typical nonhydrostatic run may take 10 to 100 times longer than an hydrostatic run.

## 3. Test cases

In order to test the model code and the accuracy of its algorithms, we have undertaken a series of test cases of increasing complexity in terms of the forcing and of the domain geometry. These are described in the following subsections.

### a. Lock-exchange flow

The main driving force of estuarine overturning circulation is the baroclinic pressure gradient induced by the density difference between fresh river water on one end and salty oceanic water on the other end. A simplication of this situation, the gravitational adjustment of two water masses of different densities initially separated by a vertical gate, has come to be called the lock-exchange problem. It has become a standard case for testing the baroclinic dynamics component of models, and it is also used to assess scalar advection schemes (Haidvogel and Beckmann 1999, p. 221). In addition we will use this case for illustration of the differences between hydrostatic and nonhydrostatic responses.

The model configuration is set to match that of Jankowski (1999) with channel length *L* = 30 m, width *B* = 3 m, and depth *H* = 4 m. The horizontal and vertical resolutions are Δ*x* = Δ*z* = 0.2 m and the time step is Δ*t* = 1 s. At *t* = 0 the left and right halves of the basin are occupied by water of density *ρ*_{2} = 1000.722 kg m^{−3} and *ρ*_{1} = 999.972 kg m^{−3}, respectively.

During the adjustment process, waves and shear instabilities develop at the interface. These can be handled by the nonhydrostatic model, given sufficient resolution (as will be illustrated in more detail in the following subsection) but cause numerical instabilities in the hydrostatic model. In order to stabilize the hydrostatic run and to make comparable hydrostatic and nonhydrostatic solutions, viscosity and diffusivity were set to *A*_{H} = *K*_{H} = 6.5 × 10^{−3} m^{2} s^{−1} and *A*_{V} = *K*_{V} = 10^{−6} m^{2} s^{−1} as minimum values for a stable hydrostatic solution. The side and bottom friction are both set to *C*_{D} = *S*_{0} = 0, which is equivalent to using a free slip condition as done in Jankowski (1999).

Figure 2 compares the hydrostatic and nonhydrostatic solution. As a check on the numerical scheme and on the two-dimensionality of the flow at this stage, we note that the fields are visually identical to the results of the three-dimensional model of Jankowski (1999, his Figs. 5.12 and 5.13, p. 143).

There are notable differences in the interface shapes and velocity fields for the hydrostatic and nonhydrostatic cases. The nonhydrostatic case better reproduces the shape of the head of the intrusion. According to laboratory observations (Turner 1973, p. 70), the characteristic nose angle at the stagnation point is *α* = 60°, which is matched to within 3% in the nonhydrostatic case but only within 40% for the hydrostatic case.

*u*| in the middle of the channel (

*x*= 15 m) at the surface (

*z*= 0) and at the bottom (

*z*= 4 m). In both layers |

*u*| converges to 1.02

*U*in the hydrostatic case and to 0.988

*U*in the nonhydrostatic case. Both cases thus converge toward a phase velocity comparable to the theoretical value.

We performed several consistency checks in the model. For example, over the course of the simulation, the total mass was conserved to within 10^{−5}% (note that calculations are done in double precision). Also, the scalar advection scheme did not produce unphysical localized extrema in the density field like the centered advection scheme would do (see Haidvogel and Beckmann 1999, p. 221). These tests, and the agreement with other modeling studies, lend confidence in the model formulation and coding, so the next test cases compare with laboratory experiments, not with other models.

### b. Shear instability

In stratified shear flows, such as those observed in estuaries and fjords, shear instability is an important mechanism for enhancing turbulent mixing (Geyer and Smith 1987; Farmer and Armi 1999b). To test the ability of the model to simulate such nonhydrostatic phenomena, we start with an idealized test case: Thorpe's (1968) laboratory experiment on shear instabilities in a two-layer fluid.

We have reproduced this experimental setting numerically. The tank, closed at both ends, has length *L* = 1.83 m, height *H* = 0.03 m, and width *B* = 0.1 m. For computational efficiency, we have used a nonuniform horizontal resolution (Fig. 4), with Δ*x* = 10^{−3} m near the tank center (i.e., where Thorpe 1968 made his measurements) and larger values toward the ends, up to Δ*x* = 10^{−2} m at the walls. The vertical resolution is Δ*z* = 6 × 10^{−4} m. The grid has 672 × 55 grid points. The time step is Δ*t* = 10^{−2} s. Coefficients of viscosity and diffusivity are set to *A*_{H} = *A*_{V} = 10^{−6} m^{2} s^{−1} and set to *K*_{H} = *K*_{V} = 10^{−7} m^{2} s^{−1}, that is, roughly to the molecular values.

*ρ*

_{1}= 10

^{3}kg m

^{−3}, Δ

*ρ*= 15.6 kg m

^{−3}, Δ

*h*= 1.5 × 10

^{−3}m,

*z*

_{i}=

*H*/2. The initial vertical velocity was set to

*w*= 0. The initial horizontal velocity was set to be longitudinally uniform and its vertical distribution is prescribed by first specifying Ri, constant throughout the domain, and then solving (23) for

*u*using the density profile given by (24). For the simulation under discussion, we used Ri = 0.025. Figure 5 shows the initial density and horizontal velocity profiles. The figure shows that the thickness of the shear layer is

*h*≃ 1 cm so that the most unstable waves are expected to have wavelengths

*λ*≃ 7 h ≃ 7 cm (Kundu 1990). To trigger instabilities, a white noise of amplitude 10

^{−5}m s

^{−1}was added to the initial horizontal velocity. Using a noise amplitude 10

^{−3}m s

^{−1}produces virtually the same results.

Figure 6 shows the comparison between model results and Thorpe's (1968) observations for the spatiotemporal structure of the density field in the 50-cm-long central section of the tank, away from both ends. Qualitatively, the numerical results are similar to the observations for the early stage of the development of instabilities. The growth rate, amplitude, shape, wavelength (i.e., distances between consecutive rolls), and number of billows are comparable to the observations. The wavelength of the modeled most unstable wave is *λ* ≃ 5 cm, which compares well with the predicted value of 7 cm. Pairing of billows is also well simulated, as seen for example on the fifth and sixth panel between the seventh and eighth billow.

Differences between model results and laboratory observations become noticeable after the complete formation of the rolls. This coincides with the time were Thorpe (1968) noted important three-dimensionality in the flow structure, which is necessarily missing in the present laterally averaged simulation. We surmise that this explains why the density structure in the last panel of Fig. 6 looks less turbulent than in Thorpe (1968). The breaking of the rolls into highly turbulent motions is less severe in the two-dimensional simulation.

Note that this setup leads to *numerical* instabilities when the model is run in an hydrostatic mode (i.e., with *δ* = 0 in 4). Billow formation and convective overturns simply cannot be simulated with a hydrostatic model. To avoid numerical instabilities when dynamically unstable conditions are met in hydrostatic models, extra diffusion, generally parameterized in term of the local Richardson number (e.g., Pacanowski and Philander 1981), must be used to prevent the instability from growing.

### c. Collision of an internal wave with sloping bottom

The breaking of high-frequency internal waves is another important mechanism for turbulent mixing in coastal systems (Farmer and Freeland 1983; Bourgault and Kelley 2003). Because of strong tidal forcing and steep topography, high-frequency internal waves in coastal environments often take the form of large-amplitude, nonlinear internal solitary waves (ISW, Farmer and Armi 1999a). Partly owing to a separate interest in such phenomena (Bourgault and Kelley 2003), and partly as a test of the model's handling of bottom features, we configured the model to simulate the shoaling of an ISW on a linear slope.

Note that simulating ISW propagation on its own (i.e., without collisions with boundaries) represents a good test to assess nonlinear, nonhydrostatic models since ISW owe their existence to the balance between nonhydrostatic effects and nonlinear steepening (see Lee and Beardsley 1974 for a review). In a recent study we examined, using this model, ISW propagation in a continuously stratified estuarine environment and we showed a comparison between model results and the Korteweg–deVries (KdV) theory for the relationship between ISW amplitude and length (Bourgault and Kelley 2003, their Fig. 11). The comparison shows that model results and theory are almost identical in the KdV limit (i.e., for small ISW amplitude compared to the surface-layer thickness) indicating that nonlinear and nonhydrostatic physics are represented accurately in the model.

We set up a numerical simulation of the laboratory experiment of Michallet and Ivey (1999), in a tank of length *L* = 1.72 m and width *B* = 0.25 m. In the flat bottom section of the tank the depth is *H* = 0.15 m. A linear slope *s* = 0.214 starts at 0.7 m from the right end of the tank. Figure 7 shows the horizontal resolution Δ*x* as function of the longitudinal axis. The resolution in the flat bottom section is Δ*x* = 10^{−2} m and steadily increases to Δ*x* = 2.5 × 10^{−3} m at the slope. The vertical resolution is set to Δ*z* = 1.25 × 10^{−3} m throughout the depth. The grid has 393 × 122 grid points. The time step is Δ*t* = 1.2 × 10^{−2} s.

*A*

_{H},

*K*

_{H},

*A*

_{V},

*K*

_{V}) =

*A*

_{S}, where

*A*

_{S}is a turbulent viscosity of Smagorinsky (1963) type given by where

*C*

_{S}is the Smagorinsky (1963) coefficient, here choosen to be equal to

*C*

_{S}= 0.2 [values for

*C*

_{S}are found in the range 0.065–0.5 in the literature (see, e.g., reviews in Porté-Agel et al. 2000; Winters and Seim 2000)], Λ = (Δ

*x*Δ

*z*)

^{1/2}is a length scale of unresolved eddies, and

*S*

^{2}is the square of the laterally averaged strain rate tensor (see the appendix for details). For simplicity, side and bottom friction are set to

*C*

_{D}=

*S*

_{0}= 0. Qualitatively, we found the results not sensitive to bottom and side friction.

*ρ*

_{1}= 10

^{3}kg m

^{−3}, Δ

*ρ*= 47 kg m

^{−3}, Δ

*h*= 1.4 × 10

^{−2}m, and

*z*

_{i}= 0.23

*H.*The vertical displacement of the initial isopycnals is given by

*ζ*

*a*

_{0}

^{2}

*x*

*x*

_{0}

*W*

*a*

_{0}= 3.1 × 10

^{−2}m,

*x*

_{0}= −1.72 m and the half-width

*W*is computed from the two-layer Korteweg– deVries theory via (Bogucki and Garrett 1993) with

*h*

_{1}= 3.45 × 10

^{−2}m and

*h*

_{2}= 1.155 × 10

^{−1}m. This initial condition produces the wave seen on the bottom panel of Fig. 8. At the base of the slope (

*x*= −0.70 m) the wave has amplitude

*a*= 2.68 × 10

^{−2}m and phase speed

*c*= 10.6 × 10

^{−1}m s

^{−1}, which compare well with observed values of 2.7 × 10

^{−2}m and 10.8 × 10

^{−1}m s

^{−1}(Michallet and Ivey 1999, their Table 1 and Experiment 15).

To mimic the flow visualization techniques used by Michallet and Ivey (1999) and to facilitate the comparison with their observations, two thin layers of a neutrally buoyant tracer *D* (dye was used in the laboratory) with a normalized concentration of *D* = 1 were initially set at *z* = 2.54 × 10^{−2} m and *z* = 3.66 × 10^{−2} m, with (7) to track the evolution.

Figure 9 compares model results and the laboratory observations of Michallet and Ivey (1999) before, during, and after wave breaking. Some features are well reproduced by the model, such as the internal-wave arrival time, the depth of the breaking point, the vertical and horizontal extents of the region of mixing, the limit of run up of pycnocline fluid up the slope, and the time scale of the run-up process.

Differences between model results and observations are also noticeable. Perhaps the most striking is the lack of production of a core of mixed fluid, around *t* = 3.0 s, ahead of the wave that, in the laboratory, runs up the slope as a turbulent bolus. In the our simulation, it is instead a stable nonturbulent wave of reverse polarity (i.e., a wave of elevation) that is produced and that runs up the slope. During and after wave breaking the numerical simulation appears to be less turbulent and more wavelike. This is attributed to the two-dimensional nature of the model since Michallet and Ivey (1999) noted important three-dimensionality during wave breaking events.

Figure 10 shows a side-by-side comparison of model results and laboratory observations of the velocity field associated with the run-up process of an ISW on the slope (for this case the model was set to mimic Experiment 12 from Michallet and Ivey 1999). The model reproduces reasonably well the intensity and direction of the velocity field associated with the run-up process, including the flow bottom separation below the wave crest. The third panel of the figure, however, suggests that the model produces a less turbulent velocity field at the time of wave overturning.

### d. Exchange flow through a contracting channel

In the introduction we emphasized that an advantage of a laterally averaged model is that it can handle flows through channels of variable width. This aspect of the present model was assessed by means of a comparison with laboratory observations of three-layer exchange flow through a contracting channel done by Lane-Serff et al. (2000). Again, we found that nonhydrostatic dynamics were required to simulate wave overturning.

*L*= 1.16 m, depth

*H*= 0.29 m and width given by where

*x*= 0 is in the middle of the tank,

*B*

_{0}= 0.13 m is the width of the uncontracting channel,

*r*= 0.5775 is the radius of the curved contraction, and

*B*

_{c}= 0.05 m is the reduced width in the middle of the tank. The horizontal resolution Δ

*x*is shown as function of the longitudinal axis on Fig. 11. The top of panel of Fig. 12 shows the width. The highest resolution of Δ

*x*= 10

^{−3}m is put near the central portion of the tank and decreases toward both ends, down to Δ

*x*= 10

^{−2}m. The vertical resolution is fixed at 2.9 × 10

^{−3}m. The grid has 856 × 100 grid points. The time step is Δ

*t*= 0.01 s. Eddy diffusivity are parameterized as in the wave breaking test case [Eq. (25)].

Two simulations (cases A and B) were performed with the initial density fields shown on Fig. 12. As time evolves, the fluid of intermediate density (gray fluid in the figure) will intrude between the other layers (black and white fluids) and accelerate through the contracting channel. The shear above and below the intrusion can then lead to instabilities.

The model–laboratory comparison is shown in Fig. 13. Inspection reveals qualitative agreement in many respects. In case A, unstable interfacial waves form on both interfaces and propagate away from the constrictions. In case B, unstable interfacial waves form on the upper interface only and propagate away from the constriction. These features are consistent with the observations of Lane-Serff et al. (2000).

However, the interfacial structures observed in the laboratory have smaller scales and look more irregular than the ones in the model simulation. This is reminiscent of the previously discussed cases.

## 4. Oceanographic application

In order to test the model under realistic oceanographic conditions, we turn to a field application, in which both the depth and the channel width vary along the axis of the domain, and in which the forcing is complex. We use Knight Inlet, British Columbia, as a test case, since it displays strong nonhydrostatic signatures that have been well-studied (Farmer and Armi 1999b). To make our test more stringent, we have chosen not to “tune” the model in any way for this case.

The domain of integration includes the whole fjord. The topography is taken from Table 2 of Stacey et al. (1995) except for details around the sill, for which we used a local navigation chart. Figures 14 and 15 show the discretized along-channel depth and details of the width around the sill, respectively. The resolution around the sill is Δ*x* = 10 m and steadily decreases to Δ*x* = 5000 m far away (Fig. 16). (This is a good illustration of the need for a variable grid, since it would be dynamically impossible to model nonhydrostatic responses at the sill without a fine grid, and needlessly computationally expensive to handle the whole domain at the fine resolution.) Figure 17 shows the vertical resolution used.

^{3}s

^{−1}is prescribed (e.g., Farmer and Smith 1980). At the seaward open boundary, the free surface

*η*

_{bnd}is prescribed with

*η*

_{bnd}

*A*

*πωt*

*A*= 1.75 m (infered visually from Farmer and Armi 1999b) and

*ω*= 1.9841 × 10

^{−5}Hz.

*C*

_{S}= 0.2,

*S*

^{2}

_{h}

*xB*)

^{1/2}is a length scale of unresolved lateral eddies. Vertical viscosity and diffusivity are parameterized following Pacanowski and Philander (1981) as where

*A*

_{0}= 10

^{−4}m

^{2}s

^{−1},

*α*= 5 and

*n*= 2. The side friction is set to

*S*

_{0}= 0.003 as in Stacey et al. (1995) and the bottom roughness length is set to

*l*

_{0}= 1.5 × 10

^{−4}m.

Figure 18 shows the comparison of model results and field observations approximately halfway through the ebb phase. This time period was choosen for comparison because it illustrates at once the strengths and weaknesses of the model in this application.

The overall velocity field is reasonably well reproduced by the model. Qualitatively, the model results compare well with observations for the quasi-uniform vertical velocity structure at *x* < 0 and below 10-m depth as well as for the timing, location and angle of the plunging water on the lee side of the sill and the existence of a nearly stagnant intermediate layer (i.e., the layer 19 ≤ *σ*_{t} ≤ 24).

The magnitude of the velocity field is underestimated in the simulation. Just above the sill crest the observed magnitudes are in the range 0.8–1.0 m s^{−1}, while the model predicts 0.5 m s^{−1}. In the region 200 < *x* < 400 m and 40 < *z* < 100 m, observed vertical velocities are in the range 0.6–1.2 m s^{−1}, while the model predicts 0.25–0.5 m s^{−1}. We attribute some of these differences to the fact that we are comparing laterally averaged quantities (model) with data collected along a transect in the middle of the channel where the velocities may be expected to be larger than their lateral averages and to aspects related to the three-dimensionality of the flow (Klymak and Gregg 2001) that cannot be captured with this model.

One feature of suspected importance to the dynamics in this regime is the existence of flow separation. This has been observed by Farmer and Armi (1999b) but does not appear in all models of this system (Cummins 2000; Afanasyev and Peltier 2001; Farmer and Armi 2001). The present simulations do succeed in mimicking the observed flow separation, and its location, 80 m, compares well with the observed value reported by Farmer and Armi (1999b).

The major features of the observed density field are also reproduced reasonably well. Of particular interest regarding the nonhydrostatic dynamics is the generation of large-amplitude lee waves. The amplitude, wavelength and locations of the waves are quite comparable to those observed (to better appreciate the observed waves see the color acoustic image from Fig. 7 in Farmer and Armi (1999b). One noticeable discrepancy between the modeled and observed density field is the vertical and horizontal extent of the intermediate layer. Farmer and Armi (1999b) have suggested that this intermediate layer results from small-scale entrainment from shear instabilities that develop along the sheared interface (see their schematic summary on their Fig. 9). Some of those instabilities are reproduced by the model. This may suggest that mixing is inadequately parameterized or that something else is missing in the model implementation, such as longitudinal variation in the density field which, as shown by Klymak and Gregg (2003), may have a considerable influence in the flow establishement.

For comparison, Fig. 19 shows the result obtained using the hydrostatic approximation [i.e., with *δ* = 0 in Eq. (4)]. Comparison with Fig. 18 reveals that the large-amplitude lee waves observed and simulated with the nonhydrostatic algorithm are absent from the hydrostatic simulation.

## 5. Concluding remarks

We have developed and tested a laterally averaged nonhydrostatic ocean model. Our goal was to produce a general tool to examine processes on a broad range of scales, from laboratory (centimeters) up to oceanic scales (kilometers). This has been illustrated in a series of test cases that show the ability of the model to simulate stable nonhydrostatic phenomena, such as internal solitary wave propagation, as well as the first stages of flow instabilities, such as shear instabilities and internal wave overturning. It should be kept in mind that the model, being two-dimensional, is unable to reproduce the transition of initially two-dimensional unstable flows to three-dimensional turbulence. How this affects simulated mixing rates remains to be quantified.

The nonhydrostatic laterally averaged approach can be a useful alternative to three-dimensional nonhydrostatic models when changes in channel geometry play an important role in flow establishment but when the full three-dimensionality of the flow need not be simulated.

We would like to thank Jackie Hurst for her help in constructing the figures and three anonymous reviewers for their constructive comments that helped improve the manuscript. This work was funded by the Fonds de Recherche sur la Nature et les Technologies of Québec, the U.S. Office of Naval Research, the Natural Sciences and Engineering Research Council of Canada, and the Canadian Foundation for Climate and Atmospheric Sciences.

## REFERENCES

Adcroft, A., , Hill C. , , and Marshall J. , 1997: Representation of topography by shaved cells in a height coordinate ocean model.

,*Mon. Wea. Rev***125****,**2293–2315.Afanasyev, Y. D., , and Peltier W. R. , 2001: On the breaking internal waves over the skill in Knight Inlet.

,*Proc. Roy. Soc. London***A457****,**2799–2825.Arakawa, A., 1966: Computational design for long-term numerical integration of the equations of fluid motion: Two-dimensional incompressible flow. Part I.

,*J. Comput. Phys***1****,**119–143.Armi, L., , and Farmer D. , 1986: Maximal two-layer exchange through a contraction with barotropic net flow.

,*J. Fluid Mech***164****,**27–51.Armi, L., 1987: A generalization of the concept of maximal exchange in a strait.

,*J. Geophys. Res***92****,**14679–14680.Blumberg, A. F., 1977: A two-dimensional numerical model for the simulation of partially mixed estuaries.

*Estuarine Processes. Volume II: Circulation, Sediments, and Transfer of Material in the Estuary,*M. Wiley, Ed., Academic Press, 1–16.Bogucki, D., , and Garrett C. , 1993: A simple model for shear-induced decay of an internal solitary wave.

,*J. Phys. Oceanogr***23****,**1767–1776.Bourgault, D., , and Kelley D. E. , 2003: Wave-induced boundary mixing in a partially mixed estuary.

,*J. Mar. Res***61****,**553–576.Chapman, D. C., 1985: Numerical treatment of cross-shelf open boundaries in a barotropic coastal ocean model.

,*J. Phys. Oceanogr***15****,**1060–1075.Cummins, P. F., 2000: Stratified flow over topography: Time-dependent comparisons between model solutions and observations.

,*Dyn. Atmos. Oceans***33****,**43–72.Cummins, P. F., , Vagle S. , , Armi L. , , and Farmer D. M. , 2003: Stratified flow over topography: Upstream influence and generation of nonlinear internal waves.

,*Proc. Roy. Soc. London***A459****,**1467–1487.Dronkers, J. J., 1964:

*Tidal Computations in Rivers and Coastal Waters*. North-Holland, 518 pp.Farmer, D. M., , and Smith J. D. , 1980: Tidal interaction of stratified flow with a sill in Knight Inlet.

,*Deep-Sea Res***27A****,**239–254.Farmer, D. M., , and Freeland H. , 1983: The physical oceanography of fjords.

*Progress in Oceanography,*Vol. 12, Pergamon, 147–220.Farmer, D. M., , and Armi L. , 1986: Maximal two-layer exchange over a sill and through the combination of a sill and contraction with barotropic flow.

,*J. Fluid Mech***164****,**53–76.Farmer, D. M., , and Armi L. , 1999a: The generation and trapping of internal solitary waves over topography.

,*Science***283****,**188–190.Farmer, D. M., , and Armi L. , 1999b: Stratified flow over topography: The role of small-scale entrainment and mixing in flow establishment.

,*Proc. Roy. Soc. London***A455****,**3221–3258.Farmer, D. M., , and Armi L. , 2001: Stratified flow over topography: Models versus observations.

,*Proc. Roy. Soc. London***A457****,**2827–2830.Ferziger, J. H., , and Perić M. , 1996:

*Computational Methods for Fluid Dynamics*. Springer, 364 pp.Ford, M., , Wang J. , , and Cheng R. T. , 1990: Predicting the vertical structure of tidal current and salinity in San Francisco Bay, California.

,*Water Resour. Res***26****,**1027–1045.Geyer, W. R., , and Smith J. D. , 1987: Shear instability in a highly stratified estuary.

,*J. Phys. Oceanogr***17****,**1668–1679.Gill, A. E., 1982:

*Atmosphere–Ocean Dynamics*. Academic Press, 662 pp.Gillibrand, P. A., , Turrell W. R. , , and Elliott A. J. , 1995: Deep-water renewal in the upper basin of Loch Sunart, a Scottish fjord.

,*J. Phys. Oceanogr***25****,**1488–1503.Haidvogel, D. B., , and Beckmann A. , 1999:

*Numerical Ocean Circulation Modeling*. Imperial College Press, 320 pp.Hamilton, P., 1975: A numerical model of the vertical circulation of tidal estuaries and its application to the Rottardam waterway.

,*Geophys. J. Roy. Astron. Soc***40****,**1–21.Hibiya, T., , Niwa Y. , , and Fujiwara K. , 1998: Numerical experiments of nonlinear energy transfer within the oceanic internal wave spectrum.

,*J. Geophys. Res***103**(C9) 18715–18722.Jankowski, J. A., 1999: A non-hydrostatic model for free surface flows. Ph.D. thesis, University of Hannover, 231 pp.

Klymak, J. M., , and Gregg M. C. , 2001: The three-dimensional nature of flow near a sill.

,*J. Geophys. Res***106****,**22295–22311.Klymak, J. M., , and Gregg M. C. , 2003: The role of upstream waves and a downstream density pool in the growth of lee waves: Stratified flow over the Knight Inlet sill.

,*J. Phys. Oceanogr***33****,**1446–1461.Kundu, P. K., 1990:

*Fluid Mechanics*. Academic Press, 638 pp.Lamb, K. G., 1994: Numerical experiments of internal wave generation by strong tidal flow across a finite amplitude bank edge.

,*J. Geophys. Res***99****,**843–864.Lane-Serff, G. F., , Smeed D. A. , , and Postlethwaite C. R. , 2000: Multi-layer hydraulic exchange flows.

,*J. Fluid Mech***416****,**269–296.Lavelle, J. W., , Cokelet E. D. , , and Cannon G. A. , 1991: A model study of density intrusions into and circulation within a deep, silled estuary: Puget Sound.

,*J. Geophys. Res***96**(C9) 16779–16800.Lee, C-Y., , and Beardsley R. C. , 1974: The generation of long nonlinear internal waves in a weakly stratified shear flow.

,*J. Geophys. Res***79****,**453–462.Lu, Y., , Wright D. G. , , and Brickman D. , 2001: Internal tide generation over topography: Experiments with a free-surface

*z*-level ocean model.,*J. Atmos. Oceanic Technol***18****,**1076–1091.Marshall, J., , Adcroft A. , , Hill C. , , Perelman L. , , and Heisey C. , 1997a: A finite-volume, incompressible Navier Stokes model for studies of the ocean on parallel computers.

,*J. Geophys. Res***102**(C3) 5753–5766.Marshall, J., , Hill C. , , Perelman L. , , and Adcroft A. , 1997b: Hydrostatic, quasi-hydrostatic, and nonhydrostatic ocean modelling.

,*J. Geophys. Res***102**(C3) 5733–5752.Michallet, H., , and Ivey G. N. , 1999: Experiments on mixing due to internal solitary waves breaking on uniform slopes.

,*J. Geophys. Res***104**(C6) 13467–13477.Miles, J., 1961: On the stability of heterogeneous shear flows.

,*J. Fluid Mech***10****,**496–508.Pacanowski, R. C., , and Philander S. G. H. , 1981: Parameterization of vertical mixing in numerical models of the tropical oceans.

,*J. Phys. Oceanogr***11****,**1443–1451.Pietrzak, J., 1998: The use of TVD limiters for forward-in-time upstream-biased advection schemes in ocean modeling.

,*Mon. Wea. Rev***126****,**812–830.Porté-Agel, F., , Meneveau C. , , and Parlange M. B. , 2000: A scale-dependent dynamic model for large-eddy simulation: Application to a neutral atmospheric boundary layer.

,*J. Fluid Mech***415****,**261–284.Press, W., , Teukolsky S. , , Vetterling W. , , and Flannery B. , 1992:

*Numerical Recipes in FORTRAN: The Art of Scientific Computing.*2d ed. Cambridge University Press, 963 pp.Roache, P. J., 1998:

*Fundamentals of Computational Fluid Dynamics*. Hermosa, 648 pp.Smagorinsky, J., 1963: General circulation experiments with primitive equations. I. The basic experiment.

,*Mon. Wea. Rev***91****,**99–164.Stacey, M. W., , Pond S. , , and Nowak Z. P. , 1995: A numerical model of the circulation in Knight Inlet, British Columbia, Canada.

,*J. Phys. Oceanogr***25****,**1037–1062.Thorpe, S. A., 1968: A method of producing a shear flow in a stratified fluid.

,*J. Fluid Mech***32****,**693–704.Turner, J. S., 1973:

*Buoyancy Effects in Fluids*. Cambridge University Press, 367 pp.Wang, D-P., , and Kravitz D. W. , 1980: A semi-implicit two-dimensional model of estuarine circulation.

,*J. Phys. Oceanogr***10****,**441–454.Wang, J., 1998: A two-channel laterally averaged estuarine circulation model (laecim).

,*J. Geophys. Res***103**(C9) 18381–18391.Winters, K. B., , and Seim H. E. , 2000: The role of dissipation and mixing in exchange flow through a contracting channel.

,*J. Fluid Mech***407****,**265–290.

# APPENDIX

## Laterally Averaged Strain Rate Tensor

In order to incorporate the Smagorinsky (1963) eddy viscosity scheme into the laterally averaged nonhydrostatic model, an expression for the laterally averaged strain rate tensor must be derived.

*y*is the horizontal axis perpendicular to the along-channel axis

*x,*with

*y*

_{1}and

*y*

_{2}representing the position of the lateral boundaries, that is, the width is

*B*=

*y*

_{2}−

*y*

_{1}. Then, the laterally averaged strain rate tensor can then be expressed as

*S*

_{ij}

*S*

^{′}

_{ij}

*x*

_{1},

*x*

_{2},

*x*

_{3}) = (

*x,*

*y,*

*z*) and (

*u*

^{′}

_{1}

*u*

^{′}

_{2}

*u*

^{′}

_{3}

*u*′,

*υ*′,

*w*′).

*S*

^{2}=

*S*

_{ij}

*S*

_{ij}[see Eq. (25)]—that is,

*S*

^{2}

*S*

^{2}

_{11}

*S*

^{2}

_{12}

*S*

^{2}

_{13}

*S*

^{2}

_{22}

*S*

^{2}

_{23}

*S*

^{2}

_{33}

### Longitudinal, laterally averaged strain rate tensor

*x*>

*H*so that even the largest eddies that scale ∼

*H*cannot be resolved. In these cases, horizontal and vertical eddy viscosities are commonly treated independently. In the horizontal direction the Smagorinsky scheme can be applied when expressed in terms of the horizontal components of the strain rate tensor (e.g., Haidvogel and Beckmann 1999, p. 181). In a laterally averaged model this will become the longitudinal strain rate given by

*S*

^{2}

_{h}

*S*

^{2}

_{11}

*S*

^{2}

_{12}

*S*

^{2}

_{22}

*B*is constant

*S*

^{2}

_{h}

*u*/∂

*x*)

^{2}.

*B*varies with

*x.*This can be understood be imagining a steady flow over a flat bottom but through a contracting channel. In this case the continuity equation reduces to ∂

*Bu*/∂

*x*= 0 and Eq. (A9) would give

*S*

^{2}

_{h}

*S*

^{2}

_{h}