Introduction
State-of-the-art Lagrangian particle dispersion models (LPDMs hereafter), for
example FLEXPART and NAME , are key scientific
tools for the study of the long-range transport and dispersal of the
transport of atmospheric trace gases and aerosols. Applications are diverse,
e.g. establishing the relationship between emissions of pollutants and air
quality downstream , aerosol dispersal following volcanic
eruptions , modelling of nuclear accident
scenarios , and determination of constraints on chemical
emissions via inverse modelling . More
fundamentally, LPDMs can be used to address key scientific questions
concerning the nature of transport in the atmosphere ,
including how transport might be influenced by a changing climate.
Mathematically speaking, LPDMs are formulated as stochastic differential
equations (SDEs hereafter). (It is notable that it is possible to include
jump processes as a representation of non-local convective
parameterisations , but we will not be concerned here with this
possibility.) Although the numerical analysis of solution techniques for
SDEs e.g. is a mature subject in mathematics, LPDMs
have not, generally speaking, exploited developments in the subject, and are
typically formulated using numerical schemes adapted from those used for
ordinary differential equations see e.g.. Validation of
LPDMs has focussed instead on direct comparison with observational
data . Our contention is that observational
comparison, while clearly a necessary aspect of model development, will be
insufficient if any uncertainty exists concerning the accuracy of the
numerical solution of the underlying equations.
The aim of the present work, therefore, is to introduce a rigorous framework
for the testing and evaluation of numerical schemes for LPDMs. The framework
is based on a standard one-dimensional dispersion model problem
modelling the vertical dispersion of air parcels in
the atmospheric boundary layer (ABL hereafter). Vertical profiles of
turbulent statistics representative of both stable and neutral conditions
will be considered, and the LPDM equations will be of the “well-mixed”
class , meaning that long time probability distribution of the
solutions (the invariant measure of the SDEs) is given by a pre-specified
“atmospheric” distribution (taken here to be uniform in physical space and
Gaussian in velocity space). Hence the model problem, while idealised,
captures key elements of the physics of dispersion in the stable and neutral
ABL. The convective case, in which the vertical velocity statistics are
non-Gaussian see e.g., will require a separate test case
and is not discussed here.
Our approach to evaluating a given LPDM numerical scheme is to cross-validate
its performance against a numerical solution of the corresponding
Fokker–Planck equation FPE hereafter; see e.g.. The FPE
describes the time evolution of the probability density function (pdf) of the
stochastic process, and is formulated in position-velocity space, and so in
the context of the current problem of dispersion in one spatial dimension is
a partial differential equation in 2 + 1 dimensions. Note that in three
spatial dimensions in which the FPE is a 6 + 1 dimensional PDE, it will
be computationally impractical in most circumstances to obtain accurate
solutions to the FPE, and consequently LPDMs will be the only practical tool
to solve the problem.
A solution method based on a Hermite function expansion is introduced in
order to obtain accurate solutions of the FPE with computational efficiency.
Evaluation of the LPDM scheme proceeds by a comparison of pdfs in appropriate
error norm, where the LPDM pdf is generated from an ensemble of solutions,
using the kernel density method e.g.. The
performances of various schemes are evaluated, as a function of time step
Δt, including the textbook (basic) Euler–Maruyama scheme, the
second-order and third-order weak Runge–Kutta scheme of Platen see
Sect. 15.1 of, the “small-noise” second-order Runge–Kutta
method of Honeycutt , the “long time-step” scheme used
operationally in FLEXPART , and a suggested improvement to this
last scheme.
The outline of the work is as follows. In Sect. 2, the SDEs describing the
evolution of particle trajectories in the LPDM are introduced, together with
the corresponding FPE. A numerical solution scheme for the FPE is described
and solutions are obtained and benchmarked for a number of test cases. In
Sect. 3, the methodology for using the FPE solution to assess specific
numerical schemes for the LPDM is presented, and in Sect. 4 this methodology
is then applied to specific schemes discussed above. In Sect. 5 the
consequences of our findings are discussed and conclusions are drawn.
The model problem
The model problem formulated as an LPDM
Consider a horizontally homogeneous turbulent ABL of uniform density, with a
vertical velocity distribution that is Gaussian with zero mean and standard
deviation σw(z), and which has a Lagrangian decorrelation timescale
τ(z). The canonical stochastic differential equation model
e.g. for one-dimensional vertical dispersion in the
ABL is
dWt=-Wtτ+121+Wtσw2∂σw2∂zdt+2σw2τ1/2dBt,dZt=Wtdt.
Here Wt and Zt are the vertical velocity and height of a given air
parcel. Both are stochastic variables, with each individual realisation
determined by that of the Brownian (or Wiener) process Bt. Further
σw=σw(Zt) and τ=τ(Zt) are the values of
σw(z) and τ(z) local to the parcel. In operational LPDMs, such
as FLEXPART, appropriate vertical profiles for σw(z) and τ(z)
are specified based on empirical fits to observations of different ABL
conditions, as will be discussed below. The equation set () is
typically augmented with reflecting boundary conditions at the Earth's
surface and at the ABL top seefor a detailed discussion of the top
boundary condition. For definiteness, for our test-case runs, the
initial velocity for Eq. () at t=0 is sampled from a normal
distribution W0∼N(0,σw2(z0)) and, for ease of
comparison to the FPE results below, the initial position is sampled from a
distribution Z0∼N(z0,σz2) centred on an initial
height z0 with standard deviation σz.
Vertical profiles of vertical velocity fluctuations
σ¯w(z) (a) and vertical velocity
Lagrangian decorrelation time τ¯(z) (b)
used in the test-case problems (see Table 1). The dimensions
for σ¯w and τ¯ are
frictional velocity u* and h/u* respectively,
where h is the ABL height.
For the purposes of numerical solution, it is more convenient e.g.
Sect. 3.1 of to use Ito's lemma to express Eq. () in
terms of the variables Ωt=Wt/σw(Zt) and Zt, leading to
dΩt=-Ωtτ+∂σw∂zdt+2τ1/2dBt,Ω0∼N(0,1)dZt=Ωtσwdt,Z0∼N(z0,σz2).
The simpler form () is exactly equivalent to
Eq. (). Moreover, the FPE of Eq. () has a
considerably simpler form than the corresponding FPE of Eq. (), a
fact which will prove useful below.
The non-dimensional profiles of σw(z) and τ(z)
suitable for (i) a constant τ profile, (ii) a stable ABL,
and (iii) a neutral ABL e.g..
The non-dimensional parameter ϵ=u*/fh is a
boundary layer Rossby number (the value ϵ=0.8 is taken in
the test case). For the purposes of numerical stability (see text),
in practice the modified profiles σ¯w(z) and
τ¯(z) are used, where Zm(z)=zb+z(1-2zb) is chosen to
avoid singular behaviour at the boundaries (zb=0.05).
σw(z)
τ(z)
Modified σ¯w(z)
Modified τ¯(z)
Constant τ
0.51+z
Constant
–
–
Stable
1.31-z
0.1z4/5σw
σw(Zm(z))
τ(Zm(z))
Neutral
1.3exp-2z/ϵ
z2σw(1+15z/ϵ)
σw(Zm(z))
τ(Zm(z))
It is simplest to view Eq. () as a non-dimensional equation,
given that in particular Ωt is already a non-dimensional variable.
The natural non-dimensionalisation has length, velocity, and timescales of
ABL height h, surface friction velocity u*, and h/u* respectively.
Under this non-dimensionalisation, the spatial domain for
Eq. () is 0≤Zt≤1.
To specify our test-case problems it is necessary to choose suitable
(non-dimensional) profiles for σw(z) and τ(z). Here we choose to
focus on three such profiles, two of which are widely used
empirical fits to observed statistics in stable and
neutral conditions respectively. The third has τ(z) constant and a
linear profile for σw(z), and is used to demonstrate a new LPDM
scheme introduced below. The details of the profiles used are given in
Table 1 and are plotted in Fig. 1. In practice, the exact profiles suggested
by are modified slightly, as detailed in Table 1, to avoid
singular behaviour at the ABL top and bottom. This is necessary because in
Hanna's original profiles either σw→0 or τ→0 as z→0,1, with neither type of behaviour being physical.
In Sect. 4 large ensembles of numerical solutions of Eq. ()
will be calculated using different numerical integration schemes. The
accuracy of each numerical scheme, as a function of time step Δt,
will be assessed by comparison with the corresponding solution of the FPE, to
be detailed next.
The model problem formulated as an FPE
Following the standard procedure in stochastic calculus e.g.
Sect. 3.4.1 of, the FPE which describes the time evolution of the
probability density p(ω,z,t) of (Ωt,Zt) in
Eq. () can be obtained as
∂p∂t=-∂ωσwp∂z-∂∂ω-ωτ+∂σw∂zp+1τ∂2p∂ω2.
Explicitly, here ω=w/σw. The initial conditions consistent with
those given in Eq. () are (for σz≪1 and z0 not
near the boundaries)
p(ω,z,0)=12πσzexp-ω22-(z-z0)22σz2.
The FPE Eq. () also requires boundary conditions at z=0,1 which
are consistent with the reflecting boundary conditions for the LPDM. The
boundary conditions consistent with reflection are
p(ω,0,t)=p(-ω,0,t),p(ω,1,t)=p(-ω,1,t),
which in probabilistic terms is equivalent to the reflection condition
Ωt→-Ωt being applied at the boundaries.
found that this perfect reflection algorithm is exactly consistent with the
“well-mixed constraint” in homogeneous Gaussian turbulence see also
the appendix of Sect. 11 of.
Equations ()–() constitute a well-defined
initial-value problem which is suitable for numerical solution. An important
quantity obtained from the solution p(ω,z,t) is the physical
concentration of parcels given by
c(z,t)=∫-∞∞p(ω,z,t)dω.
(In general, tracer concentrations and the marginal probability given in
Eq. can differ by a normalisation constant.) The concentration
c(z,t) will be our main benchmark quantity in Sect. 4 below.
Numerical solution of the FPE
The Hermite expansion for the FPE
The non-dimensionalised FPE Eq. () is a hypo-elliptic
differential equation defined on R×[0,1]. Our approach to
its numerical solution is to seek a solution based on the following Hermite
polynomial expansion:
p(ω,z,t)=12π∑k=0∞Ck(z,t)Hek(ω)e-ω2/2.
In statistics, this expansion is also known as the Gram-Charlier series of
Type A see p. 23 of. Here the functions Ck(z,t) denote
the projection, at the vertical level and time (z,t), of p(ω,z,t)
onto the (probabilists') Hermite function Hek(ω)e-ω2/2/2π where Hek(ω) is the
Hermite polynomial defined by
Hek(ω)=-1keω2/2dkdωke-ω2/2.
Notice that it follows that the particle concentration Eq. ()
satisfies c(z,t)=C0(z,t).
Before inserting the expansion Eq. () into the FPE
Eq. () it is helpful to rewrite the FPE in the form
∂p∂t=1τ∂2p∂ω2+ω∂p∂ω+p-∂∂ω∂σw∂zp-∂ωσwp∂z.
In this form the Hermite function identity Eq. () can be used to
evaluate the first term on the right-hand side. Further, the second and third
terms on the right-hand side can be simplified using the derivative and
recursion formulae for Hermite
polynomials (Eqs. , ). After some working the
result is (using the convention C-1≡0)
∑k=0∞Hek(ω)e-ω2/2∂Ck∂t+kτCk+(k+1)∂∂zσwCk+1+σw∂Ck-1∂z=0.
Using the orthogonality property of Hermite functions () it follows that
∂C0∂t=-∂∂zσwC1∂Ck∂t=-kτCk-(k+1)∂∂zσwCk+1-σw∂Ck-1∂z,fork≥1.
The system () constitutes an infinite system of coupled
1 + 1 dimensional first-order partial differential equations for the
coefficients Ck. For a numerical solution this series can be truncated as
we describe below.
The initial conditions for Eq. () are easily obtained from
() using the orthogonality property,
C0(z,0)=12πσzexp-(z-z0)22σz2,Ck(z,0)=0(fork≥1).
The boundary conditions can be obtained using the symmetry
Hek(ω)=-1kHek(-ω).
Substituting the expansion () into
the boundary condition (), it follows that
∑koddCk(z,t)Hek(ω)e-ω2/22π=0,atz=0,1,
and consequently
Ck(0,t)=Ck(1,t)=0,forkodd.
It may seem surprising that the even equations have no boundary condition and
the odd equations take two boundary conditions. However, as the
system () consists of first-order PDEs it is clear
that the total number of boundary conditions will be correct, provided that
the series is truncated at k=K odd.
It is worth noting that the series () can also be truncated at
K=0 by using an (approximate) quasi-stationary balance in the k=1
equation of the form
C1=-σwτ∂C0∂z,
which results in the diffusion equation
∂C0∂t=∂∂zσw2τ∂C0∂z,∂C0∂z(0,t)=∂C0∂z(1,t)=0.
It is well known e.g. Sect. 3.5 of that the LPDM
Eq. () can be approximated by a random walk (“random
displacement” or RDM) model
dZt=∂∂zσw2τdt+2σw2τ1/2dBt.
Equation () is simply the Fokker–Planck equation of the RDM
model (Eq. ), with the diffusivity κ of the RDM being
κ=σw2τ. Note that the RDM model can be derived formally
from the LPDM in the distinguished limit of a short decorrelation time,
σw→∞, τ→0 with σw2τ=κ finite
see e.g. Sect. 6.3 of. It is much easier to obtain accurate
solutions of Eq. (), compared to Eq. () at relatively
large time steps; hence, an interesting question concerns when exactly it is
preferable to solve Eq. () rather than Eq. (). This
question is best answered by quantifying the difference between the solution
of Eqs. () and () and using this difference as a
benchmark for assessing the errors in LPDM calculations, as will be done in
Sect. 4 below.
The numerical method and benchmark solutions for the FPE
Based on the analysis above, Eq. () can be solved numerically by
integrating the system () with boundary conditions
(Eq. ), truncated at k=K odd. Our approach is to use a
standard finite-difference discretisation with Nz grid points, equally
spaced with Δz=1/Nz, on a staggered cell-centred grid (i.e. zi=i-1/2Δz, for i=1,…,Nz) in order to apply the
boundary conditions at z=0,1 systematically. The details of the
implementation of the boundary conditions are described in Appendix B.
The set () is stiff and a naive solution method would have the
time step Δt bounded above by Δt≲Minzτ(z)/K, i.e. the timescale of exponential decay of the highest Hermite
function mode. However, considerably longer time steps can be used if an
exponential time-stepping scheme is chosen. Our choice is the Exponential
Time-Differencing fourth-order Runge–Kutta (ETDRK4) scheme of
, with the “linear” operator in that scheme taken to be the
first term on the right-hand side of Eq. () only, because it
is this first term that is responsible for the stiffness of
Eq. ().
To obtain our benchmark solutions of Eq. () and therefore
Eq. (), tests of the convergence of the solutions as both Δt and Δz are decreased and K is increased have been performed. For
all three case studies, it was found to be adequate to take K=19 to obtain
fully converged solutions, because the Hermite series was found to converge
rapidly, i.e. |C19|≲10-16 everywhere in the domain.
Comparison of a sequence of solutions with Δz=1/Nz with Nz=27,28,…,212 revealed quadratic convergence with Δz as
expected for our scheme. Figure 2 shows the relative error
Ej(t), with reference to the next-highest resolution solution,
in the L2 norm for the mean concentration c(z,t) at fixed
times, for the two test cases. That is,
Ej(t)=∫01C0j(z,t)-C0j+1(z,t)2dz1/2,
where C0j(z,t) denotes the solution with Nz=2j. Quadratic
convergence is evident from the slope of the graphs in Fig. 2. For
example, typical numerical
errors at Nz=212 (highest resolution) are E12(t1)=9.7×10-5 (stable boundary layer at t1=h/u*)
and 1.3×10-4 (neutral boundary layer at t1=3h/u*) respectively.
The numerical accuracy above is sufficient for benchmarking
our LPDM solutions, because the statistical error associated with
reasonable-sized ensembles (N=106) of the LPDM is of
order E(t1)≈10-2, as will be discussed below.
Relative error Ej (see Eq. ) of the
FPE solutions as a function of grid resolution Δz=2-j
for j=7,8,…,12 for the two test-case
problems. Stars: stable ABL (Ej(t=h/u*)). Squares: neutral ABL
(Ej(t=3h/u*)).
Snapshots of particle concentration c(z,t) from the
numerical FPE solutions for the three test-case
problems. (a) Constant τ (t=0,1,1.5,2 h/u*).
(b) Stable ABL (t=0,1,2,4 h/u*). (c) Neutral ABL
(t=0, 3, 6, 12 h/u*). For clarity, c(z,0)/4 is plotted (instead of
c(z,0))
for the initial condition at t=0 in both panels.
Figure 3 shows snapshots of the particle concentration c(z,t) for each of
the three FPE benchmark solutions described above. The left panel shows the
constant τ case, the middle panel shows the stable ABL case, and the
right panel the neutral ABL. In all three cases particles are initialised
close to z=z0=1/2 and disperse to become well mixed throughout the ABL at
late times. The neutral and stable cases differ in that mixing is rather more
rapid (in terms of the dimensional timescale h/u*) for the stable case
compared to the neutral case. Also, in the neutral case, mixing is relatively
slow towards the top of the ABL where the amplitude of turbulent fluctuations
decays exponentially.
Evaluation of numerical schemes for LPDMs
In this section, a range of textbook, commonly used and new numerical schemes
for LPDMs will first be introduced and then evaluated using the FPE solutions
described above as a benchmark. The task is somewhat simplified because the
equation set () is time-independent (autonomous). Note that it
may be necessary to modify some of the schemes described below if an ABL with
time-dependent statistics is to be modelled with the same formal accuracy.
Note that, in the terminology of SDE numerical schemes , we are
able to use “weak” schemes (convergent in probability) in addition to
“strong” schemes (convergent in path), because we are primarily interested
in the concentration of particles, which can be obtained from the pdf
p(ω,z,t). The rate of convergence of a scheme, as measured by
quantities which depend on the pdf such as the concentration c(z,t), with
respect to the time step Δt is known as its “weak” order see
e.g. Chap. 9 of. The weak order is the relevant measure of
comparison between schemes for our study, and should not be confused with the
“strong” order of a scheme, which refers to the rate of convergence of
solution paths with respect to specific stochastic realisations.
The LPDM numerical schemes investigated in Sect. 4. Here Δt
is the time step, ΔBn∼N(0,Δt), Δn∼N(0,1) and σi=σw(Zi), and τn=τ(Zn).
The drift function is denoted by Fi=-Ωi/τ(Zi)+σw′(Zi)
where i=n,μ.
Scheme
Algorithm
Reference and notes
E-M
Ωn+1=Ωn+FnΔt+(2/τn)1/2ΔBn
Zn+1=Zn+ΩnσnΔt
EXPLICIT 2.0
Ωn+1=Ωn+12Fn+FμΔt+12(2/τn)1/2+(2/τμ)1/2ΔBn
Sect. 15.1 of
Zn+1=Zn+12Ωnσn+ΩμσμΔt
Ωμ=Ωn+FnΔt+(2/τn)1/2ΔBn,
Zμ=Zn+ΩnσnΔt
HON-SRKII
Ωn+1=Ωn+12Fn+FμΔt+(2/τn)1/2ΔBn
Zn+1=Zn+12Ωnσn+ΩμσμΔt
Ωμ=Ωn+FnΔt+(2/τn)1/2ΔBn,
Zμ=Zn+ΩnσnΔt
LEGGRAUP
Ωn+1=RnΩn+σn′τ(1-Rn)+1-Rn21/2Δn
Zn+1=Zn+σnΩnΔn
Rn=e-Δt/τn
LONGSTEP
Ωn+1=RnΩn+σn′τ(1-Rn)+1-Rn21/2Δn
See Appendix C.
Zn+1=Zn+σnσn′expσn′Sn-1
Rn=e-Δt/τn
Sn=Ωnτn1-e-Δt/τn+σn′τn2Δtτn-1+e-Δt/τn
+21/2α2n(t)βnΔ1n+1-βn1/2Δ2n
βn=1-Rn221/2α1nα2n,α1n=1-Rn1/2
α2n=Δtτn-21-Rn+121-Rn21/2
EXPLICIT 3.0 scheme tested in Sect. 4, with τn=τ(Zn),
σi=σw(Zi),andσ̃ϕ=σw(Z̃ϕ),
where i=n,u,ϕ. The drift function is denoted by Fi=-Ωi/τ(Zi)+σw′(Zi) or F̃ϕ=-Ω̃i/τ(Z̃ϕ)+σw′(Z̃ϕ). Here
Δt is the time step and we use two correlated Gaussian random
variables ΔBn∼N(0,Δt) and ΔCn∼N(0,(Δt)3/3), with E(ΔBnΔCn)=(Δt)2/2.
Scheme
Algorithm
Reference and notes
EXPLICIT 3.0
Ωn+1=Ωn+FnΔt+(2/τn)1/2ΔBn
Sect. 15.2 of
+12Fζ++Fζ--32Fn-14F̃ζ++F̃ζ-Δt
+12Fζ+-Fζ--14F̃ζ+-F̃ζ-ζΔCn(2/Δt)1/2
+16Fn+Fu-Fζ+-Fρ+(ζ+ρ)ΔBn(Δt)1/2+Δt+ζρ(ΔBn)2-Δt
Zn+1=Zn+ΩnσnΔt
+12σζΩζ++Ωζ--32Ωnσn-14σ̃ζΩ̃ζ++Ω̃ζ-Δt
+σζ2Ωζ++Ωζ--σ̃ζ4Ω̃ζ+-Ω̃ζ-ζΔCn(2/Δt)1/2
+16Ωnσn+Ωuσu-σζΩζ++Ωρ-(ζ+ρ)ΔBn(Δt)1/2+Δt+ζρ(ΔBn)2-Δt
Ωϕ±=Ωn+FnΔt±(2/τn)1/2(Δt)1/2ϕ
Zϕ=Zn+ΩnσnΔt
Ω̃ϕ±=Ωn+2FnΔt±2/τn1/2(2Δt)1/2ϕ
Z̃ϕ=Zn+2ΩnσnΔt
Ωu=Ωn+Fn+Fζ+Δt+(2/τn)1/2ζ+ρ(Δt)1/2
Zu=Zn+Ωnσn+Ωζ+σζΔt,
whereϕ=ζ,ρandP(ζ=±1)=P(ρ=±1)=12
It is important to note, however, that it is by no means obvious that a given
scheme will attain its formal weak order when solving Eq. ().
This is because the assumptions under which the weak order of each scheme is
derived are not met in the case of Eq. () because of the
reflection boundary conditions. It is therefore necessary to solve
Eq. () explicitly to assess each scheme.
LPDM numerical schemes
Tables 2–3 summarise the SDE numerical schemes to be investigated. The
first, most obvious scheme to test is the Euler–Maruyama (E-M) scheme
, i.e. the simplest and lowest order time-stepping scheme
for SDEs. Next, as with ordinary differential equations (ODEs), it is
possible to construct schemes with higher orders of formal accuracy in the
spirit of Runge–Kutta schemes for ODEs. Here we test the performance of
Platen's “explicit order 2.0 weak scheme” (EXPLICIT 2.0) and “explicit
order 3.0 weak scheme” (EXPLICIT 3.0) see Chap. 15 of. In
common with schemes for ODEs, higher order schemes are somewhat more
complicated to implement, and are more computationally expensive per time
step Δt. The advantage, however, is that the schemes have weak order
Δt2 (EXPLICIT 2.0) and Δt3 (EXPLICIT 3.0) compared to
Δt for E-M.
A single candidate from a second class of schemes, the so-called
“small-noise” schemes, to be investigated is the HON-SRKII scheme of
. Small-noise schemes typically have the same weak order
(Δt) as E-M see e.g. the discussion in Chap. 3 of,
but the schemes are designed so that the leading-order error depends on the
“noise amplitude” in the equation, which in many practical situations is
sufficiently small that higher-order convergence is observed in practice (at
least for intermediate length time steps; see discussion below). The
HON-SRKII scheme will be shown below to converge with global error ∼Δt2 in this intermediate time-step regime.
A third class of schemes to be investigated is designed to work well with
long time steps. Such schemes are of interest operationally, because the
practical advantages of calculating large ensembles efficiently are thought
to outweigh the disadvantage of loss of accuracy due to time-stepping errors.
The FLEXPART model , for example, switches between using E-M
and a long time-stepping scheme due to LEGGRAUP. It is of
some interest to verify that long time-stepping schemes such as LEGGRAUP do
indeed outperform E-M at operationally relevant values of Δt. In
fact, in Appendix C we review the derivation of the LEGGRAUP scheme, and show
that additional care is needed to couple the velocity and position equations.
A corrected scheme (LONGSTEP) is derived in Appendix C and is then compared
with the schemes listed above in Sect. 4.2.
The method used to compare the results from a particular scheme, at fixed
time step Δt, to the particle concentration c(z,t) obtained from
the numerical solution of the FPE, is as follows. First, a large ensemble
(typically N=106) of trajectories is calculated using the scheme under
investigation. Next, the density of particles c^ is reconstructed
from the resulting ensemble {Zt(i),i=1,…,N} using kernel
density estimation
c^(z,t;hb)=1Nhb∑i=1NKz-Zt(i)hb+“image terms”.
Here hb>0 is a (small) smoothing parameter known as the bandwidth, and
“image terms” refer to contributions from the images of trajectories,
introduced to satisfy the boundary conditions. The function K(⋅) is the
kernel function, and is non-negative with zero mean and has unit integral.
Here we use a Gaussian kernel. Details, including how the optimal bandwidth
hb=h* is chosen in practice, are given in Appendix D.
The error associated with a given scheme, at time step Δt, is
measured by the L2 norm
‖c-c^‖2=∫01(c(z,t)-c^(z,t;h*))2dz1/2.
In practice the error (Eq. ) is effectively bounded below by
the so-called statistical error, which is defined as the expected
value of ‖c-c^‖2 in the event that the ensemble {Zt(i),i=1,…,N} were sampled from the exact distribution
c(z,t) itself. It is important to emphasise that it is not possible, using
our method, to investigate schemes with errors below the statistical error.
The statistical error can of course be reduced by using a larger ensemble
N, but convergence is slow as the dependency is N-1/5, as discussed in
Appendix D where details are given.
L2 error (Eq. ) as a function of non-dimensional
time step Δtu*/h for the constant τ=0.1 test case with
N=106 ensemble integrated at time t=h/u*. The LONGSTEP scheme (purple
diamonds) gives the best results in this case. Blue lines of slopes 1,2,
and 3 are plotted for reference.
L2 error (Eq. ) as a function of non-dimensional
time step Δtu*/h for the stable ABL test case integrated at
intermediate time t=h/u* (a) and at late time
t=4h/u* (b). From left to right, blue lines of slopes 1,2,
and 3 are plotted for reference.
In the results below, in the interests of reproducibility, the error is
presented as a function of the fixed time step Δt for each scheme.
However, the schemes have different computational costs per time step, which
will depend on both the method of implementation of each algorithm and on the
machine used for the simulations. To give a rough idea of representative
computational costs, in Table 4 the relative cost measured with reference to
the E-M scheme is shown for our calculations. Following best practice in
large operational calculations see e.g., the random numbers
used to simulate the Wiener processes are pre-calculated so the costs of
their generation are not included in the comparison. Another possible
computational saving comes from the use of variable time steps. To test
whether or not a significant computational saving is easily attainable, we
have made some calculations in which Δt∝τ (the local
Lagrangian decorrelation time). For each scheme tested, the use of variable
time steps was found to lead to a computational saving of a factor of around
2 to 3 compared to fixed time steps, with the schemes otherwise performing as
detailed below. More details on variable time-stepping schemes will be given
elsewhere.
Computational clock times, measured relative to the E-M scheme, for
all of the schemes detailed in Tables 2 and 3. The calculations are for
N=106 trajectories, with time step Δt=10-3h/u* and
integration time h/u*. The computational times are obtained by taking the
average of times elapsed in seconds from several simulations, coded in
MATLAB, on a MacBook Pro with no other programs running.
Scheme
Relative computational time
E-M
1.0
EXPLICIT 2.0
2.0
EXPLICIT 3.0
5.8
HON-SRKII
1.9
LEGGRAUP
1.2
LONGSTEP
1.5
L2 error (Eq. ) as a function of non-dimensional
time step Δtu*/h for the neutral ABL test case integrated at
intermediate time t=3h/u* (a) and at late time
t=12h/u* (b). From left to right, blue lines of slopes 1 and 2
are plotted for reference.
Results
The main results, showing the performance of the six schemes described in
Tables 2–3 over a wide range of time steps Δt, are shown in
Figs. 4–6. Figures 4–6 detail the results for the constant τ test
case, the stable ABL test case and the neutral ABL test case respectively
(see Table 1). In each figure, the L2 error (Eq. ) is
plotted as a function of non-dimensional time step Δtu*/h.
Logarithmic scales are used so that lines of constant slope correspond to the
observed order of the schemes. Blue lines with slopes 1, 2, and 3 are
plotted for reference. The statistical error, which is the lowest possible
error that can be measured for a given scheme, is plotted as a solid black
line in each panel.
Also plotted in Figs. 4–6, as a dotted black line, is the L2-norm
difference ‖c-C0‖2 between the concentration field c(z,t) obtained
from the solution of the FPE Eq. () and C0(z,t) obtained from
the diffusion Eq. (). The dotted black line marks an important
boundary on each panel. If the time step Δt is such that the error of
a given scheme lies above this line, then it is preferable to solve the RDM
Eq. () in place of Eq. (), because (at fixed
Δt) the numerical error for the former is more easily controlled.
Figure 4 shows results for the constant τ test case at time t=h/u*
(see Fig. 3 and Table 1 for details). The lowest order schemes, LEGGRAUP
(blue circles) and E-M (black squares), are seen to realise their formal weak
order Δt. EXPLICIT 2.0 (red hexagons) and HON-SRKII (green solid
triangles) have weak order Δt2, whereas EXPLICIT 3.0 (blue
triangles) has weak order Δt3, as expected. The best performing
scheme for this particular case is the new scheme LONGSTEP (purple diamonds)
derived in Appendix C. The rationale for LONGSTEP is that there is a
conceptual error in the derivation of LEGGRAUP, which results in its
performance at large Δt being no better than E-M. When this error is
corrected in LONGSTEP, the performance is better than even EXPLICIT 3.0.
LONGSTEP in effect uses exact solutions of the LPDM equations for constant
τ and linear σw, meaning that if the same calculations had been
performed in an infinite domain, the numerical error would be zero. In the
constant τ test case, errors in LONGSTEP arise only from the reflection
boundary conditions at z=0,1. However, LONGSTEP does not fare well in the
remaining two test cases to be described next.
Figure 5 shows results for the stable ABL test case at intermediate time
t=h/u* (upper panel) and at late time t=4h/u* (lower panel), when
the concentration is almost well mixed across the ABL (see Fig. 3). The
results are similar to those of the constant τ case, except LONGSTEP
(purple diamonds) now performs as poorly as E-M. Both E-M and LONGSTEP
outperform LEGGRAUP. It was not found to be possible to obtain solutions for
EXPLICIT 3.0 using time steps longer than Δt=0.02h/u* because of
problems with the reflective boundary conditions.
Figure 6 shows the results for the neutral ABL case at intermediate time t=3h/u* (upper panel) and at late time t=12h/u* (lower panel). In
this case the performance of LONGSTEP and LEGGRAUP are comparable, but with
the E-M scheme performing better than both, except at very long time steps
where LEGGRAUP has slightly better accuracy at long time steps. As for the
previous test cases, the EXPLICIT 3.0 (blue triangles) scheme gives the
lowest errors (weak order Δt3), and EXPLICIT 2.0 (red hexagons)
along with HON-SRKII (green solid triangles) perform consistently well with
weak order Δt2.
Snapshots of reconstructed particle density c^(z,t) for
the stable ABL case at time t=h/u*, shown at each scheme.
(a) When long time step Δt=0.05h/u* is used and errors
due to boundary conditions dominate. (b) When moderate time step
Δt=0.007h/u* is used.
To give an impression of where the particle concentration errors are
accumulating, Fig. 7 shows snapshots of particle density c^(z,t)
for the stable ABL case, at t=h/u*. Results are shown for each scheme when
a long time step Δt=0.05h/u* is used (left panel) and a
moderate time step Δt=0.007h/u* (right panel). The errors in
the long time-step case are large and are largely due to issues with the
reflection of trajectories at the surface (z=0). Numerical accuracy
requires that Δt≪τ, which is evidently violated close to the
boundary where τ(z) is small (see Fig. 1). Errors due to reflection are
particularly acute for the higher order schemes (such as EXPLICIT 2.0 and
HON-SRKII) that require the treatment of an intermediate step(s). See the
discussion in Appendix B for how this step is implemented. The stable
boundary layer case, where τ decays most rapidly near the z=0
boundary, is the case which appears to be the most sensitive to the treatment
of reflection there.
Conclusions
The main contribution of this paper is to introduce a protocol for the
quantitative assessment of SDE numerical schemes, applied to the problem of
dispersion in an idealised atmospheric boundary layer, as modelled by LPDMs.
Accurate solutions of the Fokker–Planck equation (FPE, Eq. ) are
used to benchmark the distribution obtained from an ensemble of LPDM
solutions obtained using a particular scheme with a fixed time step Δt. By using the FPE solution, our protocol avoids the possibility of the
LPDMs exhibiting spurious convergence to an incorrect distribution as Δt→0 (e.g. by a poor treatment of reflection boundary conditions), and
the FPE provides independent verification of the correctness of a specific
implementation.
The convergence results obtained in our model test problems are valuable because, due
to the importance of reflection of particles from the surface and top
of the boundary layer, it is not possible to rely on the formal convergence rates of
different SDE schemes as given by e.g.. All of the
schemes tested attain their formal convergence rates at early times in
the model test problem, i.e. before reflection becomes important, and
thereafter are limited to an extent by the details of how reflection
is implemented (see Appendix B for discussion).
Our results allow the following recommendations to be made, for consideration
by operational modellers.
For our test problems, the best results with respect to accuracy as a
function of Δt were obtained with the EXPLICIT 3.0 weak order Δt3 scheme. However, this scheme is time-consuming to implement and more
expensive per step compared to the weak order Δt2 schemes
investigated, so the gains associated with it are marginal. A good compromise
between ease-of-implementation, flexibility and accuracy is the
“small-noise” scheme of here HON-SRKII. Formally, the
weak order of HON-SRKII is just Δt, i.e. the same as Euler–Maruyama.
However, the scheme designed so that at fixed Δt, in the limit of
small noise, the weak error scales with Δt2 e.g. Chap. 3
of. Although the boundary layer dispersion problems examined here
are not formally “small-noise” problems, our results show clearly that they
behave as such in a practical implementation. As a consequence HON-SRKII
scheme performs at least as well as the formally weak order Δt2
scheme EXPLICIT 2.0 (which in fact has a very similar implementation for the
specific LPDM problem we have examined here).
The “long-step” scheme due to here LEGGRAUP, which is
used operationally for global integrations of trajectories in FLEXPART (for
example), should be avoided. LEGGRAUP does not significantly outperform
Euler–Maruyama at any time step for any of the three profiles we have
studied. The reason for this is a conceptual error in its derivation, which
we have corrected here in the development of a new scheme – LONGSTEP – see
Appendix C. LONGSTEP performs very well in the case of
τ(z) = constant, but no better than LEGGRAUP for other τ(z)
profiles; hence, we do not recommend it for operational use either.
Global calculations often require the use of long time steps for reasons of
computational efficiency. For such calculations, we recommend switching to
the random displacement model (Eq. ) rather than solving the LPDM
Eq. (). The reason for this recommendation is apparent in
Figs. 4–6, where the numerical error for all of the schemes investigated is
seen to exceed the difference between RDM and LPDM solutions when the time
step Δt≳0.02h/u*. Given that the unit of time in our
non-dimensionalisation is T=h/u*, where h=100-1000 m is boundary layer
height and u*=0.1-1 m s-1 is surface friction velocity, for a
typical T≈1000 s errors will be minimised by using the RDM whenever
a time step Δt≳20 s is required.
Naturally, the recommendations above are based only on the limited set of
schemes which we have studied. It is to be hoped that the protocol and test
cases introduced here will be helpful to other researchers developing and
testing novel methods for LPDMs. A key challenge in such development will be
the careful treatment of reflection boundary conditions, including their
generalisation to more complex physical situations
e.g..