Вы находитесь на странице: 1из 88

Unified Model Documentation Paper 016

ENDGame Formulation

UM Version : 10.1
Last Updated : 2015-03-06 (for vn10.1)
Owner : Nigel Wood

Contributors:
N. Wood, A. Staniforth, A. White, J. Thuburn, T. Allen, T .Davies,
M. Diamantakis, M. Dubal, M. Gross, T. Melvin, C. Smith, and
M. Zerroukat

Met Office
FitzRoy Road
Exeter
Devon EX1 3PB
United Kingdom

c Crown Copyright 2015


This document has not been published; Permission to quote from it must be obtained from the Unified Model
system manager at the above address
UMDP: 016
ENDGame Formulation

Contents
1 Specific changes from last version 4

2 Highlights 4

3 Continuous equations 6

4 Curvilinear orthogonal coordinates 8


4.1 Definitions and relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

5 A transformed vertical coordinate 10

6 The semi-implicit semi-Lagrangian discrete equations 12


6.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
6.2 The SISL discrete set in vector form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
6.3 The SISL discrete set in component form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.3.1 The scalar equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.3.2 The momentum equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.3.3 The kinematic equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

7 Spatial discretization 16
7.1 Grid and storage aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.2 Momentum equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.3 η̇ equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
7.4 Thermodynamic equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.5 Continuity equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.6 Scalar mixing ratio (mX ) equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.7 Equation of state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.8 Lower and upper boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.8.1 Continuity equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.8.2 Thermodynamic and scalar mixing ratio equations . . . . . . . . . . . . . . . . . . . . . . 21
7.8.3 Momentum equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.9 Predictors for the fast physical parametrization schemes . . . . . . . . . . . . . . . . . . . . . . 22

8 Handling of the poles 23


8.1 The South pole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
8.2 The North pole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

9 Deriving a Helmholtz equation 25


9.1 Setting the scene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
9.2 The elimination procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
9.3 Specifying the reference profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
9.4 Method of solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
9.5 Backsubstitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

10 The departure point equation 32


10.1 The switchable scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
10.1.1 Transformation to local Cartesian coordinates . . . . . . . . . . . . . . . . . . . . . . . . 32
10.1.2 Finding the departure point: analytical framework . . . . . . . . . . . . . . . . . . . . . . 35
10.1.3 Finding the departure point: iterative procedure . . . . . . . . . . . . . . . . . . . . . . . 35
10.1.4 Finding the departure point: solution procedure . . . . . . . . . . . . . . . . . . . . . . . 37
10.2 Deep-atmosphere, similar oblate spheroidal (SOS) version . . . . . . . . . . . . . . . . . . . . . 38
10.3 Deep-atmosphere, spherical polar version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
10.4 Shallow-atmosphere, spherical polar version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
10.5 Shallow-water, spherical polar version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
10.6 Cartesian version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
10.7 Limited-Area Model version (deep- and shallow-atmosphere) . . . . . . . . . . . . . . . . . . . . 39

1 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

11 Solution procedure 40

12 Reduced equation sets 42


12.1 Shallow-water model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
12.2 Vertical slice model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

A The rotated spherical polar coordinate system 43


A.1 Definition of the rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
A.2 The Earth’s rotation vector in the rotated system . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
A.3 The Coriolis terms in the rotated system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
A.4 Transforming from the non-rotated system to the rotated system . . . . . . . . . . . . . . . . . . 44
A.5 Transforming from the rotated system to the non-rotated system . . . . . . . . . . . . . . . . . . 44
A.6 Rotation matrix elements and metric factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

B Coordinate systems 46
B.1 Similar Oblate Spheroidal coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
B.1.1 System definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
B.1.2 Grad, Div and Curl operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
B.1.3 Coriolis terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
B.1.4 Gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
B.1.5 The rotation matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
B.2 Spherical polar coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
B.2.1 System definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
B.2.2 Grad, Div and Curl operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
B.2.3 Coriolis terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
B.2.4 Gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
B.2.5 The rotation matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
B.3 Shallow-atmosphere version of the spherical polar coordinates . . . . . . . . . . . . . . . . . . . 50
B.3.1 System definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
B.3.2 Grad, Div and Curl operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
B.3.3 Coriolis terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
B.3.4 Gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
B.3.5 The rotation matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
B.4 f -F plane Cartesian system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
B.4.1 System definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
B.4.2 Grad, Div and Curl operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
B.4.3 Coriolis terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
B.4.4 Gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
B.4.5 The rotation matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

C Definitions of averaging and difference operators 54

D Interpolation 57
D.1 Interpolation scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
D.1.1 Interpolating a vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
D.2 Horizontal search algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
D.3 Vertical search algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

E Derivation of the polar discretization 59


E.1 South pole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
E.1.1 Uniform resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
E.1.2 Variable resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
E.2 North Pole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

F Definitions of the Helmholtz coefficients 70

G Conservation of mass 71
G.1 Continuous conservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
G.2 Temporally discrete conservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
G.3 Spatially discrete conservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

2 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

G.4 The simple mass-fixer algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72


G.5 An energetically consistent mass-fixer algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

H Conservation of scalars and the Zerroukat ADAS and Priestley algorithms 73


H.1 Continuous aspects of conservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
H.2 Temporally discrete conservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
H.3 Spatially discrete conservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
H.4 The Zerroukat ADAS algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
H.4.1 Conservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
H.4.2 Positive definiteness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
H.4.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
H.5 The Priestley algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
H.5.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

I Limited-Area Models 80

J Helmholtz problem 82
J.1 The Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
J.2 The basic algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
J.3 More ENDGame specifics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
J.4 Formulation of the SOR preconditioner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
J.5 Choice of matrix decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

3 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

1 Specific changes from last version

1. 17/02/10: A paragraph has been added to section 10.1.4 to note the need to ensure that departure points
on the lower and upper boundaries remain there.
2. 16/03/10: Eqs. (9.46)-(9.48) of previous version have been removed as they had not been updated to
allow for the change from (1/ρ) ∇p to cP θ∇π and they probably did not add enough to warrant maintaining
their more complex form.
3. 28/05/10: An assumption that the reference profiles vary only in η has been removed (but still only the
η dependent parts are handled implicitly, the other parts are evaluated iteratively on the right-hand side).
The only required change was to (134). [Note that the separability discussion of this version assumes that
the reference profiles are functions only of η.]
4. 08/07/10: A flaw with the near boundary departure point correction for arrival points below η1 and above
ηN −1 has been eliminated, resulting in modifications to note 3 of section 10.1.3.
5. 10/02/11: The sentence preceding (216) has been expanded to clarify this equation.
6. 01/06/11: Further flaws (for arrival points below η1 and above ηN −1 ) and other limitations to the near
boundary departure point correction have been eliminated, resulting in further modifications to note 3 of
section 10.1.3.
7. 11/10/12: In appendix H, the Priestley algorithm has been replaced by the Zerroukat ADAS algorithm.
8. 02/08/13: Version 1 removed and Version 2 implemented. Non-conserving SISL given precedence over
SLICE. Conserved ρY variables removed. τ weights for Version 2 terms added and Helmholtz derivation
therefore substantially reworked. Implicit Coriolis terms removed. Separable solver options removed.
Description of the simple mass fixer added in appendix G. Thoughts on vector interpolation removed.
Details of shallow-water model removed, consistent with no vertical slice model details.
9. 08/11/13: Correction to (485) to reflect what is actually done in code.
10. 06/02/14: Departure point section 10 reworked to reflect the adoption of the (author?) [21] scheme; the
Priestley algorithm has been reinstated (in addition to the ADAS algorithm) in appendix H since in the short
term at least, it is likely to be used for the UKCA species; appendix I outlining the approach for limited-
area models and J detailing the solution of the Helmholtz problem have been added; the interpolation and
search algorithm details in appendix D have been updated. (To get the pdf hyperrefs working correctly,
the figures and tables were removed from resetcounters and the opportunity was taken to also remove the
section.page format.)
11. 10/02/14: Mass-fixer description of appendix G extended to include the more energetically consistent
version.
12. 12/02/14: Further improvements to the description in appendix D of interpolation close to the boundaries.

2 Highlights

Relative to the New Dynamics:


• Dry virtual potential temperature, θvd ≡ θ (1 + mv /ǫ), is used as the prognostic temperature variable as
this is more suitable when dry density, ρd , is used as the prognostic mass variable.
• All gradient and divergence operators are discretized in the terrain-following coordinate system in a way
that preserves their flux form.
• The Helmholtz equation is derived by adding appropriate linear terms to both sides of each relevant
equation and solving the resulting set iteratively by lagging the terms on the right-hand side with respect
to those on the left-hand side.
• The scheme is formulated in a switchable manner so that it can be switched from: the spheroidal deep-
atmosphere equations; to the spherical deep-atmosphere equations; to the shallow-atmosphere equa-
tions; to the f -F plane Cartesian equations. Additionally a hydrostatic switch is included.

4 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

• The Coriolis terms are discretized in a particular way to give improved Rossby mode dispersion.
• By storing v and the longitudinal metric factor, h1 , at the poles (rather than u, w and all scalars, as in the
New Dynamics) the equation set preserves desirable properties and v at the poles is only required for
evaluation of the departure points and interpolation of v near to the poles.
• The handling of trajectories that go near to, or beyond, the upper and lower surfaces has been improved.
• A globally uniform departure point calculation is used.
• The temporal discretization is more implicit than that of the New Dynamics.

5 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

3 Continuous equations

The assumed continuous governing equations are:

Du cpd θvd
+ 2Ω × u = −  P  ∇π + g + Su , (1)
Dt 1+ X=v,cl,cf,... mX

Dθvd
= S θvd , (2)
Dt
Dρd
+ ρd ∇.u = 0, (3)
Dt
DmX
= S mX , X = v, cl, cf, ... (4)
Dt
Dx
= u, (5)
Dt
and
  1−κd
p0 π κd
ρd = . (6)
Rd θvd

Here g is the apparent gravitational vector, being the sum of actual gravity and the centrifugal force and

Rd ≡ κd cpd ≡ cpd − cvd . (7)

The kinematic equation (5) is included in anticipation of the semi-Lagrangian discretization.


Notes:
1. The notation employed attempts to follow that of The Joy but there are notable exceptions:
(a) Subscript D is used for departure point evaluations rather than The Joy’s d. (Similarly subscript A
will, when necessary, be used for arrival point evaluations.)
(b) This frees up d to be used, as a subscript, exclusively to indicate dry quantities. Specifically, ρy of
The Joy becomes here the more natural ρd .
2. Mixing ratios, mX , and species densities, ρX are related as ρX ≡ mX ρd with the source terms related by
S ρX ≡ ρd S mX etc.
 P 
3. The use of cpd θvd / 1 + X=v,cl,cf,... mX in the pressure gradient terms amounts to using the total den-
 P 
sity, ρ ≡ ρd 1 + X=v,cl,cf,... mX , and assumes that the liquid (cl) and frozen (cf ) water species (and
any other species that may be included such as rain, graupel etc.) have the same velocity as the dry air
and water vapour.
4. The current proposal for the handling of the thermodynamic “constants” follows that of the New Dynamics,
which is to: make the reasonable approximation that κ ≃ κd ; retain the dry value of Rd in (6) by definition of
θvd (see note 5); allow for the moisture dependence of cp where it is required in the physics forcing terms,
i.e. either the full form cp = cpd [1 + (8/7) (mv /ǫ) + (ccl /cpd ) mcl ] / (1 + mv + mcl ), where ǫ ≡ Rd /Rv , or
the approximate form cp ≃ cpd (1 + 0.84mv ). [See The Joy for further discussion and details and also Andy
White’s “Representing the thermodynamic properties of moist air in the Unified Model”1 .]
5. The prognostic temperature variable is assumed to be θvd , ≡ θ (1 + mv /ǫ), where θπ ≡ T , T being
temperature. What are the pros and cons of this compared with θ? The primary issues seem to be
that: the sources for θvd are slightly more complex - though they are known and evaluated anyway if the
individual moisture species are transported separately; since θvd is what primarily affects the dynamical
response, i.e. it is θvd that the dynamics primarily “feels”, θvd is claimed to be smoother (presumably since
any unsmoothness is removed by dynamic adjustments) than θ.
1 ˜frnw/New dynamics/Documentation/LyX/Formulation/ContributingReports/moistnewestrev.ps

6 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

6. The continuity equation (3) can be rewritten in a form appropriate for application of SLICE, i.e. as:
Z 
D
ρd dV = 0. (8)
Dt V

7 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

4 Curvilinear orthogonal coordinates

A curvilinear orthogonal coordinate system is hypothesized in which the “vertical” coordinate is aligned every-
where with the direction of −g, i.e. the surfaces of the coordinate system orthogonal to the vertical coordinate
are geopotential surfaces. This system can then be approximated in different ways (see appendix B) and these
choices define the degree of “geopotential approximation” made.

4.1 Definitions and relations

Let: the coordinates be denoted by ξ1 , ξ2 and ξ3 ; the direction associated with ξ3 be aligned with −g; and the
corresponding metric factors for this coordinate system be h1 , h2 and h3 , respectively. In terms of a Cartesian
system with coordinates (x, y, z), these (positive) metric factors are given by:
 2  2  2
∂x ∂y ∂z
h21 ≡ + + , (9)
∂ξ1 ∂ξ1 ∂ξ1
 2  2  2
∂x ∂y ∂z
h22 ≡ + + , (10)
∂ξ2 ∂ξ2 ∂ξ2
 2  2  2
∂x ∂y ∂z
h23 ≡ + + . (11)
∂ξ3 ∂ξ3 ∂ξ3

Define the velocity components as


Dξi
u i = hi
, i = 1, 2, 3. (12)
Dt
This is the component form of the kinematic equation (5).
For all coordinate systems the following identifications will be made:

u ≡ u1 , (13)

v ≡ u2 , (14)

w ≡ u3 . (15)

For a generic vector F = (F1 , F2 , F3 ) and generic scalar G, the component forms of ∇.F, ∇G and hence u.∇G
are given respectively by:
 
1 ∂ ∂ ∂
∇·F= (F1 h2 h3 ) + (F2 h3 h1 ) + (F3 h1 h2 ) , (16)
h1 h2 h3 ∂ξ1 ∂ξ2 ∂ξ3
 
1 ∂G 1 ∂G 1 ∂G
∇G = , , , (17)
h1 ∂ξ1 h2 ∂ξ2 h3 ∂ξ3
and
 T
1 ∂G 1 ∂G 1 ∂G
u.∇G = (u1 , u2 , u3 ) , ,
h1 ∂ξ1 h2 ∂ξ2 h3 ∂ξ3
u1 ∂G u2 ∂G u3 ∂G
= + + . (18)
h1 ∂ξ1 h2 ∂ξ2 h3 ∂ξ3
Thence, the Lagrangian derivative is given by
     
DG ∂G ∂G u1 ∂G u2 ∂G u3 ∂G
≡ + u.∇G = + + + . (19)
Dt ∂t ∂t h1 ∂ξ1 h2 ∂ξ2 h3 ∂ξ3

Also the volume element is given by


dV ≡ h1 h2 h3 dξ1 dξ2 dξ3 . (20)

8 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Finally, should it be required (e.g. in SLICE), the distance metric is given by

ds2 ≡ h21 dξ12 + h22 dξ22 + h23 dξ32 . (21)

Notes:
1. These operators have been coded in the above form, i.e. in terms of the metric factors hi , thereby allowing
a switchable model.

9 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

5 A transformed vertical coordinate

Consider now a transformation of the vertical coordinate, η = η (ξ1 , ξ2 , ξ3 ). This transformation is here as-
sumed to be independent of time and might typically be a height-based terrain-following coordinate (a mass- or
pressure-based coordinate would require the transformation to be time dependent). The governing equations
are then transformed from the curvilinear orthogonal coordinates (ξ1 , ξ2 , ξ3 , t) to the nonorthogonal coordinates
(ξ1 , ξ2 , η, t) (but with all the velocity components, i.e. u, v and w, retained in their original form). For a generic
scalar G, the following transformation relations hold for ψ = ξ1 , ξ2 or t:
 " 
   −1      # 
∂G ∂ξ3 ∂ ∂ξ3 ∂ ∂ξ3
= G − G , (22)
∂ψ ξ3 ∂η  ∂ψ ∂η η ∂η ∂ψ η 
ξ1 ,ξ2 ,t

   −1  
∂G ∂ξ3 ∂G
= , (23)
∂ξ3 ξ1 ,ξ2 ,t ∂η ∂η ξ1 ,ξ2 ,t

where it is assumed that the transformation is monotonic, i.e. ∂ξ3 /∂η is non-zero and single-signed. Note that
(22) is a flux form equivalent of the, perhaps more familiar, transformation relation,
       −1  
∂G ∂G ∂ξ3 ∂ξ3 ∂G
= − . (24)
∂ψ ξ3 ∂ψ η ∂ψ η ∂η ∂η ξ1 ,ξ2 ,t

Subscripts signify what is held constant whilst carrying out the operation contained within the associated paren-
theses. Henceforth though, for notational conciseness, these subscripts will be dropped.
Using the transformation relations (22) and (23), (18) becomes
 −1       
∂ξ3 u1 ∂ ∂ξ3 u2 ∂ ∂ξ3
u.∇G = G + G
∂η h1 ∂ξ1 ∂η h2 ∂ξ2 ∂η
 −1         
∂ξ3 u3 ∂G u1 ∂ ∂ξ3 u2 ∂ ∂ξ3
+ − G − G , (25)
∂η h3 ∂η h1 ∂η ∂ξ1 h2 ∂η ∂ξ2

which can be simplified to


     −1      
u1 ∂G u2 ∂G ∂ξ3 ∂G u3 u1 ∂ξ3 u2 ∂ξ3
u.∇G = + + − − . (26)
h1 ∂ξ1 h2 ∂ξ2 ∂η ∂η h3 h1 ∂ξ1 h2 ∂ξ2

(This is the form that would have arisen if the transformation relation (24) had been used directly.) Thence, the
Lagrangian derivative (19) transforms to
     −1       
DG ∂G u1 ∂G u2 ∂G ∂ξ3 u3 u1 ∂ξ3 u2 ∂ξ3 ∂G
≡ + + + − − . (27)
Dt ∂t h1 ∂ξ1 h2 ∂ξ2 ∂η h3 h1 ∂ξ1 h2 ∂ξ2 ∂η

In particular,
 −1     
Dη ∂ξ3 u3 u1 ∂ξ3 u2 ∂ξ3
η̇ ≡ = − − , (28)
Dt ∂η h3 h1 ∂ξ1 h2 ∂ξ2
so that (27) can be simplified and rewritten to give the expected form
     
DG ∂G u1 ∂G u2 ∂G ∂G
= + + + η̇ . (29)
Dt ∂t h1 ∂ξ1 h2 ∂ξ2 ∂η

For motion that is constrained to be along surfaces of constant η, it follows that


   
DG ∂G u1 ∂G u2 ∂G
= + + . (30)
Dt η ∂t h1 ∂ξ1 h2 ∂ξ2

Therefore, (29) can be rewritten as


DG DG ∂G
= + η̇ , (31)
Dt Dt η ∂η

10 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

and, in particular, for G ≡ ξ3 ,


w Dξ3 Dξ3 ∂ξ3
≡ = + η̇ . (32)
h3 Dt Dt η ∂η

In a similar manner, (16), (17), (20) and (21) become


 −1       
1 ∂ξ3 ∂ ∂ξ3 ∂ ∂ξ3
∇·F = F1 h2 h3 + F2 h3 h1
h1 h2 h3 ∂η ∂ξ1 ∂η ∂ξ2 ∂η
     
∂ ∂ξ3 ∂ξ3
+ (F3 h1 h2 ) − F1 h2 h3 − F2 h3 h1 , (33)
∂η ∂ξ1 ∂ξ2
 −1       
1 ∂ξ3 ∂ ∂
∂ξ3 ∂ξ3
(∇G)ξ1 = G − G , (34)
h1 ∂η ∂ξ1 ∂η
∂η ∂ξ1
 −1       
1 ∂ξ3 ∂ ∂ξ3 ∂ ∂ξ3
(∇G)ξ2 = G − G , (35)
h2 ∂η ∂ξ2 ∂η ∂η ∂ξ2
 −1
1 ∂ξ3 ∂G
(∇G)ξ3 = , (36)
h3 ∂η ∂η
 
∂ξ3
dV ≡ h1 h2 h3 dξ1 dξ2 dη, (37)
∂η
and
"  2 # "  2 #  2
∂ξ 3 ∂ξ3 ∂ξ3
ds2 ≡ 2
h1 + h32 2 2
dξ1 + h2 + h3 2 2
dξ2 + h32
dη 2
∂ξ1 ∂ξ2 ∂η
         
∂ξ3 ∂ξ3 ∂ξ3 ∂ξ3 ∂ξ3 ∂ξ3
+2h23 dξ1 dξ2 + dξ1 dη + dξ2 dη .
∂ξ1 ∂ξ2 ∂ξ1 ∂η ∂ξ2 ∂η
(38)

Note that for F = Gu, i.e. for a vector that is proportional to the velocity, (33) becomes, on use of (28),
 −1       
1 ∂ξ3 ∂ ∂ξ3 ∂ ∂ξ3
∇ · (Gu) = Gu1 h2 h3 + Gu2 h3 h1
h1 h2 h3 ∂η ∂ξ1 ∂η ∂ξ2 ∂η
  
∂ ∂ξ3
+ Gh3 η̇h1 h2 . (39)
∂η ∂η

The above transformed relationships, together with the definitions of the original coordinate system and relevant
governing equations are enough to determine the equations in the transformed coordinate system.
Notes:
1. For a time-dependent transformation, the partial time derivative in (19) transforms (using either (22) or
(24) with ψ ≡ t) as
       −1  
∂G ∂G ∂ξ3 ∂ξ3 ∂G
= − . (40)
∂t ξ3 ∂t η ∂t η ∂η ∂η ξ1 ,ξ2 ,t
The consequence is that an extra term, −∂ξ3 /∂t, then appears in the square brackets of each of (27) and
(28).

11 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

6 The semi-implicit semi-Lagrangian discrete equations

6.1 Background

A semi-implicit semi-Lagrangian (SISL) discretization is applied to (1)-(5). This is achieved by integrating (1)-(5)
along a trajectory over a time interval of ∆t and approximating any residual integrals using a (possibly off-
centred) trapezoidal rule. As an example, consider the generic equation (where F and G could be either both
scalars or both vector fields)
DF
= G. (41)
Dt
This is first integrated along the trajectory to give
Z t+∆t Z t+∆t
DF
dt = Gdt, (42)
t Dt t

which is rewritten as Z
  t+∆t
F xt+∆t , t + ∆t − F xt , t = Gdt, (43)
t
where xt+∆t is the position along any particular trajectory at time t + ∆t and is termed the arrival point, xA .
Here, this will be assumed to be a grid point and is therefore known. xt is the position along the same trajectory
at time t and is termed the departure point, xD . The departure points are evaluated by solving the kinematic
equation (5).
The right-hand side of (43) is then approximated to give
    
F xt+∆t , t + ∆t − F xt , t = ∆t αG xt+∆t , t + ∆t + (1 − α) G xt , t . (44)
The parameter α is an off-centring parameter and takes the value 1/2 for a centred scheme.
Eq. (44) is written more compactly as

FAn+1 − FD
n
= ∆t αGn+1
A + βGnD , (45)
where β ≡ (1 − α), or, collecting arrival and departure quantities together, as
(F − α∆tG)n+1
A = (F + β∆tG)nD . (46)
The superscripts denote the time-level of a variable and subscripts A and D denote evaluation at the arrival and
departure points respectively. Further, for notational convenience, the subscript A will be dropped henceforth
(except where considered necessary) and any quantity without a subscript is assumed to be evaluated at the
arrival, or grid, point.

6.2 The SISL discrete set in vector form

Applying the above discretization to (1)-(5) gives:


n+1 n
u − αu ∆tΨ − αSu ∆tSu = u + βu ∆tΨ + βuS ∆tSu D
, (47)

n+1 n
θvd − αSθvd ∆tS θvd = θvd + βθSvd ∆tS θvd D
, (48)

n+1 n
(ρd + αρd ∆t∇.u) = (ρd − βρd ∆t∇.u)D , (49)
n+1 n
mX − αSmX ∆tS mX S
= mX + βm X
∆tS mX D
, (50)
and
n+1 n
(x − αx ∆tu) = (x + βx ∆tu)D , (51)
where
cpd θvd
Ψ ≡ −2Ω × u −  P  ∇π + g, (52)
1 + X=v,cl,cf,... mX

Notes:

12 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

1. All β’s are defined as unity minus their corresponding α. It is proposed that these are defined once and
for all at the beginning of the code and then used explicitly thereafter to enable the possible extension of
the code to e.g. a three-time-level scheme, in the future (with the addition of the required third time-level
terms).
2. In practice, due to their different time scales, different weights are applied to the physical parametrization
terms than are applied to the dynamical quantities. Therefore, off-centring parameters associated with the
physical parametrizations terms have been given a superscript S. [In fact different weights are applied
to different elements of the physical parametrizations and so an expression such as αSX S X , for a generic
quantity X, represents an appropriate sum of such products.]
3. The design of the ENDGame formulation is that all dynamical quantities should have the same off-centring
parameters applied to them. However, for possible testing purposes (and, in particular, comparison of
results with the existing dynamical core) we have here retained different off-centring parameters for each
prognostic equation. This is reflected in the codes. Note that αu and the corresponding βu , as well as
αSu and the corresponding βuS , represent diagonal matrices so that each component of the momentum
equation can be off-centred differently. The diagonal elements of these matrices are αu , αv and αw etc.
4. The discrete version of (8), the form of the continuity equation appropriate for application of SLICE, is
Z n+1 Z n
ρd dV = ρd dV . (53)
V V D

6.3 The SISL discrete set in component form

A coordinate system is now assumed (see sections 4 and 5) and the equations written in the appropriate
component form.

6.3.1 The scalar equations

Being scalar equations, (48)-(50) (and (53)) are unchanged in their gross form by the choice of coordinate
system and relations (33)-(37) suffice to define the equations.

6.3.2 The momentum equations

The principal issue with the momentum equations in component form is the evaluation of a vector field at the
departure point, i.e. the right-hand side of (47), because in general the unit base vectors at the departure point
do not coincide with those at the arrival point. (author?) [17] show how this issue can be addressed by defining
a rotation matrix M whose components depend on the particular coordinate system.
Using this approach (and accepting a slight abuse of vector notation) (47) becomes
n+1 h n i
u − αu ∆tΨ − αSu ∆tSu = M u + βu ∆tΨ + βuS ∆tSu DL , (54)

where the subscript DL denotes evaluation at the departure point in terms of the local basis vectors at that
departure point (the usual subscript D denotes evaluation at the departure point but in the basis vectors at the
arrival point).
The components of the vector ∇π are given by (34)-(36) with G ≡ π, and those of g, by construction, are given
by
g = (0, 0, −g) . (55)
Note that in general g will be a function of at least ξ3 .
Writing Ψ = (Ψu , Ψv , Ψw ) and Su = (S u , S v , S w ), the components of the momentum equation (54) are therefore:
n+1 h n i
u − αu ∆tΨu − αSu ∆tS u = M11 u + βu ∆tΨu + βuS ∆tS u DL
h n i
+M12 v + βv ∆tΨv + βvS ∆tS v D
L
h n i
+M13 δV w + βw ∆tΨw + δV βw ∆tS w DL ,
S
(56)

13 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

n+1 h n i
v − αv ∆tΨv − αSv ∆tS v = M21 u + βu ∆tΨu + βuS ∆tS u D
L
h  i
S v n
+M22 v + βv ∆tΨv + βv ∆tS DL
h n i
S
+M23 δV w + βw ∆tΨw + δV βw ∆tS w DL , (57)

 n+1 h n i
(δV + µ∆t) w − αw ∆tΨw − δV αSw ∆tS w = M31 u + βu ∆tΨu + βuS ∆tS u DL
h n i
+M32 v + βv ∆tΨv + βvS ∆tS v DL
h n i
S
+M33 δV w + βw ∆tΨw + δV βw ∆tS w DL ,
(58)

where
 −1       
cpd θvd ∂ξ3 ∂ ∂ξ3 ∂ ∂ξ3
Ψu ≡ −2 (Ω × u)u −  P  π − π , (59)
h1 1 + ∂η ∂ξ1 ∂η ∂η ∂ξ1
X=v,cl,cf,... mX

 −1       
cpd θvd ∂ξ3 ∂ ∂ξ3 ∂ ∂ξ3
Ψv ≡ −2 (Ω × u)v −  P  π − π , (60)
h2 1 + ∂η ∂ξ2 ∂η ∂η ∂ξ2
X=v,cl,cf,... mX
 −1
cpd θvd ∂ξ3 ∂π
Ψw ≡ −2 (Ω × u)w −  P  − g, (61)
h3 1 + ∂η ∂η
X=v,cl,cf,... mX

and the subscripts u, v and w indicate the ξ1 , ξ2 and ξ3 components, respectively.


A non-hydrostatic switch δV has been introduced. The full equations are obtained when this is set to 1. When it
is set to 0 the (deep) quasi-hydrostatic equation set is obtained.
An optional Rayleigh damping term has been added to the w equation. This has been done as in (author?) [10];
a single term, −µw, has been added to the right-hand side of the w equation, which has then been discretized
fully implicitly in time. This leads to the appearance of the term involving µwn+1 on the left-hand side of (58).

6.3.3 The kinematic equations

The component form and solution of (51) will be discussed in section 10.

6.4 Summary

Eqs. (56)-(61) and (48)-(50) together with (33)-(37) specify the temporally discrete SISL forms of all the prog-
nostic equations (with the notable exception of the kinematic equation for the departure point) for an as yet
unspecified coordinate system. To complete the specification requires the definition of the coordinate system
to permit the determination of: the metric factors, hi ; the components of the Earth’s rotation vector, Ω; and the
elements of the rotation matrix, M. This is done in appendix B.
It is worth noting that at this stage the discrete equations are, in a meteorological sense, exact except for the
trapezoidal approximation applied to any integrals that correspond to the right-hand side of (42). Once we
choose a specific coordinate system, then further approximations are introduced into the discrete equations
due to the geopotential surfaces being approximated in various ways.
Notes:
1. It can be shown show that, apart from the shallow-atmosphere case, the matrix M can be factored into two
matrices, each with the same form, one involving only arrival point quantities, the other only departure point
quantities. Applying this factorization approach would mean that only grid point values of the components
of M are needed. This would allow them to be simply set at grid points at the outset, thereby facilitating
the switching of the model. Additionally, factorizing in this way may allow the three-dimensional factors to

14 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

be themselves factored into products of one-dimensional arrays with the consequent saving of memory.
However, if excessive averaging of terms is to be avoided, it increases the number of departure point
evaluations needed for the momentum equations (see (62)-(67) below) from three to eight. This approach
is therefore not applied herein.

15 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

7 Spatial discretization

7.1 Grid and storage aspects

The same staggering, and associated notation, as that in the New Dynamics (see section 4 of The Joy) is used,
the exception being that v is held at the pole in place of the present u, w and all scalars.
Note also that, associated with the change of positioning of variables with respect to the poles, the indexing in
the ξ2 direction goes from j = 0 to M with the South pole at j = 0 and the North pole at j = M . This compares
with The Joy in which the South pole is at j = 1/2 and the North pole is at j = M − 1/2. Associated with this
change the opportunity has been taken to make the range of all the indices consistent so that now the indexing
in the ξ1 direction goes from i = 0 to L with the left boundary at i = 0 and the right at i = L. This compares
with The Joy in which the left and right boundaries are respectively at i = 1 and i = L. In the case of periodic
boundaries in the ξ1 direction, as appropriate for the global version of the model, the u-values corresponding to
i = 0 are set identical to those at i = L. [Similarly, if periodic boundaries are to be applied in the ξ2 direction the
v-values corresponding to j = 0 are set identical to those at j = M .]
The averaging and difference operators are defined in appendix C. They are the same operators as used in
appendix C of The Joy but, for generality, (λ, φ, η) → (ξ1 , ξ2 , η).
In contrast to the New Dynamics, all vertical averaging is done in the transformed coordinate, η, i.e. there is no
vertical averaging in physical, ξ3 , space.
The elements of M are defined such that they do not need averaging. Specifically this means that: M11 , M12
and M13 are evaluated on u-points; M21 , M22 and M23 are evaluated on v-points; and M31 , M32 and M33 are
evaluated on w-points.
The h’s are evaluated where they are needed. The position at which any particular h is needed, relative to a
ρ-point, has been indicated by a superscript. So, as examples: h3 indicates the value of h3 on a ρ-point; hξ21
indicates the value of h2 on a u-point; and hξ12 η indicates the value of h1 on a v − θ-point, i.e. the point obtained
by moving vertically from a v-point or horizontally from a θ-point. This approach ensures that the value of h1
used at the poles is identically zero. Consequently, v at the polar points only enters the discretization through
the departure points and interpolation to departure points near the poles.
In exactly the same way, the various gradients of ξ3 are evaluated where they are required. The position at
which any particular δψ ξ3 , for generic ψ, is needed, relative to a ρ-point, has been indicated by a superscript.
However, the orography is only defined at surface θ-points and is linearly averaged horizontally to other points
as required.

7.2 Momentum equation

The spatially discretized form of (56)-(61) can be written in the form:


n+1
u − αu ∆tΨu − αSu ∆tS u = Run , (62)

and n+1
v − αv ∆tΨv − αSv ∆tS v = Rvn , (63)
for levels k = 1/2, 3/2,...,N − 1/2, and
 n+1
(δV + µ∆t) w − αw ∆tΨw − δV αSw ∆tS w n
= Rw , (64)

for levels k = 1, 2,...,N − 1, where


h n i h n i
Run ≡ M11 u + βu ∆tΨu + βuS ∆tS u Du + M12 v + βv ∆tΨv + βvS ∆tS v Du
L L
h  i
S w n
+M13 δV w + βw ∆tΨw + δV βw ∆tS Du , (65)
L

h n i h n i
Rvn ≡ M21 u + βu ∆tΨu + βuS ∆tS u Dv + M22 v + βv ∆tΨv + βvS ∆tS v Dv
L L
h  i
S w n
+M23 δV w + βw ∆tΨw + δV βw ∆tS Dv , (66)
L

16 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

and
h n i h n i
n
Rw ≡ M31 u + βu ∆tΨu + βuS ∆tS u Dw + M32 v + βv ∆tΨv + βvS ∆tS v Dw
L L
h  i
S w n
+M33 δV w + βw ∆tΨw + δV βw ∆tS Dw , (67)
L

(where the superscripts on DL indicate the grid point whose departure point is to be used) together with
!ξ1 η
1 cpd θvd n h io
ξ η
Ψu ≡ −2 (Ω × u)u − ξ1
P δξ1 (πδη ξ3 ) − δη π ξ1 η (δξ1 ξ3 ) 1 , (68)
hξ11 (δη ξ3 ) 1+ X=v,cl,cf,... mX

!ξ2 η
1 cpd θvd n h io
ξ η
Ψv ≡ −2 (Ω × u)v − ξ2
P δξ2 (πδη ξ3 ) − δη π ξ2 η (δξ2 ξ3 ) 2 , (69)
hξ22 (δη ξ3 ) 1+ X=v,cl,cf,... mX

cpd θvd
Ψw ≡ −2 (Ω × u)w −  P  δη π − g. (70)
η
hη3 (δη ξ3 ) 1 + X=v,cl,cf,... mX

The Coriolis terms are evaluated following an extension of (author?) [20] to allow for the Coriolis terms arising
from the deep atmosphere and the rotation of the coordinate system. As given, the Coriolis terms, in the
absence of advection, preserve a global discrete energy principle. They also give good Rossby mode dispersion
properties. The discretization is given by:

1 D Eξ1
−2 (Ω × u)u = hv ∗ iξ2 f3∗ − hw∗ iη f2∗ , (71)
hξ11 ∆ξ1

1 D Eξ2
η ξ
−2 (Ω × u)v = hw∗ i f1∗ − hu∗ i 1 f3∗ , (72)
hξ22 ∆ξ2
1 D Eη
∗ ξ1 ∗ ∗ ξ2 ∗
−2 (Ω × u)w = η hu i f − hv i f . (73)
hη3 (δη ξ3 ) ∆η 2 1

In these equations,
ξ
u∗ ≡ ∆ξ2 ∆ηhξ21 hξ31 (δη ξ3 ) 1 ρξ1 u, (74)

ξ
v ∗ ≡ ∆ξ1 ∆ηhξ12 hξ32 (δη ξ3 ) 2 ρξ2 v, (75)

w∗ ≡ ∆ξ1 ∆ξ2 hη1 hη2 ρη w, (76)


are mass flux variables, cf. equations (2.6) and (2.7) of (author?) [20], and the starred Coriolis terms are defined
by
f1
f1∗ ≡ , (77)
ρh1 ∆ξ1
f2
f2∗ ≡ , (78)
ρh2 ∆ξ2
f3
f3∗ ≡ , (79)
ρh3 (δη ξ3 ) ∆η
with  η
X
ρ = ρd  1 + mX  , (80)
X=v,cl,cf,...

and f1 , f2 and f3 evaluated and stored on ρ-points (their definitions for the different model options are given
in appendix B). Finally, the averaging operator h i denotes a simple, equal-weighted (1/2, 1/2) average in the
direction indicated by the superscripts (see appendix C).
Notes:

17 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

1. Alternative versions of (65)-(67) were proposed in version 1 of this document that require fewer interpo-
lations. However, testing of this approach (specifically test case 2 of (author?) [27]) in the shallow-water
model, indicated poor behaviour in the region of the poles. It is possible that the consistent use of vector
interpolation may alleviate that problem. Further work would be needed before reinstating that approach.
2. The mass flux variables, (74)-(76), are closely linked to (the nonlinear extension of) the terms appearing
in the divergence term of the continuity equation (93), cf. equation (2.11) of (author?) [20].
3. The Coriolis parameters f1 , f2 and f3 are given for the various coordinate systems in appendix B. They
are all nonzero only for the spherical polar coordinates on a rotated grid. For spheroidal coordinates the
rotated grid option is not available (f1 ≡ 0). For the shallow-atmosphere f1 = f2 ≡ 0 and for Cartesian
coordinate systems f1 ≡ 0, f2 ≡ F0 and f3 ≡ f0 with f0 and F0 both constant. Additionally, if the vertical
dimension is neglected then the shallow-atmosphere form of these expressions (f1 = f2 ≡ 0) corresponds
to the forms given in equations (2.9) and (2.10) of (author?) [20] when the coefficients α, β, γ and δ of
(author?) [20] are set as:
1
αi,j+1/2 ≡ (f3∗ )i+1/2,j+1/2 , (81)
4
1 ∗
βi,j+1/2 ≡ (f ) , (82)
4 3 i−1/2,j+1/2
1 ∗
γi,j+1/2 ≡ (f ) , (83)
4 3 i−1/2,j+1/2
and
1 ∗
δi,j+1/2 ≡ (f ) . (84)
4 3 i+1/2,j+1/2

7.3 η̇ equation

The spatial discretization of (28), for levels k = 1, 2,...,N − 1, can be written as:
 
1 w uξ1 η η v ξ2 η η
η̇ ≡ η − (δ ξ
ξ1 3 ) − (δ ξ
ξ2 3 ) . (85)
(δη ξ3 ) hη3 hη1 hη2
These equations are supplemented by the zero mass flux lower and upper boundary conditions:

η̇ = 0, (86)

at k = 0 and k = N , respectively.
An alternative to evaluating η̇ from (85) is to evaluate it using (32). This addresses the issues of flow over
small-scale orography identified by (author?) [16] and discussed further by (author?) [6] and (author?) [8]. A
discretization of (32) (the Cartesian, two-dimensional equivalent of which was used in (author?) [10]) is:
"    n #
n+1
η n+1 η n w w
αη̇ (δη ξ3 ) η̇ + βη̇ [(δη ξ3 ) η̇]D = αη̇ η + βη̇
h3 hη3 D
 
ξ3 [(ξ1 )A , (ξ2 )A , ηA ] − ξ3 [(ξ1 )D , (ξ2 )D , ηA ]
−αη̇
∆t
 
ξ3 [(ξ1 )A , (ξ2 )A , ηD ] − ξ3 [(ξ1 )D , (ξ2 )D , ηD ]
−βη̇ ,
∆t
(87)

where αη̇ and βη̇ ≡ (1 − αη̇ ) are off-centring parameters. The discretization is centred in time and space when
αη̇ = βη̇ = 1/2. Eq. (87) can be rearranged to give:
 n
η η n+1 n+1 βη̇ hη3 w η ξ3 hη3
h3 (δη ξ3 ) η̇ −w = − (δ η ξ3 ) η̇ + − ξ3
αη̇ hη3 ∆t D ∆t
βη̇ hη3
− ξ3 [(ξ1 )A , (ξ2 )A , ηD ]
αη̇ ∆t

+ 3 ξ3 [(ξ1 )D , (ξ2 )D , ηA ] . (88)
∆t

18 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

In evaluating the terms involving ξ3 it would be sensible, to improve accuracy, to subtract a constant from
all of them, e.g. the mean radius of the Earth. Evaluation of ξ3 [(ξ1 )A , (ξ2 )A , ηD ] requires a one-dimensional
interpolation in the vertical and evaluation of ξ3 [(ξ1 )D , (ξ2 )D , ηA ] requires a two-dimensional interpolation in the
horizontal.
Implementation of this alternative can be achieved by replacing Rη̇∗ in (130) (and its subsequent appearances)
with Rη̇n which is defined to be:
h i  n
n η ∗0η η ′ βη̇ hη3 w′ η ′ ξ3
Rη̇ ≡ h3 (δη ξ3 ) − (δη ξ3 ) η̇ + − (δη ξ3 ) η̇ +
αη̇ hη3 ∆t D
hη3 βη̇ hη3 hη
− ξ3 − ξ3 [(ξ1 )A , (ξ2 )A , ηD ] + 3 ξ3 [(ξ1 )D , (ξ2 )D , ηA ] .
∆t αη̇ ∆t ∆t
(89)

7.4 Thermodynamic equation

The spatial discretization of (48), for levels k = 0, 1,...,N , can be written as:
n+1
θvd − αSθvd ∆tS θvd ref
− θvd = Rθnvd , (90)
where n
Rθnvd ≡ θvd + βθSvd ∆tS θvd D
ref
− θvd , (91)
where, for convenience of later notation, a reference profile has been subtracted from both sides.

7.5 Continuity equation

It is convenient at this point to combine the SISL discretization of the standard, non-mass-conserving of the
continuity equation (49) with that of the mass-conserving form (53). This is achieved by introducing a switch, δρd
such that when δρd = 0 (53) is obtained whereas when δρd = 1 (49) is obtained. The spatially discretized form
of the continuity equation, for levels k = 1/2, 3/2,...,N − 1/2, is therefore written as:
 n+1
e
ρd + δρd αρd ∆tρd ∇.u − ρref n
d = Rρd , (92)

where ∇ e denotes the discrete version of the divergence operator (39) and for a generic scalar G, co-located
with ρd , is:
1 n h ξ1
i h ξ2
i
ξ ξ
e · (Gu) =
∇ δξ1 hξ21 hξ31 (δη ξ3 ) 1 G u + δξ2 hξ32 hξ12 (δη ξ3 ) 2 G v
h1 h2 h3 (δη ξ3 )
h η
io
+δη hη1 hη2 hη3 (δη ξ3 )η G η̇ . (93)

And, for δρd = 0, Z n


1
Rρnd ≡ ρd dV − ρref
d , (94)
∆V V D
whilst for δρd = 1,  n
e
Rρnd ≡ ρd − βρd ∆tρd ∇.u − ρref
d , (95)
D
Again, for convenience of later notation, a reference profile has been subtracted from both sides of (92).
In (94) ∆V is the evaluation of the volume integral over the grid box centred on each ρ-point,
Z  
∂ξ3
∆V ≡ h1 h2 h3 dξ1 dξ2 dη ≈ h1 h2 h3 (δη ξ3 ) ∆ξ1 ∆ξ2 ∆η. (96)
V ∂η

Notes:
1. SLICE is used to evaluate the volume integral at the departure point on the right-hand side of (94).
2. For a specified grid, a consistent estimate of the element volume ∆V can be obtained by running SLICE
with u ≡ 0 and ρd ≡ 1. Use of this value instead of the right-hand side of (96) would ensure that, in the
absence of advection, SLICE would preserve a uniform initial density.

19 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

7.6 Scalar mixing ratio (mX ) equations

The spatial discretization of (50), for levels k = 0, 1,...,N , can be written as:
n+1
mX − αSmX ∆tS mX n
= Rm X
, (97)

where n
n S
Rm X
≡ mX + βm X
∆tS mX D
. (98)

Notes:
1. Global conservation of mX is imposed using the algorithm of (author?) [31]. This is detailed in appendix
H.

7.7 Equation of state

The discretization of the equation of state (6) must follow the recommendation of (author?) [19], as does that
currently used in the New Dynamics, in order to obtain optimal normal mode representation. It is therefore
given, for levels k = 1/2, 3/2,...,N − 1/2, by:
  1−κd
p0 π κd
ρd = η . (99)
Rd θvd

Notes:
1. Convergence of the iterative approach to solving the nonlinear equations suggests that it is better to write
the equation of state as an equation linear in ρd rather than, e.g. taking the (1 − κd ) /κd ’th root of (6) before
discretizing. (Since the New Dynamics linearizes the equation of state, all alternative forms of the New
Dynamics’ corresponding equation of state are indistinguishable.)

7.8 Lower and upper boundary conditions

The equations are closed by the zero mass flux lower and upper boundary conditions:

η̇ = 0, (100)

on k = 0 and k = N , respectively.

7.8.1 Continuity equation

For δρd = 0, these conditions, together with the assumption used to close the vertical redistribution algorithm
within SLICE, are sufficient to explicitly close the continuity equation provided the departure points are known.
For δρd = 1, so that SLICE is not used, Rρnd in (95) needs to be evaluated at departure points that may lie below
k = 1/2 or above k = N − 1/2. To achieve this, it assumed that the quantities within brackets in (95) vary with
height in either a piecewise constant or a piecewise linear manner below k = 1/2 and above k = N − 1/2.
Piecewise constant extrapolation was used in (author?) [28] but in more operational-like set-ups piecewise
linear extrapolation is used. In tests of neutrally stratified flow over hills, performed in the Vertical Slice model,
the piecewise linear method was found to be significantly better than constant extrapolation of the first interior
value of ρ. Constant extrapolation of density implies the existence of a statically unstable layer with the potential
implications for stability.

20 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

7.8.2 Thermodynamic and scalar mixing ratio equations

To close the thermodynamic equation and the scalar mixing ratio equations (for mX ) requires that the departure
points within the bottom and top model surfaces are known. To do this the horizontal velocity components, u
and v, (scaled by r in the deep-atmosphere, spherical case) are assumed to be constant below the level k = 1/2
and above the level k = N − 1/2.
Notes:
1. The assumption of no shear in the horizontal wind components is reasonable and appropriate for a free
slip boundary condition. For a no-slip boundary condition such an assumption is not appropriate but it is
not needed since then all three components of wind are known to vanish so that u = v = w = 0.
2. This raises the question as to whether the model should be regarded as free-slip or no-slip? As a dynam-
ical core then it should be free-slip. However, given the tight coupling of the physics to the dynamics then
perhaps no-slip is in fact the more appropriate boundary condition?

7.8.3 Momentum equations


n n
To close the momentum equations, evaluation of u + βu ∆tΨu + βuS ∆tS u and v + βv ∆tΨv + βvS ∆tS v at
departure points near the bottom and top of the model (see (65)-(67)) may require evaluation of those quantities
below the level k = 1/2 and above the level k = N − 1/2. The same approach as used for Rρnd is applied
to these quantities as they appear in the u- and v-equations, i.e. either piecewise constant or piecewise linear
extrapolation. [Piecewise constant extrapolation is more consistent with the above assumption of zero vertical
shear in the horizontal momentum components below k = 1/2 and above k = N − 1/2.] Where these quantities
appear in the w-equation piecewise constant extrapolation is always used. [Some of the complexities and
inconsistencies of these boundary conditions arises from the fact that the subroutines used are generic and
only know about the type of arrival point; they do not know about the type of field.]
 S
n
The quantity (δV + µ∆t) w + βw ∆tΨw + δV βw ∆tS w is similarly required at a departure point (for the mo-
mentum equations). This requires it to be known at levels k = 0 and k = N . It seems reasonable to assume
that there are no sources to the vertical velocity at the lower and upper boundaries so that S w vanishes there.
The vertical component of velocity w can be obtained (at least within an iterative approach) from (85) with the
boundary conditions (86) and the assumption of zero vertical shear in the horizontal velocity components below
k = 1/2 and above k = N − 1/2. This gives
 η 
h η hη η
w0/N = 3η (δξ1 ξ3 ) uξ1 η + 3η (δξ2 ξ3 ) v ξ2 η , (101)
h1 h2 0/N

where, for convenience, the subscript 0/N indicates evaluation at either k = 0 or k = N . The surface values of
w is also needed, for example, in the evaluation of the Coriolis terms in (71) and (72).
n+1
This leaves the evaluation of Ψw at the lower and upper surfaces. Estimates of (Ψw )0/N are obtained, within an
iterative procedure, by applying (64) at those surfaces and eliminating wn+1 using (101) . This results in

 n+1
n+1 hη3 η ξ1 η hη η
αw ∆t (Ψw )0/N = δV η (δξ1 ξ3 ) u + 3η (δξ2 ξ3 ) v ξ2 η n
− (Rw )0/N , (102)
h1 h2 0/N
n
where it should be noted that Rw is a departure point quantity (see (67)). At the initial time step the surface
value of Ψw is set to zero.
At k = 1/2 the two horizontal momentum component equations, (62) and h(63), require the
i bottomh level (surface)i
ξ1 η ξ2 η
pressure to close the problem. This is due to the presence of the terms δη π ξ1 η (δξ1 ξ3 ) and δη π ξ2 η (δξ2 ξ3 ) .

The surface pressure is obtained by first estimating the surface pressure gradient from (70) applied at the
surface, i.e.
  P  
 hη3 (δη ξ3 )η 1 + X=v,cl,cf,... mn+1
X
h i
(δη π)n+1
0 =− n+1 Ψn+1
w + 2 (Ω × u)n+1
w +g . (103)
 cpd θvd 
0

21 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Estimates for all the quantities on the right-hand side of (103) are available. Then, approximating the left-hand
side as

n+1
n+1 n+1
π1/2 − π0n+1
(δη π)0 ≈ (δη π)1/4 ≡ , (104)
η1/2 − η0
allows π0n+1 to be estimated from π1/2
n+1
.
An more accurate estimate (in the sense of giving the expected result both when the flow is in hydrostatic
balance (either physically or by setting δV = 0) and also when the flow is isentropic) can be obtained
 as follows.
From (103) and the latest estimate of the pressure gradient at the first internal η-level, δη π n+1 1 , the pressure
gradient halfway between η = η0 and η = η1/2 , denoted as (δη π)1/4 , is obtained as
h η
i
θvd (δη π n+1 )
n+1 1/4
(δη π)1/4 =  η . (105)
n+1
θvd
1/4

Then, using the definition of (δη π)1/4 , given by (104), allows the surface pressure, π0n+1 , to be estimated.
Notes:
1. The New Dynamics approximates the behaviour of π near the surface by imposing that it is in hydrostatic
balance there. This is obtained from (103) by setting δV = 0, neglecting the Coriolis terms and setting
n
(Rw )0 = 0.
2. In principle, the surface value of the density, (ρd )0 , could be obtained from applying the equation of state
(99) at the surface:
  1−κ κ
d
p0 π0 d
(ρd )0 = . (106)
Rd (θvd )0
As noted above though, it is currently obtained by either constant or linear extrapolation of the first two
interior values of ρ.

7.9 Predictors for the fast physical parametrization schemes

The fast physical parametrization components (e.g. convection and boundary layer) are those that are herein
n+1
denoted generically as S X . In the current New Dynamics and as proposed for ENDGame, these compo-
nents are evaluated sequentially starting from the best timelevel n + 1 estimates for u, v, w, θvd and mX in the
absence of the fast physics contributions. These estimates, denoted here by superscript P (n + 1), are obtained
from (62)-(64), (90), and (97), respectively, as:
uP (n+1) = Run + αu ∆tΨ(n+1)
u , (107)

v P (n+1) = Rvn + αv ∆tΨ(n+1)


v , (108)

(δV + µ∆t) wP (n+1) = Rw


n
+ αw ∆tΨ(n+1)
w , (109)

P (n+1)
θvd = Rθnvd + θvd
ref
, (110)
and
P (n+1) n
mX = Rm X
. (111)

The superscript (n + 1) on the terms on the right-hand side of these equations denotes the use of the latest
available complete estimates for n + 1 quantities. In contrast the P (n + 1) quantities do not include any direct
contribution from the fast physics components.
Note:
1. When the model is run in hydrostatic mode, i.e. δV = 0, the predictor wP (n+1) is not defined. However, in
this case the fast physics contribution (δV S w )n+1 is not needed.

22 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

8 Handling of the poles

For spheroidal and spherical geometry (for which ξ1 ≡ λ) the values of v at the poles are required for evaluation
of departure points in the vicinity of the poles, and interpolation of v to departure points. Provided that h1 is
stored and evaluated at v-points then v at the poles is never required elsewhere within the dynamics.
The procedures to evaluate the values of v at both the South pole, vi+1/2,0 , and at the North pole, vi+1/2,M ,
are given below. The derivation of this procedure is given in appendix E. It is the same for both spheroidal and
spherical geometries.
This procedure is also used to evaluate Rnv (defined in section 11) at each of the poles from the surrounding
values of Rnu .
The value of u at the poles is required in the calculation of the polar departure points. Additionally, it may
be beneficial to obtain values for u there and to use them for the purposes of interpolation when applying the
semi-Lagrangian scheme over the polar caps. In particular, the interpolation of wind vectors would be more
consistent over the polar cap. The procedures to evaluate the values of u at both the South pole, ui,0 , and at
the North pole, ui,M , are also included below, with their detailed derivation also given in appendix E.
Note that the procedure for obtaining the wind field components u and v in the immediate vicinity of the pole
intrinsically applies a highly scale-selective filter in the East-West direction, since the assumed functional form
only supports an East-West wavenumber one deviation from a mean zonal wind with higher harmonics excluded.
This makes the discretization behave in a more isotropic manner in the horizontal and potentially favours more
rapid convergence of the elliptic solver in polar regions.

8.1 The South pole

The procedure for determining the vector wind at the S. Pole, and from this the u- and v-components of the wind
there, is:
• Precompute C, D, E and F from
L−1 L−1
1 X 1 X
C= [∆λi cos (2λi )] , D = [∆λi sin (2λi )] , (112)
2π i=0 2π i=0

L−1 L−1
1 X 1 X
E= (∆λi sin λi ) , F = (∆λi cos λi ) , (113)
2π i=0 2π i=0
h 2 i1/2
2
and stop if C + E2 − F 2 + (D − 2EF ) + E 2 + F 2 > 1 − δ, where δ is a small tolerance;

• Evaluate A, B and G from

1 X  1 X  1 X 
L−1 L−1 L−1
A= ∆λi ui, 21 sin λi , B = ∆λi ui, 21 cos λi , G = ∆λi ui, 21 ; (114)
π i=0 π i=0 π i=0

• Evaluate λSP from


(  )
−1 1 − C − 2E 2 (B − F G) − (A − EG) (D − 2EF )
λSP = tan , (115)
− [(1 + C − 2F 2 ) (A − EG) − (D − 2EF ) (B − F G)]

using the FORTRAN library routine ATAN2;


• Obtain vSP from
(A − EG) cos λSP − (B − F G) sin λSP
vSP = h  i; (116)
2
sin φ 12 1 − C 1 − 2 sin2 λSP − 2D sin λSP cos λSP − 2 (E cos λSP − F sin λSP )

23 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

• Obtain ui,0 and vi+1/2,0 from

ui,0 ≡ u|(λi, φ0 ≡− π ) = −vSP sin (λi − λSP ) , i = 0, 1, ..., L − 1, (117)


2

 
vi+ 21 ,0 ≡ v|  = vSP cos λi+ 12 − λSP , i = 0, 1, ..., L − 1. (118)
λi+ 1 , φ0 ≡− π
2
2

8.2 The North pole

The procedure to determine the vector wind at the N. Pole, and from this, the u- and v-components of the wind
there, is:
• Use the precomputed values of C, D, E and F given by (112)
h 2 i1/2
[stopping if C + E 2 − F 2 + (D − 2EF )2 + E 2 + F 2 > 1 − δ, where δ is a small tolerance];

• Evaluate A, B and G from

1 X  1 X  1 X 
L−1 L−1 L−1
A= ∆λi ui,M− 12 sin λi , B = ∆λi ui,M− 12 cos λi , G = ∆λi ui,M− 21 ; (119)
π i=0 π i=0 π i=0

• Evaluate λN P from
(   )
−1 − 1 − C − 2E 2 (B − F G) − (A − EG) (D − 2EF )
λN P = tan , (120)
[(1 + C − 2F 2 ) (A − EG) − (D − 2EF ) (B − F G)]

using the FORTRAN library routine ATAN2;


• Obtain vN P from
(A − EG) cos λN P − (B − F G) sin λN P
vN P = h  i; (121)
2
sin φM− 21 1 − C 1 − 2 sin2 λN P − 2D sin λN P cos λN P − 2 (E cos λN P − F sin λN P )

• Obtain ui,M and vi+1/2,M from

ui,M ≡ u|(λi ,φM ≡+ π ) = vN P sin (λi − λN P ) , i = 0, 1, ..., L − 1, (122)


2

 
vi+ 21 ,M ≡ v|  = vN P cos λi+ 21 − λN P , i = 0, 1, ..., L − 1. (123)
λi+ 1 ,φM ≡+ π
2
2

24 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

9 Deriving a Helmholtz equation

Eqs. (62)-(64), (85), (99), (92), (90) and (97) form a set of nonlinear equations for un+1 , v n+1 , wn+1 , η̇ n+1 , π n+1 ,
ρn+1
d
n+1
, θvd and mn+1
X .

The method used here to solve these equations is a nested iterative approach similar to that used by (author?)
[5] and, within the present setting, by (author?) [32] and (author?) [10]. The departure-point equations are
solved in an outer loop using the latest available estimates for the wind components. Interpolation of required
quantities to these departure points is also done within the outer loop. Then, within an inner loop, a linear
Helmholtz equation is solved with the Coriolis terms and all nonlinear terms updated using the latest available
estimates for the constituent fields. Both the outer and inner loops can be iterated to convergence but by default
two outer and two inner iterations are used.
The Helmholtz problem is obtained using the Reference-State-Free scheme of (author?) [23] which reduces
the impact of the choice of reference profile. In this approach appropriate linear terms are added to both sides
of each equation with the terms that are added to the right-hand side of the equations lagged within the iteration.
These quantities are denoted by superscript (n + 1). For the θvd and ρd equations outer-loop estimates of these
quantities are used, rather than the more iterated, inner-loop estimates. This is motivated by considerations of
convergence as suggested by linear analysis and discussed in (author?) [23]. For all other variables the latest
inner-loop estimate is used.
For known right-hand sides, the equations constitute, by construction, a linear set of equations. Elimination of
variables leads to a Helmholtz equation which, once solved, gives, via back-substitution, an updated estimate of
the model variables. The advantage of the Reference-State-Free scheme is that, at convergence of the encom-
passing iterative procedure, the (added) linear terms cancel from both sides. As such, there is some flexibility
regarding their precise form: analogous to the semi-implicit scheme, the closer they are to the corresponding
nonlinear terms, the faster convergence is likely to be. The choice of what linear terms to add to both sides
of the equations is inspired by what would result from linearizing the equations about a stationary reference
profile that is a function only of η (however, see section 9.3 for how the reference profile is in fact specified).
For the terms added to both sides, the α factor associated with the term could be left unchanged. However,
it is advantageous to replace α in these terms (but not elsewhere) by a new factor τ . The τ factors are then
just relaxation parameters for the encompassing iterative procedure. The values of the α off-centring param-
eters are primarily chosen for accuracy (changing the α values changes the discretization, and therefore the
accuracy of the model). However the values of the τ relaxation parameters do not (at convergence) change the
discretization, and are chosen (empirically) to optimize convergence of the iterative procedure.

9.1 Setting the scene

The following notation is introduced for a generic scalar or vector variable F : F ′ ≡ FAn+1 − F ref (this prime
(n+1)
notation therefore has an implicit time level associated with it) and F ′(n+1) ≡ FA − F ref , where uref ≡ 0.
Rewriting (62)-(64), (85), (99), (92), (90) and (97) as described above and using this notation, gives the following
equation set. [Note that all “bent” terms, i.e. those involving δξ1 ξ3 and δξ2 ξ3 have been absorbed into right-hand-
side R∗ terms, as also have the terms involving mn+1 X .]

u equation
For levels k = 1/2, 3/2,...,N − 1/2:
 
ξ1 η
ref
u′ +  τu ∆tcpd θvd  δξ1 (π ′ δη ξ3 ) = Ru∗ + Run , (124)
ξ1
hξ11 (δη ξ3 )

where  
ξ1 η
ref  
Ru∗ ≡ αSu ∆t (S u )(n+1) + αu ∆t (Ψu )(n+1) +  τu ∆tcpd θvd  δξ1 π ′(n+1) δη ξ3 . (125)
hξ11 (δη ξ3 )ξ1
(n+1)
All terms of Ru∗ are evaluated in the inner loop with the exception of the “fast” physics terms αSu ∆t (S u )
which are evaluated in the outer loop.

25 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Note
h that evaluationi of Ψu at k = 1/2 needs special consideration due to the presence both of the term
ξ1 η ξ1 η
δη π (δξ1 ξ3 ) in (68) and also w in the Coriolis term (71). The evaluation of these terms at k = N − 1/2
is not problematic provided it is assumed that δξ1 ξ3 = δξ2 ξ3 ≡ 0 on k = N , i.e. that the upper surface is “flat”.
As a result the vertical average of π at k = N is multiplied by zero, and is therefore not required, and the upper
boundary condition η̇ = 0 implies that w = 0 on k = N . See section 7.8 for discussion of the lower and upper
boundary conditions.

v equation
For levels k = 1/2, 3/2,...,N − 1/2:
 
ξ2 η
ref
v′ +  τv ∆tcpd θvd  δξ2 (π ′ δη ξ3 ) = Rv∗ + Rvn , (126)
ξ2
hξ22 (δη ξ3 )

where  
ξ η
ref 2  
Rv∗ ≡ αSv ∆t (S v )
(n+1)
+ αv ∆t (Ψv )
(n+1)
+  τv ∆tcpd θvd  δξ2 π ′(n+1) δη ξ3 . (127)
ξ
hξ22 (δη ξ3 ) 2
(n+1)
All terms of Rv∗ are evaluated in the inner loop with the exception of the “fast” physics terms αSv ∆t (S v )
which are evaluated in the outer loop.

h that, as for Ψ
Note i u , evaluation of Ψv at k = 1/2 needs special consideration due to the presence of the term
ξ2 η ξ2 η
δη π (δξ2 ξ3 ) in (69). The evaluation of this term at k = N − 1/2 is not problematic provided it is assumed
that δξ2 ξ3 ≡ 0 on k = N , i.e. that the upper surface is “flat”. As a result the vertical average of π at k = N is
multiplied by zero, and is therefore not required. See section 7.8 for discussion of the lower and upper boundary
conditions.

w equation
For levels k = 1, 2,...,N − 1,
 ref
    ref

τw ∆tcpd θvd  ′
θvd τw ∆tcpd θvd
(δV + µ∆t) w′ + η δη π ref + η δη π ′ = Rw
∗ n
+ Rw , (128)
hη3 (δη ξ3 ) ref
θvd hη3 (δη ξ3 )

where
(n+1) (n+1)

Rw ≡ δV αSw ∆t (S w ) + αw ∆t (Ψw )
  ′(n+1)
!  
ref  θ ref
τw ∆tcpd θvd ref vd τw ∆tcpd θvd
+ η δη π + η δη π ′(n+1) . (129)
hη3 (δη ξ3 ) ref
θvd hη3 (δη ξ3 )


All terms of Rw are evaluated in the inner loop with the exception of the “fast” physics terms δV αSw ∆t (S w )(n+1)
which are evaluated in the outer loop.

η̇ equation
For levels k = 1, 2,...,N − 1:
η
hη3 (δη ξ3 ) η̇ ′ − w′ = Rη̇∗ , (130)
where    η 
hη3 η ξ1 η h3 η ξ2 η
Rη̇∗ ≡ − η (δ ξ1 ξ3 ) u ′(n+1) − η (δ ξ2 ξ3 ) v ′(n+1) , (131)
h1 h2
and, for levels k = 0 and N :
η̇ ′ = 0. (132)
The term Rη̇∗ is updated in the inner loop.
The alternative form of the η̇ equation given by (88) in section 7.3 is achieved by replacing Rη̇∗ here (and in the
following) with Rη̇n whose definition is given by (89).

26 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Thermodynamic equation
For levels k = 0, 1,...,N :  η

θvd ref
+ τθvd ∆tδη θvd η̇ ′ = Rθ∗vd + Rθnvd , (133)

where  η (n+1)
Rθ∗vd = τθvd ∆tδη θvd
ref η̇ ′(n+1) + αSθvd ∆t S θvd . (134)
ref
The term proportional to τρd on the right-hand side of (134) represents the advection of θvd and is therefore
S θvd
(n+1)
updated in the outer loop of the iterative procedure. The “fast” physics term αθvd ∆t S is similarly also
updated in the outer loop.

Continuity equation
For levels k = 1/2, 3/2,...,N − 1/2:
    
′ τρd ∆t ξ1 ξ1 ξ1 ref ξ1 ′ ξ2 ξ2 ξ2 ref ξ2 ′
ρd + δξ1 h2 h3 (δη ξ3 ) ρd u + δξ2 h3 h1 (δη ξ3 ) ρd v
h1 h2 h3 (δη ξ3 )
τρd ∆t h η i
η
+ δη (h1 h2 h3 δη ξ3 ) ρref
d η̇ ′ = Rρ∗d + Rρnd ,
h1 h2 h3 (δη ξ3 )
(135)

where
    
τρd ∆t ξ1 ξ1 ξ1 ref ξ1 ′(n+1) ξ2 ξ2 ξ2 ref ξ2 ′(n+1)
Rρ∗d ≡ + δξ1 h2 h3 (δη ξ3 ) ρd u + δξ2 h3 h1 (δη ξ3 ) ρd v
h1 h2 h3 (δη ξ3 )
τρd ∆t h η i
η
+ δη (h1 h2 h3 δη ξ3 ) ρref
d η̇ ′(n+1)
h1 h2 h3 (δη ξ3 )
(n+1) e
−δρd αρd ∆tρd ∇.u(n+1) . (136)

The terms proportional to τρd on the right-hand side of (136) (which can be written as τρd ∆t∇. e ρref u′(n+1) )
d
includes the advection of ρref and is therefore updated in the outer loop of the iterative procedure. The last
term on the right-hand side of (136), proportional to αρd , represents the nonlinear divergence term and this is
updated in the inner loop.

mX equation
For levels k = 0, 1,...,N :
mn+1
X

= Rm X
n
+ Rm X
, (137)
where

Rm X
≡ αSmX ∆t (S mX )(n+1) . (138)
(n+1)

The term Rm X
comprises only the “fast” physics terms αSmX ∆t (S mX ) is is therefore evaluated in the outer
loop.

Equation of state
For levels k = 1/2, 3/2,...,N − 1/2:
  (" η #  η )
1 − κd π′ Rd ρref ref
d θvd ρ′d ′
θvd
− + = Rπ∗ . (139)
κd π ref p0 (π ref )
1−κd
κd ρref
d
ref
θvd

where
" η #  1−κ d

Rd ρref ref
d θvd p0 π (n+1) κd

Rπ∗ ≡ 1−κd
1 − η

(n+1)
p0 (π ref ) κd Rd ρref
d θvd
   ′(n+1)  !η
′(n+1)
1 − κd π θvd
+ − ref
. (140)
κd π ref θvd

27 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

All terms of Rπ∗ are evaluated in the inner loop.


Defining a number of H-coefficients, as given in appendix F, this set of equations can be rewritten more conve-
niently as:

u equation
u′ + Hu δξ1 (π ′ δη ξ3 ) = Ru∗ + Run , (141)
for levels k = 1/2, 3/2,...,N − 1/2.

v equation
v ′ + Hv δξ2 (π ′ δη ξ3 ) = Rv∗ + Rvn , (142)
for levels k = 1/2, 3/2,...,N − 1/2.

w equation
 θvd

(δV + µ∆t) w′ + Hw δη π ref ref
+ Hw δη π ′ = Rw
∗ n
+ Rw , (143)
θvd
for levels k = 1, 2,...,N − 1.

η̇ equation
Hη̇ η̇ ′ − w′ = Rη̇∗ , (144)
for levels k = 1, 2,...,N − 1, and
η̇ ′ = 0, (145)
for levels k = 0 and N .

Thermodynamic equation

θvd + Hθ η̇ ′ = Rθ∗vd + Rθnvd , (146)
for levels k = 0, 1,...,N .

Continuity equation

ρ′d + HV [δξ1 (Hρx u′ ) + δξ2 (Hρy v ′ ) + δη (Hρz η̇ ′ )] = Rρ∗d + Rρnd , (147)

for levels k = 1/2, 3/2,...,N − 1/2.

mX equation
mn+1
X

= Rm X
n
+ Rm X
, (148)
for levels k = 0, 1,...,N .

Equation of state "  ′ η #


π′ ρ′d θvd
Hππ ref − Hπρ ref + ref
= Rπ∗ , (149)
π ρd θvd
for levels k = 1/2, 3/2,...,N − 1/2.
Eqs. (141)-(149) constitute N (for u′ ) + N (for v ′ ) + N − 1 (for w′ ) + N + 1 (for η̇ ′ ) + N + 1 (for θvd

) +N (for ρ′d ) +
n+1
N + 1 (for mX ) + N (for π ) = 8N + 2 linear equations in 4N (u , v , ρd and π ) + N − 1 (w ) + 3 (N + 1) (η̇ ′ , θvd
′ ′ ′ ′ ′ ′ ′
n+1
and mX ) = 8N + 2 unknowns.

28 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

9.2 The elimination procedure

1. Substitute for w′ from (144) into (143) to obtain


 θvd

(δV + µ∆t) Hη̇ η̇ ′ + Hw δη π ref ref
+ Hw δη π ′ = Rw
∗ n
+ Rw + (δV + µ∆t) Rη̇∗ , (150)
θvd
for levels k = 1, 2,...,N − 1.

2. Substitute for θvd from (146) into (150) to obtain
"  #
Hw δη π ref
(δV + µ∆t) Hη̇ − ref
Hθ η̇ ′ + Hw δη π ′ =
θvd

n Hw δη π ref 
Rw∗
+ Rw + (δV + µ∆t) Rη̇∗ − ref
Rθ∗vd + Rθnvd , (151)
θvd
for levels k = 1, 2,...,N − 1.
ref


3. Substitute for the vertical average of θvd /θvd from (146) into − ρref
d /Hπρ ×(149) to obtain
 ref  ′  ref   η  ref  "  ∗ n η
#
ρ d H ππ π ρ d H θ η̇ ′ ρ d
Rθ + Rθ
ρ′d − − ref
= − Rπ∗ + vd
ref
vd
,
Hπρ π ref Hπρ θvd Hπρ θvd
(152)
for levels k = 1/2, 3/2,...,N − 1/2.
4. Eliminate ρ′d between (147) and (152) to give
  ′  ref   η
′ ′ ′ ρref
d Hππ π ρd Hθ η̇ ′
HV [δξ1 (Hρx u ) + δξ2 (Hρy v ) + δη (Hρz η̇ )] + + ref
Hπρ π ref Hπρ θvd
 ref  "  ∗ η #
ρd Rθvd + Rθnvd 
= Rπ∗ + ref
+ Rρ∗d + Rρnd ,
Hπρ θvd
(153)
for levels k = 1/2, 3/2,...,N − 1/2.
5. Substituting for u′ and v ′ from (141) and (142) into (153) gives
−HV {δξ1 [Hρx Hu δξ1 (π ′ δη ξ3 )] + δξ2 [Hρy Hv δξ2 (π ′ δη ξ3 )]}
 ref  ′
ρd Hππ π
+ + HV D1 (η̇ ′ )
Hπρ π ref
 ref  "  ∗ n η
#
ρd R θ + R θ 
= Rπ∗ + vd
ref
vd
+ Rρ∗d + Rρnd
Hπρ θvd
−HV {δξ1 [Hρx (Ru∗ + Run )] + δξ2 [Hρy (Rv∗ + Rvn )]} ,
(154)
for levels k = 1/2, 3/2,...,N − 1/2, where
  η
1 ρref
d Hθ X
D1 (X) ≡ δη (Hρz X) + ref
, (155)
HV Hπρ θvd
for levels k = 3/2, 5/2,...,N − 3/2, and
  ref    
1 1 ρd  Hθ X
D1 (X) ≡ (Hρz X)1 + η1/2 − η0 ref
, (156)
η1 − η0 HV Hπρ θvd 1

for level k = 1/2, and


"  ref    #
1 1 ρd  Hθ X
D1 (X) ≡ − (Hρz X)N −1 + ηN − ηN −1/2 ref
, (157)
ηN − ηN −1 HV Hπρ θvd N −1

for level k = N − 1/2.

29 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

6. Now, rewrite (151) as


"  #
n Hw δη π ref 
′ ′
η̇ + D2 (π ) = HC ∗
Rw + Rw + (δV + µ∆t) Rη̇∗ − ref
Rθ∗vd + Rθnvd , (158)
θvd

for levels k = 1, 2,...,N − 1, where


D2 (X) ≡ HC Hw δη X, (159)
and  −1
Hw δη π ref
HC ≡ (δV + µ∆t) Hη̇ − ref
Hθ . (160)
θvd

Hence, eliminating η̇ ′ between (154) and (158) finally gives


HV {δξ1 [Hρx Hu δξ1 (π ′ δη ξ3 )] + δξ2 [Hρy Hv δξ2 (π ′ δη ξ3 )]}
 ref  ′
ρd Hππ π
+HV D1 [D2 (π )] − ′
= RHS ∗ + RHS n ,
Hπρ π ref
(161)
for levels k = 1/2, 3/2,...,N − 1/2, where
 ref  "  ∗ η #
ρ d
Rθvd
RHS ∗ ≡ − Rπ∗ + ref
− Rρ∗d
Hπρ θvd
+HV [δξ1 (Hρx Ru∗ ) + δξ2 (Hρy Rv∗ )]
( "  #)
∗ Hw δη π ref ∗
+HV D1 HC Rw + (δV + µ∆t) Rη̇∗ − ref
Rθvd , (162)
θvd

and
   n η
ρref Rθvd
RHS n ≡ − d
ref
− Rρnd
Hπρ θvd
+HV [δξ1 (Hρx Run ) + δξ2 (Hρy Rvn )]
( "  #)
n Hw δη π ref n
+HV D1 HC Rw − ref
Rθvd . (163)
θvd

Note:
1. The resulting form of the Helmholtz equation is different to (2.21)-(2.22) of (author?) [22]. A primary
reason for this is that the elimination of the Coriolis terms has here been done before eliminating θvd from
the w-equation. In a purely analytical approach both are eliminated simultaneously. In principle that could
be done here but it would be greatly complicated by the fact that in general η̇ 6= w, together with the
complicated thermodynamic relations.

9.3 Specifying the reference profile

In the shallow-water version of ENDGame [32, 23] the reference profile of height was a scalar. In the vertical
slice version of ENDGame [10] the profiles were functions only of η and not of time. More generally (e.g. (au-
thor?) 28), it has been found that, because of the large spatial and temporal variations of temperature, good
convergence of the iterative procedure requires the thermodynamic reference profiles to be functions of the
model state at the previous time step.
However, simply setting them equal to the previous time level values (i.e. F ref = F n ) can result in statically
unstable profiles which is deleterious for the convergence (and indeed well posedness) of the Helmholtz prob-
lem. Therefore a dry static adjustment is applied: the θref profile is adjusted, by reordering the values using a
bubble-sort algorithm, to ensure static stability (∂θref /∂z > 0).
Additionally, ρref is recomputed (for all points and after any dry static adjustment) from the equation of state (99).
A consequence of this is that although the Helmholtz coefficient, Hπρ , is evaluated as given by (448), it always
evaluates to be 1!

30 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

9.4 Method of solution

Any suitable solver may be used for the Helmholtz problem (161). The precise choice is determined by compu-
tational efficiency and the target computer architecture. The current choice is (author?) [2]’s post-conditioning
adaptation of (author?) [24]’s bi-conjugate gradient stabilized (BiCGstab) method. This is iterated until a speci-
fied tolerance (ε) is achieved. Rewriting (161) as H (π ′ ) = R, the tolerance is defined as
n o
−1
RMS DIAG (H) [H (π ′ ) − R]
ε≡ h i , (164)
−1
RMS DIAG (H) (R)

where RMS denotes the root-mean-squared value and DIAG denotes the diagonal part of the Helmholtz oper-
ator H. In idealized simulations a tolerance of ε = 10−6 is typically suitable but for efficiency reasons a smaller
value of ε = 10−3 is used in more operational contexts. Further details are given in appendix J.

9.5 Backsubstitution

The latest estimate for mn+1


X is already known at this stage. The other prognostic variables are found from the
following backsubstitution procedure, once π ′ has been obtained from the solution of (161) at levels k = 1/2,
3/2,...,N − 1/2:
1. η̇ ′ is obtained from (158) and (159) at levels k = 1, 2,...,N − 1. Additionally, η̇ ′ = 0 on k = 0 and N from
(145).
2. w′ is obtained from (144) at levels k = 1, 2,...,N − 1.
3. u′ and v ′ are obtained, respectively, from (141) and (142) at levels k = 1/2, 3/2,...,N − 1/2. The polar
values of v ′ are obtained from u′ by applying the procedures of section 8 applied to u′ in place of u.

4. θvd is obtained from (146) at levels k = 0, 1,...,N .
5. ρ′d is obtained from either (147) or (149) at levels k = 1/2, 3/2,...,N − 1/2.
Notes:
1. At full convergence of the encompassing iterative procedure it makes no difference whether ρ′d is obtained
from (147) or (149). However, for incomplete convergence there are two competing issues: using (147) is
the only method that gives exact mass conservation (at least when δρd = 0); but it is found that using (147)
(at least in the case δρd = 1) can lead to poor convergence and hence instability unless a sufficiently high
degree of convergence is achieved (e.g. that obtained with ε = 10−6 ). Currently, for more operational type
configurations with their relative large value of solver tolerance, ρ′d is obtained from (149).

31 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

10 The departure point equation

As noted in sections 3 and 6, departure points xD are determined by integrating the kinematic equation (5), i.e.
Dx
= u, (165)
Dt
using available gridpoint values of u (and arrival points xA ). The New Dynamics currently uses a rotated grid
method [9] near the poles, but an analytical expansion method [15] elsewhere. In contrast, ENDGame uses a
uniformly applicable scheme throughout the model domain.
In principle, and as proposed by (author?) [30],(165) can be discretized in time in the same way as the momen-
tum equation (47). This has the advantage that it is simply switchable between various geometries (Cartesian,
spherical and spheroidal). However, (author?) [21] showed that this approach can lead to a numerical insta-
bility in spherical geometry. In the spherical case, the method proposed by (author?) [21] is used. This is a
deep-atmosphere extension of the shallow-atmosphere methods described by, for example, (author?) [4] and
(author?) [30]. Let r be a position vector with r ≡ |r| the radial distance. Then k ≡ r/r defines the horizontal
position of a point, r defines its vertical position and (165) can be decomposed as
Dr
= w, (166)
Dt
and
Dk v
= , (167)
Dt r
where v ≡ u − k (k · u) is the horizontal part of the velocity vector. In the terrain-following coordinate system
(166) is replaced by

= η̇. (168)
Dt
Eq. (168) is solved in a straightforward Cartesian manner. The adjustment of (author?) [29] is applied to keep
the departure points within the model domain.
Eq. (167) has the same form as it would have for a shallow-atmosphere model (with Earth’s mean radius a
generalized here to r). This is therefore solved using the shallow-atmosphere version of the scheme described
in (author?) [30], and also in (author?) [32].
Eqs. (167) and (168) are solved together iteratively. This procedure can be repeated to convergence but gener-
ally two iterations are used. Separate departure points are computed for each dependent variable according to
where it is carried on the staggered grids.
The scheme is designed to be switchable amongst the following versions: spherical deep-atmosphere; spherical
shallow-atmosphere; spherical shallow-water; and Cartesian. Section 10.1 details the switchable scheme. The
necessary transformation formulae are listed in section 10.1.1; for background and outline derivations see
(author?) [21] and (author?) [30]. Other subsubsections describe the analytical framework for the departure
point calculation, its iterative numerical implementation, and the proposed solution procedure. Later subsections
note how the general scheme is switched to the various particular versions.

10.1 The switchable scheme

In its general form, the scheme is framed in a spherical coordinate system. The coordinates of any point are
(λ, φ, r), λ being longitude, φ latitude, and r radial distance. The evaluation of the horizontal departure points,
λD and φD , is performed on a sphere of unit radius. This requires scaling of the horizontal winds by the radial
height of the arrival point.

10.1.1 Transformation to local Cartesian coordinates

At each arrival point (A), a local Cartesian coordinate system OXY Z is defined whose unit vectors I, J, K are
parallel to the unit vectors i, j, k of the spherical coordinate system at A. The origin O of OXY Z lies is the
centre of the sphere. See Fig. 1. The units of length of the Cartesian system are chosen so that the arrival point
has coordinates (0, 0, 1).

32 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

The transformation from the spherical coordinates (λ, φ, 1) to the scaled (X, Y, Z) system associated with the
arrival point (λA , φA , rA ) is
X = − cos φ sin (λA − λ) , (169)

Y = sin φ cos φA − cos φ sin φA cos (λA − λ) , (170)

Z = sin φ sin φA + cos φ cos φA cos (λA − λ) . (171)

The inverse relations to (169)-(171) are


−X
tan (λA − λ) = , (172)
Z cos φA − Y sin φA

sin φ = Y cos φA + Z sin φA , (173)


in which 1/2
Z = 1 − X2 − Y 2 . (174)

The FORTRAN intrinsic function ATAN2 should be used to evaluate λA − λ from (172).
The associated Cartesian horizontal velocity components U and V are obtained from the scaled winds, u/r and
v/r, as:    
U u/r
= QA (λ, φ) , (175)
V v/r
where  
pA (λ, φ) qA (λ, φ)
QA ≡ , (176)
−qA (λ, φ) pA (λ, φ)
with
cos φA cos φ + (1 + sin φA sin φ) cos (λA − λ)
pA (λ, φ) ≡ , (177)
1 + sin φA sin φ + cos φA cos φ cos (λA − λ)
(sin φA + sin φ) sin (λA − λ)
qA (λ, φ) ≡ . (178)
1 + sin φA sin φ + cos φA cos φ cos (λA − λ)
When (λ, φ) = (λA , φA ), QA (λ, φ) reduces to the identity matrix (consistent with note 1 below).
The two components of (175) may be written as
1
U= (pA u + qA v) , (179)
r

1
V = (−qA u + pA v) . (180)
r

Notes:
1. Due to the local nature of the Cartesian system, (169)-(171) reduce at the arrival point, for which(λ, φ) =
(λA , φA ), to:
X = XA = 0, (181)

Y = YA = 0, (182)

Z = ZA = 1, (183)
respectively. Also, at the arrival point (179)-(180) reduce to:
uA vA
U = UA = , V = VA = . (184)
r r
[See note 1 of section 10.1.3, below, for the treatment of non-local Cartesian systems.]

33 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

j kA
A
φA
iA

A
r
Y A
Z
X
O φA y
λA

Figure 1: An attempt to depict the 3D configuration of the Cartesian system OXY Z in relation to the sphere
upon which the arrival point A lies. i, j and k are unit vectors in the zonal, meridional and vertical directions at
A; I, J and K are unit vectors in the directions of OX, OY and OZ respectively (and are respectively parallel to
i, j and k). φA is the angle that OA (and OZ) make with the equatorial plane; it is the geographic latitude of A.
λA is the longitude of A.

34 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

2. It is tempting to write Eqs. (169)-(171) more compactly in terms of the elements M13 , M23 , M33 of the
matrix MA (λ, φ) (introduced in section 6.3.2 and specified in appendix B):
X = M13 , (185)

Y = M23 , (186)

Z = M33 . (187)
However, whilst these expressions hold in the spherical deep-atmosphere and Cartesian systems (which
are Euclidean), they do not hold in the shallow spherical and shallow water systems (which are non-
Euclidean). In these shallow systems, (169)-(171) for X, Y and Z remain valid, but the definitions of the
elements of MA (λ, φ) must be modified (in the context of the velocity components). These modifications -
see subsections (10.4), (10.5), and appendix B.2.5 - would deliver incorrect results if made in (185)-(187)
(in the context of the position vector components X, Y and Z).

10.1.2 Finding the departure point: analytical framework

The target two-time-level discretization of the horizontal components of the kinematic equation (167) is [30]
n+1

XDn
= XA − ∆tγ αx UAn+1 + βx UDn
, (188)


YDn = YAn+1 − ∆tγ αx VAn+1 + βx VDn , (189)
where γ ≡ [1 + sin φA sin φD + cos φA cos φD cos (λA − λD )] /2, and αx is an off-centring parameter and βx ≡
1 − αx .
The target two-time-level discretization of the vertical component of the kinematic equation (168) is
n n+1 n+1 n

ηD = ηA − ∆t αx η̇A + βx η̇D . (190)

10.1.3 Finding the departure point: iterative procedure

Eqs. (188), (189) and (190) are solved iteratively as:


 h  i
n(K) n+1 n(K−1) n(K−1) n(K−1) n(K−1) n(K−1)
XD = XA − γ λD , φD αx UAn+1 + βx U n λD , φD , ηD ∆t, (191)

 h  i
n(K) n(K−1) n(K−1) n(K−1) n(K−1) n(K−1)
YD = YAn+1 − γ λD , φD αx VAn+1 + βx V n λD , φD , ηD ∆t, (192)
h  i
n(K) n+1 n+1 n(K−1) n(K−1) n(K−1)
ηD = ηA − αx η̇A + βx η̇ n λD , φD , ηD ∆t, (193)
n(K−1) n(K−1) n(K−1) th
where λD , φD and ηD are the values of λnD , φnD and ηD
n
obtained at the (K − 1) iteration.
n(1)
These equations need to be initialized to obtain XD etc. This can optionally be done in two ways:
  
n(0) n(0) n(0) n−1 n−1 n−1
1. Initialize the departure point to be that from the previous time step λD , φD , η̇D = λD , φD , η̇D .
For steady state flows this initialization would be exact.
2. Runge-Kutta approach:
n(1) n+1
XD = XA − UAn+1 ∆t, (194)

n(1)
YD = YAn+1 − VAn+1 ∆t, (195)

n(1)
n+1 n+1
= ηA
ηD − η̇A ∆t. (196)
  
n(0) n(0) n(0)
This is equivalent to setting λD , φD , η̇D = (λA , φA , η̇A ) and approximating (U n , V n , η̇ n ) by U n+1 , V n+1 , η̇ n+1 .
Compared with the alternative below, this method significantly reduces the communications overhead as
well as the number of trigonometric calculations.

35 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Notes:
n+1
1. Use of the local Cartesian system OXY Z defined in section 10.1.1 implies XA = YAn+1 = 0. The
n+1 n+1
possibility that XA 6= 0 and/or YA 6= 0 has been allowed for in (191) and (192) so as to include the
Cartesian version of the switchable scheme (see 10.6). This version covers the case in which the under-
lying geometry of the model is itself Cartesian (rather than spherical or spheroidal); it is then most natural
to use a single Cartesian coordinate system rather than to adopt a different one for each arrival point.
n+1
[XA 6= 0 and/or YAn+1 6= 0 would also arise in a spherical polar context if it should be desired to simulate
use of the non-local Cartesian transform schemes of (author?) [13], (author?) [14] and (author?) [18]
that are discussed by (author?) [30]; in these cases, however, (184) would have to be modified too.]
2. In the Cartesian option, in which λ → x = X and φ → y = Y (see section 10.6), convergence would be
n(K)
accelerated by sequential updating of (191)-(193) (i.e. use of the latest value xD to update V n on the
n(K) n(K)
right-hand side of (192), and use of the latest values of xD and yD to update W n on the right-hand
side of (193)). However, in the spherical case, X involves all of λ, φ and r (see (169)) and it is not clear
that the procedure would be beneficial. Indeed, because four more trig evaluations would be required per
iteration (via (172)-(173)), it seems likely that computational efficiency would be reduced by sequential
updating in these cases.
3. If at any stage during the iteration the calculated departure point lies outside the computational domain,
or very close to either its lower boundary or its upper boundary, then one of the following recalculations is
performed:
n(K)
(a) L OWER BOUNDARY ADJUSTMENT If ηD < min (ηA , η1 ), where η1 is the value of η at the first full
level above the lower boundary at which η̇ is stored, then first define
max
ηL = max (ηA , η1 ) , (197)

and
min
ηL = min (ηA , η1 ) . (198)
Next evaluate max
ηL −η
τL
(K)
(ηA ) ≡  1 , (199)
max − max η , η n(K)
ηL 0 D

n(K)
and recalculate ηD as
  
(K)
  ∆t 1 − τL
n(K) min
ηD = η0 + ηL − η0 exp − ×
 η1 − η0

" ! ! #)
(K)
1 − τL
(K)
1 + τL  
n(K) n(K)
η̇1n+1 + η̇ n λD , ϕD , η1 , (200)
2 2
and finally limit it to be less than η1 :
 
n(K) n(K)
ηD = min ηD , η1 . (201)

n(K)
Here η0 is the value of η at the lower boundary (and will usually be zero). The value of ηD depends
(K) min
on ηA only through τL , and ηL when ηA ≤ η1 . The required values of η̇ are obtained using (85)
with interpolation as necessary.
n(K)
(b) U PPER BOUNDARY ADJUSTMENT If ηD > max (ηA , ηN −1 ), where ηN −1 is the value of η at the first
full level below the upper boundary at which η̇ is stored, then first define
max
ηU = max (ηA , ηN −1 ) , (202)

and
min
ηU = min (ηA , ηN −1 ) . (203)
Next evaluate
min
(K) ηN −1 − ηU
τU (ηA ) ≡   , (204)
n(K) min
min ηD , ηN − ηU

36 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

n(K)
and recalculate ηD as
  
 ∆t 1 − τU(K)
n(K) max
ηD = ηN − (ηN − ηU ) exp ×
 ηN − ηN −1
" ! ! #)
(K)
1 − τU 1 + τU
(K)  
n+1 n n(K) n(K)
η̇N −1 + η̇ λD , ϕD , ηN −1 , (205)
2 2
and finally limit it to be greater than ηN −1 :
 
n(K) n(K)
ηD = max ηD , ηN −1 . (206)

n(K)
Here ηN is the value of η at the upper boundary. The value of ηD depends on ηA only through
(K) max
τU , and ηU when ηA ≥ ηN −1 . The required values of η̇ are obtained using (85) with interpolation
as necessary.

10.1.4 Finding the departure point: solution procedure

For illustration the sequence of operations for a u-point is described. Also, it is assumed that the iterative
procedure is initialized according to item 1 of section 10.1.3. (In the Runge-Kutta case, item 2 of section 10.1.3,
the first step, K = 1, can be greatly simplified since no evaluation of departure point quantities is required.)
  
n(0) n(0) n(0) n−1 n−1 n−1
1. Initialize the departure points as λD , φD , η̇D = λD , φD , η̇D .

2. Begin DEPARTURE INNER LOOP iteration on K = 1, 2, ...


(a) From (184), UAn+1 is trivially obtained from un+1 A as UAn+1 = un+1 A /r. Similarly, VA
n+1
is obtained
n+1
directly from v linearly interpolated to the arrival point (a u-point) and then divided by the value of
r at that u-point. [At the cost of extra storage this step could be removed from the iterative procedure.]
 
n(K−1) n(K−1) n(K−1)
(b) Locate the approximate departure point λD , φD , ηD within the grid (for example
using the search algorithm described in appendix D.2) and thus identify the surrounding u-points, the
surrounding v-points and the surrounding w-points. These  “surrounding” points are the gridpoints
n(K−1) n(K−1) n(K−1)
successively defining the u, v and w cells that contain λD , φD , ηD .
 
n(K−1) n(K−1) n(K−1)
(c) Linearly interpolate un /r, v n /r and η̇ n to λD , φD , ηD . [Although the differences are
likely to be small, note the different handling of the 1/r factor  withλφ
respect
 to interpolation between
D
the arrival point (step 2a) and departure point (this step), i.e. v n+1 /r cf. (v n /r) (where overbar
D denotes interpolation to the departure point). ]
 
n(K−1) n(K−1)
(d) Using those linearly interpolated values of un /r and v n /r, together with (λ, φ) = λD , φD ,
evaluate U n and V n from (179) and (180), respectively.
 
n(K) n(K) n(K)
(e) Calculate the Cartesian estimate XD , YD , η̇D from (191)-(193).
   
n(K) n(K) n(K) n(K)
(f) Use (172)-(173) to find λD , φD from XD , YD .
n(K)
(g) if ηD lies outside the permitted domain, recalculate it using the procedure described in note 3 of
section 10.1.3.
3. End DEPARTURE INNER LOOP iteration.
Calculation for a v-, w- or ρ-point proceeds in an analogous way. However, it should be noted that the departure
points of the polar v-points are not evaluated and are simply set to their arrival values. Any quantity that requires
evaluation at the polar v-departure points is evaluated from its evaluation at the surrounding u-points and a polar
wind calcuation (see appendix E).
Due to the lower and upper boundary conditions that η̇ = 0 on η = η0 and η = ηN , particles that, at any time,
find themselves on either the lower or the upper boundary must remain on that boundary for all time. Therefore,

37 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

for w-points that lie on the lower boundary, i.e. for which ηA = η0 , ηD should be set to η0 throughout the iterative
calculation and immediately after it. A similar treatment, but with ηD set to ηN , should be used for w-points
that lie on the upper boundary, for which ηA = ηN . A more elaborate treatment of boundary w-points is not at
present considered necessary.

10.2 Deep-atmosphere, similar oblate spheroidal (SOS) version

Extension of this departure point calculation to the spheroidal case has not been implemented.

10.3 Deep-atmosphere, spherical polar version

For this case apply the general procedure of section 10.1.4.

10.4 Shallow-atmosphere, spherical polar version

Since the deep-atmosphere algorithm is a straightforward generalization of an originally shallow one, the only
required changes to the procedure of section 10.1.4 are:
1. replace r by a in (175) and (179)-(180).

10.5 Shallow-water, spherical polar version

The shallow-water version of the scheme is obtained by applying the shallow-atmosphere version at the single
level of the model, and not calculating vertical displacements at stage (2e).

10.6 Cartesian version

The Cartesian version of the scheme is derived directly from the shallow-atmosphere, spherical polar version by
noting that in the Cartesian case the prognostic velocity components u and v correspond exactly (after removal
of the constant scaling by a) to U and V , respectively, and the components of the horizontal position vector, x
and y, correspond to X and Y , respectively (allowing for the use of a single Cartesian origin in the case of x, y
and z - see note 1 of section 10.1.3). There are no changes at all to η and η̇.
The only material change (other than the removal of the spherical transformations) is that the factor γ introduced
in (188)-(189) becomes γ = 1 in Cartesian geometry.
The scheme therefore reduces to just solving the three components (188), (189) and (190) iteratively, i.e. to
solving h  i
n(K) n+1 n(K−1) n(K−1) n(K−1)
XD = XA − αx UAn+1 + βx U n XD , YD , ηD ∆t, (207)
h  i
n(K) n(K−1) n(K−1) n(K−1)
YD = YAn+1 − αx VAn+1 + βx V n XD , YD , ηD ∆t, (208)
h  i
n(K) n+1 n+1 n(K−1) n(K−1) n(K−1)
ηD = ηA − αx η̇A + βx η̇ n XD , YD , ηD ∆t. (209)

The procedure for the Cartesian version of the scheme is therefore the same as that for the shallow-atmosphere,
spherical polar version but with:
1. (169)-(171) replaced by
X = x, Y = y, Z = z; (210)

2. (179)-(180) replaced by
U = u, V = v; (211)

3. (191)-(193) replaced by (207)-(209); and

38 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

4. setting γ = 1.
Departure points near the lower and upper boundaries are treated as described in note 3 of section 10.1.3 (with
λD and φD replaced by XD and YD respectively).

10.7 Limited-Area Model version (deep- and shallow-atmosphere)

Since the limited-area model domains do not encompass the poles a more traditional scheme can be applied.
This is equivalent to the Cartesian version but where, in the deep-atmosphere case,
u
U≡ , (212)
h1
and
v
V ≡ , (213)
h2
where the metric factors are specified in appendix B.

39 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

11 Solution procedure

Sections 3-9, together with the various appendices, specify the equation set to be solved. An outline of the
iterative solution procedure used to solve those equations is as follows:
1. Evaluate the time-level n, arrival-point quantities:
n
(a) The required physical parametrization terms (S u )n , (S v )n , (S w )n , S θvd and (S mX )n (the “slow
physics”),
n
(b) Rnu ≡ u + βu ∆tΨu + βuS ∆tS u ,
n
(c) Rnv ≡ v + βv ∆tΨv + βvS ∆tS v , obtaining the polar values of Rnv from Rnu by applying the proce-
dures of section 8,
n
(d) Rnw ≡ δV w + βw ∆tΨw + δV βw S
∆tS w ,
n
(e) Rnθvd ≡ θvd + βθSvd ∆tS θvd ,
 n
e
(f) Rnρd ≡ ρd − δρd βρd ∆tρd ∇.u ,
n
(g) RnmX ≡ mX + βm S
X
∆tS mX ;
2. Initialize the estimates for timelevel n + 1 quantities as F (n+1) = F n for F = u, v, w, η̇, θvd , ρd , mX and π.
3. Begin OUTER LOOP iteration on complete model time step:
(a) Using un , v n and wn and the latest estimates for u(n+1) , v (n+1) and w(n+1) , compute the next estimate
n n n
for the departure points (ξ1 )D , (ξ2 )D and (η)D by applying the iterative procedure of section 10;
i. Evaluate the time-level n, departure-point dependent quantities:
h i h i h i
A. Run ≡ M11 (Rnu )Du + M12 (Rnv )Du + M13 (Rnw )Du ,
L L L
h i h i h i
B. Rvn ≡ M21 (Rnu )Dv + M22 (Rnv )Dv + M23 (Rnw )Dv ,
L L L
h i h i h i
n
C. Rw ≡ M31 (Rnu )Dw + M32 (Rnv )Dw + M33 (Rnw )Dw ,
L L L

n n
 ref
D. Rθvd ≡ Rθvd D − θvd ,
R  
E. Rρnd ≡ V1 V Rnρd dV D − ρref n n ref
d using SLICE for δρd = 0, and Rρd ≡ Rρd D − ρd for δρd = 1,
n

F. Rm X
≡ RnmX D ,
G. RHS n from (163);
 η
ii. Compute the outer loop dependent parts of Rθ∗vd and Rρ∗d , i.e. ref
τθvd ∆tδη θvd η̇ ′(n+1) and

e ρref u′(n+1) , respectively;
τρ ∆t∇.
d d

iii. Compute the physics predictors F P (n+1) , for F = u, v, w, θvd and mX , given in section 7.9 and
from these obtain the required physical parametrization terms (S u )(n+1) , (S v )(n+1) , (S w )(n+1) ,
(n+1) (n+1)
S θvd and (S mX ) (the “sequential” or “fast” physics);
iv. Begin NONLINEAR INNER LOOP iteration on all time-level n + 1 quantities handled on the right-
hand side of the Helmholtz equation:
A. Evaluate the time-level n + 1, arrival-point quantities Ru∗ , Rv∗ , Rw ∗
, Rθ∗vd , Rη̇∗ , Rρ∗d , Rm

X
and

Rπ from (125), (127), (129), (134), (131), (136), (138) and (140), respectively, in terms of the
(n+1) (n+1) (n+1)
latest timelevel n + 1 estimates u(n+1) , v (n+1) , w(n+1) , θvd , ρd , mX and π (n+1) (and
(n+1) (n+1)
η̇ if required for any of the source terms S ), noting that some parts of Rθ∗vd and Rρ∗d
remain fixed at their outer loop value (see step 3(a)ii above);
B. Update mX using (137)];
C. Evaluate the time-level (n + 1) dependent quantities on the right-hand side of the Helmholtz
equation, i.e. evaluate RHS ∗ from (162);

40 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

D. Solve the Helmholtz equation (161) for π ′ and hence obtain the next estimate for π n+1 ,
π (n+1) ≡ π ′ + π ref ;
E. Obtain η̇ (n+1) ≡ η̇ ′ from (158) and (159) at levels k = 1, 2,...,N − 1 with η̇ (n+1) ≡ η̇ ′ = 0 on
k = 0 and N ;
F. Obtain w(n+1) ≡ w′ from (144) at levels k = 1, 2,...,N − 1;
G. Obtain u(n+1) ≡ u′ and v (n+1) ≡ v ′ from (141) and (142), respectively, and obtain the polar
values of v (n+1) from u(n+1) by applying the procedures of section 8;
′ (n+1) ′ ref
H. Obtain θvd from (146), and hence obtain θvd ≡ θvd + θvd ;
(n+1)
I. Obtain ρ′d from (147), and hence obtain ρd ≡ ρ′d + ρref
d ;

J. Obtain all remaining quantities required at the lower and upper boundaries from the proce-
dure of section 7.8.
v. End NONLINEAR INNER LOOP
4. End OUTER LOOP.
(n+1) (n+1)
5. Apply the mass fixer to ρd (for δρd = 1) and the moisture conservation fixer to mX (and other tracers
as required).
6. Set F n+1 = F (n+1) for F = u, v, w, η̇, θvd , ρd , mX , ρY and π.

41 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

12 Reduced equation sets

12.1 Shallow-water model

The shallow-water equations are obtained by:


1. adopting the appropriate shallow-atmosphere coordinate system (either Cartesian, spherical or spheroidal);
2. making the equations dry, isentropic and hydrostatic, i.e. setting mX = 0, θ = θvd = constant and
Dw/Dt = 0;
3. integrating the hydrostatic equation down from ξ3 = h + hs , where h is the depth of the fluid and hs is the
height of the underlying orography, to some height ξ3 , to obtain an expression for π in terms of ξ3 , h and
hs ;
4. substituting the expression for π into the momentum equations and (after making a further slight approxi-
mation in the case of the spheroidal system that amounts to neglecting the variation of the pressure with
height) noting that if u and v are initially independent of height they will remain so;
5. integrating the (simplified) continuity equation (which since θ = constant is now effectively an equation for
π) from ξ3 = hs where w = Dhs /Dt to ξ3 = h + hs to obtain a prognostic equation for h (after equating
w (h + hs ) with D (h + hs ) /Dt) in terms of the height independent horizontal wind components.
The basic equations are therefore:
Du
= −2Ω × u − ∇ (gh) − ∇ (ghs ) , (214)
Dt

Dh
+ h∇.u = 0. (215)
Dt
See (author?) [26] for a brief discussion of the non-spherical aspects of these equations.
Applying the discretization procedure of this document to those equations results (in the spherical case) in
the shallow-water model formulation given by (author?) [23] (which is an evolution of an earlier discretization
presented by (author?) [32]2 .

12.2 Vertical slice model

These equations reduce to a 2D vertical slice form by:


1. adopting the Cartesian coordinate system;
2. replacing terms of the form δy z (namely that in the v-momentum equation, (69), and that in the equation for
η̇, (85)) by a constant, corresponding to the slope of the assumed orography in the y-direction (a non-zero
value of this constant is required to allow for the possibility of imposing a steady, geostrophically balanced
reference state with mean advection in the x-direction); and
3. neglecting all remaining derivatives in y.
The resulting equations are straightforward reductions of the full three-dimensional ones and so are not given
here. The formulation together with results are given in (author?) [10]3 .

2 Links to internal documentation of the code and to where the code itself is, can be found at
http://www-nwp/~ frmz/sw_model/sw_model_explained.html
3 Some internal documentation of the code can be found at http://www-nwp/ fra25/vertical_slice_Results_homepage.html and
~
the code itself at ˜fra25/Documents/Programs/VSEG/src

42 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

A The rotated spherical polar coordinate system

The rotated pole procedure is the same for shallow and deep spherical models but it is not applicable to
spheroidal models (or any other formulations that do not assume the spherical geopotential approximation).

A.1 Definition of the rotation

The north pole of the rotated spherical polar system is placed at the point that has latitude φp and longitude λp
in the geographical (non-rotated system). Longitude λ in the rotated system is chosen so that the geographical
north pole has λ = 0. Latitude in the rotated system is denoted φ.

A.2 The Earth’s rotation vector in the rotated system

Simple geometry shows that, in the rotated system, the geographical north pole has latitude φp . Let I, J, K be
unit vectors in a geocentric Cartesian system, K being aligned with the rotated pole and I lying in the (rotated)
meridional plane that contains the geographical north pole (at which λ = 0). Then the Earth’s rotation vector Ω
has no J component and at all times may be written in terms of I and K (independently of λp ) as:

Ω = Ω (I cos φp + K sin φp ) . (216)

A.3 The Coriolis terms in the rotated system

Let i, j, k be the unit vector triad at the point (λ, φ, r) in the rotated system. In terms of I, J, K we have the
familiar relations
i = −I sin λ + J cos λ, (217)

j = − sin φ (I cos λ + J sin λ) + K cos φ, (218)

k = cos φ (I cos λ + J sin λ) + K sin φ. (219)


Define the components of 2Ω in the rotated (λ, φ, r) system as

2Ω = f1 i + f2 j + f3 k. (220)

Then (applying (216) and (217)-(219) in (220))

f1 ≡ 2Ω · i = −2Ω cos φp sin λ. (221)

f2 ≡ 2Ω · j = 2Ω (sin φp cos φ − cos φp sin φ cos λ) . (222)

f3 ≡ 2Ω · k = 2Ω (sin φp sin φ + cos φp cos φ cos λ) . (223)

With the velocity field represented in the rotated system as

u = ui + vj + wk, (224)

it then follows from (220)-(223) that the term −2Ω×u, which is required for the right-hand side of the momentum
equation, takes the form
−2Ω × u = − (f1 i + f2 j + f3 k) × (ui + vj + wk) , (225)
i.e.
−2Ω × u = (f3 v − f2 w) i + (f1 w − f3 u) j + (f2 u − f1 v) k. (226)

43 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

A.4 Transforming from the non-rotated system to the rotated system

An arbitrary point whose geographical longitude and latitude are (λa , φa ) [the subscripts a may be construed as
indicating “actual” longitude and latitude] has longitude and latitude (λ, φ) in the rotated coordinate system that
are given by:
cos φ cos λ = − cos φa cos (λa − λp ) sin φp + sin φa cos φp , (227)

cos φ sin λ = − cos φa sin (λa − λp ) , (228)

sin φ = sin φa sin φp + cos φa cos (λa − λp ) cos φp . (229)


If the velocity components at (λa , φa ) are (ua , va ) in the non-rotated system, the corresponding components in
the rotated system, (u, v), may be expressed as

u = ua cos (ROT ) + va sin (ROT ) , (230)

v = va cos (ROT ) − ua sin (ROT ) , (231)


where
cos (ROT ) = − cos λ cos (λa − λp ) − sin λ sin (λa − λp ) sin φp , (232)

sin (ROT ) = cos λ sin φa sin (λa − λp ) − sin λ [cos φa cos φp + sin φa sin φp cos (λa − λp )] . (233)
Eq. (232) may be obtained by constructing i · ia , and (233) by constructing i · ja , where ia and ja are the respec-
tive zonal and meridional unit vectors in the geographical system. Both (232) and (233) are applicable even at
the poles of the rotated system.
Notes:
1. Eqs. (227)-(232) result from the equations of section 2.1 of the Joy upon noting that: the quantities λI and
φJ therein are related to λp and φp by φJ = π/2 − φp and λI = λp − π; and the quantities λ0 and φ0 therein
correspond respectively to λp and φp . Eq. (233) was not given in section 2.1 of the Joy; see note 4, below.
2. Eqs. (227)-(233) give a null transformation (i.e. λ = λa , φ = φa , u = ua , v = va ) when both λp = π and
φp = π/2.
3. The rotated system used in test case 2 of (author?) [27] (defined by the angle α) can be obtained from
(227)-(234) by reversing the sign of the velocity scaling (u0 in (author?) [27]) and setting φp = π/2 − α (λp
is arbitrary).
4. An alternative expression for sin (ROT ), which was given (and derived) in section 2.1 of the Joy, is

sin (λa − λp ) cos φp


sin (ROT ) = . (234)
cos φ

The right-hand side of (234) is somewhat simpler than that of (233), but it is indeterminate at the poles of
the rotated system because both sin (λa − λp ) and cos φ vanish there. However, at the poles of the rotated
system, the procedure of section 8 could be used to evaluate v from the surrounding values of u. This
approach might be competitive in terms of accuracy and consistency with use of (233).

A.5 Transforming from the rotated system to the non-rotated system

The reverse formulae, readily obtained from (227)-(229) and (230)-(231), are:

cos φa cos (λa − λp ) = − cos φ cos λ sin φp + sin φ cos φp , (235)

cos φa sin (λa − λp ) = − cos φ sin λ, (236)

sin φa = sin φ sin φp + cos φ cos λ cos φp . (237)

44 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

ua = u cos (ROT ) − v sin (ROT ) , (238)

va = v cos (ROT ) + u sin (ROT ) , (239)


with cos (ROT ) and sin (ROT ) given by (232) and (233) respectively.
Notes:
1. This procedure is applicable even at the poles of the rotated system.
2. If (234), rather than (233), were to be used to calculate sin (ROT ) [see note 4 of section (A.4)] then ua and
va could be evaluated at the poles of the rotated system by the following method:
(i) At the North pole
ua = (ua )N P = −vN P sin λN P , (240)

va = (va )N P = +vN P cos λN P , (241)


where vN P and λN P are, respectively, the North polar wind speed and direction evaluated using the
procedure of section 8.
(ii) At the South pole
ua = (ua )SP = +vSP sin λSP , (242)

va = (va )SP = +vSP cos λSP , (243)


where vSP and λSP are, respectively, the South polar wind speed and direction evaluated using the pro-
cedure of section 8.

A.6 Rotation matrix elements and metric factors

These take the same form as in the non-rotated system, but in terms of latitude and longitude in the rotated
system.

45 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

B Coordinate systems

B.1 Similar Oblate Spheroidal coordinate system

B.1.1 System definition

The system is defined by the following.


The coordinates are:
ξ1 = λ, (244)

ξ2 = ϕ, (245)

ξ3 = r. (246)

These coordinates are supplemented by an auxiliary angle, the geographic latitude φ. This is the angle at which
the normal to the oblate spheroid is inclined to the equatorial plane. It is important to note that it is distinct from
the latitudinal coordinate ϕ. In particular, it depends (weakly) on the vertical coordinate r and is given by the
implicit relation
 " 
 2  2
1/2 #2ǫ2 −1
sin ϕ r 1−ǫ
sin2 φ = 1 − cos2 ϕ cos2 ϕ + |sin φ| , (247)
 (1 − ǫ2 ) a 1 − ǫ2 sin2 φ 

which can be solved iteratively in the form


 " 
 2  2
1/2 #2ǫ2 −1
sin ϕ r 1 − ǫ
sin2 φn+1 = 1 − cos2 ϕ cos2 ϕ + |sin φn | , (248)
 (1 − ǫ2 ) a 1 − ǫ2 sin2 φn 
q
2
with the sign of φ and φn chosen to be the same as the sign of ϕ. Here ǫ ≡ 1 − (Lminor /Lmajor ) is the
eccentricity of the family of similar ellipses sharing the same ratio Lminor /Lmajor of semi-minor axis Lminor to
semi-major axis Lmajor .
The metric factors are: −1/2
h1 = hλ ≡ r cos φ 1 − ǫ2 sin2 φ , (249)
 
sin φ cos φ −1/2
h2 = hϕ ≡ r 1 − ǫ2 sin2 φ , (250)
sin ϕ cos ϕ
1/2
h3 = hr ≡ 1 − ǫ2 sin2 φ . (251)

B.1.2 Grad, Div and Curl operators

For a generic scalar F and a generic vector G = (G1 , G2 , G3 ), the component forms of ∇F , ∇.G and ∇ × G
are given respectively by:  
1 ∂F 1 ∂F 1 ∂F
∇F = , , , (252)
hλ ∂λ hϕ ∂ϕ hr ∂r
 
1 ∂ ∂ ∂
∇·G= (hϕ hr G1 ) + (hλ hr G2 ) + (hλ hϕ G3 ) , (253)
hλ hϕ hr ∂λ ∂ϕ ∂r
and
 
1 ∂ ∂
(∇ × G)λ = (hr G3 ) − (hϕ G2 ) , (254)
hϕ hr ∂ϕ ∂r
 
1 ∂ ∂
(∇ × G)ϕ = (hλ G1 ) − (hr G3 ) , (255)
hr hλ ∂r ∂λ
 
1 ∂ ∂
(∇ × G)r = (hϕ G2 ) − (hλ G1 ) . (256)
hλ hϕ ∂λ ∂ϕ

46 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Due to the length and complexity of hϕ , the metric factors hλ , hϕ and hr have not been explicitly substituted into
the above expressions. Their specific forms though are given by (249), (250) and (251).
Notes:
1. Since they have not been given elsewhere, the components of the curl of G in general orthogonal coordi-
nates are:
 
1 ∂ ∂
(∇ × G)ξ1 = (h3 G3 ) − (h2 G2 ) , (257)
h2 h3 ∂ξ2 ∂ξ3
 
1 ∂ ∂
(∇ × G)ξ2 = (h1 G1 ) − (h3 G3 ) , (258)
h3 h1 ∂ξ3 ∂ξ1
 
1 ∂ ∂
(∇ × G)ξ3 = (h2 G2 ) − (h1 G1 ) . (259)
h1 h2 ∂ξ1 ∂ξ2

B.1.3 Coriolis terms

Noting that in the spheroidal coordinate system a rotated pole option is not available, the Earth’s rotation vector
has the same form as that for the spherical polar coordinate system (see appendix A.3) but with φp ≡ π/2, so
that f1 = 0. Therefore, the Coriolis terms are:

−2 (Ω × u)u = f3 v − f2 w, (260)

−2 (Ω × u)v = −f3 u, (261)

−2 (Ω × u)w = f2 u, (262)
where
f2 = 2Ω cos φ, (263)

f3 = 2Ω sin φ. (264)

Notes:
1. There is an implicit (but weak) dependency of the Coriolis parameters on the vertical coordinate, r, through
the dependency of the geographic latitude φ on r.

B.1.4 Gravity

The gravitational acceleration, g, is given by


ga  a 2
g= 1/2 , (265)
1 − ǫ2 sin2 φ r

where ga is its surface, equatorial value, i.e. the value of gravity at r = a and φ = 0.
Notes:
1. In deriving (265) the gravitational potential has been assumed to decay as the inverse of the vertical
coordinate r. However, due to the dependency of the geographic latitude φ on r, the resulting gravity does
not decay exactly as the inverse of r2 but slightly slower.
2. The area integral of g over a spheroid of equatorial radius r is not a constant, i.e. the result depends on r.
This is in contrast to the case for spherical coordinates (both the deep and shallow cases, see appendices
B.2.4 and B.3.4). This is because r−1 is not a harmonic function, i.e. ∇2 r−1 6= 0. This behaviour is
to be expected since the spheroidal coordinates make implicit allowance for the centrifugal effects of the
planet’s rotation via the assumed shape of the geopotential surfaces.

47 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

B.1.5 The rotation matrix

The elements of the rotation matrix, M, are:


M11 = cos (λA − λD ) , (266)

M12 = sin φD sin (λA − λD ) , (267)

M13 = − cos φD sin (λA − λD ) , (268)

M21 = − sin φA sin (λA − λD ) , (269)

M22 = cos φA cos φD + sin φA sin φD cos (λA − λD ) , (270)

M23 = cos φA sin φD − sin φA cos φD cos (λA − λD ) , (271)

M31 = cos φA sin (λA − λD ) , (272)

M32 = sin φA cos φD − cos φA sin φD cos (λA − λD ) , (273)

M33 = sin φA sin φD + cos φA cos φD cos (λA − λD ) . (274)

Notes:
1. There is an implicit dependency of the elements of the rotation matrix on the vertical coordinate, r, through
the dependency of the geographic latitude φ on r.

B.2 Spherical polar coordinate system

B.2.1 System definition

The system is defined by the following.


The coordinates are:
ξ1 = λ, (275)

ξ2 = φ, (276)

ξ3 = r. (277)

The metric factors are:


h1 = hλ ≡ r cos φ, (278)

h2 = hφ ≡ r, (279)

h3 = hr ≡ 1. (280)

Notes:
1. For spherical coordinates the latitudinal coordinate and the geographic latitude are equivalent and are
both independent of the vertical coordinate (in contradistinction to the similar oblate spheroidal coordinate
system) and are here both denoted by φ.
2. We could/should also consider the use of µ ≡ sin φ for ξ2 . (author?) [20] however argue that the advan-
tages of using µ over φ are small, amounting to the more accurate evaluation of area. But they go on to
note that the difference then is numerically very small.

48 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

B.2.2 Grad, Div and Curl operators

For a generic scalar F and a generic vector G = (G1 , G2 , G3 ), the component forms of ∇F , ∇.G and ∇ × G
are given respectively by:  
1 ∂F 1 ∂F ∂F
∇F = , , , (281)
r cos φ ∂λ r ∂φ ∂r
 
1 ∂ ∂ ∂ 
∇·G= 2 (rG1 ) + (rG2 cos φ) + r2 G3 cos φ , (282)
r cos φ ∂λ ∂φ ∂r
and
 
1 ∂ ∂
(∇ × G)λ = (G3 ) − (rG2 ) , (283)
r ∂φ ∂r
 
1 ∂ ∂
(∇ × G)φ = (r cos φG1 ) − (G3 ) , (284)
r cos φ ∂r ∂λ
 
1 ∂ ∂
(∇ × G)r = (rG2 ) − (r cos φG1 ) . (285)
r2 cos φ ∂λ ∂φ

B.2.3 Coriolis terms

From appendix A,
−2 (Ω × u)u = f3 v − f2 w, (286)

−2 (Ω × u)v = f1 w − f3 u, (287)

−2 (Ω × u)w = f2 u − f1 v, (288)
where f1 , f2 and f3 are defined respectively by (221), (222) and (223).

B.2.4 Gravity

The gravitational acceleration, g, is given by


 a 2
g = ga , (289)
r
where ga is its value at the height r = a which would normally be taken as e.g. mean sea level. This form
ensures that the area integral of g over a sphere of radius r is constant (independent of r), which means that
the enclosed mass is constant, as it should be if the mass of the atmosphere itself is neglected.

B.2.5 The rotation matrix

The elements of the rotation matrix, M, are:

M11 = cos (λA − λD ) , (290)

M12 = sin φD sin (λA − λD ) , (291)

M13 = − cos φD sin (λA − λD ) , (292)

M21 = − sin φA sin (λA − λD ) , (293)

M22 = cos φA cos φD + sin φA sin φD cos (λA − λD ) , (294)

M23 = cos φA sin φD − sin φA cos φD cos (λA − λD ) , (295)

49 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

M31 = cos φA sin (λA − λD ) , (296)

M32 = sin φA cos φD − cos φA sin φD cos (λA − λD ) , (297)

M33 = sin φA sin φD + cos φA cos φD cos (λA − λD ) . (298)

B.3 Shallow-atmosphere version of the spherical polar coordinates

B.3.1 System definition

The system is defined by the following.


The coordinates are:
ξ1 = λ, (299)

ξ2 = φ, (300)

ξ3 = z. (301)

The metric factors are:


h1 = hλ ≡ a cos φ, (302)

h2 = hφ ≡ a, (303)

h3 = hz ≡ 1. (304)

Notes:
1. The shallow atmosphere system cannot be considered as a submanifold of 3D Euclidean space. For
example, latitude and longitude are used as coordinates, but the curvature of great circles is neglected;
and all spheres concentric with the (spherical) Earth have the same radius. Whether its non-Euclidean
character can be formalized in terms of classical Riemannian geometry is not clear. It seems quite proba-
ble that the system has a hybrid character, a Cartesian vertical coordinate being grafted onto a spherical
shell. However, shallow atmosphere space is a metric space in so far as the metric factors are defined by
(302)-(304) and a distance measure ds can be defined by (21) with (299)-(304).

B.3.2 Grad, Div and Curl operators

For a generic scalar F and a generic vector G = (G1 , G2 , G3 ), the component forms of ∇F , ∇.G and ∇ × G
are given respectively by:  
1 ∂F 1 ∂F ∂F
∇F = , , , (305)
a cos φ ∂λ a ∂φ ∂z
 
1 ∂ ∂ ∂
∇·G= (G1 ) + (G2 cos φ) + (aG3 cos φ) , (306)
a cos φ ∂λ ∂φ ∂z
and
 
1 ∂ ∂
(∇ × G)λ = (G3 ) − (aG2 ) , (307)
a ∂φ ∂z
 
1 ∂ ∂
(∇ × G)φ = (a cos φG1 ) − (G3 ) , (308)
a cos φ ∂z ∂λ
 
1 ∂ ∂
(∇ × G)z = (G2 ) − (cos φG1 ) . (309)
a cos φ ∂λ ∂φ

50 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

B.3.3 Coriolis terms

Since in the shallow-atmosphere approximation the Earth’s rotation vector is, in the notation of appendix A,

Ω = 0i + 0j + Ω sin φa k, (310)

(where sin φa is given by (237)) it follows from appendix A that:

−2 (Ω × u)u = f3 v, (311)

−2 (Ω × u)v = −f3 u, (312)

−2 (Ω × u)w = 0, (313)
where f3 = 2Ω sin φa .

B.3.4 Gravity

The gravitational acceleration, g, is given by


g = ga , (314)
where ga is its value at the height r = a which would normally be taken as e.g. mean sea level. This form
ensures that the area integral of g over a sphere of radius a is constant (independent of z), which means that
the enclosed mass is constant, as it should be if the mass of the atmosphere itself is neglected.

B.3.5 The rotation matrix

The elements of the rotation matrix, M, are:


cos φA cos φD + (1 + sin φA sin φD ) cos (λA − λD )
M11 = , (315)
(1 + cos α)

(sin φA + sin φD ) sin (λA − λD )


M12 = , (316)
(1 + cos α)

M13 = 0, (317)

(sin φA + sin φD ) sin (λA − λD )


M21 = − , (318)
(1 + cos α)
cos φA cos φD + (1 + sin φA sin φD ) cos (λA − λD )
M22 = , (319)
(1 + cos α)

M23 = 0, (320)

M31 = 0, (321)

M32 = 0, (322)

M33 = 1. (323)
In the above
cos α ≡ sin φA sin φD + cos φA cos φD cos (λA − λD ) . (324)

51 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

B.4 f -F plane Cartesian system

B.4.1 System definition

The system is defined by the following.


The coordinates are:
ξ1 = x, (325)

ξ2 = y, (326)

ξ3 = z. (327)

The metric factors are:


h1 = hx ≡ 1, (328)

h2 = hy ≡ 1, (329)

h3 = hz ≡ 1. (330)

B.4.2 Grad, Div and Curl operators

For a generic scalar F and a generic vector G = (G1 , G2 , G3 ), the component forms of ∇F , ∇.G and ∇ × G
are given respectively by:  
∂F ∂F ∂F
∇F = , , , (331)
∂x ∂y ∂z
∂G1 ∂G2 ∂G3
∇·G= + + , (332)
∂x ∂y ∂z
and
∂G3 ∂G2
(∇ × G)x = − , (333)
∂y ∂z
∂G1 ∂G3
(∇ × G)y = − , (334)
∂z ∂x
∂G2 ∂G1
(∇ × G)z = − . (335)
∂x ∂y

B.4.3 Coriolis terms

The Earth’s rotation vector is:


Ω = Ω (0, cos φ0 , sin φ0 ) , (336)
where φ0 is the latitude of the f -F plane. It follows that:

−2 (Ω × u)u = f0 v − F0 w, (337)

−2 (Ω × u)v = −f0 u, (338)

−2 (Ω × u)w = F0 u, (339)
where
f0 ≡ 2Ω sin φ0 , (340)
and
F0 ≡ 2Ω cos φ0 . (341)

52 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

An f -plane Cartesian system is obtained by further approximating the Earth’s rotation vector by

Ω = Ω (0, 0, sin φ0 ) , (342)

so that the terms involving F0 in (337)-(339) are then absent.

B.4.4 Gravity

Gravity g is now, for consistency, a constant independent of height (as the spheroids/spheres enclosing the
Earth’s mass have degenerated to flat surfaces, z =constant).

B.4.5 The rotation matrix

The elements of the rotation matrix, M, are:

Mij = δij , i = 1, 2, 3, j = 1, 2, 3, (343)

and δij is the Kronecker delta.

53 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

C Definitions of averaging and difference operators

In what follows, the following grid interval definitions hold:

(∆ξ1 )l ≡ ξ1 (l + 1/2) − ξ1 (l − 1/2) ≡ (ξ1 )l+ 1 − (ξ1 )l− 1 , (344)


2 2

(∆ξ2 )l ≡ ξ2 (l + 1/2) − ξ2 (l − 1/2) ≡ (ξ2 )l+ 1 − (ξ2 )l− 1 , (345)


2 2

∆ηl ≡ η (l + 1/2) − η (l − 1/2) ≡ ηl+ 21 − ηl− 21 , (346)


where the grid index l is a positive integral multiple of 1/2. For further details of the grid structure see section 4
of The Joy.
ξ1 ξ2 ξ1 ξ2 ξ2 ξ1 ξ ξ
• Horizontal averaging operators ( ) , ( ) , ( ) ,() , h i 1 and h i 2 :
" # " #
h iξ1  ξ  (ξ1 )i+ 1 − (ξ1 )i (ξ1 )i − (ξ1 )i− 1
1
F (ξ1 )i , (ξ2 )j ≡ F = 2
Fi− 12 ,j + 2
Fi+ 12 ,j , (347)
i,j (∆ξ1 )i (∆ξ1 )i
" # " #
h iξ2  ξ  (ξ2 )j+ 1 − (ξ2 )j (ξ2 )j − (ξ2 )j− 1
2
F (ξ1 )i , (ξ2 )j ≡ F = 2
Fi,j− 12 + 2
Fi,j+ 12 , (348)
i,j (∆ξ2 )j (∆ξ2 )j

" #
h iξ1 ξ2  ξξ   ξ1
ξ2
1 2
F (ξ1 )i , (ξ2 )j ≡ F = F
i,j
i,j
" #
(ξ2 )j − (ξ2 )j− 1
= 2
×
(∆ξ2 )j
(" # " # )
(ξ1 )i+ 1 − (ξ1 )i (ξ1 )i − (ξ1 )i− 1
2
Fi− 21 ,j+ 12 + 2
Fi+ 21 ,j+ 12
(∆ξ1 )i (∆ξ1 )i
" #
(ξ2 )j+ 1 − (ξ2 )j
+ 2
×
(∆ξ2 )j
(" # " # )
(ξ1 )i+ 1 − (ξ1 )i (ξ1 )i − (ξ1 )i− 1
2
Fi− 21 ,j− 12 + 2
Fi+ 21 ,j− 12 ,
(∆ξ1 )i (∆ξ1 )i
(349)

" #
h iξ2 ξ1  ξ2 ξ1
  ξ2
ξ1
F (ξ1 )i , (ξ2 )j ≡ F = F
i,j
i,j
" #
(ξ1 )i − (ξ1 )i− 1
= 2
×
(∆ξ1 )i
(" # " # )
(ξ2 )j+ 1 − (ξ2 )j (ξ2 )j − (ξ2 )j− 1
2
Fi+ 12 ,j− 12 + 2
Fi+ 12 ,j+ 12
(∆ξ2 )j (∆ξ2 )j
" #
(ξ1 )i+ 1 − (ξ1 )i
2
×
(∆ξ1 )i
(" # " # )
(ξ2 )j+ 1 − (ξ2 )j (ξ2 )j − (ξ2 )j− 1
2
Fi− 12 ,j− 12 + 2
Fi− 21 ,j+ 12
(∆ξ2 )j (∆ξ2 )j
h iξ1 ξ2
≡ F (ξ1 )i , (ξ2 )j , (350)

D h iEξ1   1 
ξ
F (ξ1 )i , (ξ2 )j ≡ hF i 1 = Fi− 21 ,j + Fi+ 21 ,j , (351)
i,j 2

54 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

D h iEξ2   1 
ξ
F (ξ1 )i , (ξ2 )j ≡ hF i 2 = Fi,j− 21 + Fi,j+ 21 , (352)
i,j 2
where i and j are the horizontal grid indices in the ξ1 - and ξ2 -directions respectively. i and j are both
positive, integral multiples of 1/2. (ξ1 )i denotes the value of ξ1 at the ith grid point in the ξ1 -direction and
(ξ2 )j denotes the value of ξ2 at the jth grid point in the ξ2 -direction. For the general variable, F , Fi,j here
denotes evaluation of F at the (i, j, k) grid point where, for clarity, the k subscript has been dropped from
all the horizontal operators since for these operators it does not vary.
η η
• Vertical averaging operator ( ) and h i :
       
η
 η ηk − ηk− 21 F ηk+ 21 + ηk+ 12 − ηk F ηk− 21
F (ηk ) ≡ F =
k ηk+ 21 − ηk− 12
   
ηk − ηk− 12 Fk+ 21 + ηk+ 12 − ηk Fk− 12
≡ , (353)
ηk+ 21 − ηk− 12

η η 1 
hF (ηk )i ≡ (hF i )k = Fk+ 12 + Fk− 12 , (354)
2
where k is the vertical grid index and is a positive, integral multiple of 1/2. For the general variable, F , Fk
here denotes evaluation of F at the (i, j, k) grid point. For clarity, the i, j subscripts have been dropped
from F in the definition of the vertical operators since they remain unchanged for these operators.
• Horizontal differencing operators δξ1 ( ), δξ2 ( ):
h i h i
h i F (ξ1 )i+ 1 , (ξ2 )j − F (ξ1 )i− 1 , (ξ2 )j Fi+ 12 ,j − Fi− 21 ,j
2 2
δξ1 F (ξ1 )i , (ξ2 )j ≡ (δξ1 F )i,j = ≡ , (355)
(ξ1 )i+ 1 − (ξ1 )i− 1 (∆ξ1 )i
2 2

h i h i
h i F (ξ1 )i , (ξ2 )j+ 1 − F (ξ1 )i , (ξ2 )j− 1 Fi,j+ 12 − Fi,j− 21
2 2
δξ2 F (ξ1 )i , (ξ2 )j ≡ (δξ2 F )i,j = ≡ . (356)
(ξ2 )j+ 1 − (ξ2 )j− 1 (∆ξ2 )j
2 2

• Vertical differencing operators δη ( ) and δ2η ( ):


   
F ηk+ 12 − F ηk− 21 Fk+ 12 − Fk− 12
δη F (ηk ) ≡ (δη F )k = ≡ , (357)
ηk+ 21 − ηk− 21 ∆ηk

F (ηk+1 ) − F (ηk−1 ) Fk+1 − Fk−1


δ2η F (ηk ) ≡ (δ2η F )k = ≡ . (358)
ηk+1 − ηk−1 ∆ηk+ 21 + ∆ηk− 12

• The discrete divergence operator applied to a vector Gu where G is stored at ρ points, and whose contin-
uous form is given by (39), is
1 n h ξ1
i h ξ2
i
ξ ξ
e · (Gu)
∇ = δξ1 hξ21 hξ31 (δη ξ3 ) 1 G u + δξ2 hξ32 hξ12 (δη ξ3 ) 2 G v
h1 h2 h3 δη ξ3
h η
io
+δη hη1 hη2 hη3 (δη ξ3 )η G η̇ . (359)

where the discrete derivatives are evaluated at i − 12 , j − 21 , k − 1
2 .
Notes:
1. Since for the averaging operators both the originating and target grids are known and fixed in time, the
weights can be precomputed and stored.
2. A consequence of note 1 is that use of cubic averaging in place of linear is a viable option. Whilst in a
local algorithmic sense it is more expensive, within the model as a whole the additional expense is likely
to be negligible.

55 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

3. Again, because the target points are known, both for bi- and tri-linear averaging and, more especially, for
bi- and tri-cubic averaging, it might be more efficient to apply the cascade approach (though see note 4
below): specifically, consider bi-linear averaging, instead of locally bi-linearly averaging on a grid point by
grid point basis, it is cheaper to linearly average the field in one direction and then linearly average the
resulting field in the other direction. This save duplication of calculations. The saving increases with both
the order of the averaging and also the number of dimensions.
4. Care needs to be taken when the averaging stencil spans the pole and the grid is non-uniform. For one-
dimensional averaging in the latitudinal direction, the originating points on the “other side” of the pole will
not in general coincide with grid points. It is then proposed that the values of the field at these points are
obtained by appropriate averaging in the longitudinal direction of neighbouring grid point values. A picture
ξ1 ξ2
would probably help here. For double horizontal averages of the form F this procedure amounts to
ensuring that the averaging in the ξ1 direction is done first with appropriate weights for the points on the
“other side” of the pole. This aspect would preclude application of the cascade approach outlined in note
3 for near-polar points.

56 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

D Interpolation

Interpolation is needed to evaluate various quantities at the departure points. There are two aspects to this:
how the interpolation is to be done and, having determined the departure point, how to evaluate in which grid
box that departure point lies. These two issues are discussed in the following sections.

D.1 Interpolation scheme

• Linear interpolation is used in the evaluation of the departure points.


• For the rest of the model Cubic Lagrange interpolation is used in the horizontal for all variables.
• In the vertical: the velocity components are interpolated using Cubic Lagrange; potential temperature uses
a Cubic Hermite scheme (to address the tropical tropopause warm bias); and the moisture fields and other
tracers use Quintic Lagrange. It is planned to replace the Quintic Lagrange with Cubic Hermite at GA7.
• As the bottom or top of the model is approached the order of the scheme has to be reduced as the number
of available points reduces.
– For variables co-located with w and θvd linear interpolation is used in the lowermost (k ≤ 1) and
uppermost layers (k ≥ N − 1). Using the surface values of these variables, cubic interpolation can
be applied in the layers 1 < k ≤ 2 and N − 2 ≤ k < N − 1, and if required quintic in the layers above
and below those, respectively.
– For other points (stored at half-levels - those whose vertical level coincides with that of the dry density
ρd ) constant interpolation has been used in idealized tests (such as those of (author?) [28]) but in
the more operational versions of the model linear extrapolation is used (this is more by accident than
anything but has been found to be beneficial for mass conservation). These two flavours are used
in the lowermost (k ≤ 1/2) and uppermost (k ≥ N − 1/2) layers. Linear interpolation is used in the
layers 1/2 < k ≤ 3/2 and N − 3/2 ≤ k < N − 1/2. Cubic interpolation is applied for 3/2 < k ≤ 5/2
and N − 5/2 ≤ k < N − 3/2 and if required quintic in the layers above and below those, respectively.
– An exception to this description of how points stored at half-level are interpolated, are the u- and v-
sources in the w equation. Although these are stored on half-levels, the fields are extended to include
the bottom and top levels and therefore they span the whole domain. As a result they are interpolated
in the same way as if they were co-located with w. The extension of the fields is achieved by copying
level 1/2 values into level 0 and level N − 1/2 values into level N . As a result the nominally linear
interpolation in the lowermost and uppermost layers is in fact equivalent to constant extrapolation in
the vertical.
– There is also an option in the model to apply linear interpolation for interpolation to departure points
lying in both the two lowest layers. This is because for many of the tracers, specifically potential
temperature and the moisture fields, their value at the surface, F (0) say, is (based on a switch in
the model) constrained to be equal to the first interior value, i.e. F (0) = F (1). A cubic is not then
a natural fit to such a profile as it does not respect the assumed constancy of F in the lowest layer.
Applying cubic interpolation to the values F (0), F (1), F (2), and F (3) (to find a departure value
between levels 1 and 2) can therefore lead to a systematic error in the interpolated value. Linear
interpolation can in this case provide a better estimate.
• For SLICE the Piecewise Parabolic Method of (author?) [3] is used in all directions.
Notes:
1. For a one-off cubic Lagrange interpolation, Neville’s formula (see section 3.1 of (author?) [11]) is more
efficient than a straightforward implementation of the Lagrange formula. However, given that the originating
grid is known and fixed in time there may be a more efficient approach since Neville’s formula will inevitably
be recomputing various quantities.
2. Care needs to be taken when the interpolation stencil spans the pole and the grid is non-uniform. For
interpolation in the latitudinal direction, the originating points on the “other side” of the pole will not in
general coincide with grid points. It is then proposed that the values of the field at these points are
obtained by appropriate interpolation in the longitudinal direction of neighbouring grid point values. This

57 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

procedure amounts to ensuring that interpolation in the ξ1 direction is done first. [See (author?) [7] for a
discussion of the continuity issues near the poles.]

D.1.1 Interpolating a vector

The components of a vector are treated simply as scalars but with care taken to flip the sign of the horizontal
components, e.g. u and v, when they are interpolated across the poles.

D.2 Horizontal search algorithm

When the horizontal grid is stretched, the following search algorithm is used where x (i) is used to represent a
generic one-dimensional grid.
Let ∆xmin denote the smallest adjacent grid point separation in the generic x-direction, i.e.
∆xmin ≡ min [x (i + 1/2) − x (i) , x (i + 1) − x (i + 1/2)] . (360)
i=0,...,I−1

Then define an auxiliary grid χ (j), j = 1, 2, ..., J where χ (1) = x (0), χ (j) = χ (j − 1) + ∆xmin = x (0) +
(j − 1) ∆xmin for j = 2, ..., J and J is the smallest integer such that χ (J) ≥ x (0) + Lx , i.e.
 
Lx
J = 2 + Int , (361)
∆xmin
where Int denotes “the integer part of”. Then given a departure point with coordinate x = X, X satisfies
χ (jD + 1) ≤ X < χ (jD + 2) , (362)
where  
X − x (0)
jD ≡ Int . (363)
∆xmin
+
Use of a predetermined look-up table then allows determination of the values i−
D and iD (which are both integral
multiples of 1/2) such that  
x i−
D − 1/2 ≤ χ (jD + 1) < x iD ,

(364)
and  
x i+ +
D − 1/2 ≤ χ (jD + 2) < x iD . (365)
Let iD be the integral multiple of 1/2 such that
x (iD − 1/2) ≤ X < x (iD ) . (366)
i−
IfD = i+
Dthen iD = i−
D= i+
D. However, if i− +
D = iD − 1/2 then the exact interval in which X lies is unknown and
a further test must be made to determine iD , namely
 
i− −
D , if X < x iD  .
iD = (367)
i+ −
D , if X ≥ x iD

Notes:
1. There may be numerical advantages to making ∆xmin a little smaller than the actual minimum grid sepa-
ration, i.e. to replacing (360) by
∆xmin ≡ (1 − ε) min [x (i + 1/2) − x (i) , x (i) − x (i − 1/2)] , (368)
i=1,...,I

where ε is some small parameter.

D.3 Vertical search algorithm

The vertical search algorithm, which is always performed since this direction is always stretched, is a modifica-
tion of the originally implemented bisection scheme. The scheme works by starting at the current vertical level
and searching either upwards or downwards one level at a time until the required grid location is found. Although
in theory this is an expensive technique (i.e. it is O(N ) in the worst case) in practice it finds the required level
rapidly and is on average twice as fast as the O(log2 N ) bisection algorithm.

58 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

E Derivation of the polar discretization

To close the discretization for spheroidal and spherical geometries it is necessary to specify v at the two poles.
Additionally, the value of u at the poles is required in the calculation of the polar departure points. Since the
horizontal components of the momentum equation are singular at the two poles, this is done diagnostically,
rather than prognostically. First a vector wind is computed at each pole using the surrounding values of u, and
then u and v are obtained there diagnostically. In what follows, and for simplicity, only horizontal indices are
retained since the procedure is diagnostic and all vertical levels are treated in exactly the same manner.
Here spherical geometry is assumed (and this section is presented assuming that ξ1 ≡ λ and ξ2 ≡ φ). However,
applying the same approximations, the derivation and resulting procedure also hold for spheroidal geometry.
The structure of the grid and associated indexing is shown in Fig. 2 and is a modified version (with (1, L − 1) →
(0, L) and (1, M − 1) → (0, M )) of the “alternative grid” presented in Fig. 4.13 of The Joy. [Note that for the
periodic boundary conditions in the λ-direction, as appropriate to this section, the u-values corresponding to
i = 0 will be identical to those at i = L and therefore do not enter any of the formulae in this section.] In
particular, the S. Pole is at φ = φ0 ≡ −π/2, the N. Pole is at φ = φM ≡ +π/2, and the Greenwich meridian is at
λ = λ0 ≡ 0 (and also at λ = λL ≡ 2π where periodic wrap-around occurs).

v v
j=M
u Π u u Π u
j=M−1/2
v v
j=M−1

v v
j=1
u Π u u Π u
j=1/2
v v
j=0

i=1/2 i=L−1/2
i=0 i=1 i=L−1 i=L
Figure 2: Storage and indexing structure of the horizontal grid.

E.1 South pole

Let the vector wind field in the vicinity of the S. Pole be that of a solid-body rotation about an axis inclined at
an angle α to the polar axis of the coordinate system, where |α| ≤ π/2 (a rotation such that π/2 < |α| ≤ π is
equivalent to one that satisfies |α| < π/2 but pointed in the opposite direction). Thus the functional form of the
wind components is given by
u (λ, φ) = u0 [sin α sin (λ − λSP ) sin φ + cos α cos φ] , (369)

v (λ, φ) = u0 sin α cos (λ − λSP ) , (370)


where λSP and u0 are constants.

59 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Note that solid-body rotation about the polar axis of the coordinate system corresponds to α = 0, whereas
rotation about an equatorial axis corresponds to α = ±π/2. Note also that the assumed functional forms (369)
and (370) only support wavenumber zero and one variations in λ, with higher harmonics suppressed. This
makes the polar-cap representation more isotropic in the horizontal than would otherwise be the case, and
amounts to a highly scale-selective East-West filtering of the wind components over the polar cap.
It is convenient to rewrite (369) - (370) as

u (λ, φ) = uSP cos φ + vSP sin (λ − λSP ) sin φ, (371)

v (λ, φ) = vSP cos (λ − λSP ) , (372)


where
uSP ≡ u0 cos α, vSP ≡ u0 sin α. (373)

Evaluating (371) - (372) at the S. Pole (or more correctly at a latitude infinitesimally close to it), where φ ≡ −π/2,
then gives  π
u λ, − = −vSP sin (λ − λSP ) , (374)
2
 π
v λ, − = vSP cos (λ − λSP ) . (375)
2
Thus the vector wind at the S. Pole (see Fig. 3, as viewed from the Earth’s centre) has speed vSP in direction
λSP relative to the reference longitude λ = λ0 ≡ 0.
ui,0

λ = λi

λi vSP

λ SP λ = λ0 = 0

φ = φ1/2

Figure 3: The vector wind and its u-component at the S. Pole as viewed from the Earth’s centre.

The closest latitude to the S. Pole on which u points are held is φ = φ1/2 . Evaluating (371) at this latitude then
gives
ui, 12 ≡ u|  = u
SP cos φ 12 + vSP sin (λi − λSP ) sin φ 12 , i = 0, 1, ..., L − 1. (376)
λi, φ 1
2

It remains to obtain expressions for uSP , vSP and λSP in terms of ui,1/2 , i = 0, 1, ..., L − 1. If the vector wind in
the vicinity of the S. Pole were indeed that of a solid body rotation, then uSP , vSP and λSP could be determined
from (376) using three of these L equations (the other L − 3 equations would be trivially consistent with these
three). However, the vector wind in the vicinity of the S. Pole is not, in general, that of solid-body rotation, so a
least squares minimization principle is applied to determine uSP , vSP and λSP . To do this, let

u (λ, φ) = uSP cos φ + vSP sin (λ − λSP ) sin φ + ε (λ, φ) , (377)

in the vicinity of the S. Pole, so u (λ, φ) is expressed as a perturbation about the u wind component of a solid-
body rotation - see (371) and (372).

60 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

The wind quantities uSP and vSP , and the orientation angle λSP , are determined by minimizing the contour
integral of the square perturbation ε2 (λ, φ) around the latitude circle φ = φ1/2 closest to the S. Pole, i.e. by
minimizing
Z 2π  
I (ε) = ε2 λ, φ 12 r cos φ 12 dλ
0
Z 2π   XZ
L−1 λi+1/2  
≈ r 12 cos φ 12 ε2 λ, φ 21 dλ = r 21 cos φ 12 ε2 λ, φ 12 dλ
0 i=0 λi−1/2

XZ
L−1 λi+1/2 n   h io2
= r 12 cos φ 12 u λ, φ 12 − uSP cos φ 12 + vSP sin (λ − λSP ) sin φ 12 dλ,
i=0 λi−1/2

(378)

where r at all points around the latitude circle φ = φ1/2 has been approximated by a mean value r1/2 , and
periodicity is assumed in decomposing the integral from 0 to 2π over λ into the sum of integrals from λi−1/2
to λi+1/2 . Integrating over the individual intervals λi−1/2 , λi+1/2 for i = 0, 1, ..., L − 1 using the midpoint rule,
(378) is discretized as
L−1
X n h io2
I (uSP , vSP , λSP ) = r 21 cos φ 12 ∆λi ui, 12 − uSP cos φ 21 + vSP sin (λi − λSP ) sin φ 12 , (379)
i=0

where ∆λi ≡ λi+1/2 − λi−1/2 . I (uSP , vSP , λSP ) is now minimized with respect to the three as-yet-undetermined
parameters uSP , vSP and λSP .
Setting ∂I/∂vSP = 0 yields
L−1
X n h io
∆λi ui, 21 − uSP cos φ 21 + vSP sin (λi − λSP ) sin φ 12 sin (λi − λSP ) = 0, (380)
i=0

i.e.
L−1 L−1
1 X 1 X
uSP cos φ 12 ∆λi sin (λi − λSP ) + vSP sin φ 12 ∆λi sin2 (λi − λSP )
π i=0 π i=0
L−1
1 X
= ∆λi ui, 12 sin (λi − λSP ) , (381)
π i=0

or

2uSP cos φ 21 (E cos λSP − F sin λSP ) + vSP sin φ 21 [1 − C cos (2λSP ) − D sin (2λSP )]
= A cos λSP − B sin λSP , (382)

where
1 X  1 X 
L−1 L−1 L−1
1 X
A= ∆λi ui, 21 sin λi , B = ∆λi ui, 21 cos λi , G = ∆λi ui, 21 , (383)
π i=0 π i=0 π i=0
L−1 L−1
1 X 1 X
C= [∆λi cos (2λi )] , D = [∆λi sin (2λi )] , (384)
2π i=0 2π i=0
L−1 L−1
1 X 1 X
E= (∆λi sin λi ) , F = (∆λi cos λi ) . (385)
2π i=0 2π i=0

Setting ∂I/∂uSP = 0 yields


L−1
X n h io
∆λi ui, 21 − uSP cos φ 12 + vSP sin (λi − λSP ) sin φ 12 = 0, (386)
i=0

61 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

i.e.
L−1 L−1 L−1
1 X 1 X 1 X
uSP cos φ 12 ∆λi + vSP sin φ 12 ∆λi sin (λi − λSP ) = ∆λi ui, 21 , (387)
π i=0 π i=0 π i=0
or
G
uSP cos φ 21 + vSP sin φ 12 (E cos λSP − F sin λSP ) = . (388)
2

Setting ∂I/∂λSP = 0 yields


L−1
X n h io
∆λi ui, 12 − uSP cos φ 12 + vSP sin (λi − λSP ) sin φ 12 vSP cos (λi − λSP ) = 0, (389)
i=0

i.e.
" L−1 L−1
#
1 X 1 X
vSP uSP cos φ 12 ∆λi cos (λi − λSP ) + vSP sin φ 12 ∆λi sin (λi − λSP ) cos (λi − λSP )
π i=0 π i=0
L−1
1 X
−vSP ∆λi ui, 21 cos (λi − λSP ) = 0, (390)
π i=0

or
n
vSP 2uSP cos φ 21 (F cos λSP + E sin λSP ) + vSP sin φ 12 [D cos (2λSP ) − C sin (2λSP )]
− (B cos λSP + A sin λSP )} = 0. (391)

E.1.1 Uniform resolution

For uniform resolution, ∆λi ≡ ∆λ ≡ 2π/L = constant, so that C = D = E = F = 0. Insert these into (382),
(388) and (391) to obtain, respectively,

A cos λSP − B sin λSP


vSP = , (392)
sin φ 12

G
uSP = , (393)
2 cos φ 12

vSP (B cos λSP + A sin λSP ) = 0. (394)

The known quantities are A, B and G, and the algorithm, and its logic, needs to be written in terms of these.
G only serves to determine uSP through (393), leaving vSP and λSP to be determined from (392) and (394).
Consider now the two cases: (i) A2 + B 2 = 0; and (ii) A2 + B 2 6= 0. Physically, these correspond to solid-body
rotation about (i) the polar axis, and (ii) a general axis.

Case (i): A2 + B 2 = 0

Substituting A = B = 0 into (392) - (394) gives

G
uSP = , vSP = 0, (395)
2 cos φ 12

with (394) being identically satisfied, independently of λSP . For this case, λSP is arbitrary.

Case (ii): A2 + B 2 6= 0

There are two subcases to consider.

62 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Subcase (ii-1): vSP 6= 0

Assume that vSP 6= 0. Eq. (394) then gives


B
tan λSP = , (396)
−A
and whence λSP using the FORTRAN library routine ATAN2. Substituting (396) into (392) gives

1 − A2 + B 2
vSP = (A cos λSP − B sin λSP ) = . (397)
sin φ 12 sin φ 12

Note that the minus sign in (396) is arbitrarily placed in the denominator so that vSP in (397) corresponds to the
windspeed, a non-negative quantity, at the S. Pole since sin φ1/2 < 0.
[Placing the minus sign in the numerator of (396) would result in λSP being phase shifted by π, and in vSP
changing sign, but the physical solution would remain the same with the vector wind pointing in the same
direction and having the same amplitude.]
Note also that only vSP and λSP are needed in the expressions (374) and (375) for u (λ, −π/2) and v (λ, −π/2)
at the S. Pole. However, uSP may, if required, be obtained from (393).

Subcase (ii-2): vSP = 0

Assume that vSP = 0. Then (394) is trivially satisfied, and (392) - (393) give

A
tan λSP = , (398)
B

G
uSP = . (399)
2 cos φ 12

Sorting the extrema

Parameter values of the extrema of the variational integral (379), for the various subcases with uniform resolu-
tion, are summarized in Table 1.
Examination of Table 1 shows that there are two kinds of extrema. The general case is case (ii), for which
A2 + B 2 6= 0, and there are two subcases, viz. (ii-1) and (ii-2). These two sub-cases can be considered to
hold generally, i.e. for any values of A, B, and G, with case (i) corresponding to a degenerate case of both (ii-1)
and (ii-2), obtained by setting A = B = 0. The question now, is which of the two prototypical subcases (ii-1)
and (ii-2) is the pertinent solution? Both solutions are extrema of the variational integral (379), but both do not
necessarily minimize it.
To answer this for uniform resolution, recall from (379) that

I (uSP , vSP , λSP ) Xn


L−1 h io2
≡ ∆λ ui, 21 − uSP cos φ 12 + vSP sin (λi − λSP ) sin φ 12 . (400)
r 12 cos φ 12 i=0
 
From Table 1, it is seen for case (ii-2) that uSP = G/ 2 cos φ 12 , vSP = 0. Substituting these values into (400)
then gives !
1 G X
L−1
G
2
I , 0, λSP = ∆λ ui, 2 −
1 . (401)
r 12 cos φ 12 2 cos φ 21 i=0
2
  √
From Table 1, it is seen for case (ii-1) that uSP = G/ 2 cos φ 21 , vSP = − A2 + B 2 / sin φ 12 and tan λSP =

63 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

B/ (−A). Substituting these values into (400) then gives


√ !
1 G − A2 + B 2
I , , λSP
r 12 cos φ 21 2 cos φ 12 sin φ 12
X 
L−1
G
 p 2
= ∆λ ui, 21 − + A2 + B 2 sin (λi − λSP )
i=0
2
" #
X 
L−1
G
2 p 
G

 2
2 2 2 2
= ∆λ ui, 12 − + 2 A + B ui, 12 − sin (λi − λSP ) + A + B sin (λi − λSP )
i=0
2 2
X
L−1
G
2 p L−1
X
= ∆λ ui, 12 − + 2 A2 + B 2 ∆λ ui, 12 sin (λi − λSP )
i=0
2 i=0
p L−1
X L−1
X

2 2
−G A + B ∆λ 2 2
sin (λi − λSP ) + A + B ∆λ sin2 (λi − λSP )
i=0 i=0
X
L−1
G
2 p  
= ∆λ ui, 21 − +2 A2 + B 2 π (A cos λSP − B sin λSP ) + π A2 + B 2
i=0
2
X
L−1
G
2
 
= ∆λ ui, 12 − − 2π A2 + B 2 + π A2 + B 2 , (402)
i=0
2
PL−1
where the definition ∆λ ≡ 2π/L, the definitions (383) for A and B, and the identities i=0 sin2 (λi − λSP ) = L/2
PL−1
and i=0 sin (λi − λSP ) = 0, have all been exploited.
Eq. (402) may be rewritten as
√ ! !
G − A2 + B 2 G 
I , , λSP = I , 0, λSP − π A2 + B 2 r 12 cos φ 12 . (403)
2 cos φ 12 sin φ 12 2 cos φ 12

Thus √ ! !
G − A2 + B 2 G
I , , λSP ≤ I , 0, λSP , (404)
2 cos φ 12 sin φ 12 2 cos φ 12
and so the relevant extremum is that of (ii-1), since it is the one which is the minimum.
To define u (λ, −π/2) and v (λ, −π/2), cf. (374) - (375), only vSP and λSP are required. In particular, this means
that it is not necessary to individually determine u0 and α. The relevant entries of Table 1 are thus those for vSP
and tan λSP in the row for case (ii-1).

E.1.2 Variable resolution

The relevant equations to determine the parameters uSP , vSP and λSP , are (382), (388) and (391).

Case vSP 6= 0

Assume first that vSP 6= 0. Eq. (391) then gives

2uSP cos φ 12 (F cos λSP + E sin λSP ) + vSP sin φ 12 [D cos (2λSP ) − C sin (2λSP )]
= B cos λSP + A sin λSP . (405)

sin λSP ×(405) + cos λSP ×(382) yields

2EuSP cos φ 12 + [(1 − C) cos λSP − D sin λSP ] vSP sin φ 21 = A, (406)

whereas cos λSP ×(405) - sin λSP ×(382) gives

2F uSP cos φ 21 + [D cos λSP − (1 + C) sin λSP ] vSP sin φ 12 = B. (407)

64 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Using (388) to eliminate uSP cos φ 12 from (406) and (407) yields
  
1 − C − 2E 2 cos λSP − (D − 2EF ) sin λSP vSP sin φ 21 = A − EG, (408)

  
(D − 2EF ) cos λSP − 1 + C − 2F 2 sin λSP vSP sin φ 12 = B − F G. (409)
Eliminating vSP sin φ 12 from (408) and (409) then leads to
  
1 − C − 2E 2 (B − F G) − (A − EG) (D − 2EF )
tan λSP = , (410)
− [(1 + C − 2F 2 ) (A − EG) − (D − 2EF ) (B − F G)]
from which λSP is found. Note that the inverse tangent in (410) is evaluated using the Fortran library routine
ATAN2 with the minus sign in (410) being (arbitrarily) placed in the denominator so that vSP corresponds to the
windspeed, a non-negative quantity, at the S. Pole.
Eliminating uSP cos φ 12 from (382) and (388) gives

(A − EG) cos λSP − (B − F G) sin λSP


vSP = h i
2
sin φ 12 1 − C cos (2λSP ) − D sin (2λSP ) − 2 (E cos λSP − F sin λSP )
(A − EG) cos λSP − (B − F G) sin λSP
= h  i.
2
sin φ 12 1 − C 1 − 2 sin2 λSP − 2D sin λSP cos λSP − 2 (E cos λSP − F sin λSP )
(411)
[The second form avoids computing the two trig. functions cos (2λSP ) and sin (2λSP ) and instead computes
them as products of the already-available values of cos λSP and sin λSP .]
For uniform resolution, C = D = E = F = 0, and the denominator on the right-hand sides of (411) is then
guaranteed to be non-singular. It is believed that this is probably also the case for variable resolution. However,
to guard against a singular computation for this unlikely event in practical applications, note that the maximum
value of  2
H ≡ C 1 − 2 sin2 λSP − 2D sin λSP cos λSP − 2 (E cos λSP − F sin λSP ) , (412)
is h i1/2
2 2
Hmax ≡ C + E2 − F 2 + (D − 2EF ) + E2 + F 2. (413)
A check can then be made to ensure that H is less than unity, i.e. that
h 2 i1/2
2
C + E 2 − F 2 + (D − 2EF ) + E 2 + F 2 < 1 − δ, (414)

where δ is a small tolerance.


Having determined the vector wind quantities vSP and λSP at the S. Pole, the u- and v-components of the wind
at longitudes λi and λi+1/2 respectively, on a line of latitude infinitesimally close to the S. Pole, are obtained
(see (374) - (375), and also Figs. 3 and 4) from
ui,0 ≡ u|(λi, φ0 ≡− π ) = −vSP sin (λi − λSP ) , i = 0, 1, ..., L − 1 (415)
2

 
vi+ 21 ,0 ≡ v|  = vSP cos λi+ 12 − λSP , i = 0, 1, ..., L − 1. (416)
λi+ 1 , φ0 ≡− π
2
2

Having obtained vSP from (411), (388) then yields (if required)
 
1 G
uSP = − vSP sin φ 12 (E cos λSP − F sin λSP ) . (417)
cos φ 21 2

Using (373), u0 and α (if required) may be obtained from


u20 = u2SP + vSP
2
, (418)

vSP
sin α = , (419)
u0
with α chosen such that |α| ≤ π/2.

65 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

v i+1/2,0

(λ i+1/2− λ SP) vSP


λ i+1/2

λ SP λ = λ0 = 0

φ = φ1/2

Figure 4: The vector wind and its v-component at the S. Pole as viewed from the Earth’s centre.

Case vSP = 0

Assume now that vSP = 0. Thus (391) is trivially satisfied, (388) gives
G
uSP = , (420)
2 cos φ 12

and inserting this into (382) then yields


A − EG
tan λSP = . (421)
B − FG

Sorting the extrema

For the special case of uniform resolution, it is shown above that the minimum of the variational integral (379)
is achieved for the case vSP 6= 0, with the case vSP = 0 corresponding to an inadmissible extremum that does
not minimize (379). It is now assumed that this same characterization of the extrema also holds for the general
case of variable resolution. That this assumption does indeed hold true appears almost certain, but rigorous
proof could prove to be a challenge - at the time of writing, it is judged not to be worth expending effort on this
nicety!

The computational procedure

Summarizing, the computational procedure for determining the vector wind at the S. Pole, and from this the u-
and v-components of the wind there, is:
• evaluate C, D, E and F from (384) - (385) (in practice C, D, E and F would be precomputed and stored
since they only depend on the grid configuration and are independent of the data ui,1/2 );
h 2 i1/2
2
• if C + E 2 − F 2 + (D − 2EF ) + E 2 + F 2 > 1 − δ, where δ is a small tolerance, then

– stop - solution procedure can be singular;


• else
– evaluate A, B and G from (383);
– evaluate λSP from (410);
– obtain vSP from (411);
– obtain ui,0 ≡ u|(λi ,φ0 ≡−π/2) from (415);

66 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

– obtain vi+1/2,0 ≡ v|(λi+1/2 ,φ0 ≡−π/2) from (416);

• endif
Notes:
1. For a uniform grid, where ∆λ = 2π/L, the above-described procedure simplifies somewhat. This is due
to the orthogonality properties of discrete Fourier transforms which lead to C = D = E = F = 0. The
simplified procedure for a uniform grid is thus:
• evaluate A and B from

2 X  2 X 
L−1 L−1
A= ui, 12 sin λi , B = ui, 12 cos λi ; (422)
L i=0 L i=0

• evaluate λSP from λSP = tan−1 [B/ (−A)];


p
• obtain vSP from vSP = (A cos λSP − B sin λSP ) / sin φ1/2 = − (A2 + B 2 )/ sin φ1/2 ;
• obtain ui,0 ≡ u|(λi ,φ0 ≡−π/2) from (415);
• obtain vi+1/2,0 ≡ v|(λi+1/2 ,φ0 ≡−π/2) from (416).

2. An alternative, equivalent, and slightly more efficient procedure, valid only for uniform resolution, is:
• obtain ui,0 and vi+1/2,0 from

(A sin λi + B cos λi ) A cos λi+ 21 − B sin λi+ 12


ui,0 = − , vi+ 12 ,0 = , (423)
sin φ 12 sin φ 12

where
2 X  2 X 
L−1 L−1
A= ui, 12 sin λi , B = ui, 12 cos λi , (424)
L i=0 L i=0

or, equivalently but less efficiently, from

1 2 Xh i 1 2 Xh  i
L−1 L−1
ui,0 = − uk, 12 cos (λi − λk ) , vi+ 21 ,0 = − uk, 21 sin λi+ 12 − λk . (425)
sin φ 21 L sin φ 12 L
k=0 k=0

 the expressions for ui,0


Another advantage of this alternative procedure is that it simplifies the form of
and vi+1/2,0 and thereby makes it clear that they depend linearly on u φ1/2 , an important consider-
ation for the formulation of adjoints.

E.2 North Pole

Let the vector wind at the N. Pole (see Figs. 5-6, as viewed from directly above the N. Pole) have speed vN P
in direction λN P relative to the reference longitude λ = λ0 ≡ 0. Note that the v-component of the wind vector
arrows in Figs. 3-6 all point in the direction of increasing coordinate φ. Thus in Figs. 5-6 they point towards the
N. Pole, whereas in Figs. 3-4 they point away from the S. Pole. In terms of the vector wind at the N. Pole, the
u- and v- components of the wind at the N. Pole (or more correctly at a latitude infinitesimally close to it), with
longitudes λ = λi and λ = λi+1/2 respectively, are

ui,M ≡ u|(λi ,φM ≡+ π ) = +vN P sin (λi − λN P ) , i = 0, 1, ..., L − 1, (426)


2

 
vi+ 21 ,M ≡ v|  = +vN P cos λi+ 21 − λN P , i = 0, 1, ..., L − 1. (427)
λi+ 1 ,φM ≡+ π
2
2

Proceeding in a similar manner to that used to derive results for the S. Pole leads to the following procedure to
determine the vector wind at the N. Pole, and from this, the u- and v-components of the wind there:

67 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

ui,M

λ = λi

λi vNP

λ NP λ = λ0 = 0

φ = φM-1/2

Figure 5: The vector wind and its u-component at the N. Pole as viewed from directly above the N. Pole.

v i+1/2,M

(λ i+1/2− λNP) vNP


λ i+1/2

λ NP λ = λ0 = 0

φ = φM-1/2

Figure 6: The vector wind and its v-component at the N. Pole as viewed from directly above the N. Pole.

• It is assumed that C, D, E and F have already been precomputed (see the general algorithm of section E.1
h 2 i1/2
2
for the S. Pole) and tested so that it can be assumed that C + E 2 − F 2 + (D − 2EF ) + E2 + F 2 <
1 − δ, where δ is a small tolerance;
• evaluate A, B and G from
L−1 L−1 L−1
1 X  1 X  1 X 
A= ∆λi ui,M−1/2 sin λi , B = ∆λi ui,M−1/2 cos λi , G = ∆λi ui,M−1/2 ; (428)
π i=0 π i=0 π i=0

• evaluate λN P from
(   )
−1 − 1 − C − 2E 2 (B − F G) − (A − EG) (D − 2EF )
λN P = tan ; (429)
[(1 + C − 2F 2 ) (A − EG) − (D − 2EF ) (B − F G)]

• obtain vN P from
(A − EG) cos λN P − (B − F G) sin λN P
vN P = h  i; (430)
2
sin φM− 21 1 − C 1 − 2 sin2 λN P − 2D sin λN P cos λN P − 2 (E cos λN P − F sin λN P )

68 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

• obtain ui,M from


ui,M ≡ u|(λi ,φM ≡+ π ) = vN P sin (λi − λN P ) , i = 0, 1, ..., L − 1; (431)
2

• obtain vi+1/2,M from


 
vi+ 21 ,M ≡ v|  = vN P cos λi+ 21 − λN P , i = 0, 1, ..., L − 1. (432)
λi+ 1 ,φM ≡+ π
2
2

Notes:
1. For a uniform grid, the above-described procedure simplifies at the N. Pole to:
• evaluate A and B from

2 X  2 X 
L−1 L−1
A= ui,M− 21 sin λi , B = ui,M− 12 cos λi ; (433)
L i=0 L i=0

• evaluate λN P from λN P = tan−1 [(−B) /A];


p
• obtain vN P from vN P = (A cos λN P − B sin λN P ) / sin φM−1/2 = (A2 + B 2 )/ sin φM−1/2 ;
• obtain ui,M ≡ u|(λi ,φM ≡+π/2) from (431);
• obtain vi+1/2,M ≡ v|(λi+1/2 ,φM ≡+π/2) from (432).

2. An alternative, equivalent and slightly more efficient procedure, valid only for uniform resolution, is:
• obtain ui,M and vi+1/2,M from

A sin λi + B cos λi A cos λi+ 12 − B sin λi+ 21


ui,M = , vi+ 21 ,M = , (434)
sin φM− 12 sin φM− 21

where
2 X  2 X 
L−1 L−1
A= ui,M− 21 sin λi , B = ui,M− 12 cos λi , (435)
L i=0 L i=0

or, equivalently but less efficiently, from

2 Xh i
L−1
1
ui,M = uk,M− 21 cos (λi − λk ) , (436)
sin φM− 12 L
k=0

2 Xh  i
L−1
1
vi+ 12 ,M = − uk,M− 21 sin λi+ 12 − λk . (437)
sin φM− 21 L
k=0

Another advantage of this alternative procedure is that it simplifies the form of the expression for
ui,M and vi+1/2,M and thereby makes it clear that they depend linearly on u φM−1/2 , an important
consideration for the formulation of adjoints.

69 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

F Definitions of the Helmholtz coefficients


ξ1 η
ref
τu ∆tcpd θvd
Hu ≡ ξ1
, (438)
hξ11 (δη ξ3 )
ξ2 η
ref
τv ∆tcpd θvd
Hv ≡ ξ2
, (439)
hξ22 (δη ξ3 )
ref
τw ∆tcpd θvd
Hw ≡ η , (440)
hη3 (δη ξ3 )
η
Hη̇ = hη3 (δη ξ3 ) , (441)
 η
ref
Hθ ≡ τθvd ∆tδη θvd , (442)

τρd ∆t
HV ≡ , (443)
h1 h2 h3 δη ξ3
ξ ξ1
Hρx ≡ hξ21 hξ31 (δη ξ3 ) 1 ρref
d , (444)

ξ ξ2
Hρy ≡ hξ32 hξ12 (δη ξ3 ) 2 ρref
d , (445)

η η
Hρz ≡ (hη1 hη2 hη3 δη ξ3 ) ρref
d , (446)
 
1 − κd
Hππ ≡ , (447)
κd
η
Rd ρref ref
d θvd
Hπρ ≡ 1−κd . (448)
p0 (π ref ) κd

70 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

G Conservation of mass

G.1 Continuous conservation

The dry density evolves according to (3)


Dρd
+ ρd ∇.u = 0. (449)
Dt
Using the fact that D/Dt ≡ ∂/∂t + u.∇, this equation can be rewritten to give

∂ρd
+ ∇. (uρd ) = 0. (450)
∂t

From (450), together with zero mass flux at the lower and upper boundaries of the domain, it follows that
Z
d
ρd dV = 0. (451)
dt
V

Here V is the global model domain. For limited area models the above would have to be modified to allow for
the flux of ρd across the lateral boundaries.

G.2 Temporally discrete conservation

Integrating (451) over a timestep results in


Z Z Z
ρn+1
d dV = ρ n
d dV = ... = ρ0d dV. (452)
V V V
R
The quantity V
ρ0d dV is the initial mass.

G.3 Spatially discrete conservation

Consider a variable C. The discrete equivalent of its global integral is defined to be


X Z
I (C) ≡ Ci,j,k ∆Vi,j,k ≈ CdV, (453)
i,j,k V

where, c.f. (96),  


∂ξ3
∆Vi,j,k ≡ h1 h2 h3 ∆ξ1 ∆ξ2 ∆η , (454)
∂η i,j,k

is the discrete volume of the control volume surrounding Ci,j,k . Applying the approximation (453) to (452)
requires  
I ρn+1
d = I (ρnd ) = ... = I ρ0d ≡ M0 , (455)
where
 XN
X −1

I ρn+1
d ≡ ρn+1
d i,j,k+1/2
∆Vi,j,k+1/2 , (456)
i,j k=0

M is the discrete evaluation of the initial mass, and the indices i and j will be half-integer.

71 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

G.4 The simple mass-fixer algorithm

Initially (and still available as an option) the simplest possible mass fixer was used:
For the general SISL estimate of ρn+1
d ,(455) will not hold. Therefore the simple mass-fixer modifies this estimate
by multiplying it by a global constant chosen to ensure that the new density field does indeed satisfy (455).
Let ρ∗d be the current, non-mass-conserving, estimate of ρn+1
d and define M∗ ≡ I (ρ∗d ) to be the associated total
mass. Then the mass-fixer evaluates the globally conserving estimate ρn+1
d as:

M0
ρn+1
d = ρ∗d . (457)
M∗

G.5 An energetically consistent mass-fixer algorithm

It has been found in climate runs that the simple mass-fixer impacts negatively on the energy budget of the
model. This is due to a systematic vertical transport of mass which alters the moment of the mass and hence,
in particular, the potential energy. To remedy this, the fixer is allowed to vary with height and the extra degree of
freedom is used to preserve the estimate of potential energy obtained before the mass fixer is applied:
The potential energy is given by
P (ρd ) ≡ I [gρd (rρ − a)] , (458)
where rρ is the height of the rho levels and a is the mean radius of the Earth.
Let P ∗ ≡ I [gρ∗d (rρ − a)] be the potential energy of the model before the mass-fixer has been applied. The aim
is to make the mass-fixer preserve this estimate of potential energy. To achieve this, the fixer requires the first
moments of both the mass and potential energy:

M∗r ≡ I (ρ∗d rρ ) , (459)

and
Pr∗ ≡ I [gρ∗d rρ (rρ − a)] . (460)
Then the globally conserving and potential-energy preserving estimate ρn+1
d is
 
(M∗ − M0 )
ρn+1 = ρ ∗
d 1 − (P ∗ − P ∗ rρ ) . (461)
d
M∗ Pr∗ − M∗r P ∗ r

Whilst (461) ensures that the mass-fixer does not impact on the global potential energy, the internal energy will
be impacted (as well as the kinetic energy but this seems empirically to be less of an issue). The internal energy
is given by  
η
E (ρd , θvd ) ≡ I cvd θvd ρd . (462)

Therefore in order to preserve the internal energy, the estimate θvd of potential temperature before the mass-
fixer is applied is corrected as
 −1
n+1 ∗ (M∗ − M0 ) ∗ ∗
θvd = θvd 1− (P − P rθ ) , (463)
M∗ Pr∗ − M∗r P ∗ r

where rθ is the height of the theta levels. Because of the averaging of θvd in (462) the cancellation of the
correction factors is not exact but the level of accuracy that (463) achieves seems to be sufficient.

72 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

H Conservation of scalars and the Zerroukat ADAS and Priestley algo-


rithms

The algorithms of (author?) [31] and (author?) [12] are designed to ensure the appropriate global conservation
of any scalar quantity. Here those schemes are applied to the mixing ratios of various water substances, mX .
The application of the schemes is complicated by the fact that mX is staggered in the vertical with respect to
the dry density ρd . This is also true of tracers and potential temperature. Conservation of these quantities is
obtained in precisely the same way as for moisture.

H.1 Continuous aspects of conservation

The mixing ratio of a quantity with density ρX is defined as mX ≡ ρX /ρd .


The evolution of the mixing ratios is governed by (4), i.e.
DmX
= S mX , X = v, cl, cf, ... (464)
Dt
The dry density evolves according to (3)
Dρd
+ ρd ∇.u = 0. (465)
Dt
Using the fact that D/Dt ≡ ∂/∂t + u.∇, these equations can be combined to give
∂ρX
+ ∇. (uρX ) = ρd S mX . (466)
∂t
[Since ρX is the physical quantity, (466) is in fact the more natural starting point than (464). Here though, (466)
has been derived from (464) since that equation is the basis for the numerical discretization.]
From (466), together with zero mass flux at the lower and upper boundaries of the domain, it follows that
Z Z
d
ρX dV = ρd S mX dV, (467)
dt
V V

or Z Z
d
(ρd mX ) dV = ρd S mX dV. (468)
dt
V V

Here V is the global model domain. For limited area models the above would have to be modified to allow for
the flux of ρX across the lateral boundaries.

H.2 Temporally discrete conservation

Since both the dry mass continuity equation and the mixing ratio equations are discretized in a Lagrangian
manner (albeit possibly a conserving Lagrangian form for dry mass), rather than in an Eulerian flux form, con-
servation of the form (468) will not in general hold but is instead imposed. In order to impose such conservation,
(468) must be discretized in time. An appropriate discretization is
Z " # Z h i
(ρd mX )n+1 − (ρd mX )n
dV = αc (ρd S mX )n+1 + βc (ρd S mX )n dV, (469)
∆t
V V

where αC + βC = 1. In practice the physical parametrization term S mX is made up of different elements,


n+1
each of which may be associated with a different off-centring parameter. Here, a term such as αc (ρd S mX )
represents the appropriate sum of such products (cf., note 2 of section 6.2).
The New Dynamics uses a similar discretization of (468). However, it differs in that only ρnd appears on the
right-hand side of (469), i.e. a one-sided discretization of the influence of ρd is used. This leads to the need for
the second conservation corrector. See The Joy for details. The disadvantage of the choice (469) is that both
ρnd and ρn+1
d need to be available when the net source/sink to the moisture field mX is evaluated.

73 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

H.3 Spatially discrete conservation

Since ρd and mX are staggered in the vertical (they are collocated in the horizontal) a choice has to be made
in the spatial discretization of (469) as to whether ρd is averaged in the vertical to be collocated with mX or vice
versa.
Here, as in the New Dynamics, it is chosen to average mX in the vertical to be collocated with ρd . There are
two advantages of this approach. First, mX spans the domain, in that it is stored at both the lower and upper
boundaries and so there is an unambiguous method of averaging mX to the ρd levels, without the need for
extrapolation or one-sided operations. Second, it only makes sense to seek to conserve ρd mX if ρd is itself
conserved. Therefore, the definition of what form of ρd mX is conserved should reduce to the definition of
what form of ρd is conserved when mX is set equal to unity. For the choice made here, when mX is constant
and there are no sources or sinks the natural conservation of ρd on its own grid is recovered. [There are
also disadvantages though. One is that this averaging does not preserve the flux form of some of the physics
parametrizations, e.g. the boundary layer, that contribute to S mX .]
Therefore, on the staggered grid considered here, the conservation relation to be imposed is:
Z η ! Z h
ηi
η
ρn+1 mn+1 − ρnd mnX η
mX )n+1 + ρn (β S mX )n
d X
dV = ρn+1
d (αc S d c dV, (470)
∆t
V V

or equivalently, it is required that


Z Z η
Z
η nη
ρn+1 m n+1
dV = ρ n+1
(α ∆tS mX )n+1 dV + ρnd (mX + βc ∆tS mX ) dV. (471)
d X d c
V V V

This will not in general hold. Therefore, to enforce conservation, the value of mn+1 X obtained by the original
discretization is adjusted to mcons
X which is constructed so that the discrete version of the following does indeed
hold: Z Z h i
η
η n+1 nη
ρn+1
d mcons
X dV = ρn+1
d (αc ∆tS mX ) + ρnd (mX + βc ∆tS mX ) dV. (472)
V V

Because of the vertical averaging, (472) is not in an appropriate form to apply a conservation corrector. However,
it can be rearranged to be so by manipulation of the vertical sums in the discrete forms of the volume integrals.
Consider a variable C. The discrete equivalent of its global integral is defined to be
X Z
I (C) ≡ Ci,j,k ∆Vi,j,k ≈ CdV, (473)
i,j,k V

where, c.f. (96),  


∂ξ3
∆Vi,j,k ≡ h1 h2 h3 ∆ξ1 ∆ξ2 ∆η , (474)
∂η i,j,k

is the discrete volume of the control volume surrounding Ci,j,k . Applying the approximation (473) to the left-hand
side of (472) requires the evaluation of sums of the form

 η
 X NX
−1  η

I ρn+1
d U ≡ ρ i,j,k+1/2 U i,j ∆Vi,j,k+1/2 , (475)
k+1/2
i,j k=0

where notation aligns with that of (author?) [12] and for brevity ρi,j,k+1/2 is used in place of ρn+1 .
d i,j,k+1/2

74 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

From the definition, (353), of the vertical average, (475) can be expanded as
"   #
  X NX −1
ηk+1/2 − ηk Ui,j,k+1 + ηk+1 − ηk+1/2 Ui,j,k
n+1 η
I ρd U = ρi,j,k+1/2 ∆Vi,j,k+1/2
i,j
ηk+1 − ηk
k=0
N
XX  
ηk−1/2 − ηk−1
= ρi,j,k−1/2 Ui,j,k ∆Vi,j,k−1/2
i,j k=1
ηk − ηk−1

X NX
−1  
ηk+1 − ηk+1/2
+ ρi,j,k+1/2 Ui,j,k ∆Vi,j,k+1/2
i,j k=0
ηk+1 − ηk
X 
ηk+1 − ηk+1/2
 

= ρi,j,k+1/2 ∆Vi,j,k+1/2 Ui,j,k
i,j
ηk+1 − ηk k=0
−1 
X NX  
ηk−1/2 − ηk−1
+ ρi,j,k−1/2 ∆Vi,j,k−1/2
i,j k=1
ηk − ηk−1
  
ηk+1 − ηk+1/2
+ρi,j,k+1/2 ∆Vi,j,k+1/2 Ui,j,k
ηk+1 − ηk
X 
ηk−1/2 − ηk−1
 

+ ρi,j,k−1/2 ∆Vi,j,k−1/2 Ui,j,k . (476)
i,j
ηk − ηk−1 k=N

Defining (
0,   k=0
Ali,j,k ≡ ηk−1/2 −ηk−1 (477)
ρi,j,k−1/2 ηk −ηk−1 ∆Vi,j,k−1/2 , k = 1, ..., N,

and (  
ηk+1 −ηk+1/2
ρi,j,k+1/2 ∆Vi,j,k+1/2 , k = 0, ..., N − 1
Aui,j,k ≡ ηk+1 −ηk
(478)
0, k = N,
then (476) can be rewritten as

 η
 XX
N

I ρn+1
d U = Ali,j,k + Aui,j,k Ui,j,k . (479)
i,j k=0

Defining 
Si,j,k ≡ Ali,j,k + Aui,j,k , (480)
cons
the problem can finally be written very generally as the construction of Ui,j,k such that
X
cons
Si,j,k Ui,j,k = C, (481)
i,j,k

where C is known (here it is given by the discrete form of the right-hand side of (472)) and the sum over k is
over all values k = 0, ..., N .
In the New Dynamics, it is assumed that Ui,j,0 = Ui,j,1 and then k is restricted to the range k = 1, ..., N and
Aui,j,0 is absorbed into Ali,j,1 .

H.4 The Zerroukat ADAS algorithm

H.4.1 Conservation

e . The
The Zerroukat ADAS (All Dancing All Singing) algorithm [31] starts with an estimate for U , namely U
algorithm then defines
 
cons
Ui,j,k ei,j,k + γD F U
=U ei,j,k , (482)
Si,j,k

75 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

where D is the global surplus/deficit, given by:


X
D≡C− ei,j,k ,
Si,j,k U (483)
i,j,k

and

 −1
X  
γ≡ Si,j,k F Uei,j,k  . (484)
i,j,k
 
e must be non-negative and is currently chosen to be
The function F U
 
F U ei,j,k ,
ei,j,k Si,j,k U
ei,j,k = ∆2p U (485)

where p is the order of diffusion/antidiffusion,p = 1, 2, ... (the value p = 2 is currently used), and ∆2 is the
Laplacian in grid space, i.e. 
∆2 F ≡ δξ21 + δξ22 + δη2 F. (486)
Near the lower and upper boundaries the vertical derivative of F is dropped and the Laplacian becomes a
horizontal Laplacian.
It has been found that it may be beneficial to apply the conservation based on the Laplacian of data from which
e with a simple 1-2-1
two-grid length oscillations have been removed. This can either be done by first filtering U
filter or by applying the Laplacian over two grid lengths, i.e. replacing ∆2 by ∆22 where

∆22 F ≡ δ2ξ2
1
2
+ δ2ξ 2
2
+ δ2η F. (487)

Multiplying (482) by Si,j,k , summing over i, j, k, using (483) and (484), and noting that γ and D are constants,
shows that X
cons
Si,j,k Ui,j,k = C, (488)
i,j,k

as required.

H.4.2 Positive definiteness

Note that even if the non-conservative solution U e is monotone and positive, the corrected solution U cons after
the conservation correction might violate positivity. To remedy this situation a second correction can be applied
to U cons to restore positivity. Assume that after the conservation step it is additionally required that
cons+pos
Ui,j,k ≥ Umin , (489)

where Umin ≥ 0 is a constant and U cons+pos is a conservative positive-definite solution which satisfies both (488)
and (489).
The solution is constructed as

cons+pos cons

Ui,j,k = θ1 max Ui,j,k , Umin + θ2 , (490)
where the two constants θ1 and θ2 are obtained by requiring the following two constraints to be satisfied:

cons+pos cons
Ui,j,k = Umin if Ui,j,k < Umin , (491)

X cons+pos
Si,j,k Ui,j,k = C. (492)
i,j,k

Substituting (490) into (491) shows that the following must hold

θ1 Umin + θ2 = Umin , (493)

76 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

i.e.
θ2 = (1 − θ1 ) Umin . (494)
Then substituting (490) into (492) and eliminating θ2 using (494) gives
P
C − Umin i,j,k Si,j,k
θ1 = P  . (495)
b
i,j,k Si,j,k Ui,j,k − Umin

From (490), (495) and (494), the final result is:


P
cons+pos C − Umin i,j,k Si,j,k  cons
 
Ui,j,k = P h   i max Ui,j,k , Umin − Umin + Umin , (496)
cons
i,j,k Si,j,k max Ui,j,k , Umin − Umin

 
cons
The quantity max Ui,j,k , Umin − Umin is non-negative. Therefore, assuming that a non-pathological value is
P cons+pos
chosen for Umin such that Umin i,j,k Si,j,k ≤ C, it is seen that the solution does indeed satisfy Ui,j,k, ≥
Umin as well as preserving conservation.
cons cons
Note that if the solution after the conservation step, Ui,j,k, , already satisfies (489) (i.e., Ui,j,k, ≥ Umin ), then
X    X 
cons cons
Si,j,k max Ui,j,k , Umin − Umin = Si,j,k Ui,j,k − Umin
i,j,k i,j,k
X
= C − Umin Si,j,k , (497)
i,j,k

cons+pos cons
and so Ui,j,k = Ui,j,k . Therefore, the positive-definite correction, (490) or (496) makes no changes, as
expected.
Furthermore, making sure that the non-conservative solution is positive definite before the
 conservation filter
ei,j,k ≥ Umin ) makes it more likely that P
(i.e., ensuring that U S max U cons
, U min ≃ C , and then the
i,j,k i,j,k i,j,k
positive-definite correction should, in general, have a minor impact on the conservative solution.

H.4.3 Summary

1. Evaluate Al and Au from (477) and (478) and hence S from (480).
2. Obtain an estimate for U , i.e., from (97) and (98),
n n+1
U ≡ mn+1
X
S
= mX + βm X
∆tS mX D
+ αSmX ∆tS mX .

3. Evaluate h η ηi
C ≡ I ρn+1 (α ∆tS mX )n+1 + ρn (m + β ∆tS mX )n . (498)
d c d X c

4. Apply the ADAS algorithm as summarized in Table 2.

H.5 The Priestley algorithm

The Priestley algorithm relies on the existence of two estimates for U , namely U H and U L where U H is a high-
order estimate for U (and, if it were to satisfy (481) would be the preferred solution) and U L is a lower-order
estimate. [In the context of interpolation U H is typically the estimate obtained from appropriate application of
cubic interpolation and U L is that obtained from linear interpolation, the highest order interpolation guaranteed
to be monotone.] The algorithm then defines
cons H L
Ui,j,k ≡ ωi,j,k Ui,j,k + (1 − ωi,j,k ) Ui,j,k , (499)

with 0 ≤ ωi,j,k ≤ 1, and seeks the optimum values of the coefficients ωi,j,k such that (481) holds. Since U H
is the preferred solution, optimization of ωi,j,k means seeking the largest value of ωi,j,k whilst respecting the
constraint 0 ≤ ωi,j,k ≤ 1.

77 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Substituting (499) into (481) and rearranging gives:


X  X
H L L
ωi,j,k Ui,j,k − Ui,j,k Si,j,k = C − Ui,j,k Si,j,k . (500)
i,j,k i,j,k

max
Define a maximum value ωi,j,k (the rôle of this parameter will be discussed later). Then with some notational
changes (and the addition of step 0) the algorithm of (author?) [12] is as follows:
• Step 0:
– If X  X
max H L L
ωi,j,k Ui,j,k − Ui,j,k Si,j,k = C − Ui,j,k Si,j,k , (501)
i,j,k i,j,k
max
then conservation holds with ωi,j,k = ωi,j,k . This is therefore the solution and the algorithm stops.
– Otherwise, if X  X
max H L L
ωi,j,k Ui,j,k − Ui,j,k Si,j,k > C − Ui,j,k Si,j,k , (502)
i,j,k i,j,k

define 
H L
∆Ui,j,k ≡ Ui,j,k − Ui,j,k Si,j,k , (503)
and X
L
C∗ ≡ C − Ui,j,k Si,j,k . (504)
i,j,k

– Else, if X  X
max H L L
ωi,j,k Ui,j,k − Ui,j,k Si,j,k < C − Ui,j,k Si,j,k , (505)
i,j,k i,j,k

then define 
H L
∆Ui,j,k ≡ − Ui,j,k − Ui,j,k Si,j,k , (506)
and  
X
C ∗ ≡ − C − L
Ui,j,k Si,j,k  . (507)
i,j,k

• Step 1: As a result of Step 0, X


max
ωi,j,k ∆Ui,j,k > C ∗ , (508)
i,j,k

and the ω’s should be chosen to be different from ω max ’s only to the extent that doing so reduces the
left-hand side of (508). Therefore:
max
– If ∆Ui,j,k ≤ 0, then ωi,j,k = ωi,j,k and Ii,j,k = 1 (where Ii,j,k is a flag) but if ∆Ui,j,k > 0, then ωi,j,k = 0
and Ii,j,k = 0.
• Step 2: Define the surplus to be X
∆C ≡ C ∗ − ωi,j,k ∆Ui,j,k , (509)
Ii,j,k =1

where it is to be understood that the summation is over all i, j, k such that Ii,j,k = 1. The surplus ∆C
indicates how much slack there remains in the choice of ω’s.
– If the surplus is negative (∆C < 0) then the linear average of U H and U L is unable to achieve
conservation. A conservative solution is then
h i
H L
C ωi,j,k Ui,j,k + (1 − ωi,j,k ) Ui,j,k
cons h i.
Ui,j,k =P (510)
H L
i,j,k Si,j,k ωi,j,k Ui,j,k + (1 − ωi,j,k ) Ui,j,k

max
[A choice has to be made for the ω’s. Setting ωi,j,k = ωi,j,k seems a sensible option. This corresponds
max
to what is done in the New Dynamics, where ωi,j,k ≡ 1 and hence this option is a rescaling of the
high-order estimate. An alternative would be to keep whatever value the ω’s have at this stage of the
algorithm. This would be a good choice if, with this choice, conservation is only slightly missed.] The
algorithm stops. Otherwise:

78 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

• Step 3: Define an average ω:


∆C
ω avg ≡ P . (511)
Ii,j,k =0 ∆Ui,j,k

This gives the value ω avg such that


X X
max
C∗ − ωi,j,k ∆Ui,j,k = ω avg ∆Ui,j,k , (512)
Ii,j,k =1 Ii,j,k =0

i.e. X X
ω avg ∆Ui,j,k + max
ωi,j,k ∆Ui,j,k = C ∗ , (513)
Ii,j,k =0 Ii,j,k =1

as required. However, this solution is only permitted if ω avg ≤ ωi,j,k


max
everywhere that Ii,j,k = 0.
• Step 4: If ω avg < ωi,j,k
max
everywhere that Ii,j,k = 0, then, for these values of i, j, k, set ωi,j,k = ω avg . The
algorithm stops. Otherwise:
• Step 5: If ω avg > ωi,j,k
max
and Ii,j,k = 0 then set ωi,j,k = ω max and Ii,j,k = 1.
• Step 6: Repeat from Step 2.
The rôle of ω max :
The aim of (author?) [12] was to obtain both conservation and monotonicity. In that paper monotonicity is
imposed prior to imposing conservation but is achieved in a very similar manner, i.e. by averaging U L and U H
max
exactly as in (499). This results in a permissible range of values of ωi,j,k , i.e. 0 ≤ ωi,j,k ≤ ωi,j,k . As a result, in
order to ensure that monotonicity is respected, the value of ωi,j,k used to obtain conservation must be restricted
max
to ωi,j,k ≤ ωi,j,k . If, however, both estimates U L and U H are themselves monotonic, any linear combination of
max
them is also monotonic. In this case ωi,j,k = 1. This is the case in the present implementation of the Priestley
algorithm since there U is obtained by linear interpolation (which is inherently monotonic) and U H is obtained
L

by cubic interpolation but to which the monotonicity algorithm of (author?) [1] has been applied.
max
Although the Priestley algorithm is, in its general form, iterative, when ωi,j,k = 1, ω avg becomes a constant
independent of position and there is only one iteration: either the scheme can deliver a conservative solution or
it cannot.

H.5.1 Summary

1. Evaluate Al and Au from (477) and (478) and hence S from (480).
2. Obtain two estimates, U H and U L for
S
n
U ≡ mX + βm X
∆tS mX D
, (514)

for example obtain U H using cubic interpolation and U L using linear interpolation.
3. Evaluate h  ηi
S ∆tS mX n
C ≡ I ρnd mX + βm . (515)
X

max
4. Set ωi,j,k and apply the Priestley algorithm as in section H.5 to obtain the field ωi,j,k and hence the
S
n
conservative estimate for mX + βm X
∆tS mX D .

79 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

✁✁✕

Figure 7: Illustration of the different model zones within the LAM. Note that the three innermost regions are the
computational domain while the external halos are the left over areas from the domain decomposition.

I Limited-Area Models

The following description is primarily about what happens within the LAM model inside of atm step; i.e. it is
about how ENDGame implements the LAM boundary forcing during the time step.
Figure 7 shows an illustration of the different zones that make up a LAM domain. The rim zone is split into two
pieces - the actual rim zone plus the blending zone. These areas contain the model driving data obtained from
a global model run. At the end of each time step the model overwrites (or blends) the predicted LAM solution
with data from the global simulation. The final two regions are the self-explanatory Forecast Area and External
Halos. The external halos are essentially a constant extrapolation of the rim zone data and thus act like a zero
gradient condition on any calculation that uses them.
Currently the driving data used within rim/blending zones are hydrostatically balanced values for pressure and
density which are obtained by setting the vertical velocity w to zero and only using the surface (actually level
1) values of pressure from the global model. An outline of how the LAM lateral boundary conditions (lbc’s) are
implemented within ENDGame’s atm step is shown in Table 3. Note that Table 3 is actually the same as is used
for the ENDGame global model if the blending/overwriting steps are removed.
An important step in Table 3 is the choice of when to blend the lbc’s within the outer loop. Currently the
blending within the outer loop is never performed but the initial intention was to do it on the second outer loop
(i.e. outer loop 6= 1).
It is worth going into detail about what happens in some of the steps described in Table 3 to illustrate how data is
used/calculated within the ENDGame LAM. It is also worth noting that the computational domain is actually the
inner three zones (i.e. red, yellow and white) and that any calculation performed away from the blending steps
will use the data from the external halo; i.e. in the calculation of Run the model will use a zero normal pressure

80 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

gradient even though this is not the condition used within the Helmholtz problem. The external halos will also
be used when these fields are interpolated to the departure points which will then feed into the forcing for the
Helmholtz problem.
Since the Helmholtz problem is to be solved subject to a fixed value of pressure (i.e. a Dirichlet condition with
the pressure set by the balanced lbc data) the Helmholtz matrix is set to the identity at the edge of the domain
and the forcing is set to be equal to the pressure difference between the lbc value of π and the reference value
from the previous time level. This is actually done for the last two points on the western boundary due to the
different number of u and p grid points in the LAM domain.
In the Helmholtz inner loop, where the back-substitution step is also performed, the model estimates all updated
time level (n + 1) fields with the application of a zero normal gradient (Neumann) condition on any field that per-
forms a calculation involving a external halo point. As a consequence of these “assumed” boundary conditions
the predicted values of the time level (n + 1) fields disagree with the applied lbc data during this stage of the
calculation and the model is free to determine a state that it “thinks” is consistent with the solution procedure.
Once the Helmholtz step is completed the model re-blends the fields with the lbc data, either by going back and
performing another outer loop or at the end of the time step in preparation for the next one.
It is important to note that the final re-blending does not remove the assumptions made within the external halos
by overwriting the fields since the solution for the pressure in the interior uses the external halos via the solution
of the elliptic Helmholtz problem.

81 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

J Helmholtz problem

J.1 The Problem

The Helmholtz problem solved within ENDGame can be written as a general matrix problem

Hx = b, (516)

where M is the discrete form for the Helmholtz operator, x is the Exner tendency (difference from the reference
state) and b is the forcing. The first step in ENDGame is a preconditioning step by the diagonal which takes
place outside of the solver:
D−1 Hx = Ax = D−1 b = r, (517)
where D is the diagonal part of H
In ENDGame the Helmholtz problem is simplified in such a way that the resulting matrix problem has a much
reduced 7−point computational stencil with the same structure as the usual Cartesian 3D Laplacian; i.e. at the
grid point P≡ (i, j, k) only the points D≡ (i, j, k−1), U≡ (i, j, k+1), S≡ (i, j −1, k), N≡ (i, j +1, k), W≡ (i−1, j, k)
and E≡ (i + 1, j, k) are used.

J.2 The basic algorithm

The BiCGstab [24] algorithm used within ENDGame is essentially that described in (author?) [25] which is
based upon the efficient post-conditioned version of (author?) [2]. In this version (516) is replaced by

ACC−1 x = r, (518)

which can also be written as


ACy = r, x = Cy. (519)
Note that one advantage of post-conditioning is that the right-hand-side is not altered by the choice of C and so
the residual error is not rescaled by the preconditioner.
Table 4 shows a basic outline of the method implemented within ENDGame: note that the temporary vectors s
and t are local to each iteration and play two separate rôles during the calculation.

J.3 More ENDGame specifics

An important detail of the algorithm given in Table 4 is the definition of the stopping criterion. Within ENDGame
the usual choice is that p p
(rm , rm ) ≤ ǫ max( (r, r), δ), (m ≥ 1), (520)
where ǫ is the convergence tolerance set by the user and δ is a small parameter used to avoid division by zero.
Calculating ωm and (rm , rm ) at the end of the algorithm of Table 4 requires three global sums two of which can
be performed simultaneously (i.e. the ones in the definition of ωm ) reducing the communication overhead. The
final global sum can also be absorbed by observing that

(rm , rm ) = (s − ωm t, s − ωm t)
2
= (s, s) − 2ωm (s, t) + ωm (t, t), (521)

i.e. the residual error can be calculated before the residual vector is formed as part of the calculation of ωm .
Note that for any other choice of error norm a separate global reduction (per iteration) will be required.

82 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Figure 8: Schematic showing the (horizontal) computational stencil with the red/black ordering. With this order-
ing all the red (or black) cells can be updated independently of one another since the stencil only accesses the
cells of the opposite colour.

J.4 Formulation of the SOR preconditioner

The current preconditioner used in ENDGame is a form of Successive-Over-Relaxation. To derive the algorithm
(517) is rewritten as
Ax = (T + L + U)x = r, (522)
for some matrices T, L and U which will be discussed later. Eq. (517) can also be written in the more convenient
(from the standpoint of creating iterative solutions) as

(T + L)x = r − Ux. (523)

Multiplying (523) by a (positive) parameter ω and adding Tx to both sides yields

(T + ωL)x = ω(r − Ux) + (1 − ω)Tx, (524)

from which, after a suitable choice of decomposition in the above equations has been made, the iterative scheme

(T + ωL)xn = (1 − ω)Txn−1 + ω(r − Uxn−1 ), (525)

for n = 1, 2, . . . can be constructed with a suitable choice of initial guess x0 = 0 (chosen since in a preconditioner
the right-hand-side r tends to zero as the iterations proceed; i.e. we are solving for the errors). Generally a low
number of iteration (∼ 3) is chosen. In (525) the parameter ω is a relaxation parameter and corresponds to
over-relaxation when ω > 1 and under-relaxation when ω < 1 with a typical value of around 1.5.

J.5 Choice of matrix decomposition

In the classical SOR method the matrix decomposition is chosen with T as the diagonal, L as the lower triangular
part and U as the upper triangular part. This choice is convenient since it allows for a simple inversion of the
left-hand-side operator. In the present problem the anisotropy of the grid and the strong constraint of near
hydrostatic balance suggests that a better choice is to make T the tridiagonal matrix arising from the vertical
contributions (i.e. points D, P and U from section J.1). This ensures that the vertical part (largest contribution) is
treated exactly within the iterative procedure.
For the remaining two matrices U and L we could choose them to be the same as the classical SOR routine but
then a problem would arise with parallelization - both in terms of efficiency and reproducibility across different
processor configurations. A natural alternative is to use the well known red/black ordering (see Figure 8) which

83 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

exploits the fact that the red (or black) squares depend only on values at the black (red, respectively) points and
so can be updated independently.
With the red/black ordering (525) can be written in the simplified form
n−1
xnR = xR + ωT−1 [r − Axn−1 ]R , (526)
n−1
xnB = xB + ωT−1 [r − Axn ]B ,

where the subscripts R and B are used to denote evaluation on the Red or Black grid boxes and it is to be
understood that Axn is to be evaluated with the most recently available information; i.e. it would be more
correct to have written it as (L + U)xn + Txn−1 .

84 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

References
[1] R. Bermejo and A. Staniforth. The conversion of semi-Lagrangian advection schemes to quasi-monotone
schemes. Mon. Wea. Rev., 120:2622–2632, 1992.
(Referenced on page 79.)

[2] A. M. Bruaset. A survey of preconditioned iterative methods. Harlow, Essex, England : Longman Scientific
& Technical ; New York : Wiley, 1995.
(Referenced on pages 31 and 82.)

[3] P. Colella and P.R. Woodward. The piecewise parabolic method (PPM) for gas-dynamical simulations. J.
Comput. Phys., 54:174–201, 1984.
(Referenced on page 57.)

[4] J. Côté. A Lagrange multiplier approach for the metric terms of semi-Lagrangian models on the sphere. Q.
J. R. Meteorol. Soc., 114:1347–1352, 1988.
(Referenced on page 32.)

[5] J. Côté, S. Gravel, A. Méthot, A. Patoine, M. Roch, and A. Staniforth. The operational CMC-MRB Global
Environmental Multiscale (GEM) model. Part I: Design considerations and formulation. Mon. Wea. Rev.,
126:1373–1395, 1998.
(Referenced on page 25.)

[6] C. Girard, R. Benoit, and M. Desgagné. Finescale topography and the MC2 dynamics kernel. Mon. Wea.
Rev., 133:1463–1477, 2005.
(Referenced on page 18.)

[7] M. Gross and A. Staniforth. Cubic-spline interpolation on a non-uniform latitude-longitude grid: achieving
cross- and circum-polar continuity. Atmos. Sci. Letters, 11:229–238, 2010.
(Referenced on page 58.)

[8] J. B. Klemp, W. C. Skamarock, and O. Fuhrer. Numerical consistency of metric terms in terrain-following
coordinates. Mon. Wea. Rev., 131:1229–1239, 2003.
(Referenced on page 18.)

[9] A. McDonald and J. R. Bates. Semi-Lagrangian integration of a gridpoint shallow water model on the
sphere. Mon. Wea. Rev., 117:130–137, 1989.
(Referenced on page 32.)

[10] T. Melvin, M. Dubal, N. Wood, A. Staniforth, and M. Zerroukat. An inherently mass-conserving semi-
implicit semi-Lagrangian discretisation of the nonhydrostatic vertical slice equations. Q. J. R. Meteorol.
Soc., 136:799–814, 2010.
(Referenced on pages 14, 18, 25, 30, and 42.)

[11] W.H. Press, S.A. Teukolsky, W.T. Vetterling, and B.P. Flannery. Numerical Recipes in FORTRAN: The art
of scientific computing. Cambridge University Press, Cambridge, UK, 2nd edition, 1992.
(Referenced on page 57.)

[12] A. Priestley. A quasi-conservative version of the semi-Lagrangian advection scheme. Mon. Wea. Rev.,
121:621–629, 1993.
(Referenced on pages 73, 74, 78, and 79.)

[13] H. Ritchie. Semi-Lagrangian advection on a Gaussian grid. Mon. Wea. Rev., 115:608–619, 1987.
(Referenced on page 36.)

[14] H. Ritchie. Application of the semi-Lagrangian method to a multilevel spectral primitive-equations model.
Q. J. R. Meteorol. Soc., 117:91–106, 1991.
(Referenced on page 36.)

[15] H. Ritchie and C. Beaudoin. Approximations and sensitivity experiments with a baroclinic semi-Lagrangian
spectral model. Mon. Wea. Rev., 122:2391–2399, 1994.
(Referenced on page 32.)

[16] C. Schär, D. Leuenberger, O. Fuhrer, D. Lüthi, and C. Girard. A new terrain-following vertical coordinate
formulation for atmospheric prediction models. Mon. Wea. Rev., 130:2459–2480, 2002.
(Referenced on page 18.)

85 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

[17] A. Staniforth, A. A. White, and N. Wood. Treatment of vector equations in deep-atmosphere, semi-
Lagrangian models. I: Momentum equation. Q. J. R. Meteorol. Soc., 136:497–506, 2010.
(Referenced on page 13.)

[18] C. Temperton, M. Hortal, and A. Simmons. A two-time-level semi-Lagrangian global spectral model. Q. J.
R. Meteorol. Soc., 127:111–128, 2001.
(Referenced on page 36.)

[19] J. Thuburn. Vertical discretizations giving optimal representation of normal modes: Sensitivity to the form
of the pressure gradient term. Q. J. R. Meteorol. Soc., 132:2809–2825, 2006.
(Referenced on page 20.)

[20] J. Thuburn and A. Staniforth. Conservation and linear Rossby-mode dispersion on the spherical C grid.
Mon. Wea. Rev., 132:641–653, 2004.
(Referenced on pages 17, 18, and 48.)

[21] J. Thuburn and A. A. White. A geometrical view of the shallow-atmosphere approximation, with application
to the semi-Lagrangian departure point calculation. Q. J. R. Meteorol. Soc., 139:261–268, 2013.
(Referenced on pages 4 and 32.)

[22] J. Thuburn, N. Wood, and A. Staniforth. Normal modes of deep atmospheres. I: spherical geometry. Q. J.
R. Meteorol. Soc., 128:1771–1792, 2002.
(Referenced on page 30.)

[23] J. Thuburn, M. Zerroukat, N. Wood, and A. Staniforth. Coupling a mass-conserving semi-Lagrangian


scheme (SLICE) to a semi-implicit discretisation of the shallow-water equations: minimizing the depen-
dence on a reference atmosphere. Q. J. R. Meteorol. Soc., 136:146–154, 2010.
(Referenced on pages 25, 30, and 42.)

[24] H. A. van der Vorst. Bi-CGSTAB: fast and smoothly converging variant of BiCG for the solution of nonsym-
metric linear systems. SIAM J. Sci. Stat. Comput., 13:631–644, 1992.
(Referenced on pages 31 and 82.)

[25] P. Wesseling. Principles of Computational Fluid Dynamics. Springer-Verlag, Berlin, 1st edition, 2001.
(Referenced on pages 82 and 87.)

[26] A. A. White and N. Wood. Consistent approximate models of the global atmosphere in non-spherical
geopotential coordinates. Q. J. R. Meteorol. Soc., 138:980–988, 2012.
(Referenced on page 42.)

[27] D. L. Williamson, J. B. Drake, J. J. Hack, R. Jakob, and P. N. Swarztrauber. A standard test set for numerical
approximations to the shallow-water equations in spherical geometry. J. Comp. Phys., 102:211–224, 1992.
(Referenced on pages 18 and 44.)

[28] N. Wood, A. Staniforth, A. White, T. Allen, M. Diamantakis, M. Gross., T. Melvin, C. Smith, S. Vosper, M. Zer-
roukat, and J. Thuburn. An inherently mass-conserving semi-implicit semi-Lagrangian discretisation of the
deep-atmosphere global nonhydrostatic equations. Q.J.R. Meteorol. Soc., 2013. DOI:10.1002/qj.2235.
(Referenced on pages 20, 30, and 57.)

[29] N. Wood, A. Staniforth, and A. A. White. Determining near-boundary departure points in semi-Lagrangian
models. Q. J. R. Meteorol. Soc., 135:1890–1896, 2009.
(Referenced on page 32.)

[30] N. Wood, A. A. White, and A. Staniforth. Treatment of vector equations in deep-atmosphere, semi-
Lagrangian models. II: Kinematic equation. Q. J. R. Meteorol. Soc., 136:507–516, 2010.
(Referenced on pages 32, 35, and 36.)

[31] M. Zerroukat. A simple mass conserving semi-Lagrangian scheme for transport problems. J. Comput.
Phys., 229:9011–9019, 2010.
(Referenced on pages 20, 73, and 75.)

[32] M. Zerroukat, N. Wood, A. Staniforth, A. White, and J. Thuburn. An inherently mass-conserving semi-
implicit semi-Lagrangian discretisation of the shallow water equations on the sphere. Q. J. R. Meteorol.
Soc., 135:1104–1116, 2009.
(Referenced on pages 25, 30, 32, and 42.)

86 c Crown Copyright 2015



UMDP: 016
ENDGame Formulation

Solution A2 + B 2 uSP vSP tan λSP


 
(i-1) 0 G/ 2 cos φ 12 0 −
  √
(ii-1) − G/ 2 cos φ 12 − A2 + B 2 / sin φ 12 B/ (−A)
 
(ii-2) − G/ 2 cos φ 12 0 A/B

Table 1: Parameter values for the extrema: arbitrary and/or undefined values denoted by a hyphen.

Table 2: ADAS algorithm

1. Given U , S and C:
2. U ← max (U, Umin ), this aims to reduce the impact of steps 4 and 5 below;
3. Apply the conservation correction (482), U ← U + SγD i,j,k
F (U );
4. U ← max (U, Umin );
5. Apply the positive-definite correction (490), U ← θ1 U + θ2 .

Table 3: Outline algorithm of how the lateral boundary conditions are implemented for a single model time step.

1. Input fields at time step n: π n , un , etc.


2. Initialize guess at next time level: π n+1 = π n , un+1 = un . . . ;
3. Calculate forcing terms held fixed through time step: Run ,. . . ;
4. Calculate Constant Helmholtz matrix coefficients;
5. FOR outer loop = 1,2,. . . DO
IF blend condition holds THEN
a. Blend/overwrite time level n + 1 fields with data from the lbc’s;
ENDIF
b. Calculate departure points and interpolate sources to them;
c. Estimate arrival sources at time level n + 1;
d. Solve Helmholtz problem for π n+1 and update guesses for other fields;
ENDDO
6. Blend/overwrite time level n + 1 fields with data from the lbc’s.
7. Copy n + 1 fields into n variables: π n = π n+1 , un = un+1 . . . ;

Table 4: Post-conditioned BiCGstab [25]

1. Inputs: x, r
2. x0 = x; p0 = v0 = 0;
3. α0 = ω0 = ρ0 = 1; r0 = r − Ax0 ;
4. m = 0;
5. WHILE stopping criterion not satisfied DO
a. m = m + 1;
b. ρm = (rm−1 , r0 ); β = αm−1 ρm /[ωm−1 ρm−1 ];
a. t = rm−1 − βωm−1 vm−1 ; s = Ct; pm = s + βpm−1 ;
c. vm = Apm ; αm = ρm /(r0 , vm );
d. s = rm−1 − αm vm ; s̃ = Cs; t = As̃;
e. ωm = (t, s)/(t, t);
f. xm = xm−1 + αm pm + ωm s̃; rm = s − ωm t.
END

87 c Crown Copyright 2015

Вам также может понравиться