170
3. Beyond the One-Way WaveEquation
ßu
ßh
--fv+g-=O,
ßt
ßx
ßv
-+fu =0,
ßt
ßh
Bu
-+H-=O.
ßt
ßx
Comparc the approximate solution to these equations obtained using leapfrog
differencing on an unstaggered mesh
82tU - fv + g82xh = 0,
82t V + f u = 0 ,
82th + H82xU = 0
with those obtained using forward-backward tirne-differencing on the staggered mesh shown in Fig . 3.1:
Assume that v, which is not shown in Fig. 3.1, is defined at the same points
as u, Let the spatial domain be periodic on the interval 0 x
2000 km,
but show your solutions only in the domain 600
x
14000 km . Let
f = 10- 4 s-I and e = -JiH = 10 ms- I. For initial conditions choose
u(x,O) = v(x,O) = 0, and let the height field be given by a slightly
smoothed unit-amplitude square wave with nodes at x = 0 and 1000 km .
Obtain this smoothed square wave by three iterative applications ofthe filter
to a pure square wavc . Let Ilx = 3l km .
(a) Show solutions for all three fields at the time step closest to t = 21000 s.
Use Courant numbers (eilt / Ilx) of 0.9 and O.L Discuss the quality of the
two solutions. Explain the source of the difference between the two solutions.
(b) Eliminate the smoothing step from the initialization and discuss the impact on the solution.
(Note that analytic solutions to this problem are given in Gill (1982, Sec -
tions 7.2-7.3).)
13. *Compute exact and numerical solutions to the variable-wind-speed advection equation (3.87) in a periodic domain 0 x
2. Choose
0.3 -
1 0.3,
I.5(x - -3 sin(3rrx) sin(12rrx),
1)
I
if 3
I
s x s 3'
2
otherwise,
e(x) =
3. Beyond the One-Way WaveEquation
ßu
ßh
--fv+g-=O,
ßt
ßx
ßv
-+fu =0,
ßt
ßh
Bu
-+H-=O.
ßt
ßx
Comparc the approximate solution to these equations obtained using leapfrog
differencing on an unstaggered mesh
82tU - fv + g82xh = 0,
82t V + f u = 0 ,
82th + H82xU = 0
with those obtained using forward-backward tirne-differencing on the staggered mesh shown in Fig . 3.1:
Assume that v, which is not shown in Fig. 3.1, is defined at the same points
as u, Let the spatial domain be periodic on the interval 0 x
2000 km,
but show your solutions only in the domain 600
x
14000 km . Let
f = 10- 4 s-I and e = -JiH = 10 ms- I. For initial conditions choose
u(x,O) = v(x,O) = 0, and let the height field be given by a slightly
smoothed unit-amplitude square wave with nodes at x = 0 and 1000 km .
Obtain this smoothed square wave by three iterative applications ofthe filter
to a pure square wavc . Let Ilx = 3l km .
(a) Show solutions for all three fields at the time step closest to t = 21000 s.
Use Courant numbers (eilt / Ilx) of 0.9 and O.L Discuss the quality of the
two solutions. Explain the source of the difference between the two solutions.
(b) Eliminate the smoothing step from the initialization and discuss the impact on the solution.
(Note that analytic solutions to this problem are given in Gill (1982, Sec -
tions 7.2-7.3).)
13. *Compute exact and numerical solutions to the variable-wind-speed advection equation (3.87) in a periodic domain 0 x
2. Choose
0.3 -
1 0.3,
I.5(x - -3 sin(3rrx) sin(12rrx),
1)
I
if 3
I
s x s 3'
2
otherwise,
e(x) =
