In this project I will examine the (mildly nonlinear) behaviour of flows over complex topography.
Special attention will be paid to the behaviour as steepness of topography increases to infinity.
I'm following the techniques of chapter 5 of this book
Mathematical prerequisites
We start with the equation from Long 1953
for stratified flow over a mountain in the absence of friction, described by a streamfunction perturbation δ(x,z)=z−z0∇2δ+e∂ze[∂zδ−21∥∇δ∥2]+U2N2δ=0E Nonlinear
Where e=(1/2)ρ0U2, and U=U(z) is the background flow away from the mountain.
We make the following assumptions following Lin:
Ψ has no deflection far upstream of the mountain (i.e. streamlines are horizontal)
U(z)≡C and N(z)≡C
The atmosphere is Boussinesq.
Under these assumptions, Equation E Nonlinear becomes
∇2δ+U2N2δ=0E Linear
which is a linear second order elliptic equation to which we apply the non-linear boundary condition
δ(x,z)=h(x) at z=h(x)E BC Nonlinear
where we are applying the boundary condition at (x,h(x)) rather than at (x,0) in the linear case.
Elementary fourier transform theory see reference leads us
to calculate δ^(k,m)=2π1∫−∞∞∫−∞∞δ(x,z)e−i(kx+mz)dxdz with inverse δ(k,m)=2Re∫0∞∫0∞δ^(k,m)ei(kx+mz)dkdm
where we have left the ∂zz term unexpanded because we will use a separable ansatz,
namely δ^(k,z)=δ(k,0)e−imz for l>k, with m=l2−k2 and δ^(k,z)=δ(k,0)e−λz with λ=k2−l2. Note that these
are implementations of the linear boundary conditions. We will implement a newton-raphson method
for the nonlinear boundary conditions later. Under linear boundary conditions we can use FFT to find
δ(x,z)=Re[∫0lδ^(k,0)eimzeikzdk+∫l∞δ^(k,0)e−λzeikxdk]E IFT Linear
In order to find the proper nonlinear boundary condition iteratively see this reference
Ok so we have a 3-step pseudocode using a pointwise predictor corrector numerical minimization problem
Step 0:
δ1(z=0)
=h(x)
Step 1:
En(z=h(x))
=δn(z=h(x))−h(x)
Step 2:
δn+1(z=0)
=δn(z=0)−En(z=h(x))
Where each step merely involves a fourier transform. The final solution can be
extracted by taking a fourier transform along model levels. All that needs
to be passed into the model is the surface coefficients.
Todo 12/05/2021
Test to see that one-step solver works for constant l and linear lower boundary constraint. Done.
Test that solution resulting from iterative solver actually solves the equation that I
think I'm solving. Done.
Extend results to use non-constant l parameters from the Keller paper.
Note: I think the derivation made here is valid under the assumption that δ does not
meaningfully contribute to deviations from ρ(z), and so we can assume that
ρz=C(x) is approximately constant.
Extending my code to work with a vertically varying l
From Keller, if we assume that we have background profiles N(z),u(z),ρ(z).
Keller makes the rather cursèd definition β≡dzdlnρ(z) which we will call ε
We will assume linear shear in the vertical, and that we are still working at horizontal scales
at which non-hydrostatic effects are significant. We define z~≡1+cz and thus assume that
u=u0z~.
Although we will assume non-hydrostatic dynamics, we will assume that our base state (in particular, ρ
obeys ∂zp=−ρg). For simplicity I'll assume an isothermal atmosphere
because thermodynamics will play no role in the evolution of the dynamical core experiments for this mode.
With this assumption, we know that if we let T≡T, then we solve ∂zp=−ρg
which gives us that
p(z)=p0exp[−RdTgz]
and we can use the ideal gas law to conclude
ρ(z)=ρ0exp[−RdTgz]
Note: the dependence of this profile on `z` means we have to take care when we are trying to apply a nonlinear
boundary condition
With these preliminaries we are ready to define the most complex equation we will be solving in this project. We define κ2≡c2k2+β2/4 to be a non-dimensional wavenumber
0
=dz~2d2Ψ^+(z~2N2(∂zu)−2−κ2)Ψ^
=dz~2d2Ψ^+(z~2N2(u0c)−2−κ2)Ψ^
=dz~2d2Ψ+(z~2Ri−κ2)
If we define μ≡Ri−1/4, we can define the solutions of this equation
in terms of bessel functions, and thus find
which is presumably the equation that will now pin me down, steal my ice cream cone,
and force me to watch it melt while it laughs at me.
We need to find a way to evaluate Bessel functions with complex order and real arguments.
Evaluating exotic bessel functions in python
Ok we don't actually have to support fully complex orders. Our order is given by
iμ=iRi−1/4, which is either real or purely imaginary.
We will try to deal with this using the ideas found here.
Suppose we are only interested in κ∈R with order iν for ν∈R then
Jν(x)=sech(νπ)ReJiν(x)
There is a paper that illustrates
how we might calculate these, but for now it's probably easier to just solve it numerically.
Note: for fixed μ (i.e. c and N) we can calculate this function to extremely high precision offline.
For our purposes β2≈0, and exists in the paper only for mathematical reasons.