Physical vs. numerical dispersion in nonhydrostatic ocean...

15
Physical vs. numerical dispersion in nonhydrostatic ocean modeling Sean Vitousek , Oliver B. Fringer Environmental Fluid Mechanics Laboratory, Stanford University, Stanford, CA 94305, United States article info Article history: Received 11 September 2010 Received in revised form 29 May 2011 Accepted 1 July 2011 Available online 14 July 2011 Keywords: Dispersion Nonhydrostatic effects Internal waves Ocean modeling Grid resolution requirements Leptic ratio Lepticity abstract Many large-scale simulations of internal waves are computed with ocean models solving the primitive (hydrostatic) equations. Under certain circumstances, however, internal waves can represent a dynamical balance between nonlinearity and nonhydrostasy (dispersion), and thus may require computationally expensive nonhydrostatic simulations to be well-resolved. Most discretizations of the primitive equa- tions are second-order accurate, inducing numerical dispersion generated from odd-order terms in the truncation error (3rd-order derivatives and higher). This numerical dispersion mimics physical dispersion due to nonhydrostasy. In this paper, we determine the numerical dispersion coefficient associated with common discretizations of the primitive equations. We compare this coefficient to the physical disper- sion coefficient from the Boussinesq equations or KdV equation. The results show that, to lowest order, the ratio of numerical to physical dispersion is C = Kk 2 , where K is an O(1) constant dependent on the dis- cretization of the governing equations and k is the grid leptic ratio, k Dx/h 1 , where Dx is the horizontal grid spacing and h 1 is the depth of the internal interface. In addition to deriving this relationship, we ver- ify that it indeed holds in a nonhydrostatic ocean model (SUNTANS). To ensure relative dominance of physical over numerical effects, simulations require C 1. Based on this condition, the horizontal grid spacing required for proper resolution of nonhydrostatic effects is k < O(1) or Dx < h 1 . When this condi- tion is not satisfied, numerical dispersion overwhelms physical dispersion, and modeled internal waves exist with a dynamical balance between nonlinearity and numerical dispersion. Satisfaction of this con- dition may be a significant additional resolution requirement beyond the current state-of-the-art in ocean modeling. Published by Elsevier Ltd. 1. Introduction Dispersion, a characteristic of nonlinear or nonhydrostatic waves, occurs when the wave speed is a non-constant function of the wave amplitude or wave frequency (or similarly wavelength) (Whitham, 1974). Distinction is sometimes made between these two types of dispersion, namely amplitude dispersion and frequency dispersion, respectively (LeBlond and Mysak, 1978). The two are synonymous with nonlinearity and nonhydrostasy in studies of gravity waves, and hence are typically called nonlinear- ity and dispersion. Interesting wave phenomena exist when both nonlinearity and dispersion occur together and with approximately equal magni- tude. Under such circumstances, nonlinear steepening balances dispersive spreading, and propagating waves of constant form known as ‘‘solitary’’ waves are possible (Korteweg and de-Vries, 1895). The most common equations satisfying the balanced motion include the Boussinesq equations (Boussinesq, 1871, 1872; Pere- grine, 1967) and the Korteweg–de Vries (KdV) equation (Korteweg and de-Vries, 1895). These equations represent the depth-averaged conservation of mass and momentum and include dispersive effects due to nonhydrostasy by retaining the lowest-order effects of integrating the nonhydrostatic pressure over the depth. The KdV equation reduces conservation of mass and momentum to a single equation which is valid only for unidirectional wave propagation. In this paper, we rely heavily on the Boussinesq equations and KdV equation as models that faithfully represent nonlinear and nonhydrostatic behavior in more complicated natural systems, in this case, oceanic internal gravity waves. Many researchers have relied on weakly nonlinear, weakly non- hydrostatic KdV theory to understand both qualitative and quanti- tative details of internal waves (Helfrich and Melville, 2006). Internal wave dynamics have been examined using the KdV framework which shows good comparison of internal wave pro- files with the analytical result from the KdV equation (Liu et al., 1998; Stanton and Ostrovsky, 1998; Duda et al., 2004; Warn- Varnas et al., 2010). Developments extending KdV theory to fully nonlinear dynamics have made significant contributions to the literature, a complete list of which is given in Helfrich and Melville (2006). However, weakly nonlinear, weakly nonhydrostatic scaling of many internal wave problems justifies use of traditional KdV theory. 1463-5003/$ - see front matter Published by Elsevier Ltd. doi:10.1016/j.ocemod.2011.07.002 Corresponding author. E-mail addresses: [email protected] (S. Vitousek), [email protected] (O.B. Fringer). Ocean Modelling 40 (2011) 72–86 Contents lists available at ScienceDirect Ocean Modelling journal homepage: www.elsevier.com/locate/ocemod

Transcript of Physical vs. numerical dispersion in nonhydrostatic ocean...

Ocean Modelling 40 (2011) 72–86

Contents lists available at ScienceDirect

Ocean Modelling

journal homepage: www.elsevier .com/locate /ocemod

Physical vs. numerical dispersion in nonhydrostatic ocean modeling

Sean Vitousek ⇑, Oliver B. FringerEnvironmental Fluid Mechanics Laboratory, Stanford University, Stanford, CA 94305, United States

a r t i c l e i n f o a b s t r a c t

Article history:Received 11 September 2010Received in revised form 29 May 2011Accepted 1 July 2011Available online 14 July 2011

Keywords:DispersionNonhydrostatic effectsInternal wavesOcean modelingGrid resolution requirementsLeptic ratioLepticity

1463-5003/$ - see front matter Published by Elsevierdoi:10.1016/j.ocemod.2011.07.002

⇑ Corresponding author.E-mail addresses: [email protected] (S. Vitousek

Fringer).

Many large-scale simulations of internal waves are computed with ocean models solving the primitive(hydrostatic) equations. Under certain circumstances, however, internal waves can represent a dynamicalbalance between nonlinearity and nonhydrostasy (dispersion), and thus may require computationallyexpensive nonhydrostatic simulations to be well-resolved. Most discretizations of the primitive equa-tions are second-order accurate, inducing numerical dispersion generated from odd-order terms in thetruncation error (3rd-order derivatives and higher). This numerical dispersion mimics physical dispersiondue to nonhydrostasy. In this paper, we determine the numerical dispersion coefficient associated withcommon discretizations of the primitive equations. We compare this coefficient to the physical disper-sion coefficient from the Boussinesq equations or KdV equation. The results show that, to lowest order,the ratio of numerical to physical dispersion is C = Kk2, where K is an O(1) constant dependent on the dis-cretization of the governing equations and k is the grid leptic ratio, k � Dx/h1, where Dx is the horizontalgrid spacing and h1 is the depth of the internal interface. In addition to deriving this relationship, we ver-ify that it indeed holds in a nonhydrostatic ocean model (SUNTANS). To ensure relative dominance ofphysical over numerical effects, simulations require C� 1. Based on this condition, the horizontal gridspacing required for proper resolution of nonhydrostatic effects is k < O(1) or Dx < h1. When this condi-tion is not satisfied, numerical dispersion overwhelms physical dispersion, and modeled internal wavesexist with a dynamical balance between nonlinearity and numerical dispersion. Satisfaction of this con-dition may be a significant additional resolution requirement beyond the current state-of-the-art inocean modeling.

Published by Elsevier Ltd.

1. Introduction

Dispersion, a characteristic of nonlinear or nonhydrostaticwaves, occurs when the wave speed is a non-constant function ofthe wave amplitude or wave frequency (or similarly wavelength)(Whitham, 1974). Distinction is sometimes made between thesetwo types of dispersion, namely amplitude dispersion andfrequency dispersion, respectively (LeBlond and Mysak, 1978).The two are synonymous with nonlinearity and nonhydrostasy instudies of gravity waves, and hence are typically called nonlinear-ity and dispersion.

Interesting wave phenomena exist when both nonlinearity anddispersion occur together and with approximately equal magni-tude. Under such circumstances, nonlinear steepening balancesdispersive spreading, and propagating waves of constant formknown as ‘‘solitary’’ waves are possible (Korteweg and de-Vries,1895). The most common equations satisfying the balanced motioninclude the Boussinesq equations (Boussinesq, 1871, 1872; Pere-grine, 1967) and the Korteweg–de Vries (KdV) equation (Korteweg

Ltd.

), [email protected] (O.B.

and de-Vries, 1895). These equations represent the depth-averagedconservation of mass and momentum and include dispersiveeffects due to nonhydrostasy by retaining the lowest-order effectsof integrating the nonhydrostatic pressure over the depth. The KdVequation reduces conservation of mass and momentum to a singleequation which is valid only for unidirectional wave propagation.In this paper, we rely heavily on the Boussinesq equations andKdV equation as models that faithfully represent nonlinear andnonhydrostatic behavior in more complicated natural systems, inthis case, oceanic internal gravity waves.

Many researchers have relied on weakly nonlinear, weakly non-hydrostatic KdV theory to understand both qualitative and quanti-tative details of internal waves (Helfrich and Melville, 2006).Internal wave dynamics have been examined using the KdVframework which shows good comparison of internal wave pro-files with the analytical result from the KdV equation (Liu et al.,1998; Stanton and Ostrovsky, 1998; Duda et al., 2004; Warn-Varnas et al., 2010). Developments extending KdV theory to fullynonlinear dynamics have made significant contributions to theliterature, a complete list of which is given in Helfrich and Melville(2006). However, weakly nonlinear, weakly nonhydrostatic scalingof many internal wave problems justifies use of traditional KdVtheory.

Fig. 1. Basic dimensional setup of the problem after Lynett and Liu (2002).

S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86 73

Many oceanic internal waves are long relative to the depth andhence are nearly hydrostatic. Therefore, modeling waves of suchscale with a hydrostatic model may be appropriate (Kantha andClayson, 2000). In many other cases, near continental shelves andocean ridges, internal waves can be highly nonlinear and nonhy-drostatic, often appearing as rank-ordered solitary-like wave trains(Hunkins and Fliegel, 1973; Apel et al., 1985; Liu et al., 1998; Scottiand Pineda, 2004). Thus, simulations of internal waves may requirefully nonhydrostatic models (such as MITgcm (Marshall et al.,1997), SUNTANS (Fringer et al., 2006), nonhydrostatic ROMS(Kanarska et al., 2007)). The drawback of fully nonhydrostaticmodels is the computational cost associated with solving a 3-Delliptic equation for the nonhydrostatic pressure, which may re-quire an order of magnitude increase in computational time (Frin-ger et al., 2006). The prohibitive computational cost requirement aswell as the nearly hydrostatic scales make primitive (hydrostatic)ocean models the preferred method for simulating internal wavesin the ocean. Although not as computationally expensive, the prim-itive equations do not resolve physical dispersion resulting fromnonhydrostatic effects. However, this may not be a problem whenphysical dispersion is negligible. An excellent discussion concern-ing the application of hydrostatic models to the problem of simu-lating internal waves is presented in Hodges et al. (2006). Theypropose that future use of primitive ocean models is justified dueto the clear hydrostatic scaling of most problems of interest. How-ever, they also point out issues that modelers must contend withwhen simulating processes which include internal waves withhydrostatic models. As we will show, it is not only the lack of phys-ical dispersion that adversely influences model results of internalwaves, but the presence of numerical dispersion.

The concept of numerical dispersion is not particularly new.Long has it been known that even if the governing equations arenondispersive, their discrete model may be (artificially) dispersive(Trefethen, 1982). In early work, some authors referred to this as‘‘spurious dispersion’’ (Vichnevetsky, 1980; Vichnevetsky and Bow-les, 1982). Numerical dispersion generally refers to the class ofessentially unavoidable spurious oscillations that result fromnumerical discretization. In other fields, particularly electrodynam-ics and acoustics, dispersion–relation–preserving numericalschemes (Tam and Webb, 1993) have received significant attention.

The effects of numerical dispersion have received limited atten-tion in the literature on gravity waves. One instance is from Burwellet al. (2007), who examine the numerically diffusive and dispersiveproperties of tsunami models and find the horizontal grid resolu-tion is critical to accurately simulate the dispersive behavior. Theysuggest a method, based on the concept in Shuto (1991), in whichthe grid resolution and thus the numerical dispersion can be tunedto replicate the physical dispersion not resolved in the (hydrostatic)model. Gottwald (2007) show that discretization of the inviscidBurgers equation can result in the KdV equation as its correspond-ing modified equivalent partial differential equation, where the(purely numerical) dispersive term is generated from truncation er-ror. Schroeder and Schlünzen (2009) derive a numerical dispersionrelation for an atmospheric internal gravity wave model. Theirrelation naturally tends toward the true dispersion relation as thehorizontal grid spacing approaches zero. In simulations of internalwaves, numerical dispersion is particularly adverse because itmay create an artificial balance with the nonlinear steepening ten-dency of the wave and produce solitary-like waves that are physi-cally unrealistic or impossible. Both Hodges et al. (2006) andWadzuk and Hodges (2009) speculate that this is the problem withinconsistencies arising in hydrostatic ocean models. In this paper,we will demonstrate that this is indeed the case.

Numerical dispersion typically results from odd-orderedderivatives (3rd-order and higher) in the truncation error of finite-difference approximations to first-order derivatives in the govern-

ing equations. Often second-order central differences are used,implying that the dominant numerical dispersion coefficient is pro-portional to the horizontal grid spacing squared. In this paper, wedetermine the numerical dispersion coefficient from the modifiedequivalent partial differential equation given from a particular dis-cretization (Hirt, 1968). Such analyses would be of limited use with-out, as a point of comparison, the physical dispersion coefficient. Forinternal waves, as mentioned previously, this is provided by theBoussinesq equations or the KdV equation. Realistic nonhydrostaticsimulations require that the physical dispersion is much larger thanthe numerical dispersion. Because the physical dispersion for a gi-ven problem is typically fixed, the problem of minimizing numericaldispersion in nonhydrostatic ocean models reduces to the problemof providing adequate horizontal resolution. As we will show, thisadequate horizontal resolution is Dx < h1 where Dx is the horizontalgrid spacing and h1 is the depth of the internal interface.

The remainder of this paper is divided into four sections. Sec-tion 2 presents the governing equations for modeling dynamicsof internal waves used in our analysis and derives the ratio ofnumerical to physical dispersion and associated resolution require-ments of a model. Section 3 presents numerical simulations of theKdV equation and the fully nonhydrostatic ocean model SUNTANSand illustrates how both models are prone to numerical dispersion.Finally, Sections 4 and 5 present the discussion and conclusions ofthe methods in this paper, respectively.

2. Governing equations

We begin with the nondimensional two-layer Boussinesq equa-tions representing the weakly nonlinear and weakly nonhydrostat-ic motion of the two-layer system depicted in Fig. 1. In this paper,we indicate nondimensional quantities with a ⁄. Following Lynettand Liu (2002), the governing nondimensional momentum andcontinuity equations in one horizontal dimension which retainthe first-order nonlinear and nonhydrostatic effects are given by

oU�1ot�þ dU�1

oU�1ox�þ og�

ox�� �2 h�21

3o2

ox�2oU�1ot�

� �¼ O �2d; �4� �

; ð1Þ

on�

ot�� o

ox�h�1 � dn�� �

U�1� �

¼ O Dq�ð Þ; ð2Þ

oU�2ot�þ dU�2

oU�2ox�þ 1

q�2

o

ox�q�1g

� þ n�� �

þ �2 h�22

6o2

ox�2oU�2ot�

� �� �2 h�2

2o2

ox�2h�2

oU�2ot�

� �¼ O �2d; �4� �

; ð3Þ

74 S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86

on�

ot�þ o

ox�h�2 þ dn�� �

U�2� �

¼ 0: ð4Þ

The nondimensional horizontal velocity in the upper and lowerlayers are given by U�1 ¼ U1=U0 and U�2 ¼ U2=U0, respectively, whereU0 is the characteristic flow velocity. The nondimensional densities ofthe upper and lower layers are given respectively by q�1 ¼ q1=q0 andq�2 ¼ q2=q0, where q2 > q1 and typically q0 = q2, and it is assumedthat Dq⁄ = (q2 � q1)/q0� 1. The nondimensional height of the freesurface above the still water level is g⁄ = g/(a0Dq⁄), and n⁄ = n/a0 isthe nondimensional height of the internal interface above the stillinterface level and a0 is a measure of the interface deflection.h�1 ¼ h1=h0 and h�2 ¼ h2=h0 are the nondimensional depths of theupper and lower layers, respectively, where the characteristic waterdepth is given by

h0 ¼h1h2

h1 þ h2; ð5Þ

and h1 and h2 are the dimensional layer depths in quiescent condi-tions i.e. g = n = 0.

Two nondimensional parameters, d and �, play important rolesin the behavior of the equations, since they represent the degree ofnonlinearity and nonhydrostasy of the wave solutions, respec-tively. These parameters are given by

d ¼ a0

h0; ð6Þ

� ¼ h0

Lw; ð7Þ

where Lw is the internal wave horizontal length scale. Eqs. (1) and(3) are derived under the assumptions of weak nonlinearity andweak nonhydrostasy, viz. O(d) = O(�2) < O(1). Thus the higher-orderterms are O(d2) = O(�4)� 1 and therefore negligible.

In the following, we show that the two-layer Boussinesq equa-tions, (1)–(4), under the assumption of a deep lower layer, can bereduced to the KdV equation. Later, in Section 3.2, we will showthat internal wave simulations of the full nonlinear and nonhydro-static equations using the SUNTANS model can be modeled excep-tionally well with the much simpler KdV equation. By assumingthat the ratio of the layer depths is small, i.e. h1/h2� 1, we obtainh0 � h1 and h�1 ¼ h1=h0 � 1. Furthermore, as the lower-layer depthbecomes very large the depth-averaged velocity of the lower layerapproaches zero. In the limit that U�2 ! 0, the lower-layer momen-tum Eq. (3) becomes, after integration, to O(Dq⁄):

g� ¼ �n� þ Gðt�Þ: ð8ÞHere, G(t⁄) is an arbitrary function of time, which becomes irrele-vant upon insertion of Eq. (8) into Eq. (1). Ignoring the arbitraryfunction of time, Eq. (8) implies that upon redimensionalization,the amplitude of the free surface is Dq⁄ times smaller than theamplitude of the internal interface and of opposite sign.

Substitution of Eq. (8) into the 1-D upper-layer momentum Eq.(1) and recalling that when this relationship is valid, h�1 ! 1, gives:

oU�

ot�þ dU�

oU�

ox�� on�

ox�� �

2

3o2

ox�2oU�

ot�

� �¼ O �2d; �4;Dq�

� �; ð9Þ

on�

ot�� o

ox�1� dn�ð ÞU�½ � ¼ O Dq�ð Þ; ð10Þ

where it is understood that U�2 ! 0, and hence we refer to theupper-layer velocity as U⁄. Eqs. (9) and (10) are sometimes referredto as the reduced gravity model or inverted shallow water equa-tions (as �? 0) (Cushman-Roisin and Beckers, 2010), becausereplacing n⁄ with �g⁄ provides the familiar shallow water equa-tions. Eq. (9) is written in the common form of the Boussinesq equa-tions in which the dispersion term appears as two spatialderivatives and one time derivative on the depth-averaged velocity(Grimshaw (2007) following Mei (1983)). However, we can alter the

form of these equations while maintaining the same order of accu-racy in the asymptotic approximation by self-substitution of thefirst-order relation of the momentum equation, viz:

oU�

ot�¼ on�

ox�þ O �2; d; Dq�

� �: ð11Þ

This was recognized by Peregrine (1967) although the commonform (9) was retained. Substitution of the first-order balance (11)into the dispersion term in the momentum Eq. (9) gives, toO(�2d,�4,Dq⁄):

oU�

ot�|{z}acceleration

þ dU�oU�

ox�|fflfflfflffl{zfflfflfflffl}advection ofmomentum

¼ on�

ox�|{z}hydrostatic

pressure gradient

þ �2

3o3n�

ox�3|fflfflfflffl{zfflfflfflffl}nonhydrostatic

pressure gradient

; ð12Þ

where the terms are identified to illustrate the related terms in thefully nonhydrostatic and nonlinear equations from which they arise.Recall that the sign of the pressure gradient terms are positive be-cause of the definition of n⁄ from Eq. (8). Eq. (12) is more convenientthan (9) because it does not contain mixed time and space deriva-tives. This will facilitate direct comparison between the physicaldispersion arising from the nonhydrostatic pressure and the numer-ical dispersion arising from discretization errors.

Eqs. (10) and (12) admit bidirectional wave solutions. We re-strict our study to unidirectional waves by projecting Eqs. (10)and (12) onto one of their linear characteristics. This gives theKdV equation (derivation of which is given in Zauderer (1989))governing the evolution of the interface height. The KdV equation,to O(�2d,�4,Dq⁄), is given by

on�

ot�þ 1� 3

2dn�

� �on�

ox�þ �

2

6o3n�

ox�3¼ 0; ð13Þ

the solution of which is a wave (train) of depression. Writing theKdV equation (13) in a form similar to the momentum equation(12) gives:

on�

ot�|{z}acceleration

� 32

dn�on�

ox�|fflfflfflfflffl{zfflfflfflfflffl}advection ofmomentum

¼ � on�

ox�|{z}hydrostatic

pressure gradient

� �2

6o3n�

ox�3|fflfflfflffl{zfflfflfflffl}nonhydrostatic

pressure gradient

: ð14Þ

The well-known analytical solitary-wave solution to the KdV equa-tion (13) given in Korteweg and de-Vries (1895) is:

n� ¼ a� sech2 x� � c�t�

L�0

� �; ð15Þ

where the wave speed is c⁄ = 1 � da⁄/2 and the solitary wave length

scale is L�0 �ffiffiffiffiffiffiffiffiffiffiffiffiffi� 4

3�2

da�

q. Thus the amplitude, a⁄, must be negative,

hence requiring a wave of depression to ensure real L�0.Although the KdV equation (13) was derived for a two-layer

system with a deep lower layer, it can be extended to representthe propagation of weakly nonlinear waves in the presence of arbi-trary stratification. Liu et al. (1998) provide an estimation of thenonlinearity, d, and dispersion, �, parameters for the KdV equation(13) to simulate internal waves in a general two-layer stratifiedsystem. These coefficients are given by

d ¼ h2 � h1

h1h2a0; ð16Þ

and

� ¼ffiffiffiffiffiffiffiffiffiffiffih1h2

ðLwÞ2

s; ð17Þ

where a0 and Lw are the dimensional amplitude and horizontallength scales. Notice that as h1 > h2, the nonlinear parameter, d, isnegative and thus the internal waves propagate as elevation waves

S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86 75

rather than depression waves. The coefficients in the presence ofgeneral stratification are given by

d ¼ �a0

R 0�d

d/dz

�3dzR 0

�dd/dz

�2dz; ð18Þ

and

� ¼

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi3L2

w

R 0�d /2dzR 0

�dd/dz

�2dz

vuuut ; ð19Þ

where / = /(z) is the first-mode eigenfunction and d is the dimen-sional depth (Liu, 1988).

2.1. Physical dispersion

In the limit d ? 0, the momentum (12) and continuity (10)equations are given, to O(�4, Dq⁄), by

oU�

ot�� on�

ox�� �

2

3o3n�

ox�3¼ 0; ð20Þ

on�

ot�� oU�

ox�¼ 0: ð21Þ

The dispersion relation is obtained via substitution of plane-wavesolutions into Eqs. (20) and (21), viz:

U� ¼X bUðkÞ exp i kx� �xt�ð Þð Þ; ð22Þ

n� ¼X

n̂ðkÞ exp i kx� �xt�ð Þð Þ; ð23Þ

where i ¼ffiffiffiffiffiffiffi�1p

is the imaginary unit, k is the nondimensional wave-number, x is the nondimensional wave frequency and bU and n̂ arethe Fourier amplitudes of each wave component. The resulting dis-persion relation is given by

x2 ¼ k2 1� 13ðk�Þ2

� �; ð24Þ

or

c2 ¼ x2

k2 ¼ 1� 13ðk�Þ2; ð25Þ

which gives the phase speed c ¼ �ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi1� ðk�Þ

2

3

q. Without dispersion,

�? 0, the dispersion relation reduces to that of the nondimen-sional shallow water equations, x2 = k2, which gives the phasespeed c = ±1. Eqs. (24) and (25) can be compared to the truenondimensional Airy dispersion relation (LeBlond and Mysak,1978):

x2 ¼ k�

tanhðk�Þ ¼ k2 1� 13ðk�Þ2 þ 2

15ðk�Þ4 � 17

315ðk�Þ6 þ

� �;

ð26Þ

with

c2 ¼ x2

k2 ¼1k�

tanhðk�Þ ¼ 1� 13ðk�Þ2 þ 2

15ðk�Þ4 � 17

315ðk�Þ6 þ :

ð27Þ

These show that the Boussinesq equations recover the Airy disper-sion relation to O((k�)4). The third-order derivative term in themomentum equation (12) appearing from the first-order nonhydro-static effect, o3n�

ox�3 , called the dispersion term, is aptly named becauseit is responsible for deviation from shallow-water behavior. Fur-thermore, the coefficient in front of this term is the lowest-orderphysical dispersion coefficient.

The dispersion relation for the KdV equation is similar to thatfor the Boussinesq equations. The linear KdV equation (d ? 0) is gi-ven by

on�

ot�þ on�

ox�þ �

2

6o3n�

ox�3¼ 0: ð28Þ

Substitution of the plane-wave solution into Eq. (28) gives:

x ¼ k 1� ðk�Þ2

6

!; ð29Þ

or

c ¼ xk¼ 1� ðk�Þ

2

6: ð30Þ

The dispersion relation (29) differs from the Boussinesq dispersionrelation (24) by a quadratic factor arising from the assumption ofunidirectional waves in the KdV equation. The dispersion relations(24) and (29) show that the physically-dispersive propertiesare controlled by the parameter k� which represents the degreeof nonhydrostasy or ratio of the depth to the horizontalwavelength.

2.2. Numerical dispersion

For illustrative purposes we will discretize the KdV equation(13) using centered finite-differences in both space and time. Cen-tral differencing in time is known as ‘‘leap-frog’’, and is used in sev-eral ocean models (POM, Blumberg and Mellor, 1987; MICOM,Bleck et al., 1992; MOM, Pacanowski and Griffes, 1999). Manyocean models use second-order accurate central differencing forthe baroclinic pressure gradient term (Shchepetkin and McWil-liams, 2003). As we will show, the discretization of this term is pri-marily responsible for numerical dispersion. The discretization ofthe nonlinear advection of momentum, although often believedto dominate the effects of numerical dispersion (Hodges et al.,2006; Scotti and Mitran, 2008), has a much weaker effect, sincetypically d < O(1).

The second-order accurate in time and space discretization ofthe KdV equation (13) is given by

nnþ1i � nn�1

i

2Dt�þ 1� 3

2dnn

i

� �nn

iþ1 � nni�1

2Dx�

þ �2

6

12 nn

iþ2 � nniþ1 þ nn

i�1 � 12 nn

i�2

Dx�3¼ 0; ð31Þ

where the superscript n represents the time index and the subscripti represents the spatial index or individual grid point of the numer-ical solution on a discrete grid, i.e. nn

i ¼ n� x�i ; t�n

� �¼ n�ðiDx�;nDt�Þ.

The second-order accurate spatial discretization of the dispersionterm in Eq. (31) ensures that truncation errors are O(�2(Dx⁄)2) andthus numerical error associated with this term is much smaller thanthe retained terms.

The modified equivalent partial differential form of the spatialgradient term in Eq. (31), as obtained by expansion of the numer-ical solution in a Taylor series, is given by

nniþ1� nn

i�1

2Dx�¼ on�

ox�

����ni

þDx�2

6o3n�

ox�3

�����n

i

þDx�4

120o5n�

ox�5

�����n

i

þ Dx�6

5040o7n�

ox�7

�����n

i

þO Dx�8� �

:

ð32Þ

Therefore, to O(Dx⁄2), the second-order accurate, central finite-difference approximation is consistent with the first derivative atthe grid point i and time-level n. To derive the modified equivalentpartial differential equation (MEPDE) of the KdV equation (13) weuse expansions similar to Eq. (32) for all finite-difference terms in

76 S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86

Eq. (31). Furthermore, the linear Eq. (28) can be used to convert thehigher-order time derivatives to spatial derivatives. To O(�2,d), Eq.(28) gives:

omn�

ot�m¼ ð�1Þm omn�

ox�m; ð33Þ

where m is the order of the partial derivative. Thus the MEPDE ofthe discrete KdV equation (31) after removing subscript i and super-script n (since the equation holds for all discrete space and time), isgiven by

on�

ot�þ 1� 3

2dn�

� �on�

ox�þ �2

6þ b

� �o3n�

ox�3

¼ O �2Dx�2; dDx�2;Dx�4;Dt�4� �

; ð34Þ

where b ¼ ð1� C2Þ Dx�26 and C � Dt�

Dx� is the Courant number (seeAppendix A for derivation). This shows that the modified form ofthe KdV equation resulting from second-order accurate, central fi-nite-difference approximation in time and space differs from theoriginal KdV equation (13) due to the addition of numerical disper-sion of magnitude b. Here, b is the lowest-order numerical disper-sion coefficient arising from the discretization of the linearpressure gradient term. Note that a Courant number satisfyingC2 > 1 + (�/Dx⁄)2 may lead to negative dispersion and instability.

2.3. Comparison of numerical and physical dispersion

We can rewrite Eq. (34) after factoring the physical dispersioncoefficient, �2/6, as:

on�

ot�þ 1� 3

2dn�

� �on�

ox�þ ð1þ CÞ �

2

6o3n�

ox�3

¼ O �2Dx�2; dDx�2; Dx�4;Dt�4� �

; ð35Þwhere C, the ratio of numerical to physical dispersion, is given by

C ¼ b�2

6

¼ð1� C2Þ Dx�2

6�2

6

¼ ð1� C2ÞDx�2

�2 ¼ KDx�

� �2

; ð36Þ

with K = 1 � C2. We write Eq. (35) in this form to show that numer-ical discretization of the governing equation increases the magni-tude of dispersion by a factor of 1 + C, due to the presence ofnumerical dispersion. The modified dispersion relation of the line-arized version of Eq. (35), to O((k�)4, (kDx⁄)4), is given by

x ¼ k 1� ð1þ CÞ ðk�Þ2

6

!; ð37Þ

which gives:

c ¼ 1� 1þ Cð Þ ðk�Þ2

6: ð38Þ

Eq. (38) shows that both physical and numerical dispersion (assum-ing C2

6 1 + (�/Dx⁄)2) reduce the speed of the waves. ComparingEqs. (35) and (37) to (29) and (30), respectively, shows that thenumerical solution will be consistent with the true solution whenC is small, meaning that the numerical effects of dispersion aresmall in comparison to the physical effects. When C P O(1), thephase speed of short waves (k�P O(0.1)) may be significantly af-fected by the additional (artificial) dispersion. The ratio C, as seenin Eq. (36), becomes zero when the Courant number is 1, and all er-ror in the MEPDE is eliminated. This is an ideal case and in general,the Courant number will not be 1. However, a Courant number near1 for this discretization decreases the magnitude of C since asC ? 1,K ? 0. For moderate and low Courant numbers the coefficientK has little effect on the order of magnitude of C.

It is important to note that the constant K in Eq. (36) is deter-mined by both the spatial and temporal discretization of the equa-

tions. The primary source of numerical dispersion for the KdVequation (13), based on the central discretization (31), is the spatialdiscretization of the horizontal pressure gradient. The spatial dis-cretization of this term in Eq. (31) provides the 1 in the constantK, while the time-discretization reduces K by C2. If the time discret-ization were carried out to 3rd-order or greater, while using sec-ond-order central differences on the linear gradient term, thenthe constant would be K = 1. If instead of leap-frog we employ thesemi-implicit h-method (Casulli and Cattani, 1994) for the temporaldiscretization of the KdV equation (13), we obtain the same MEPDEas Eq. (35), but with K ¼ 1þ C2

2 . Therefore, for most popular second-order accurate methods (in either space or time) the ratio of numer-ical to physical dispersion should be of the form C = K(Dx⁄/�)2,where for most practical implementations K is an O(1) constant.

In terms of dimensional parameters, the ratio of numerical tophysical dispersion is given by

C ¼ KDx�

� �2

¼DxLw

�2

h1Lw

�2 ¼ KDxh1

� �2

¼ Kk2; ð39Þ

where k � Dx/h1 is the grid leptic ratio (Scotti and Mitran, 2008), orlepticity. To ensure relative dominance of physical over numericaleffects, simulations require C� 1. Since the ratio of numerical tophysical dispersion is given by C = Kk2, the condition C� 1 ismet when k < O(1) or Dx < h1.

If instead we redimensionalize the nonhydrostatic parameterappearing in the KdV equation with the general two-layer expres-sion given in Eq. (17), then the form of C for a general two-layersystem is given by

C ¼ KDx�

� �2

¼ KDxLw

�2

ffiffiffiffiffiffiffiffih1h2

ðLwÞ2

q �2 ¼ KDxLw

�2

h1h2

ðLwÞ2¼ K

Dx2

h1h2¼ Kk1k2; ð40Þ

where k1 � Dx/h1 and k2 � Dx/h2. In this case, the requirement thatC� 1 is met when k1k2� 1. Equivalently, this condition is metwhen both k1 < O(1) and k2 < O(1), or when Dx < min (h1,h2). For ageneral stratification, Eq. (19) can be used to show that:

C ¼ KDx�

� �2

¼ KDxLw

�2

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi3ðLwÞ2

R 0

�d/2dzR 0

�do/ozð Þ

2dz

s !2 ¼ KDx2

h2e

¼ Kk2e ; ð41Þ

where ke � Dx/he, and the equivalent depth in a continuously-strat-ified fluid of depth d is given by

he ¼

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi3R 0�d /2dzR 0

�do/oz

� �2dz

vuut :

For a linearly-stratified fluid, / = sin (pz/d), which giveshe ¼

ffiffi3p

p d � 0:55d. In the presence of linear stratification, the hori-zontal grid resolution must therefore be less than roughly one-halfthe water depth in order for the numerical dispersion to be less thanthe physical dispersion.

The MEPDE analysis has identified the dominant numerical dis-persion term for second-order accurate methods that is propor-tional to (kDx⁄)2. The parameter kDx⁄ can be interpreted as thedegree to which the variability of a wave is resolved on a discretegrid. Slowly-varying waves on fine grids result in small values ofkDx⁄ and little numerical error. On the other hand, short waves oncoarse grids give large values of kDx⁄ and result in significant error.

2.4. Modeled solitary wave widths

The presence of numerical dispersion affects the width of mod-eled solitary-like waves. The analytical soliton length scale derivedfrom the analytical solution to the KdV equation (13) is given by

S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86 77

L�0 �ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi�4

3�2

da�

r: ð42Þ

Modeled soliton length scales can be derived from the analyticalsolution to the modified equivalent KdV equation (34), which issimilar to analytical solution of the KdV equation (15) and is givenby

n� ¼ a� sech2 x� � c�t�

L�

� �; ð43Þ

where the modeled soliton length scale is:

L� ¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi�8�2=6þ b

da�

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi�4

31þ Cð Þ�2

da�

ffiffiffiffiffiffiffiffiffiffiffiffiffi1þ C

p ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi�4

3�2

da�

r¼ L�0

ffiffiffiffiffiffiffiffiffiffiffiffiffi1þ C

p: ð44Þ

In hydrostatic simulations, the artificial soliton length scale is givenby

L�h ¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi�8

bda�

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi�8

C�2=6da�

ffiffiffiffiCp

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi�4

3�2

da�

r¼ L�0

ffiffiffiffiCp

; ð45Þ

which primarily depends on the form of the numerical dispersioncoefficient, b, and thereby depends on the grid resolution (recallb (Dx⁄)2). We note that the soliton length scales given above areapproximately half of the half-width, or more precisely half of thesech2(1) � 42%-width. Based on the scaling of L�h, we can determinea relationship between the grid spacing and the length scale of theartificial soliton, which is given by

Dx�

L�h¼ Dx�ffiffiffiffiffiffiffiffiffiffiffiffiffi

�8 bda�

q Dx�ffiffiffiffiffiffiffiffiffiffiðDx�Þ2

d

q ¼ Dx�

Dx�ffiffi1d

q ¼ffiffiffidp

: ð46Þ

Therefore, as the nonlinearity increases, the widths of numericalsolitons approach the grid scale. We can determine a similar rela-tionship between the grid spacing and the length scale of the ana-lytical solitons, which is given by

Dx�

L�0¼ Dx�ffiffiffiffiffiffiffiffiffiffiffiffiffi

� 43�2

da�

q ¼ Dx�ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi�3

4da�

�2

r¼ Dx�

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi�3

4da�

r Dx�

�¼ k: ð47Þ

This equation provides an alternative interpretation of the parame-ter k. When k is large, the grid does not resolve the analytical solitonlength scale, and error ensues.

Assuming that the ratio of numerical to physical dispersionscales like the grid lepticity squared, viz. C = Kk2, we can investi-gate how soliton widths scale with the grid lepticity. SubstitutingC = Kk2 into Eq. (44), we obtain:

L�=L�0 ¼ L=L0 ¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi1þ Kk2

q: ð48Þ

Substituting C = Kk2 into Eq. (45), we obtain:

L�h=L�0 ¼ Lh=L0 ¼ kffiffiffiffiKp

: ð49Þ

Therefore, for hydrostatic models, the numerical soliton widths scalelinearly with the grid lepticity. We note that since the nondimen-sional variables are all normalized by the same length scale, Eqs.(48) and (49) hold for dimensional models. In the following numer-ical experiments, we compare modeled (dimensional) soliton widthsto the theoretical soliton length scales derived above, i.e. L0, L, Lh.

3. Numerical experiments

3.1. Assessing numerical dispersion in the discrete KdV equation

We present numerical simulations of the KdV equation to illus-trate some similarities and differences between hydrostatic andnonhydrostatic behavior. In what follows, we refer to the standard

KdV equation (13) as the ‘‘nonhydrostatic equation’’, and refer tothe KdV equation without dispersion (� = 0) as the ‘‘hydrostaticequation’’. We will show that the results of the two models canbe almost identical when the numerical dispersion, present in bothmodels, is much larger than the physical dispersion in the nonhy-drostatic model, and hence dominates the solution of bothequations.

The numerical experiments are performed with the second-or-der accurate discretization of the KdV equation given in Eq. (31). Agrid-refinement convergence analysis verifying that the method isindeed second-order accurate is given in Appendix B. The followingsimulations use the parameters � = 0.1 and d = 0.2, which are cho-sen to approximately match the internal wave scales given in Apelet al. (1985). An Asselin filter (Asselin, 1972), popular with severalocean models using the leap-frog time discretization, with thenominal coefficient of 0.05 is also employed. The Asselin filter pre-vents the onset of high wavenumber error. For simulations of shortduration, the model results (not shown) are identical with andwithout the filter. The simulations are performed in a periodic do-main of length L�d ¼ 10, and the number of equispaced grid pointsthat are used to discretize the domain is varied to study the effectsof C. The initial condition is given by

n� x�; t� ¼ 0ð Þ ¼ exp � x� � 2r�

� �2" #

; ð50Þ

where r⁄ = 0.85. The Courant number is given by C ¼ Dt�Dx� ¼ 0:01.

Fig. 2 shows the result when Nx = 1000 grid points are usedwhich gives C = 0.01. Both the hydrostatic (solid, red line) and non-hydrostatic (dashed, blue line) results lead to trains of solitarywaves that emerge from the initial Gaussian of depression. How-ever, since the numerical dispersion is 100 times smaller that thephysical dispersion, the nonhydrostatic simulation is very closeto the exact solution. Having considerably less dispersion (all ofwhich is numerical), the hydrostatic simulation forms a numberof sharp and narrow numerically-induced solitons. These arisefrom the balance between nonlinearity and weak (numerical)dispersion.

Fig. 2 also shows the leading solitons from the hydrostatic andnonhydrostatic simulations compared to the analytical solitons.The analytical solitons are given by n� ¼ a� sech2 x� � x�0

� �=L�th

� �,

where a⁄ is the amplitude of the leading soliton centered atx� ¼ x�0. For the nonhydrostatic result, L�th ¼ L�0 from Eq. (42) (sinceC� 1), while for the hydrostatic result L�th ¼ L�h from Eq. (45). Inaddition to the specified values of d and �; L�0 and L�h require compu-tation of a⁄ and x�0. These are obtained with a quadratic polynomialfit to the three points nearest the maximum value (in absolute va-lue) of the interface deflection n⁄. The amplitude a⁄ is given by themaximum of this polynomial and x�0 is the location of this maxi-mum. The figure shows that the theoretical solitons with scalesL�0 and L�h both agree with the simulation results for the nonhydro-static and hydrostatic simulations, respectively. Also noteworthyin Fig. 2 is the weak dependence of L�0 and L�h on the wave ampli-tude as demonstrated by the similar widths of the individual soli-tons in the wave packets.

Fig. 3 shows the same calculation as in Fig. 2 but with Nx = 32grid points and C = 10. In this simulation, the dispersive character-istics are primarily numerically-induced and thus the results of thehydrostatic and nonhydrostatic simulations are virtually identical.Furthermore, the length scale of the solitary waves,L� � 0:25

ffiffiffiffiffiffiffiffiffiffiffiffiffi1þ Cp

� 0:85, is approximately the same as the lengthscale of the initial Gaussian function and thus the initial wave formpropagates as a (single) solitary wave.

Fig. 3 also compares the leading solitons to the analytical soli-tons. The numerical soliton of width L�h compares very well withthe results from both the hydrostatic and nonhydrostatic models.

−2

−1.5

−1

−0.5

0

t* = 10

−2

−1.5

−1

−0.5

0

t* = 20

ξ*

0 5 10

−2

−1.5

−1

−0.5

0

t* = 30

x*−c0* t*

6.5 7 7.5 8

−1.8

−1.6

−1.4

−1.2

−1

−0.8

−0.6

−0.4

−0.2

x*−c0* t*

ξ*

HydrostaticNonhydrostatic

Soliton of width L*0

Soliton of width L*h

Initial Waveform

Γ = 0.01

zoom

Fig. 2. The results of a nonhydrostatic simulation (dashed blue line) vs. a hydrostatic simulation (solid red line) for the case when C = 0.01. The plot in the lower-right depictsa zoomed-in view of the simulation along with a comparison between the theoretical sech2 profiles and the numerical results. Recall that the nondimensional linear wavespeed is c�0 ¼ 1. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

78 S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86

These solitons are approximately three times larger than the ana-lytical soliton of width L�0. The length scales of the solitons are agood indicator of the form of dispersion, and thus we can see thatin this simulation the magnitudes of dispersion in each model areroughly equivalent.

3.2. Assessing numerical dispersion in the nonhydrostatic SUNTANSmodel

We simulate the evolution of an internal solitary-like wavetrain using the nonhydrostatic SUNTANS model (Fringer et al.,2006) in a two-dimensional x-z domain. The parameters are chosento approximately mimic the evolution of solitary-like waves in theSouth China Sea, which evolve from internal tides generated at theLuzon Strait at its eastern boundary (Zhang et al., 2011). Simula-tions are performed on a domain of length Ld = 300 km and depthd = 2000 m that is initialized with approximate two-layer stratifi-cation as an idealized representation of the South China Sea so asto simplify our analysis. Despite the idealized stratification, thesimulated solitary-like waves are similar to those that form inthe South China Sea, particularly from the point of view of relevantlength scales.

The initial stratification is given by

qðx; z; t ¼ 0Þq0

¼ �12

Dqq0

tanh2tanh�1a

dqðz� nðx; t ¼ 0Þ þ h1Þ

" #;

ð51Þ

where the upper-layer depth is h1 = 250 m, the a = 99% interfacethickness (see Fringer and Street (2003)) is dq = 200 m, and the den-sity difference is given by Dq/q0 = 0.001. The initial Gaussian ofdepression that evolves into a train of solitary-like waves is given by

nðx; t ¼ 0Þ ¼ �G0 exp � xwq

� �2" #

; ð52Þ

with G0 = 250 m and wq = 15 km. The boundary conditions areclosed at x = 0 and x = Ld and the bottom at z = �d is free-slip witha free surface at the upper boundary. The domain is discretized uni-formly in the vertical with Nz = 100 grid cells, and we perform sixsimulations each with a different uniform horizontal resolutioncontaining Nx = 150, 300, 600, 1200, 2400, and 4800 cells, such thatthe grid lepticity k = Dx/h1 varies from 0.25 to 8, and where Dx = Ld/Nx. We did not change the vertical resolution because this has littleinfluence on the results as long as the stratification is reasonably re-solved. The time step is determined with the horizontal Courantnumber which is held fixed for all simulations, and is given byCh = c0Dt/Dx = 0.11, where c0 = 1.4 m s�1 is the first-mode eigen-speed obtained from a linearized modal analysis. The simulationsare run for a total time of 145,600 s (roughly 1.7 days), so that thefinest grid requires Dt = 5 s for a total of 29,120 time steps.Although rotational effects lead to added linear dispersion whichhas a tendency to broaden waves that propagate over inertial timescales (Helfrich and Melville, 2006), rotation is ignored in the pres-ent simulations. To stabilize the central-differencing scheme formomentum advection, the horizontal and vertical eddy-diffusivitiesare constant and are given by mH = 0.1 m2 s�1 and mV = 10�4 m2 s�1,respectively, and no scalar diffusivity is employed.

In what follows we compare the results of the hydrostatic to thenonhydrostatic versions of SUNTANS. Since the nonhydrostaticcode essentially computes a correction to the hydrostatic dynam-ics, switching between the two codes is straightforward althoughthe nonhydrostatic code incurs more overhead particularly forlow values of the grid lepticity. Fig. 4 shows the computationaloverhead associated with using the nonhydrostatic model as mea-sured by the ratio of the total wallclock simulation time for the

−2

−1.5

−1

−0.5

0

t* = 10

−2

−1.5

−1

−0.5

0

t* = 20

ξ*

0 5 10

−2

−1.5

−1

−0.5

0

t* = 30

x*−c0* t*

2 3 4 5 6 7

−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

x*−c0* t*

ξ*

HydrostaticNonhydrostatic

Soliton of width L*0

Soliton of width L*h

Initial Waveform

Γ = 10

zoom

Fig. 3. The results of a nonhydrostatic simulation (dashed blue line) vs. a hydrostatic simulation (solid red line) for the case when C = 10. The plot in the lower-right depicts azoomed-in view of the simulation along with a comparison between the theoretical sech2 profiles and the numerical results. Recall that the nondimensional linear wavespeed is c�0 ¼ 1. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

0 1 2 3 4 5 6 7 80

1

2

3

4

5

6

7

8

9

10

λ

Non

hydr

osta

tic o

verh

ead

Fig. 4. Relative workload associated with computing the nonhydrostatic pressureas a function of the grid lepticity k = Dx/h1. The overhead is computed as the ratio ofthe total wallclock time for the nonhydrostatic simulation to that of the hydrostaticsimulation.

S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86 79

nonhydrostatic model to that for the hydrostatic model. For largegrid lepticity there is relatively little overhead because the precon-ditioner for the nonhydrostatic pressure solver performs wellwhen the grid aspect ratio Dz/Dx is small (Fringer et al., 2006).However, the preconditioner is not as effective for larger grid as-pect ratios, or equivalently smaller grid leptic ratios. Therefore,for the smallest lepticity the nonhydrostatic code requires roughly8 times as much wallclock time than the hydrostatic simulation(the most well-resolved nonhydrostatic run took 2 s per time stepusing 16 cores on four quad-core Opteron 2356 QC processors). It isinteresting to note that the nonhydrostatic overhead divergessharply around k = 2, which is effectively the limit above whichphysical nonhydrostatic effects are overwhelmed by numericalnonhydrostatic effects. Marshall et al. (1997) show that, due tothe performance of the preconditioner, nonhydrostatic algorithmsin the hydrostatic limit are no more computationally expensivethan hydrostatic models. They describe the nonhydrostatic pres-sure solver and preconditioner as ‘‘an algorithm that seamlesslymoves from nonhydrostatic to hydrostatic limits’’. We note, how-ever, that a nonhydrostatic model does not behave correctly untilit resolves the magnitude of dispersion, that is, k < O(1). Further-more, as shown in Fig. 4, truly resolving nonhydrostatic effects ismore computationally expensive.

To infer the behavior of the numerical dispersion in theSUNTANS simulations, we first show that the SUNTANS resultsare accurately represented by the KdV equation. We compare theresults of the highest resolution SUNTANS model (Nx = 4800) withthe KdV model with Nx = 800, so that C � 0.25 in both models. Thenondimensional initial condition for the SUNTANS model is givenby

n�S x�; t� ¼ 0ð Þ ¼ �a�S exp � x�

r�S

� �2" #

; ð53Þ

where a�S ¼ G0=a0 ¼ 1:136 and r�S ¼ wq=Lw ¼ 10:446. In this exam-ple, the results from the SUNTANS model are nondimensionalizedwith a0 = 220 m and Lw = L0 = 1436 m, which are the amplitudeand length scale, respectively, of the leading solitary wave at theend of the highest resolution simulation. If we approximate theSUNTANS initial condition as a two-layer stratification, Eqs. (16)and (17) give the KdV parameters d = 0.754 and � = 0.461. The con-tinuous stratification parameter estimates from Eqs. (18) and (19)give similar values of d = 0.756 and � = 0.494. Because the KdV

80 S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86

equation only admits right-propagating waves, the initial conditionfor the KdV model needs to be adjusted to produce the same wavesas the SUNTANS model. The SUNTANS model produces right-prop-agating waves because its initial condition is given by a half-Gauss-ian of depression at the left no-flux boundary. The initial conditionfor the KdV model is therefore given by

n�K x�; t� ¼ 0ð Þ ¼ �a�K exp � x� � Dx�Kr�K

� �2" #

; ð54Þ

where a�K ¼ 0:536;r�K ¼ r�S ¼ 10:446, and Dx�K ¼ 1:253. Due to thedifferent initial conditions, the parameters required to produce amatch between the KdV result and the SUNTANS model are givenby d = 0.572 and � = 0.585. As shown in Fig. 5, the agreement be-tween the KdV equation and the SUNTANS model is excellent. Theonly significant deviation between the two models arises from thetail of the wave train which is produced by numerical diffusion inthe SUNTANS model that is not present in the KdV model. The slightmismatch between the theoretical parameters, d and �, given byEqs. (16)–(19) and the best fit parameters is due to higher-ordernonlinearity and the finite-thickness of the interface, which arenot accounted for in the KdV theory.

The excellent agreement between the models highlights thepower of the relatively simple KdV equation for modeling complexphenomena. Of course, there are many situations in which the KdVequation does not adequately capture the dynamics of the fullynonlinear and nonhydrostatic model for a continuously stratifiedsystem. However, this result shows that the dominant physics ofinternal waves at the limits of weakly nonlinear, weakly nonhydro-static characterization can still be represented by the KdV equa-tion. We make this comparison to argue that the analysisperformed for the KdV equation with regard to numerical vs. phys-ical dispersion should hold for fully nonhydrostatic models for cer-tain problems of interest. That is, for weakly nonlinear, weaklynonhydrostatic internal wave phenomena even in a continuouslystratified system modeled with a (second-order accurate) nonhy-drostatic model, the ratio of numerical to physical dispersion

−1

−0.5

0

ξ/a 0

t = 5.5 T

KdVSUNTANS

−1

−0.5

0

ξ/a 0

t = 44 T

−1

−0.5

0

ξ/a 0

t = 87 T

0 50 100 150 200

−1

−0.5

0

x/L0

ξ/a 0

t = 131 T

zoom

Fig. 5. Comparison of the KdV equation to the nonhydrostatic SUNTANS oceanmodel. The KdV solution is for the interface height in a two-layer system. SUNTANSmodels a continuously stratified system in which the q = q0 density contourrepresents the solution. The cutout in the bottom subplot shows a comparison ofthe leading soliton.

should be C = Kk2 as is the case for the KdV equation. With thisin mind, we compare the results of hydrostatic and nonhydrostaticsimulations using SUNTANS at various resolutions as we did for theKdV equation in Figs. 2 and 3.

Fig. 6 shows the nonhydrostatic SUNTANS result compared tothe hydrostatic result for the finest grid (Nx = 4800), or the smallestleptic ratio k = Dx/h1 = 0.25. In the figure, time is normalized byTs = Lw/c0, where Lw = L0 = 1436 m is the leading solitary wavewidth at the end of the simulation. As expected, the nonhydrostaticresult leads to a train of rank-ordered solitary-like internal gravitywaves of depression that move faster than the linear phase speed(as indicated by the vertical dashed lines in Fig. 6). Owing to ampli-tude dispersion, the hydrostatic wave train also propagates fasterthan the linear phase speed c0. However, due to a lack of physicaldispersion, the wave steepens into a train of very short solitary-likewaves (see the inset plot at t = 141.5 Ts). These short waves repre-sent a balance between nonlinear steepening and numerical dis-persion that results from the second-order error in thediscretization of the baroclinic pressure gradient in SUNTANS.Due to the high grid resolution, the relatively small lepticity ofk = Dx/h1 = 0.25 is the cause of the weak numerical dispersion. Un-like the results from the KdV simulations in Section 3.1, the SUN-TANS results also possess numerical diffusion. Therefore, thenearly grid-scale length of the numerically-induced solitary-likewaves results in numerical diffusion that leads to amplitude lossin the leading solitary-like waves as well as a thickening of thestratification in the lee of the wave train. The amplitude loss leadsto weaker amplitude dispersion for the hydrostatic case and causesthe hydrostatic packet to propagate more slowly than the nonhy-drostatic packet. The problem of excess numerical diffusion associ-ated with high-resolution hydrostatic models was recognized byHodges et al. (2006), who hypothesized that formation of numeri-cal ‘‘soliton-like’’ waves leads to numerical diffusion and dissipa-tion. Our results support this hypothesis. However, we add thatthe lack of dispersion (physical or otherwise) in high-resolutionhydrostatic models is the cause of problems with numerical diffu-sion and dissipation.

When the lepticity is increased to k = 8, numerical dispersion isso large relative to physical dispersion that the nonhydrostatic andhydrostatic results are nearly identical, as shown in Fig. 7. This re-sult agrees with Marshall et al. (1997) who conclude that at coarsehorizontal resolution, hydrostatic and nonhydrostatic models giveessentially the same numerical solutions. Although the results lookqualitatively similar, the nonhydrostatic result is far too dispersivedue to the numerical dispersion, and so the width of the leadingwave is larger than the ‘‘exact’’ result shown in Fig. 6.

As shown in Fig. 8, increasing the grid lepticity causes the widthof the leading solitary-like waves to grow in both the hydrostaticand nonhydrostatic solutions. The width of the nonhydrostaticwave, however, converges to the correct value upon decreasingthe lepticity, while that for the hydrostatic waves continues to de-crease toward zero. This decrease leads to more numerical diffu-sion which causes the hydrostatic wave to propagate moreslowly. These results indicate that the width of the leading soli-tary-like wave in the wave packets is a good indicator of thenumerical dispersion. Since the dispersion in the hydrostatic mod-el is strictly numerical, then progressively weaker dispersion withgrid refinement leads to shorter solitary-like waves, while thewaves in the nonhydrostatic model converge to the correct solu-tion with grid refinement. Increased grid spacing leads to largersolitary-wave widths in both models, although the width of thewaves in the nonhydrostatic model will always be larger thanthose in the hydrostatic model due to the presence of physicaldispersion. While always present, the relative magnitude of theresolved physical dispersion decreases with increasing gridlepticity.

−4

−2

0

z/a 0

t=0.0 Ts

−4

−2

0

z/a 0

t=32.7 Ts

−4

−2

0z/

a 0

t=59.9 Ts

−4

−2

0

z/a 0

t=87.1 Ts

−4

−2

0

z/a 0

t=114.3 Ts

0 20 40 60 80 100 120 140 160 180 200

−4

−2

0

x/L0

z/a 0

t=141.5 Tszoom

Fig. 6. Comparison of the evolution of a solitary-like internal gravity wave train as computed by SUNTANS with Nx � Nz = 4800 � 100 grid cells (k = Dx/h1 = 0.25) with(upper blue contours) and without (lower red contours) the nonhydrostatic pressure. The horizontal distance is normalized by Lw = L0 = 1436 m, the width of theleading nonhydrostatic wave at the end of the simulation, and Ts = Lw/c0 is the wave propagation time scale. Density contours are shown for q/q0 = (�0.4, � 0.2,0,0.2,0.4)Dq/q0. A zoomed-in view of the dashed box around the leading wave in the hydrostatic wave train is depicted in the inset plot att = 141.5 Ts. The vertical dashed line moves at the linear wave speed c0 for reference. (For interpretation of the references to colour in this figure legend, the reader isreferred to the web version of this article.)

−4

−2

0

z/a 0

t=0.0 Ts

−4

−2

0

z/a 0

t=32.7 Ts

−4

−2

0

z/a 0

t=59.9 Ts

−4

−2

0

z/a 0

t=87.1 Ts

−4

−2

0

z/a 0

t=114.3 Ts

0 50 100 150 200

−4

−2

0

x/L0

z/a 0

t=141.5 Ts

Fig. 7. Comparison of the evolution of a solitary-like internal gravity wave train as computed by SUNTANS with Nx � Nz = 150 � 100 grid cells (k = Dx/h1 = 8) with (upperblue contours) and without (lower red contours) the nonhydrostatic pressure. The horizontal distance is normalized by Lw = L0 = 1436 m, the width of the leadingnonhydrostatic wave that is computed with Nx = 4800 grid cells at the end of the simulation, and Ts = Lw/c0 is the wave propagation time scale. Density contours areshown for q/q0 = (�0.4, � 0.2,0,0.2,0.4)Dq/q0. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of thisarticle.)

S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86 81

−1

−0.5

0

z/a 0

λ=8.00

−1

−0.5

0

z/a 0

λ=4.00

−1

−0.5

0

z/a 0

λ=2.00

−1

−0.5

0

z/a 0

λ=1.00

−1

−0.5

0

z/a 0

λ=0.50

−12 −10 −8 −6 −4 −2 0 2 4

−1

−0.5

0

(x−x0)/L

0

z/a 0

λ=0.25

Fig. 8. Effect of grid lepticity k = Dx/h1 on the leading solitary-like waves (centered at x0) in the wave packets as computed by the hydrostatic (faint solid red lines) andnonhydrostatic (thick solid blue lines) SUNTANS models (these are the q = q0 isopycnals at t = 141.5 Ts). The thin dotted line is the best-fit leading soliton for the hydrostaticresult, while the thick dashed line is that for the nonhydrostatic result. The results are normalized by the analytical soliton length scale L0 = 1436 m. (For interpretation of thereferences to colour in this figure legend, the reader is referred to the web version of this article.)

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

λ=Δ x*/ε

L sim

/L* 0

Hydrostatic Soliton Scaling (lowest order)Nonhydrostatic Soliton Scaling (lowest order)Hydrostatic KdV ModelNonhydrostatic KdV Model

Fig. 9. The relationship between the grid lepticity, k, and the deviation from thetheoretical soliton length scales for the KdV equation. The theoretical prediction forthe model performance is Lsim=L�0 ¼ L�=L�0 ¼

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi1þ Kk2

pfor the nonhydrostatic model

(solid blue line) and Lsim=L�0 ¼ L�h=L�0 ¼ kffiffiffiffiKp

for the hydrostatic model (dashed redline) where K = 0.9999. (For interpretation of the references to colour in this figurelegend, the reader is referred to the web version of this article.)

82 S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86

3.3. Numerical dispersion and the scaling of solitary wave widths

As mentioned previously, the widths of simulated solitons are agood indicator of the magnitude of dispersion. Returning to theform of the numerical soliton given in Eqs. (48) and (49), we seethat the simulated soliton scale of a second-order accurate nonhy-drostatic model relative to the analytical soliton scale is given by

L=L0 ¼ L�=L�0 ¼ffiffiffiffiffiffiffiffiffiffiffiffiffi1þ Cp

¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi1þ Kk2

p. Likewise, for a second-order

accurate hydrostatic model, the ratio is given by Lh=L0 ¼L�h=L�0 ¼

ffiffiffiffiCp¼ k

ffiffiffiffiKp

. In this paper we have highlighted the form ofC = Kk2 = K(Dx⁄/�)2. Verification of the correct form of C asdetermined in this paper is possible by comparing the scaling ofmodeled solitons to the theoretical relationships for the hydro-static and nonhydrostatic simulations, respectively, as the gridlepticity increases. This analysis is shown in Fig. 9 for the KdVequation and Fig. 10 for the SUNTANS model.

The analysis in Fig. 9 uses the numerical method from Eq. (31),which has K = 1 � C2 = 0.9999, since C = 0.01. The simulations areperformed with identical conditions to the simulations above inSection 3.1 with t�max ¼ 30 and a variety of different resolutions,namely Nx = 1000, 800, 600, 500, 400, 300, 250, 220, 210, 180,150, 125, 100, 80, 60, 50, 40, 35, 30, 25. For each simulation, thesimulated soliton width, Lsim, is calculated as the length from thelocation of the parabolic maximum, x0, to the horizontal location,xc, (on the right) where the soliton obtains an amplitude ofasech2(1). This length scale Lsim = xc � x0 corresponds approxi-mately to half of the 42%-width. The horizontal location, xc, isdetermined by fitting a quadratic polynomial to the three pointsnearest to the soliton peak and inverting the location.

As shown in Fig. 9, the computed soliton widths compare verywell with the theoretically-expected soliton widths. The closeagreement is particularly notable for small values of the grid lep-

ticity, that is for k < O(1). The agreement is not as good fork > O(1) because the theoretical relationships assume 1st-ordernumerical dispersion. For k > O(1), higher-order numerical disper-sion also affects the soliton length scales. Even with the deviationsdue to higher-order effects when k > O(1), the agreement of the

0 1 2 3 4 5 6 7 8 90

0.5

1

1.5

2

2.5

λ

L sim

/L0

Hydrostatic Soliton Scaling (lowest order)Nonhydrostatic Soliton Scaling (lowest order)SUNTANS Hydrostatic ModelSUNTANS Nonhydrostatic Model

Fig. 10. The relationship between the grid lepticity, k, and the soliton length scale,Lsim/L0 for the SUNTANS model. The theoretical predictions are Lsim=L0 ¼ L=L0 ¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

1þ Kk2p

for the nonhydrostatic model (solid blue line) and Lsim=L0 ¼ Lh=L0 ¼ kffiffiffiffiKp

for the hydrostatic model (dashed red line), where K = 0.075. (For interpretation ofthe references to colour in this figure legend, the reader is referred to the webversion of this article.)

S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86 83

models and the theoretically-predicted soliton length scales isquite remarkable.

We test the SUNTANS model to determine the scaling of the sol-iton widths using the analysis presented in Fig. 9. Fig. 10 showsthat the theory for the dependence of the soliton length scale onthe grid lepticity (Eqs. (48) and (49)) is valid for the continuouslystratified system when simulated with both a hydrostatic and anonhydrostatic ocean model. The soliton widths are determinedusing the same method as above for the q = q0 density contour.The nonhydrostatic SUNTANS model computes solitons withLsim=L0 �

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi1þ Kk2

p, while the hydrostatic SUNTANS model com-

putes solitons with Lsim=L0 � kffiffiffiffiKp

, where K = 0.075 as obtainedwith a least-squares fit (Lsim is computed using the same techniqueas that for the KdV simulations).

4. Discussion

For weakly nonlinear, weakly nonhydrostatic waves, discretiza-tion of the linear problem, that is, acceleration balancing a pressuregradient, gives rise to most of the numerical dispersion. For weaklynonhydrostatic waves, water wave theory gives the lowest-orderphysical dispersion as proportional to (k�)2. The numerical discret-ization of the linear problem using second-order, central finite-dif-ferencing produces, to lowest order, numerical dispersionproportional to (kDx⁄)2. The ratio of these two effects is the ratioof numerical to physical dispersion, C, which is proportional tothe grid lepticity squared, viz. C = Kk2, where K is typically anO(1) constant. Scotti and Mitran (2008) showed that the nonlinearadvection term introduces an artificial term in the dispersion rela-tion of magnitude O(dk2). However, we have shown that the dis-cretization of the linear problem and not the nonlinear advectionterm is responsible for the dominant source of dispersion forweakly nonlinear, weakly nonhydrostatic waves. The relative mag-nitudes of the numerically dispersive effects of the linear problemvs. the nonlinear advection problem depend on the relative magni-tudes of K and d. Typically K = O(1) and d � O(1) due to the weaklynonlinear scaling of most oceanic problems of interest. Thus thenumerical dispersion induced by the linear term is typically one or-der of magnitude larger than the numerical dispersion induced bythe nonlinear advection term. Highly nonlinear and nonhydrostatic

(i.e. d � �2 = O(1)) dynamical problems in the ocean are importantbut confined to small-scale turbulent motions. In modeling suchsituations, the dispersive error from nonlinear advection termswith magnitude O(dk2) may exceed the dispersive error from thelinear terms with magnitude O(Kk2). Thus ensuring small valuesof the grid lepticity, k, may be even more important in such cases.Typically, in highly nonlinear problems the motion is governed bya balance between nonlinear advection and the nonhydrostaticpressure gradient. Large-eddy-simulation (LES) is the preferred ap-proach under such circumstances. LES models seek to minimize thenumerical dissipation to capture the correct turbulent dissipation.Ocean models, on the other hand, should seek to minimize numer-ical dispersion, particularly when modeling wave phenomena. Forinternal wave simulations, the dominant source of numerical dis-persion arises from the discretization of the baroclinic pressuregradient. For surface wave simulations (i.e. tsunami modeling),the dominant source of numerical dispersion is the discretizationof the barotropic pressure gradient.

When C� 1, or when the grid lepticity is large, i.e. k > O(1),simulations produce an overly dispersive result because thephysical dispersion is negligible in comparison to the numericaldispersion. This implies that a nonhydrostatic simulation is indis-tinguishable from a hydrostatic simulation when the grid spacingis large relative to the relevant depth scale. Such a large gridspacing may therefore give a false impression that nonhydrostaticphysics must be unimportant. Scotti and Mitran (2008) developedan approximated method to reduce the computational cost ofcomputing the nonhydrostatic pressure in thin domains whichconverges when k > O(1). However, when this condition is satis-fied, the solution is contaminated by numerical dispersion andthe computational overhead associated with solving the fullnonhydrostatic problem is small, as shown in Fig. 4. Ellipticapproximation methods must therefore be combined withhigher-order discretization techniques which minimize numericaldispersion if they are to be viable.

5. Conclusions

We have determined the magnitude of physical and numericaldispersion coefficients from asymptotic approximations for weaklynonlinear, weakly nonhydrostatic models. The ratio of numerical tophysical dispersion, C, for nonhydrostatic ocean models that aresecond-order accurate in time and/or space is given by C = Kk2,where k � Dx/h1 is the grid leptic ratio or lepticity, and K is typi-cally an O(1) constant. Simulations of internal waves using theSUNTANS nonhydrostatic ocean model are well-reproduced bythe KdV equation, thereby validating its use to quantify the magni-tudes of physical and numerical dispersion.

For hydrostatic models, the ratio C is infinite because there isno resolved physical dispersion. However, when the leptic ratiois large, numerical simulations based on either hydrostatic or non-hydrostatic models will be dominated by numerical dispersion. Forsimulations of internal waves, the amount of physical dispersion iscritical to resolving the correct behavior, and thus a well-resolvednonhydrostatic model or approximation thereof is required.Numerical solutions of internal waves when modeled with sec-ond-order accuracy in time or space will be realistic only whenk < O(1) or D x < h1. The relationship C = Kk2 is primarily due tothe second-order accurate discretization of the baroclinic pressuregradient. The severity of this condition may be loosened usinghigher-order differencing schemes or schemes with better disper-sive properties such as Padé schemes (Lele, 1992). Adaptive meshrefinement (AMR) methods, which allow additional resolutionwhen necessary, also present a possible solution.

84 S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86

The condition that k < O(1), or Dx < h1, is consistent with thescaling of nonhydrostatic effects, since they occur when verticalscales of motion are roughly equal to the horizontal scales. There-fore, accurate simulation of nonhydrostatic effects requires thathorizontal scales of O(h1) must be resolved. This constraint maybe a significant additional resolution requirement beyond the cur-rent state-of-the-art in ocean modeling.

Acknowledgments

Sean Vitousek gratefully acknowledges his support as a DOEComputational Science Graduate Fellow. Sean Vitousek and OliverB. Fringer gratefully acknowledge the support of ONR as part of theYIP and PECASE awards under grants N00014-10-1-0521 andN00014-08-1-0904 (scientific officers Dr. C. Linwood Vincent, Dr.Terri Paluszkiewicz and Dr. Scott Harper). We thank Alberto Scottifor numerous discussions which contributed to the ideas in thismanuscript. We also thank two anonymous reviewers for theircomments and suggestions which led to a significant improvementof the manuscript.

Appendix A. Modified equivalent partial differential equationanalysis

We show how the modified equivalent partial differential equa-tion (MEPDE) (34) of the discretization (31) is obtained. MEPDEanalysis begins with the expansion of the adjacent grid points inTaylor series usually about the central point. In this case theseexpansions are given by

nniþ1 ¼ nn

i þ Dx�on�

ox�

����ni

þ Dx�ð Þ2

2o2n�

ox�2

�����n

i

þ Dx�ð Þ3

6o3n�

ox�3

�����n

i

þ ðA:1Þ

nni�1 ¼ nn

i � Dx�on�

ox�

����ni

þ Dx�ð Þ2

2o2n�

ox�2

�����n

i

� Dx�ð Þ3

6o3n�

ox�3

�����n

i

þ ðA:2Þ

nniþ2 ¼ nn

i þ 2Dx�on�

ox�

����ni

þ 2 Dx�ð Þ2 o2n�

ox�2

�����n

i

þ 4 Dx�ð Þ3

3o3n�

ox�3

�����n

i

þ ðA:3Þ

nni�2 ¼ nn

i � 2Dx�on�

ox�

����ni

þ 2 Dx�ð Þ2 o2n�

ox�2

�����n

i

� 4 Dx�ð Þ3

3o3n�

ox�3

�����n

i

þ ;

ðA:4Þ

where, nni ¼ n� x�i ; t

�n

� �¼ n�ðiDx�;nDt�Þ. Using these expressions, the

form of the truncation error of the second-order, central finite-dif-ference approximation to the spatial derivative is given in Eq.(32). Similarly, the truncation error for the second-order, leap-frogtime derivative is given by

nnþ1i � nn�1

i

2Dt�¼ on�

ot�

����ni

þ Dt�ð Þ2

6o3n�

ot�3

�����n

i

þ Dt�ð Þ4

120o5n�

ot�5

�����n

i

þ Dt�ð Þ6

5040o7n�

ot�7

�����n

i

þ O Dt�ð Þ8 �

: ðA:5Þ

The second-order accurate, centered 3rd-order spatial derivative isgiven by

12 nn

iþ2 � nniþ1 þ nn

i�1 � 12 nn

i�2

Dx�ð Þ3¼ o3n�

ox�3

�����n

i

þ Dx�ð Þ2

4o5n�

ox�5

�����n

i

þ O Dx�ð Þ6 �

:

ðA:6Þ

Substitution of Eqs. (32), (A.5), and (A.6) into the complete discret-ization (31) gives:

on�

ot�

����ni

þ Dt�ð Þ2

6o3n�

ot�3

�����n

i

þ 1� 32

dnni

� �on�

ox�

����ni

þ Dx�ð Þ2

6o3n�

ox�3

�����n

i

!

þ �2

6o3n�

ox�3

�����n

i

þ Dx�ð Þ2

4o5n�

ox�5

�����n

i

!¼ O Dx�ð Þ4; Dt�ð Þ4

�: ðA:7Þ

Since each term is at time level n and spatial index i, and this equa-tion holds for all space and time, we can remove the subscripts andwrite Eq. (A.7) as:

on�

ot�þ 1� 3

2dn�

� �on�

ox�þ �

2

6o3n�

ox�3

" #

þ Dt�ð Þ2

6o3n�

ot�3þ 1� 3

2dn�

� �Dx�ð Þ2

6o3n�

ox�3þ �

2 Dx�ð Þ2

24o5n�

ox�5

" #¼ O Dx�ð Þ4; Dt�ð Þ4

�; ðA:8Þ

where the first set of bracketed terms represents the terms in theoriginal PDE and the second set of bracketed terms represents theadditional terms in the MEPDE that result from the discretization.Recalling that O(d) = O(�2) < 1, Eq. (A.8) can be written as:

on�

ot�þ 1� 3

2dn�

� �on�

ox�þ �

2

6o3n�

ox�3

" #þ Dt�ð Þ2

6o3n�

ot�3þ Dx�ð Þ2

6o3n�

ox�3

" #¼ O �2 Dx�ð Þ2; d Dx�ð Þ2; Dx�ð Þ4; Dt�ð Þ4

�: ðA:9Þ

We ignore the truncation error terms in the MEPDE created fromthe nonlinear advection and dispersion terms because they areapproximately one order of magnitude smaller than the termsresulting from the linear problem. Using the first-order, linearrelation:

on�

ot�¼ � on�

ox�þ O �2; d

� �; ðA:10Þ

we have, to O(�2,d):

o2n�

ot�2¼ o2n�

ox�2;

o3n�

ot�3¼ � o3n�

ox�3:

This result generalizes to Eq. (33). Using this relation, we can re-write Eq. (A.9) as:

on�

ot�þ 1� 3

2dn�

� �on�

ox�þ �

2

6o3n�

ox�3

" #þ Dx�ð Þ2

6o3n�

ox�3� Dt�ð Þ2

6o3n�

ox�3

" #¼ O �2 Dx�ð Þ2; d Dx�ð Þ2; Dx�ð Þ4; Dt�ð Þ4

�; ðA:11Þ

or:

on�

ot�þ 1� 3

2dn�

� �on�

ox�þ �

2

6o3n�

ox�3

" #þ 1� C2

� Dx�ð Þ2

6o3n�

ox�3

" #¼ O �2 Dx�ð Þ2; d Dx�ð Þ2; Dx�ð Þ4; Dt�ð Þ4

�; ðA:12Þ

where C � Dt⁄/Dx⁄. This gives the numerical dispersion coefficientb ¼ ð1� C2Þ ðDx�Þ2

6 in Eq. (34).

Appendix B. Convergence analysis for the KdV discretization

In this section we perform a grid-refinement convergence anal-ysis of the discrete KdV equation (31) to verify that the numericalmethod is indeed second-order accurate. Fig. B.11 shows that thecentered finite-difference method given in Eq. (31) is second-orderaccurate in time. The temporal convergence analysis shown inFig. B.11 is performed for the evolution of an initial Gaussian hump

10−2

10−3

10−2

10−1

100

Δ t*

Err

or

hydrostasticnonhydrostaticsecond−order accuracy

Fig. B.11. Temporal convergence of the numerical KdV solution given in Eq. (31).The convergence analysis shows that all methods converge with second-orderaccuracy, O((Dt⁄)2), with refinement of the time step size, Dt⁄.

10−3 10−2

10−2

10−1

100

Δ x*

Erro

r

hydrostasticnonhydrostaticsecond-order accuracy

Fig. B.12. Spatial convergence of the numerical KdV solution given in Eq. (31).

S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86 85

of the form given in Eq. (50), with identical parameters as in Sec-tion 3.1, on a grid with Nx = 200 grid points and with a Courantnumber C ¼ Dt�

Dx�, for various time step sizes Dt⁄ = 1/512, 1/256, 1/128, 1/64, 1/32 with t�max ¼ 10. Recall that the ⁄ notation refers tonondimensional variables. The measure of convergence of the solu-tion (Figs. B.11, B.12) is obtained by: Error = k solution (Dx⁄ orDt⁄) � solution (Dx⁄/2 or Dt⁄/2)k2, where ‘‘solution’’ means thenumerical solution of n⁄ on a grid of size Dx⁄ or with a time stepof Dt⁄. As shown in Fig. B.11, the numerical solution obtainsO((Dt⁄)2) convergence, as expected.

Convergence with respect to spatial resolution is shown inFig. B.12. This analysis is performed for identical initial conditionsas the temporal convergence analysis, with grid spacing given byDx⁄ = 1/600, 1/500, 1/400, 1/300, 1/200, 1/100. Each simulation isperformed with a time step of Dt⁄ = 0.00005 and with t�max ¼ 5.The measure of convergence of the solution is obtained using themethod explained above. The coarse-grid solution is interpolatedonto the highest resolution domain using a cubic-spline interpola-

tion method and the norm of the difference between the solutionsat various resolutions provides the measure of convergence.

Unlike the temporal convergence, spatial convergence is not aswell-behaved. The nonhydrostatic method, as shown in Fig. B.12,converges with spatial-refinement with approximately second-or-der accuracy. However, the hydrostatic model does not convergewith spatial-refinement. Lack of convergence results from the mag-nitude of (numerical) dispersion which is a function of D x⁄. There-fore, numerical solitons appear with increasingly smaller widthsthat are always proportional to the grid spacing via Eq. (46). Thelack of convergence is a common problem arising from invalidassumptions of hydrostatic models. For example, when calculatinga lock-exchange flow, Fringer et al. (2006) show that the hydro-static model yields exceedingly large vertical velocities. This occursbecause of the ill-posedness of the hydrostatic model which causesan inverse dependence of the vertical velocity on Dx. Horizontalgrid refinement leads to unbounded increase in the vertical veloc-ity when a hydrostatic model is used to simulate an inherentlynonhydrostatic problem.

References

Apel, J., Holbrook, J., Liu, A., Tsai, J., 1985. The Sulu Sea internal soliton experiment. J.Phys. Oceanogr. 15, 1625–1651.

Asselin, R., 1972. Frequency filter for time integrations. Mon. Weather Rev. 100,487–490.

Bleck, R., Rooth, C., Hu, D., Smith, L.T., 1992. Salinity-driven thermocline transientsin a wind- and thermohaline-forced isopycnic coordinate model of the NorthAtlantic. J. Phys. Oceanogr. 22, 1486–1505.

Blumberg, A.F., Mellor, G.L., 1987. A description of a three-dimensional coastalocean circulation model. In: Heaps, N. (Ed.), Three-Dimensional Coastal OceanModels. American Geophysical Union, pp. 1–16.

Boussinesq, J., 1871. Thorie de l’intumescence liquide, applele onde solitaire ou detranslation, se propageant dans un canal rectangulaire. C.R. Acad. Sci. 72,755759.

Boussinesq, J., 1872. Thorie des ondes et des remous qui se propagent le long d’uncanal rectangulaire horizontal, en communiquant au liquide contenu dans cecanal des vitesses sensiblement pareilles de la surface au fond. J. Math. PureAppl. 17, 55108.

Burwell, D., Tolkova, E., Chawla, A., 2007. Diffusion and dispersion characterizationof a numerical tsunami model. Ocean Modell. 19, 10–30.

Casulli, V., Cattani, E., 1994. Stability, accuracy and efficiency of a semi-implicitmethod for three-dimensional shallow water flow. Comput. Math. Appl. 27, 99–112.

Cushman-Roisin, B., Beckers, J., 2010. Introduction to Geophysical Fluid Dynamics:Physical and Numerical Aspects. Academic Press.

Duda, T.F., Lynch, J.F., Beardsley, R.C., Irish, J.D., Ramp, S.R., Chiu, C.S., Tang, T.Y.,Yang, Y.J., 2004. Internal tide and nonlinear internal wave behavior at thecontinental slope in the Northern South China Sea. IEEE J. Ocean. Eng. 29, 1105–1130.

Fringer, O.B., Street, R.L., 2003. The dynamics of breaking progressive interfacialwaves. J. Fluid Mech. 494, 319–353.

Fringer, O.B., Gerritsen, M., Street, R.L., 2006. An unstructured-grid, finite-volume,nonhydrostatic, parallel coastal ocean simulator. Ocean Modell. 14, 139–173.

Gottwald, G., 2007. Dispersive regularizations and numerical discretizations for theinviscid burgers equation. J. Phys. A. Math. Theor. 40, 14745.

Grimshaw, R., 2007. Solitary Waves in Fluids. WIT Press, Boston.Helfrich, K.R., Melville, W.K., 2006. Long nonlinear internal waves. Annu. Rev. Fluid

Mech. 38, 395–425.Hirt, C., 1968. Heuristic stability theory for finite-difference equations. J. Comput.

Phys. 2, 335–339.Hodges, B., Laval, B., Wadzuk, B., 2006. Numerical error assessment and a temporal

horizon for internal waves in a hydrostatic model. Ocean Modell. 13, 44–64.Hunkins, K., Fliegel, M., 1973. Internal undular surges in Seneca Lake: A natural

occurrence of solitons. J. Geophys. Res. 78, 539–548.Kanarska, Y., Shchepetkin, A., McWilliams, J., 2007. Algorithm for non-hydrostatic

dynamics in the regional oceanic modeling system. Ocean Modell. 18, 143–174.Kantha, L., Clayson, C., 2000. Numerical Models of Oceans and Oceanic Processes.

Academic Press.Korteweg, D., de-Vries, G., 1895. On the change of form of long waves advancing in a

rectangular canal, and on a new type of long stationary waves. Philos. Mag. 39,422–443.

LeBlond, P., Mysak, L., 1978. Waves in the Ocean. Elsevier, Amsterdam, TheNetherlands.

Lele, S., 1992. Compact finite difference schemes with spectral-like resolution. J.Comput. Phys. 103, 16–42.

Liu, A.K., 1988. Analysis of nonlinear internal waves in the New York Bight. J.Geophys. Res. 93, 12317–12329.

86 S. Vitousek, O.B. Fringer / Ocean Modelling 40 (2011) 72–86

Liu, A.K., Yang, Y.S., Hsu, M.K., Liang, N.K., 1998. Evolution of nonlinear internalwaves in the East and South China Seas. J. Geophys. Res. 103, 7995–8008.

Lynett, P.J., Liu, P.L.F., 2002. A two-dimensional, depth-integrated model for internalwave propagation over variable bathymetry. Wave Motion 36, 221–240.

Marshall, J., Adcroft, A., Hill, C., Perelman, L., Heisey, C., 1997. A finite-volume,incompressible Navier Stokes model for studies of the ocean on parallelcomputers. J. Geophys. Res. 102, 5753–5766.

Marshall, J., Hill, C., Perelman, L., Adcroft, A., 1997. Hydrostatic, quasi-hydrostatic,and nonhydrostatic ocean modeling. J. Geophys. Res. 102, 5733–5752.

Mei, C., 1983. Theory and Applications of Ocean Surface Waves. World Scientific,Singapore.

Pacanowski, R., Griffes, S., 1999. The MOM 3 Manual. Geophysical Fluid DynamicsLaboratory/NOAA, Princeton.

Peregrine, D., 1967. Long waves on a beach. J. Fluid Mech. 27, 815–827.Schroeder, G., Schlünzen, K., 2009. Numerical dispersion of gravity waves. Mon.

Weather Rev. 137, 4344–4354.Scotti, A., Mitran, S., 2008. An approximated method for the solution of elliptic

problems in thin domains: Application to nonlinear internal waves. OceanModell. 25, 144–153.

Scotti, A., Pineda, J., 2004. Observations of very large and steep internal waves ofelevation near the Massachussetts coast. Geophys. Res. Lett. 31, L22307.

Shchepetkin, A., McWilliams, J., 2003. A method for computing horizontal pressure-gradient force in an oceanic model with a non-aligned vertical coordinate. J.Geophys. Res. 108.

Shuto, N., 1991. Numerical simulation of tsunamis its present and near future. Nat.Hazards 4, 171–191.

Stanton, T.P., Ostrovsky, L.A., 1998. Observations of highly nonlinear internalsolitons over the continental shelf. Geophys. Res. Lett. 25, 2695–2698.

Tam, C., Webb, J., 1993. Dispersion–relation–preserving finite difference schemesfor computational acoustics. J. Comput. Phys. 107, 262–281.

Trefethen, L.N., 1982. Group velocity in finite difference schemes. SIAM Rev. 24,113–136.

Vichnevetsky, R., 1980. Propagation properties of semi-discretizations of hyperbolicequations. Math. Comput. Simulat. 22, 98–102.

Vichnevetsky, R., Bowles, J., 1982. Fourier Analysis of Numerical Approximations ofHyperbolic Equations. SIAM.

Wadzuk, B.M., Hodges, B.R., 2009. Hydrostatic versus nonhydrostatic Euler-equation modeling of nonlinear internal waves. J. Eng. Mech. 135, 1069–1080.

Warn-Varnas, A., Hawkins, J., Lamb, K., Piacsek, S., Chin-Bing, S., King, D., Burgos, G.,2010. Solitary wave generation dynamics at Luzon Strait. Ocean Modell. 31, 9–27.

Whitham, G., 1974. Linear and Nonlinear Waves. Wiley-Interscience, New York.Zauderer, E., 1989. Partial Differential Equations of Applied Mathematics. Wiley,

New York.Zhang, Z., Fringer, O.B., Ramp, S.R., 2011. Three-dimensional, nonhydrostatic

numerical simulation of nonlinear internal wave generation and propagationin the South China Sea. J. Geophys. Res. 116, C05022. doi:10.1029/2010JC006424.