determining near-boundary departure points in semi-lagrangian models

7
QUARTERLY JOURNAL OF THE ROYAL METEOROLOGICAL SOCIETY Q. J. R. Meteorol. Soc. 135: 1890–1896 (2009) Published online 27 August 2009 in Wiley InterScience (www.interscience.wiley.com) DOI: 10.1002/qj.478 Notes and Correspondence Determining near-boundary departure points in semi-Lagrangian models Nigel Wood*, Andrew Staniforth and Andy White Met Office, Exeter, UK ABSTRACT: When the trajectory equation is discretised in semi-Lagrangian models, the departure points can be spuriously located outside the model domain. Historically this has been addressed in an ad hoc manner by relocating any such departure point to the domain boundary. This procedure, whilst convenient, is not physically justified and is inaccurate. It is of particular concern for mass-conserving, finite-volume, semi-Lagrangian schemes that use the locations of departure points to determine upstream volumes, since it can lead to spuriously massless or near-massless volumes, and large errors in mass transport. This weakness of current discretisations is discussed. An improved near-boundary discretisation of the trajectory equation is then proposed and analysed via an example. Crown Copyright c 2009. Reproduced with the permission of HMSO. Published by John Wiley & Sons Ltd. KEY WORDS discretisation; finite volume; kinematic equation; mass conservation; trajectory Received 17 February 2009; Revised 19 June 2009; Accepted 22 June 2009 1. Introduction Semi-Lagrangian schemes are widely used for the advec- tion component of many modern operational atmospheric models due to their enhanced efficiency and stability com- pared to Eulerian schemes – Staniforth and Cˆ ot´ e (1991) provide a review. Such schemes usually use a backward trajectory approach in which the trajectory equation (also known as the departure point or kinematic equation) is integrated to determine the departure locations of parti- cles that arrive at gridpoints at the new time level. This involves both temporal discretisation and spatial interpo- lation. It has been found that the discretisation of the tra- jectory equation should be second-order accurate in time, otherwise the timestep length is unduly limited by accu- racy considerations (Staniforth and Pudykiewicz, 1985; McDonald, 1987) In space, whilst cubic (or higher-order) interpolation should generally be used to evaluate quanti- ties at departure points, it is usually sufficient to use linear interpolation of the wind components when determining the departure points by integrating the trajectory equation (Staniforth and Pudykiewicz, 1985; Temperton and Stan- iforth, 1987; Bates et al., 1990). Linear interpolation has the virtue of being very economical. Near solid boundaries, however, the composite spatio- temporal discretisation can lead to departure points being spuriously located outside the domain. This is particularly serious at the lower boundary of a three-dimensional (3D) model, or a 2D vertical-slice model, in the presence of Correspondence to: Nigel Wood, Met Office, FitzRoy Road, Exeter EX1 3PB, UK. E-mail: Nigel.Wood@metoffice.gov.uk detailed orography; it is also a problem in the horizontal for 1D, 2D, and 3D contained flows, e.g. for a 2D shallow-water model in a bounded domain. It has become standard practice to relocate, in an ad hoc manner, any departure point lying outside the domain to the domain boundary. Whilst this has proven to be quite effective, it is not entirely satisfactory, since it can lead to a spuriously large number of departure points lying on the boundary. It can also lead to massless, or almost massless, layers where two departure points, associated with two adjacent arrival points separated by a finite distance z (say), both lie on the boundary, when neither of them should. (Analytically, particles that lie on a solid boundary are constrained to remain on it, and cannot move to the interior of the flow.) This is a partic- ularly serious problem for semi-Lagrangian models that use a finite-volume approach to inherently conserve mass (Machenhauer et al., 2008), since the finite volumes are determined by the location of the departure points, and an inaccurate determination of these volumes can then lead to an unacceptable loss of accuracy for mass transport. The purpose of this note is to examine the issue of depar- ture points spuriously migrating outside the domain, and to develop a near-boundary discretisation to address this. In section 2, the standard discretisation of the 1D tra- jectory equation is given and the problem near boundaries is discussed. An alternative, near-boundary, discretisation for 1D problems is then developed in section 3 and com- pared, in section 4, with both the analytic solution and the standard discretisation for a simple example. In section 5 the proposed scheme is extended to 2D. Conclusions are drawn in section 6. Crown Copyright c 2009. Reproduced with the permission of HMSO. Published by John Wiley & Sons Ltd.

Upload: nigel-wood

Post on 06-Jul-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Determining near-boundary departure points in semi-Lagrangian models

QUARTERLY JOURNAL OF THE ROYAL METEOROLOGICAL SOCIETYQ. J. R. Meteorol. Soc. 135: 1890–1896 (2009)Published online 27 August 2009 in Wiley InterScience(www.interscience.wiley.com) DOI: 10.1002/qj.478

Notes and CorrespondenceDetermining near-boundary departure points in

semi-Lagrangian models

Nigel Wood*, Andrew Staniforth and Andy WhiteMet Office, Exeter, UK

ABSTRACT: When the trajectory equation is discretised in semi-Lagrangian models, the departure points can be spuriouslylocated outside the model domain. Historically this has been addressed in an ad hoc manner by relocating any suchdeparture point to the domain boundary. This procedure, whilst convenient, is not physically justified and is inaccurate. Itis of particular concern for mass-conserving, finite-volume, semi-Lagrangian schemes that use the locations of departurepoints to determine upstream volumes, since it can lead to spuriously massless or near-massless volumes, and large errorsin mass transport. This weakness of current discretisations is discussed. An improved near-boundary discretisation ofthe trajectory equation is then proposed and analysed via an example. Crown Copyright c© 2009. Reproduced with thepermission of HMSO. Published by John Wiley & Sons Ltd.

KEY WORDS discretisation; finite volume; kinematic equation; mass conservation; trajectory

Received 17 February 2009; Revised 19 June 2009; Accepted 22 June 2009

1. Introduction

Semi-Lagrangian schemes are widely used for the advec-tion component of many modern operational atmosphericmodels due to their enhanced efficiency and stability com-pared to Eulerian schemes – Staniforth and Cote (1991)provide a review. Such schemes usually use a backwardtrajectory approach in which the trajectory equation (alsoknown as the departure point or kinematic equation) isintegrated to determine the departure locations of parti-cles that arrive at gridpoints at the new time level. Thisinvolves both temporal discretisation and spatial interpo-lation. It has been found that the discretisation of the tra-jectory equation should be second-order accurate in time,otherwise the timestep length is unduly limited by accu-racy considerations (Staniforth and Pudykiewicz, 1985;McDonald, 1987) In space, whilst cubic (or higher-order)interpolation should generally be used to evaluate quanti-ties at departure points, it is usually sufficient to use linearinterpolation of the wind components when determiningthe departure points by integrating the trajectory equation(Staniforth and Pudykiewicz, 1985; Temperton and Stan-iforth, 1987; Bates et al., 1990). Linear interpolation hasthe virtue of being very economical.

Near solid boundaries, however, the composite spatio-temporal discretisation can lead to departure points beingspuriously located outside the domain. This is particularlyserious at the lower boundary of a three-dimensional (3D)model, or a 2D vertical-slice model, in the presence of

∗Correspondence to: Nigel Wood, Met Office, FitzRoy Road, ExeterEX1 3PB, UK. E-mail: [email protected]

detailed orography; it is also a problem in the horizontalfor 1D, 2D, and 3D contained flows, e.g. for a 2Dshallow-water model in a bounded domain.

It has become standard practice to relocate, in anad hoc manner, any departure point lying outside thedomain to the domain boundary. Whilst this has provento be quite effective, it is not entirely satisfactory, since itcan lead to a spuriously large number of departure pointslying on the boundary. It can also lead to massless,or almost massless, layers where two departure points,associated with two adjacent arrival points separated by afinite distance �z (say), both lie on the boundary, whenneither of them should. (Analytically, particles that lieon a solid boundary are constrained to remain on it, andcannot move to the interior of the flow.) This is a partic-ularly serious problem for semi-Lagrangian models thatuse a finite-volume approach to inherently conserve mass(Machenhauer et al., 2008), since the finite volumes aredetermined by the location of the departure points, and aninaccurate determination of these volumes can then leadto an unacceptable loss of accuracy for mass transport.The purpose of this note is to examine the issue of depar-ture points spuriously migrating outside the domain, andto develop a near-boundary discretisation to address this.

In section 2, the standard discretisation of the 1D tra-jectory equation is given and the problem near boundariesis discussed. An alternative, near-boundary, discretisationfor 1D problems is then developed in section 3 and com-pared, in section 4, with both the analytic solution and thestandard discretisation for a simple example. In section 5the proposed scheme is extended to 2D. Conclusions aredrawn in section 6.

Crown Copyright c© 2009. Reproduced with the permission of HMSO. Published by John Wiley & Sons Ltd.

Page 2: Determining near-boundary departure points in semi-Lagrangian models

DETERMINING NEAR-BOUNDARY DEPARTURE POINTS 1891

2. The vertical trajectory equation in 1D

2.1. Governing equation

The vertical trajectory equation in 1D may be written as

Dz

Dt= w, (1)

where z is vertical coordinate and w is vertical wind-speed. Assume a domain z0 ≡ 0 ≤ z ≤ zN , divided intoN layers zl−1 ≤ z ≤ zl, l = 1, 2, . . . , N , and boundaryconditions

w = 0 at z = z0, zN . (2)

2.2. Discretisation

In a semi-Lagrangian model, the trajectory equation (1) isdiscretised using data defined at either two or three timelevels, and at gridpoints zl, l = 0, 1, . . . , N . Becausetwo-time-level semi-Lagrangian models are, in principle,more efficient than three-time-level ones (McDonald andBates, 1987; Temperton and Staniforth, 1987), attentionis restricted herein to two-time-level discretisations; thesame approach can however be used for three-time-leveldiscretisations.

A simple two-time-level discretisation of Equation (1)is the iterative scheme

zn(k+1)D = zA − �t

2

[wn+1

A + wn(zn(k)D

)], (3)

where superscript n denotes evaluation at time t =n�t , the additional superscript (k) denotes evaluation atiteration k, and subscripts A and D denote evaluationat arrival and departure points z = zn+1

A = zA and z =zn

D, respectively. The arrival points are assumed to bethe gridpoints z0, z1, . . . , zN , at which values of wn+1,assumed to be known (e.g. as part of some furtheriterative procedure), are defined. However, in general,the departure points at the kth iterate, z

n(k)D , will not

coincide with gridpoints, and evaluation of wn(zn(k)D ) is

then achieved by linear interpolation, using the knownvalues of wn at the two endpoints of the interval inwhich z

n(k)D lies. To start the iterative procedure, z

n(0)D

is set to some initial value, for example zn(0)D = zA,

or zn(0)D = zn−1

D , the final value obtained for zD at theprevious timestep.

2.3. Near-boundary issue

In general, the iterative procedure described above workswell and leads to an accurate determination of thedeparture points. However, near solid boundaries andwhen using large timesteps, it can spuriously lead to smallbelow-ground (i.e. negative) estimates for the locationzn(k+1)D of the departure points. To see this consider the

following case.Let the arrival point be located at the specific gridpoint

z = z1, i.e. at z = zA = z1. Assume that w1 is positive

and that the initial guess for the departure point is zn(0)D =

z1. Applying the discretisation Equation (3), with k set tozero, gives

zn(1)D = z1 − �t

2(wn+1

1 + wn1 ). (4)

If

(wn+11 + wn

1 )�t

2z1> 1, (5)

then the estimate zn(1)D for zn

D is negative and spuriouslylocated outside the physical domain. At the next itera-tion, the linear interpolation used to evaluate wn(z

n(1)D )

breaks down (it would become an extrapolation, ratherthan an interpolation). The usual, ad hoc, fix for thisproblem, is to simply set z

n(k+1)D to zero whenever it

becomes negative, so that in this case zn(1)D = 0. (Some

justification for this might be as follows. Since it isknown analytically that zn

D must lie within the domain,any estimate that erroneously places a particle outsidethe domain must be due to truncation error, and thereforerelocation to the boundary induces a change that must bewithin truncation error.) Proceeding to the next iteration,using Equation (3) with k set to unity, z

n(1)D set to zero

and applying Equation (2), then gives

zn(2)D = z1

(1 − wn+1

1 �t

2z1

). (6)

Thus for large enough �t , i.e.

wn+11 �t

z1> 2, (7)

zn(2)D is also negative, thereby leading to z

n(2)D (and indeed

all subsequent estimates) being reset to zero. (If Equation(7) holds then Equation (5) requires only that wn

1 > 0.)Figure 1(a) gives a schematic example of this case.

However, although the departure point remains withinthe domain (albeit only just), it is spuriously located atthe boundary of the domain. This violates the intrinsicproperty that a particle whose departure point lies on asolid boundary cannot migrate to an arrival point locatedaway from this boundary.

A similar analysis shows that the departure pointassociated with arrival at the general point z = zj at timetn+1 is, for an initial guess z

n(0)D = zj , also spuriously

located at the boundary if wnj > 0 and

wn+1j �t

zj

> 2 . (8)

Noting that z0 = 0 and w0 = 0, this condition can beseen as a restriction on a bulk form of the dimensionlessquantity Cdef ≡ �t ∂w/∂z, across the layer [z0 = 0, zj ].

Crown Copyright c© 2009. Reproduced with the permission ofHMSO. Published by John Wiley & Sons Ltd.

Q. J. R. Meteorol. Soc. 135: 1890–1896 (2009)DOI: 10.1002/qj

Page 3: Determining near-boundary departure points in semi-Lagrangian models

1892 N. WOOD ET AL.

z0

.

.

.

.

.

.

w

∆t

z2

z1A

D

tn tn+1

t

(a)

z0

z2

z1

.

.

.

. w

A

D ..

(c)

t

tn+1∆t

tn

z0

z2

z1

.

.

.

.

.

.

tn+1tn

w

.∆t

A

t

D

(b)

z0

z2

z1

..

.t

tn

w

∆t

A

(d)

D

(1−α∆t) α∆t

tn+1

.

.

Figure 1. Schematic time–height diagrams of the various near-boundarybackward trajectories (from the arrival point A to the departure pointD) for the case w > 0: (a) the case of a backward trajectory from thefirst internal level (z1) that goes out of the domain and is lifted up tothe surface (z0); (b) is as (a) but where the departure point is evaluatedusing Equation (12); (c) is as (a) but where the backward trajectoryoriginates from the second internal level (z2); (d) is as (c) but wherethe departure point is evaluated using Equation (14). See text for further

details.

Therefore, defining the signed, vertical deformationalCourant number to be

Cdefj ≡ �t

wn+1j − w0

zj − z0, (9)

(8) can be written as

Cdefj > 2. (10)

For a timestep �t = 1800 s and a lowest interior gridpoint z1 = 10 m (values not untypical for a global semi-Lagrangian model), Equation (7) will be satisfied forvertical velocities larger than around 10−2 m s−1.

3. Alternative discretisation of the 1D verticaltrajectory equation near the lower boundary

For the lowest layer [0, z1], and the time interval[n�t, (n + 1)�t], assume now that w(z, t) > 0 varieslinearly in both z and t and also satisfies the boundaryconditions, Equation (2) on w. (Note that these linearityassumptions are consistent with those made in the dis-cretisation given in section 2.2; however they are useddifferently in the following derivations.) Thus

w(z, t) =[(

tn+1 − t

�t

)wn

1 +(

t − tn

�t

)wn+1

1

]z

z1, (11)

where wn1 denotes the value of w at z = z1, and at

time tn = n�t . Inserting Equation (11) into the trajectoryEquation (1), and integrating along a trajectory thatarrives at z = z1 at time tn+1, then yields

znD = z1 exp

[−�t

z1

(wn+1

1 + wn1

2

)]. (12)

The discretisation Equation (12) of the trajectory Equa-tion (1) has the important property that for w(z, t) > 0,and for any value of �t , the departure point zn

D thatarrives at the point z = z1 at time (n + 1)�t alwayslies strictly within the domain, and can therefore neveroriginate from the surface z = z0 = 0. Under thesecircumstances, the problem discussed in section 2.3 isthus addressed. Figure 1(b) shows schematically theimpact of applying Equation (12) (cf. Figure 1(a)).

This alternative discretisation is however restrictedto the arrival point being located at z = z1, and is notdirectly applicable to the situation where the arrivalpoint is at, for example, z = z2, with the departurepoint lying in the interval z0 = 0 ≤ z ≤ z1. Thereforeconsider the case of the arrival point being located atz = zj , j ≥ 2, and where at some iterate, k, z

n(k+1)D

lies below z = z1. If additionally zn(k+1)D lies below

the surface, i.e. zn(k+1)D < 0, then lift the particle to

the surface z = z0 = 0. (Figure 1(c) gives a schematicof this situation.) Define z

n(k+1)D as the usual estimate

corrected (in an ad hoc manner) if necessary, i.e.

zn(k+1)

D ≡ max

{0, zA− �t

2

[wn+1

A + wn(zn(k)D

)]}. (13)

By assumption zn(k+1)

D < z1. It follows that theparticle that starts at z

n(k+1)D (0 ≤ z

n(k+1)D < z1) and

arrives at zA (zA > z1) spends only a fraction, α(k) say,of its total travel time travelling from z1 to zA (thisfraction of the timestep is indicated on Figure 1(d) asα�t). Therefore, the particle only spends a fraction(1 − α(k)) of the timestep travelling within the lowestlayer. It is in this layer, and for this period of time,that Equation (11) applies. Hence, for arrival pointslocated at z = zj , j ≥ 2, and where at some iterate, k,zn(k+1)D lies below z = z1, Equation (12) is replaced by

the integral of Equation (11) between times t = tn andt = tn + (1 − α(k))�t . This results in:

zn(k+1)D = z1 exp

{− (1 − α(k)

)�t

×[(

1− α(k)

2

)wn+1

1

z1+

(1+ α(k)

2

)wn

1

z1

]}.

(14)

Application of Equation (14) requires an estimate forα(k). Here that is obtained as

α(k) = zA − z1

zA − zn(k+1)

D

. (15)

Crown Copyright c© 2009. Reproduced with the permission ofHMSO. Published by John Wiley & Sons Ltd.

Q. J. R. Meteorol. Soc. 135: 1890–1896 (2009)DOI: 10.1002/qj

Page 4: Determining near-boundary departure points in semi-Lagrangian models

DETERMINING NEAR-BOUNDARY DEPARTURE POINTS 1893

z0

.

.

.

.

.

.

w

∆t

z2

z1

tn tn+1

t

(a)

D

Az0

z2

z1 .

.

.

.

.

tn+1tn

w

.∆t

t

(b)

D

A

z0

z2

z1

.

.

.

. w

..

(c)

t

tn+1∆t

tn

D

Az0

z2

z1

..

.

.tn+1tn

w

∆tt

(d)D

A

α∆t (1−α∆t)

.

.

Figure 2. Schematic time–height diagrams of the various near-boundaryforward trajectories (from the departure point D to the arrival pointA) for the case w < 0: (a) the case of a forward trajectory from thefirst internal level (z1) that goes out of the domain and is lifted up tothe surface (z0); (b) is as (a) but where the arrival point is evaluatedanalogously to Equation (12); (c) is as (a) but where the forwardtrajectory originates from the second internal level (z2); (d) is as (c)but where the arrival point is evaluated analogously to Equation (14).

By virtue of Equation (13) and the fact that zA > z1 > 0,the parameter α(k) is guaranteed to lie in the range0 ≤ α(k) ≤ 1. Figure 1(d) shows schematically the impactof applying (14) (cf. Figure 1(c)).

For zA = z1 and non-zero vertical velocities, Equation(15) implies that α(k) = 0 and therefore Equation (14)reduces to Equation (12). Thus, Equation (14) is in factvalid for all arrival points zj , j ≥ 1, since it subsumesthe case j = 1.

The Appendix discusses aspects of the convergence ofthe coupling of Equation (3) with Equations (14) and (15).

Whilst the presentation here assumes backward trajec-tories, it is worth noting that the same method and thesame procedure, mutatis mutandis, can be applied to for-ward trajectories (in which the departure point coincideswith a grid point). Details are not given here, but Figure 2(in the same format as Figure 1) summarises the situa-tion and proposed treatment for the case of near surfaceforward trajectories when w < 0.

4. An example

To illustrate the nature of the problem, and the character-istics of the proposed solution, it is useful to consider aspecific example.

To start, consider the discretisation, Equation (3) of thetrajectory Equation (1) under the assumption that z

n(k)D

always lies in the interval z0 = 0 ≤ z ≤ z1. Then, using

linear interpolation to evaluate wn(zn(k)D ) from wn

0 = 0and wn

1 , Equation (3) gives

zn(k+1)D = zA − �t

2

(wn+1

A + zn(k)D

z1wn

1

), (16)

whose exact solution is

znD = z

n(k+1)D = z

n(k)D

= zA

(1 − wn+1

A �t

2zA

)(1 + wn

1�t

2z1

)−1

. (17)

Now choose a particular velocity profile. Assume that,adjacent to the lower boundary (z = 0), w is constant intime (so that the superscripts indicating the time level canbe dropped) and satisfies

w(z) = wr

(z

zr

)p

, (18)

where p is an integer greater than or equal to 2 and wrand zr are fixed, positive, reference values for w and z.

Analytically integrating the trajectory Equation (1)subject to Equation (18), and to the condition that theparticle arrives at an arrival point z = zA at time t =tn+1 = (n + 1)�t , then gives

zD = zA

[1 + (p − 1)

wA�t

zA

]− 1p−1

, (19)

as the exact location of the departure point. Note that forfixed p, the larger �t is, the closer the departure point isto the lower boundary z = z0 = 0, but it is always locatedabove the ground regardless of how large �t is.

Further assume now that the arrival point is locatedat the specific gridpoint z = z1, i.e. at z = zA = z1, andthat w is exactly sampled at gridpoints so that w0 = 0 andw1 = wr(z1/zr)

p . Application of Equation (17) yields

zD = z1

(1 − w1�t

2z1

)(1 + w1�t

2z1

)−1

. (20)

Expanding the right-hand side for small w1�t/z1 thengives

zD = z1

[1 − w1�t

z1+ 1

2

(w1�t

z1

)2]

+ O

(w1�t

z1

)3

,

(21)

which agrees to O(�t) with the corresponding small �t

expansion

zD = z1

[1 − w1�t

z1+ p

2

(w1�t

z1

)2]

+O

(w1�t

z1

)3

,

(22)

of the exact result, Equation (19) with zA = z1. Thus allis well for the discretisation, Equation (3) for small �t

for this example.

Crown Copyright c© 2009. Reproduced with the permission ofHMSO. Published by John Wiley & Sons Ltd.

Q. J. R. Meteorol. Soc. 135: 1890–1896 (2009)DOI: 10.1002/qj

Page 5: Determining near-boundary departure points in semi-Lagrangian models

1894 N. WOOD ET AL.

Under the same assumptions, the proposed alternativediscretisation, Equation (14), which under these assump-tions reduces to Equation (12), yields

zD = z1 exp

(−w1�t

z1

). (23)

This has the small �t expansion

zD = z1

[1 − w1�t

z1+ 1

2

(w1�t

z1

)2]

+O

(w1�t

z1

)3

,

(24)

which, to this order, is exactly the same as the expansionEquation (21) for the standard discretisation Equation(3) of the trajectory equation Equation (1). Thus, forthis problem, the discretisation Equation (14) of thetrajectory Equation (1) addresses the problem identifiedin section 2.3 for the discretisation Equation (3) of thissame equation, without loss of formal accuracy.

Consider now the impact that the trajectory discreti-sation has on the predicted departure depth, �z

(1,2)D ≡

zD(z2) − zD(z1), of the arrival layer [z1, z2]. Let the gridbe uniform so that z2 = 2z1 = 2�z. Further, let wr and zrbe such that w1�t = 2�z (motivated by consideration ofEquation (17)). Then, for the wind profile Equation (18),w2�t = 2p+1�z. The analytical departure points for thiscase are given by Equation (19) and are:

zD(z2)

�z= 2

[1 + 2p(p − 1)

]− 1p−1 , (25)

andzD(z1)

�z= [1 + 2(p − 1)]−

1p−1 . (26)

The algebra is considerably simplified by choosing p = 2.Then Equations (25) and (26) give:

zD(z2)

�z= 2

5,

zD(z1)

�z= 1

3, (27)

and therefore, analytically,

�z(1,2)D

�z= 1

15. (28)

From the analysis of section 2.3, the discretisa-tion, Equation (3) predicts both zD(z1) and zD(z2)

to be zero. This results in �z(1,2)D /�z = 0. Equa-

tion (14) predicts zD(z2)/�z = exp(−1) ≈ 0.37 andzD(z1)/�z = exp(−2) ≈ 0.14. These imply

�z(1,2)D

�z≈ 15

64. (29)

For this case, zD(z2)/�z is close to its analytic value butzD(z1)/�z is about half the size it should be. The netresult is that the predicted layer depth is more than twiceas large as it should be. However, it is significantly betterthan the zero value given by the standard discretisation.

5. Extension to a 2D x−z vertical slice model

5.1. Governing equations

For a 2D x–z vertical slice model (where x is thehorizontal coordinate) the trajectory equations can bewritten as

Dx

Dt= u , (30)

Dz

Dt= w . (31)

5.2. Interior discretisation

A two-time-level discretisation of Equations (30)–(31),analogous to that given for the 1D case in section 2.2, isto iteratively solve

xn(k+1)D = xn+1

A − �t

2

[un+1

A + un(x

n(k)D , z

n(k)D

)], (32)

zn(k+1)D = zn+1

A − �t

2

[wn+1

A + wn(x

n(k)D , z

n(k)D

)], (33)

using bilinear interpolation in space, and some appropri-ate initial estimates x

n(0)D and z

n(0)D .

5.3. Near-boundary discretisation

In general, the iterative procedure given immediatelyabove determines the location of departure points withsufficient accuracy. However, near solid boundaries andwhen using large timesteps, it suffers from the deficiencydiscussed in section 2.3. The procedure described thereincan be straightforwardly applied to the 2D case. Doingso results in the following algorithm.

1. Iteratively solve Equations (32) and (33) in theusual way using bilinear interpolation in space, andsome appropriate initial estimates x

n(0)D and z

n(0)D

and adjust any departure points that lie outside thedomain to lie on the boundary.

2. For any zn(k+1)D that lies below the first level z = z1,

evaluate α(k) from

α(k) ≡ zA − z1

zA − zn(k+1)

D

, (34)

where

zn(k+1)

D ≡max

{0, zn+1

A − �t

2

[wn+1

A + wn(x

n(k)D , z

n(k)D

)]},

(35)

and replace the estimate for zn(k+1)D with

zn(k+1)D = z1 exp

{− (1 − α(k)

)�t

×(

1− α(k)

2

)wn+1

1

z1+

(1+ α(k)

2

)wn1

(x

n(k)D

)z1

,

(36)

where wn1(x

n(k)D ) is evaluated using linear interpo-

lation in x.

Crown Copyright c© 2009. Reproduced with the permission ofHMSO. Published by John Wiley & Sons Ltd.

Q. J. R. Meteorol. Soc. 135: 1890–1896 (2009)DOI: 10.1002/qj

Page 6: Determining near-boundary departure points in semi-Lagrangian models

DETERMINING NEAR-BOUNDARY DEPARTURE POINTS 1895

3. For any zn(k+1)D that lies above the penultimate level

z = zN−1(x), evaluate β(k) from

β(k) ≡ zN−1 − zA

zn(k+1)

D − zA

, (37)

where

zn(k+1)

D ≡min

{zN, z

n+1A − �t

2

[wn+1

A + wn(x

n(k)D , z

n(k)D

)]},

(38)

and replace the estimate for zn(k+1)D with

zN − zn(k+1)D = (zN − zN−1) exp

{+(1 − β(k)

)�t

×[(

1 − β(k)

2

)wn+1

N−1

zN −zN−1

+(

1 + β(k)

2

)wnN−1

(x

n(k)D

)zN −zN−1

,

(39)

where wnN−1(x

n(k)D ) is evaluated using linear inter-

polation in x.

Extension to the 3D context follows naturally, as too doesextension to a terrain-following coordinate system.

6. Conclusion

Numerical models of the atmosphere that are based onsemi-Lagrangian advection schemes have the advantagethat they can be run with relatively large timesteps. Toachieve this, they need to solve a trajectory equation.Schemes based on backward trajectories need to deter-mine the departure point at the previous timestep of aparcel of air that arrives at a given point at the currenttimestep. Schemes based on forward trajectories need todetermine the arrival point at the current timestep of aparcel of air originating at a given point at the previoustimestep. When evaluated numerically, the trajectoriesmay (in 1D) cross if the deformational Courant number isnot suitably small. This restriction on the deformationalCourant number may well be satisfied in the interior ofthe flow. However, it can be violated near the ground dueto the much higher vertical resolution usually employedthere in order to capture the strong vertical gradientswithin the planetary boundary layer. Additionally, trajec-tories near the surface may leave the model domain. Theusual ad hoc approach to this problem is to simply liftsuch trajectories back to the surface. This does not thoughprevent near-surface trajectories crossing or, more typi-cally, coinciding at the surface. For finite-volume modelsthis can lead to vanishing control volumes with seriousassociated problems.

Here an approach that addresses these problems nearmodel boundaries has been proposed that is based on

integrating the trajectory equation analytically. (Althoughpresented in terms of backward trajectories, this approachcan equally be applied to forward trajectories.) A lin-ear assumption about the subgrid variation of the verticalvelocity close to the boundaries has been made, consistentwith the fact that most semi-Lagrangian models currentlyevaluate departure point estimates using linear interpola-tion of the velocity field. The proposed scheme alwaysresults in departure points that lie within the domain,whatever the value of the timestep.

The scheme has been developed in 1D and an examplegiven of its application to power-law profiles for the ver-tical velocity. For small deformational Courant numbers,the proposed scheme has the same formal accuracy asthe standard scheme. Additionally, when applied at largedeformational Courant numbers to the particular case of aquadratic vertical velocity profile, it produces reasonableestimates for the departure depth of near-surface arrivallayers (or control volumes). In contrast, the standardscheme gives zero departure depth since both relevantdeparture points fall outside the domain and are conse-quently both lifted to the boundary.

The scheme has been extended to two dimensions foran orthogonal coordinate system. The extension to threedimensions, and also to terrain-following coordinates,follows naturally. Whilst the presentation has treated thecase of vertical field variations near horizontal bound-aries, the same approach could equally well be appliedto horizontal field variations near vertical boundaries inmodels of horizontally contained flows. An additionalpossibility is the application of the approach to modelsthat employ a Lagrangian vertical coordinate (e.g. Lin,2004; Nair et al., 2009). In such models the physicalheight (or its equivalent for pressure-based models) ofa coordinate surface is no longer constant. Its evolution,if required prognostically, is governed by an equation ofthe form of Equation (1). Application of the approachpresented here to solving that equation near the bound-aries could prevent coordinate surfaces having heightsspuriously outside the physical domain.

Acknowledgements

The authors would like to thank the reviewers for theirhelpful comments and suggestions that improved theoriginal manuscript.

Appendix: Convergence

For zA = z1, Equation (12) (or equivalently in this caseEquation (14)) is independent of k and the scheme istrivially convergent. The following analysis thereforeonly considers zA ≥ z2.

Let w be stationary in time so that wn+1 = wn = w,and assume that for all points of interest w > 0. Then

zn(k+1)

D ≡ max

{0, zA− �t

2

[wA+ w(z

n(k)D )

]}≤ z1,

(A.1)

Crown Copyright c© 2009. Reproduced with the permission ofHMSO. Published by John Wiley & Sons Ltd.

Q. J. R. Meteorol. Soc. 135: 1890–1896 (2009)DOI: 10.1002/qj

Page 7: Determining near-boundary departure points in semi-Lagrangian models

1896 N. WOOD ET AL.

and further suppose that zn(k)D ≤ z1. Applying then linear

interpolation to evaluate wn(zn(k)D ), subject to the bound-

ary condition (2) that w0 = 0, (A.1) can be rewritten as

zn(k+1)

D = max

[0, zA − �t

2

(wA + w1

zn(k)D

z1

)]≤ z1.

(A.2)

The presence of the max function in (A.2) makes analysisdifficult. Therefore assume that

zA − �t

2

(wA + w1

zn(k)D

z1

)(A.3)

is either always less than or always greater than 0. If it isalways less than 0 (as will be the case if wA�t/zA ≥ 2),then z

n(k+1)D = 0 for all estimates z

n(k)D and therefore

α(k) = (zA − z1)/zA. Then (14) is independent of k andthe scheme is trivially convergent. If (A.3) is alwaysgreater than 0, then

α(k) = 2(zA − z1)

wA �t

(1 + w1

wA

zn(k)Dz1

) , (A.4)

by assumption zn(k)D < z1. Therefore if w1 < wA, (A.4)

can be approximated as

α(k) = 2(zA − z1)

wA�t

(1 − w1

wA

zn(k)D

z1

)+ H.O.T. (A.5)

Thus, using (9),

zn(k+1)D = z1 exp

[− (1 − α(k)

)Cdef

1

]= z1 exp

(−Cdef1

)exp

(α(k)Cdef

1

)≈ z1 exp

(−Cdef1

)× exp

[2zA − z1

z1

w1

wA

(1 − w1

wA

zn(k)D

z1

)]

= z1 exp(−Cdef

1

)exp

(2zA − z1

z1

w1

wA

)× exp

[−2

zA − z1

z1

(w1

wA

)2zn(k)D

z1

]. (A.6)

Then provided that 2(w1/wA)2(zA − z1)/z1 is small,i.e. that w increases fast enough, the final exponentialin (A.6) can be expanded and two successive iterativeestimates subtracted from one another to give

zn(k+1)D − z

n(k)D

zn(k)D − z

n(k−1)D

≈ − 2zA− z1

z1

(w1

wA

)2

×exp

[−Cdef

1

(1 − 2

zA − z1

wA�t

)].

(A.7)

Since Cdef1 > 0, and the linearisation has assumed that

2(w1/wA)2(zA − z1)/z1 is small, the scheme is thereforeconvergent when wA�t/(zA − z1) > 2, i.e. when wA

alone (i.e. (3) with wn(zn(k)D ) set to zero) is large enough

for a particle arriving at z = zA to originate in the lowestlayer.

References

Bates JR, Semazzi FHM, Higgins RW, Barros SRM. 1990. Integrationof the shallow-water equations on the sphere using a semi-Lagrangian scheme with a multigrid solver. Mon. Weather Rev. 118:1615–1627.

Lin SJ. 2004. A ‘vertically Lagrangian’ finite-volume dynamical corefor global models. Mon. Wetaher Rev. 132: 2293–2307.

Machenhauer B, Kaas E, Lauritzen PH. 2008. Finite-volume methodsin meteorology. Pp 3–120 in Handbook of Numerical Analysis:Special Volume on Computational Methods for the Atmosphere andthe Oceans. Ciarlet PG, Temam R, Tribbia J. (eds.) Elsevier: NewYork.

McDonald A. 1987. Accuracy of multiply-upstream semi-Lagrangian advetive schemes. II. Mon. Weather Rev. 115:1446–1450.

McDonald A, Bates JR. 1987. Improving the estimate of the departurepoint in a two-time-level semi-Lagrangian and semi-inplicit scheme.Mon. Weather Rev. 115: 737–739.

Nair RD, Choi H-W, Tufo HM. 2009. Computational aspects of ascalable high-order discontinuous Galerkin atmospheric dynamicalcore. Comput. Fluids 38: 309–319.

Staniforth A, Cote J. 1991. Semi-Lagrangian integration schemesfor atmospheric models – A review. Mon. Weather Rev. 119:2206–2223.

Staniforth A, Pudykiewicz J. 1985. Reply to comments on andaddenda to ‘Some properties and comparative performance ofthe semi-Lagrangian method of Robert in the solution of theadvection–diffusion equation’. Atmos.–Ocean 23: 195–200.

Temperton C, Staniforth A. 1987. An efficient two-time-level semi-Lagrangian semi-implicit integration scheme. Q. J. R. Meteorol. Soc.113: 1025–1039.

Crown Copyright c© 2009. Reproduced with the permission ofHMSO. Published by John Wiley & Sons Ltd.

Q. J. R. Meteorol. Soc. 135: 1890–1896 (2009)DOI: 10.1002/qj