Testing the hypothesis that it's a lamb wave
The mathematics of lamb waves
In the atmosphere there is a special kind of acoustic wave called a Lamb wave, which is a horizontally propagating sound wave
with no vertical velocity propagation (w ′ w' w ′
= 0). They are supported by a hydrostatic equation set. It has been observed that the amplitudes of the oscillations of a Lamb wave vary with height.
Use the equations:
( ∂ ∂ t + u ‾ ∂ ∂ x ) u ′ + 1 ρ ‾ ∂ p ′ ∂ x = 0 \left(\frac{\partial}{\partial t} + \overline{u} \frac{\partial}{\partial x} \right)u' + \frac{1}{\overline{\rho}} \frac{\partial p'}{\partial x} = 0 ( ∂ t ∂ + u ∂ x ∂ ) u ′ + ρ 1 ∂ x ∂ p ′ = 0
( ∂ ∂ t + u ‾ ∂ ∂ x ) p ′ + γ p ‾ ∂ u ′ ∂ x = 0 \left(\frac{\partial}{\partial t} + \overline{u} \frac{\partial}{\partial x} \right)p' + \gamma \overline{p} \frac{\partial u'}{\partial x} = 0 ( ∂ t ∂ + u ∂ x ∂ ) p ′ + γ p ∂ x ∂ u ′ = 0
∂ p ′ ∂ z = − ρ ′ g \frac{\partial p'}{\partial z} = -\rho' g ∂ z ∂ p ′ = − ρ ′ g
( ∂ ∂ t + u ‾ ∂ ∂ x ) ρ ′ + ρ ‾ ∂ u ′ ∂ x = 0 \left(\frac{\partial}{\partial t} + \overline{u} \frac{\partial}{\partial x} \right) \rho' + \overline{\rho} \frac{\partial u'}{\partial x} = 0 ( ∂ t ∂ + u ∂ x ∂ ) ρ ′ + ρ ∂ x ∂ u ′ = 0
Where p ‾ ( z ) \overline{p}(z) p ( z )
, ρ ‾ ( z ) \overline{\rho}(z) ρ ( z )
depend on height, u ‾ ( z , ϕ ) \overline{u}(z, \phi) u ( z , ϕ )
, T ‾ ( z , ϕ ) \overline{T}(z, \phi) T ( z , ϕ )
are taken as parameters and γ ≡ c p / c v \gamma \equiv c_p/c_v γ ≡ c p / c v
and eliminate ρ ′ \rho' ρ ′
in the last equation:
− 1 g ( ∂ ∂ t + u ‾ ∂ ∂ x ) ∂ p ′ ∂ z + ρ ‾ ∂ u ′ ∂ x = 0 -\frac{1}{g}\left(\frac{\partial}{\partial t} + \overline{u} \frac{\partial}{\partial x} \right) \frac{\partial p'}{\partial z} + \overline{\rho} \frac{\partial u'}{\partial x} = 0 − g 1 ( ∂ t ∂ + u ∂ x ∂ ) ∂ z ∂ p ′ + ρ ∂ x ∂ u ′ = 0
We multiply through by − g -g − g
to get
( ∂ ∂ t + u ‾ ∂ ∂ x ) ∂ p ′ ∂ z − g ρ ‾ ∂ u ′ ∂ x = 0 \left(\frac{\partial}{\partial t} + \overline{u} \frac{\partial}{\partial x} \right) \frac{\partial p'}{\partial z} -g \overline{\rho} \frac{\partial u'}{\partial x} = 0 ( ∂ t ∂ + u ∂ x ∂ ) ∂ z ∂ p ′ − g ρ ∂ x ∂ u ′ = 0
Before we go further that if ρ = ρ ‾ + ρ ′ \rho = \overline{\rho} + \rho' ρ = ρ + ρ ′
and p = p ‾ + p ′ , p = \overline{p} + p', p = p + p ′ ,
then we find that ∂ p ∂ z = − ρ g \frac{\partial p}{\partial z} = - \rho g ∂ z ∂ p = − ρ g
which gives us ∂ p ′ ∂ z + ∂ p ‾ ∂ z = − g ( ρ ‾ + ρ ′ ) \frac{\partial p'}{\partial z} + \frac{\partial \overline{p}}{\partial z} = - g \left(\overline{\rho} + \rho' \right) ∂ z ∂ p ′ + ∂ z ∂ p = − g ( ρ + ρ ′ )
and using what we know
about ρ ′ \rho' ρ ′
and p ′ p' p ′
we get that ∂ p ‾ ∂ z = − g ρ ‾ \frac{\partial\overline{p}}{\partial z} = -g\overline{\rho} ∂ z ∂ p = − g ρ
which should be true just from physical intuition. We note that γ ≠ 0 \gamma \neq 0 γ = 0
and p ‾ ≠ 0 \overline{p} \neq 0 p = 0
and thus
p ‾ γ ( ∂ ∂ t + u ‾ ∂ ∂ x ) ∂ p ′ ∂ z − g γ p ‾ ρ ‾ ∂ u ′ ∂ x = 0 \overline{p} \gamma \left(\frac{\partial}\partial {t} + \overline{u} \frac{\partial}{\partial x} \right) \frac{\partial p'}{\partial z} - g \gamma \overline{p} \overline{\rho} \frac{\partial u'}{\partial x} = 0 p γ ( ∂ ∂ t + u ∂ x ∂ ) ∂ z ∂ p ′ − g γ p ρ ∂ x ∂ u ′ = 0
g ρ ‾ ( ∂ ∂ t + u ‾ ∂ ∂ x ) p ′ + g γ ρ ‾ p ‾ ∂ u ′ ∂ x = 0 g \overline{\rho} \left(\frac{\partial}{\partial t} + \overline{u} \frac{\partial}{\partial x} \right)p' + g \gamma \overline{\rho} \overline{p} \frac{\partial u'}{\partial x} = 0 g ρ ( ∂ t ∂ + u ∂ x ∂ ) p ′ + g γ ρ p ∂ x ∂ u ′ = 0
and we add these equations to get
p ‾ γ ( ∂ ∂ t + u ‾ ∂ ∂ x ) ∂ p ′ ∂ z + g ρ ‾ ( ∂ ∂ t + u ‾ ∂ ∂ x ) p ′ = 0 \overline{p} \gamma \left(\frac{\partial }{\partial t} + \overline{u} \frac{\partial}{\partial x} \right) \frac{\partial p'}{\partial z} + g \overline{\rho} \left(\frac{\partial }{\partial t} + \overline{u} \frac{\partial }{\partial x} \right)p' = 0 p γ ( ∂ t ∂ + u ∂ x ∂ ) ∂ z ∂ p ′ + g ρ ( ∂ t ∂ + u ∂ x ∂ ) p ′ = 0
( ∂ ∂ t + u ‾ ∂ ∂ x ) u ′ + 1 ρ ‾ ∂ p ′ ∂ x = 0 \left(\frac{\partial}{\partial t} + \overline{u} \frac{\partial}{\partial x} \right)u' + \frac{1}{\overline{\rho}} \frac{\partial p'}{\partial x} = 0 ( ∂ t ∂ + u ∂ x ∂ ) u ′ + ρ 1 ∂ x ∂ p ′ = 0
Which allows us to solve for p ′ p' p ′
(note we started with 3 equations and 4 unknowns) and then back-substitute to get other values: assume that p ′ = p ^ exp ( i k ( x − c t ) ) p' = \hat{p}\exp(ik(x - ct)) p ′ = p ^ exp ( ik ( x − c t ))
, p ^ ( z = 0 , ϕ ) = p 00 \hat{p}(z=0, \phi) = p_{00} p ^ ( z = 0 , ϕ ) = p 00
and get
p ‾ γ ( − k c + u ‾ k ) ( ∂ p ^ ∂ z ) Ψ + i g ρ ‾ ( k u ‾ − k c ) p ^ Ψ = 0 \overline{p}\gamma\left( -kc + \overline{u}k \right)\left(\frac{\partial \hat{p}}{\partial z} \right)\Psi + ig\overline{\rho} \left( k\overline{u} - k c\right)\hat{p}\Psi = 0 p γ ( − k c + u k ) ( ∂ z ∂ p ^ ) Ψ + i g ρ ( k u − k c ) p ^ Ψ = 0
⟹ i k p ‾ γ ( u ‾ − c ) ( ∂ p ^ ∂ z ) Ψ + i k g ρ ‾ ( u ‾ − c ) p ^ Ψ = 0 \implies ik\overline{p}\gamma\left( \overline{u} -c \right)\left(\frac{\partial \hat{p}}{\partial z} \right)\Psi + ik g\overline{\rho} \left( \overline{u} - c\right)\hat{p}\Psi = 0 ⟹ ik p γ ( u − c ) ( ∂ z ∂ p ^ ) Ψ + ik g ρ ( u − c ) p ^ Ψ = 0
⟹ p ‾ γ ( ∂ p ^ ∂ z ) + g ρ ‾ p ^ = 0 \implies \overline{p}\gamma\left(\frac{\partial \hat{p}}{\partial z} \right) + g\overline{\rho}\hat{p} = 0 ⟹ p γ ( ∂ z ∂ p ^ ) + g ρ p ^ = 0
⟹ ( ∂ p ^ ∂ z ) = − g ρ ‾ p ‾ γ p ^ \implies \left(\frac{\partial \hat{p}}{\partial z} \right) = -\frac{g\overline{\rho}}{\overline{p}\gamma}\hat{p} ⟹ ( ∂ z ∂ p ^ ) = − p γ g ρ p ^
and we use the ideal gas law to find p ‾ = ρ ‾ R d T ‾ ⟹ p ‾ ρ ‾ = R d T ‾ \overline{p} = \overline{\rho} R_d \overline{T} \implies \frac{\overline{p}}{\overline{\rho}} = R_d \overline{T} p = ρ R d T ⟹ ρ p = R d T
and therefore
( ∂ p ^ ∂ z ) = − g R d γ T ‾ ( z ) p ^ \left(\frac{\partial \hat{p}}{\partial z} \right) = - \frac{g}{R_d\gamma \overline{T}(z)}\hat{p} ( ∂ z ∂ p ^ ) = − R d γ T ( z ) g p ^
The righthand size has units Pa/m which agrees with the lefthand side. Clearly this has solution ln ( p ^ ( z ) ) − ln ( p ^ ( z = 0 ) ) = − ∫ z = 0 z g R d γ T ‾ ( z ) d z \ln(\hat{p}(z)) - \ln(\hat{p}(z=0)) = - \int_{z=0}^z\frac{g}{R_d \gamma \overline{T}(z)}\, \mathrm{d}z ln ( p ^ ( z )) − ln ( p ^ ( z = 0 )) = − ∫ z = 0 z R d γ T ( z ) g d z
and therefore
p ^ ( z ) = p 00 exp ( − ∫ z = 0 z g R d γ T ‾ ( z ) d z ) \hat{p}(z) = p_{00}\exp\left(- \int_{z=0}^z\frac{g}{R_d \gamma \overline{T}(z)}\, \mathrm{d}z\right) p ^ ( z ) = p 00 exp ( − ∫ z = 0 z R d γ T ( z ) g d z )
In order to find the physical solution we take
p ′ p' p ′ = Re ( p 00 exp ( − ∫ z = 0 z g R d γ T ‾ ( z ) d z ) exp ( i k ( x − c t ) ) ) = \Re \left(p_{00}\exp\left(- \int_{z=0}^z\frac{g}{R_d \gamma \overline{T}(z)}\, \mathrm{d}z\right) \exp \left(ik(x - ct) \right) \right) = Re ( p 00 exp ( − ∫ z = 0 z R d γ T ( z ) g d z ) exp ( ik ( x − c t ) ) )
= p 00 exp ( − ∫ z = 0 z g R d γ T ‾ ( z ) d z ) Re ( exp ( i k ( x − c t ) ) ) = p_{00}\exp\left(- \int_{z=0}^z\frac{g}{R_d \gamma \overline{T}(z)}\, \mathrm{d}z\right) \Re \left( \exp \left(ik(x - ct) \right) \right) = p 00 exp ( − ∫ z = 0 z R d γ T ( z ) g d z ) Re ( exp ( ik ( x − c t ) ) )
= p 00 exp ( − ∫ z = 0 z g R d γ T ‾ ( z ) d z ) Re ( cos ( k ( x − c t ) ) + i sin ( k ( x − c t ) ) ) = p_{00}\exp\left(- \int_{z=0}^z\frac{g}{R_d \gamma \overline{T}(z)}\, \mathrm{d}z\right) \Re \left( \cos(k(x - ct)) + i \sin(k(x - ct)) \right) = p 00 exp ( − ∫ z = 0 z R d γ T ( z ) g d z ) Re ( cos ( k ( x − c t )) + i sin ( k ( x − c t )) )
= p 00 exp ( − ∫ z = 0 z g R d γ T ‾ ( z ) d z ) cos ( k ( x − c t ) ) = p_{00}\exp\left(- \int_{z=0}^z\frac{g}{R_d \gamma \overline{T}(z)}\, \mathrm{d}z\right) \cos(k(x - ct)) = p 00 exp ( − ∫ z = 0 z R d γ T ( z ) g d z ) cos ( k ( x − c t ))
And we use the linearized hydrostatic equation
∂ p ′ ∂ z = − ρ ′ g \frac{\partial p'}{\partial z} = -\rho' g ∂ z ∂ p ′ = − ρ ′ g to find
ρ ′ \rho' ρ ′ = − 1 g ∂ p ′ ∂ z = -\frac{1}{g} \frac{\partial p'}{\partial z} = − g 1 ∂ z ∂ p ′
= − p 00 R d γ T ‾ ( z ) exp ( − ∫ z = 0 z g R d γ T ‾ ( z ) d z ) cos ( k ( x − c t ) ) = - \frac{p_{00}}{R_d\gamma \overline{T}(z)}\exp\left(- \int_{z=0}^z\frac{g}{R_d \gamma \overline{T}(z)}\, \mathrm{d}z\right) \cos(k(x-ct)) = − R d γ T ( z ) p 00 exp ( − ∫ z = 0 z R d γ T ( z ) g d z ) cos ( k ( x − c t ))
We return to the remaining equation ( ∂ ∂ t + u ‾ ∂ ∂ x ) u ′ + 1 ρ ‾ ∂ p ′ ∂ x = 0 \left( \frac{\partial}{\partial t} + \overline{u} \frac{\partial}{\partial x}\right)u' + \frac{1}{\overline{\rho}} \frac{\partial p'}{\partial x} = 0 ( ∂ t ∂ + u ∂ x ∂ ) u ′ + ρ 1 ∂ x ∂ p ′ = 0
and assume that u ′ = Re [ u ^ ( z ) exp ( i k ( x − c t ) ) ] u' = \Re \left[\hat{u}(z) \exp(ik(x-ct)) \right] u ′ = Re [ u ^ ( z ) exp ( ik ( x − c t )) ]
to find
( − i k c + i u ‾ k ) u ^ ( z ) Ψ + 1 ρ ‾ ( i k ) p ^ Ψ (-ikc + i\overline{u}k)\hat{u}(z)\Psi + \frac{1}{\overline{\rho}} (ik) \hat{p} \Psi ( − ik c + i u k ) u ^ ( z ) Ψ + ρ 1 ( ik ) p ^ Ψ
⟹ ( − c + u ‾ ) u ^ ( z ) + p ^ ρ ‾ \implies (-c + \overline{u})\hat{u}(z) + \frac{\hat{p}}{\overline{\rho}} ⟹ ( − c + u ) u ^ ( z ) + ρ p ^
⟹ u ^ ( z ) = − p ^ ρ ‾ ( u ‾ − c ) \implies \hat{u}(z) = - \frac{\hat{p}}{\overline{\rho}( \overline{u}-c)} ⟹ u ^ ( z ) = − ρ ( u − c ) p ^
⟹ u ^ ( z ) = − p 00 ρ ‾ ( u ‾ ( z ) − c ) exp ( − g R d γ T ‾ z ) cos ( k ( x − c t ) ) \implies \hat{u}(z) = - \frac{p_{00}}{\overline{\rho}( \overline{u}(z)-c)} \exp\left(-\frac{g}{R_d\gamma \overline{T}}z\right) \cos(k(x-ct)) ⟹ u ^ ( z ) = − ρ ( u ( z ) − c ) p 00 exp ( − R d γ T g z ) cos ( k ( x − c t ))
We also return to the equation ( ∂ ∂ t + u ‾ ∂ ∂ x ) p ′ + γ p ‾ ∂ u ′ ∂ x = 0 \left(\frac{\partial}{\partial t} + \overline{u} \frac{\partial}{\partial x} \right)p' + \gamma \overline{p} \frac{\partial u'}{\partial x} = 0 ( ∂ t ∂ + u ∂ x ∂ ) p ′ + γ p ∂ x ∂ u ′ = 0
in order to get a dispersion relation
0 0 0 = ( ∂ ∂ t + u ‾ ∂ ∂ x ) p ′ + γ p ‾ ∂ u ′ ∂ x = \left(\frac{\partial}{\partial t} + \overline{u} \frac{\partial}{\partial x} \right)p' + \gamma \overline{p} \frac{\partial u'}{\partial x} = ( ∂ t ∂ + u ∂ x ∂ ) p ′ + γ p ∂ x ∂ u ′
= ( − i k c + u ‾ i k ) p ^ Ψ − γ p ‾ i k ρ ‾ ( u ‾ − c ) p ^ Ψ = \left(-ikc + \overline{u}ik \right)\hat{p}\Psi - \gamma \overline{p} \frac{ik}{\overline{\rho}(\overline{u} -c)} \hat{p}\Psi = ( − ik c + u ik ) p ^ Ψ − γ p ρ ( u − c ) ik p ^ Ψ
= [ ( − c + u ‾ ) − γ p ‾ 1 ρ ‾ ( u ‾ − c ) ] p ^ Ψ = \left[\left(-c + \overline{u} \right) - \gamma \overline{p} \frac{1}{\overline{\rho}(\overline{u} -c)} \right]\hat{p}\Psi = [ ( − c + u ) − γ p ρ ( u − c ) 1 ] p ^ Ψ
And by rearranging this we get c = u ‾ + γ R d T ‾ c = \overline{u} + \sqrt{\gamma R_d \overline{T}} c = u + γ R d T
which agrees with Lamb waves being acoustic
The conclusions for our data:
p ′ p' p ′
decays vertically like exp ( − ∫ z = 0 z g R d γ T ‾ ( z ) d z ) \exp\left(- \int_{z=0}^z\frac{g}{R_d \gamma \overline{T}(z)}\, \mathrm{d}z\right) exp ( − ∫ z = 0 z R d γ T ( z ) g d z )
.
We know from the dcmip document that
T v ( z , ϕ ) = 1 τ 1 ( z ) − τ 2 ( z ) I T ( ϕ ) T_v(z, \phi) = \frac{1}{\tau_1(z) - \tau_2(z)I_T(\phi)} T v ( z , ϕ ) = τ 1 ( z ) − τ 2 ( z ) I T ( ϕ ) 1
I T ( ϕ ) = ( cos ϕ ) K − K K + 2 ( cos ϕ ) K + 2 I_T(\phi) = (\cos \phi)^K - \frac{K}{K+2}(\cos \phi)^{K+2} I T ( ϕ ) = ( cos ϕ ) K − K + 2 K ( cos ϕ ) K + 2
τ i n t , 1 ( z ) = 1 Γ [ exp ( Γ z T 0 ) − 1 ] + z ( T 0 − T P T 0 T P ) exp [ − ( g z b R d T 0 ) 2 ] \tau_{\mathrm{int}, 1}(z) = \frac{1}{\Gamma}\left[\exp\left(\frac{\Gamma z}{T_0} \right) - 1 \right] + z\left(\frac{T_0-T_P}{T_0T_P}\right)\exp\left[-\left( \frac{gz}{bR_dT_0}\right)^2 \right] τ int , 1 ( z ) = Γ 1 [ exp ( T 0 Γ z ) − 1 ] + z ( T 0 T P T 0 − T P ) exp [ − ( b R d T 0 g z ) 2 ]
τ i n t , 2 ( z ) = K + 2 2 ( T E − T P T E T P ) z exp [ − ( g z b R d T 0 ) 2 ] \tau_{\mathrm{int}, 2}(z) = \frac{K+2}{2}\left( \frac{T_E-T_P}{T_E T_P}\right)z\exp\left[ -\left( \frac{gz}{bR_dT_0}\right)^2\right] τ int , 2 ( z ) = 2 K + 2 ( T E T P T E − T P ) z exp [ − ( b R d T 0 g z ) 2 ]
Where we note that
exp ( − ∫ z = 0 z g R d γ T ‾ ( z ) d z ) \exp\left(- \int_{z=0}^z\frac{g}{R_d \gamma \overline{T}(z)}\, \mathrm{d}z\right) exp ( − ∫ z = 0 z R d γ T ( z ) g d z ) = exp ( − g R d γ ∫ z = 0 z [ τ 1 ( z ) − τ 2 ( z ) I T ( ϕ ) ] d z ) = \exp\left(- \frac{g}{R_d \gamma} \int_{z=0}^z\left[\tau_1(z) - \tau_2(z)I_T(\phi)\right] \, \mathrm{d}z\right) = exp ( − R d γ g ∫ z = 0 z [ τ 1 ( z ) − τ 2 ( z ) I T ( ϕ ) ] d z )
= exp ( − g R d γ [ τ i n t , 1 ( z ) − τ i n t , 2 ( z ) I T ( ϕ ) ] ) = \exp\left(- \frac{g}{R_d \gamma} \left[\tau_{\mathrm{int}, 1}(z) - \tau_{\mathrm{int}, 2}(z)I_T(\phi)\right] \right) = exp ( − R d γ g [ τ int , 1 ( z ) − τ int , 2 ( z ) I T ( ϕ ) ] )
and so we want to look for this kind of decay signature in the pressure field.
SE increased divergence damping --> look for figures
Check phase speed of lamb wave
FV3 0.25 is probably available
DCMIP 2012: gravity wave test case
Tracking down the actual speed of the wave:
We'll do this in python using Omega 850 masked so that it doesn't catch the baroclinic instability.
Method:
We're looking at time 6, 12, and 18 hours after start of run.
I'm calculating the maximum value of (signed) ω 850 \omega_{850} ω 850
at each time stamp over a small region containing just the
wave.
t ∈ { 3 , 4 , 5 } t\in \{3, 4, 5\} t ∈ { 3 , 4 , 5 } ,
t ∈ { 6 , 7 , 8 , 9 } t\in \{6, 7, 8, 9\} t ∈ { 6 , 7 , 8 , 9 } ,
t ∈ { 10 , 11 , 12 } t\in \{10, 11, 12\} t ∈ { 10 , 11 , 12 } ,
ϕ b o t t o m = \phi_{\mathrm{bottom}} = ϕ bottom = -90 -90 -90
ϕ t o p = \phi_{\mathrm{top}} = ϕ top = 90 90 90
λ l e f t = \lambda_{\mathrm{left}} = λ left = 150 190 220
λ r i g h t = \lambda_{\mathrm{right}} = λ right = 220 290
And locating the gridpoint at which ω 850 \omega_{850} ω 850
is maximized gives
t = 3 t=3 t = 3 ,
t = 4 t=4 t = 4 ,
t = 5 t=5 t = 5
t = 6 t=6 t = 6
t = 7 t=7 t = 7
t = 8 t=8 t = 8
t = 9 t=9 t = 9
t = 10 t=10 t = 10
t = 11 t=11 t = 11
t = 12 t=12 t = 12
ϕ a r g m a x = \phi_{\mathrm{argmax}} = ϕ argmax = 35.1562 34.453 27.421 21.796 12.65 7.0312 0.0 -8.43 -13.35 -21.09
λ a r g m a x = \lambda_{\mathrm{argmax}} = λ argmax = 177.89 191.95 201.09 210.23 215.85 224.29 232.03 237.65 246.79 253.82
According to the formula for greatcircle distance d g c = a arccos ( sin ϕ 1 sin ϕ 2 + cos ϕ 1 cos ϕ 2 cos ( Δ λ ) ) . d_{gc} = a \arccos {\bigl (}\sin \phi _{1}\sin \phi _{2}+\cos \phi _{1}\cos \phi _{2}\cos(\Delta \lambda ){\bigr )}. d g c = a arccos ( sin ϕ 1 sin ϕ 2 + cos ϕ 1 cos ϕ 2 cos ( Δ λ ) ) .
I used the following script
View track_gw_speed.py
import xarray as xr
import numpy as np
import matplotlib.pyplot as plt
import cartopy
import cartopy.crs as ccrs
from os.path import join
fdir = "/nfs/turbo/cjablono2/owhughes/mountain_test_case_netcdf/"
fname = "ne30_1h_output.nc"
ne30_ds = xr.open_dataset(join(fdir, fname))
t = 12
t0 = 2
bounds = [[-90, 90, 150, 220], [-90, 90, 150, 220], [-90, 90, 150, 220], [-90, 90, 150, 220],
[-90, 90, 190, 260], [-90, 90, 190, 260], [-90, 90, 190, 260], [-90, 90, 190, 260],
[-90, 90, 220, 290], [-90, 90, 220, 290], [-90, 90, 220, 290] ]
lons = ne30_ds['lon']
lon_mask = np.logical_and(lons > bounds[ (t-t0)][2], lons < bounds[ (t-t0)][3])
lats = ne30_ds['lat']
lat_mask = np.logical_and(lats > bounds[ (t-t0)][0], lats < bounds[ (t-t0)][1])
print(ne30_ds['time'][2 * t])
omega850 = ne30_ds['OMEGA850'][2 * t, :, :] #- ne30_ds['OMEGA850'][1, :, :]
omega850 = omega850.where(lat_mask).where(lon_mask)
res = omega850.argmax(dim=("lat", "lon"))
latmax = (omega850.lat[res['lat']].values)
lonmax = (omega850.lon[res['lon']].values)
print(f"lat: {latmax}, lon:{lonmax}")
plt.figure()
ax = plt.axes(projection=ccrs.PlateCarree())
plt.contourf(lons.where(lon_mask), lats.where(lat_mask), omega850,
transform=ccrs.PlateCarree())
plt.text(lonmax, latmax, 'Max',c="white",
horizontalalignment='center',
transform=ccrs.PlateCarree())
a = 6371 #km
plt.savefig(f"{t}_omega_test.pdf")
View comp_gw_speed.py
import xarray as xr
import numpy as np
import matplotlib.pyplot as plt
import cartopy
import cartopy.crs as ccrs
from os.path import join
fdir = "/nfs/turbo/cjablono2/owhughes/mountain_test_case_netcdf/"
fname = "ne30_1h_output.nc"
ne30_ds = xr.open_dataset(join(fdir, fname))
a = 6371e3 #km
dt = 60 * 60
gamma = 1003/(1003 - 287.3)
Rd = 287.3
lambdamax = np.array([177.89, 191.95, 201.09, 210.23, 215.85, 224.29, 232.03, 237.65, 246.79, 253.82 ])
phimax = np.array([35.1562, 34.453, 27.421, 21.796, 12.65, 7.0312, 0.0, -8.43, -13.35, -21.09])
print(ne30_ds['lon'])
subset = ne30_ds.isel(indexers={"time": [0],
}).sel(indexers={"lon": lambdamax, "lat": phimax}, method="nearest")
lambdamax = np.deg2rad(lambdamax)
phimax = np.deg2rad(phimax)
T = subset["T850"]
u = subset["U850"]
print("predicted speeds: ")
print(u + np.sqrt(gamma * T * Rd))
gc = a * np.arccos(np.sin(phimax[1:]) * np.sin(phimax[:-1]) + np.cos(phimax[1:]) * np.cos(phimax[:-1]) * np.cos(lambdamax[1:] - lambdamax[:-1]))
print("calculated speeds: ")
print(gc/dt)
Ok so computing this c = u ‾ + γ R d T ‾ c = \overline{u} + \sqrt{\gamma R_d \overline{T}} c = u + γ R d T
. Taking T ‾ = 280 K \overline{T} = 280 \mathrm{K} T = 280 K
and in the lower atmosphere u ‾ ≈ 10 m / s \overline{u} \approx 10\mathrm{m}/\mathrm{s} u ≈ 10 m / s
, and γ = 1003 / ( 1003 − 287.3 ) = 1.40 \gamma = 1003 / (1003 - 287.3) = 1.40 γ = 1003/ ( 1003 − 287.3 ) = 1.40
, and R d = 287.3 J ⋅ k g − 1 ⋅ K − 1 R_d = 287.3 \mathrm{J}\cdot \mathrm{kg}^{-1}\cdot \mathrm{K}^{-1} R d = 287.3 J ⋅ kg − 1 ⋅ K − 1
we therefore find that c = 10 m / s + 1.4 ⋅ 280 K ⋅ 287.3 J ⋅ k g − 1 ⋅ K − 1 = 345.5 m / s . c = 10\mathrm{m}/\mathrm{s} + \sqrt{1.4 \cdot 280 \mathrm{K} \cdot 287.3 \mathrm{J}\cdot \mathrm{kg}^{-1} \cdot \mathrm{K}^{-1}} = 345.5 \mathrm{m}/\mathrm{s}. c = 10 m / s + 1.4 ⋅ 280 K ⋅ 287.3 J ⋅ kg − 1 ⋅ K − 1 = 345.5 m / s .
The calculated speeds of the wave from the scripts above vary from 356.95 m / s 356.95 \mathrm{m}/\mathrm{s} 356.95 m / s
at hour 3, and
316.35 m / s . 316.35 \mathrm{m}/\mathrm{s}. 316.35 m / s .
at hour 12
This seems to be compatible. This is deeply curious to me, as it indicates that the wave may be acoustic?
Idea: increase temperature by 90 degrees, i.e. T E = 400 K , T P = 330 K T_E = 400\mathrm{K} ,\ T_P = 330 \mathrm{K} T E = 400 K , T P = 330 K
Propagation under increased temperature
In this case latmax = [33.0468, 30.937, 22.5, 14.062, 7.031, 0.7031, -11.95, -19.68, -24.60, -32.34]
,
lonmax = [182.812, 197.57, 206.71, 215.85, 224.29, 234.84, 237.65, 246.79, 258.75, 269.29]
Using the same calculation as above, we find that the calculated speeds are between 391 m / s 391 \mathrm{m} / \mathrm{s} 391 m / s
and
372 m / s 372 \mathrm{m} / \mathrm{s} 372 m / s
at time 6.
Under a 9 0 ∘ C 90^\circ\mathrm{C} 9 0 ∘ C
change in temperature,
c = 10 m / s + 1.4 ⋅ 370 K ⋅ 287.3 J ⋅ k g − 1 ⋅ K − 1 = 395.5 m / s . c = 10\mathrm{m}/\mathrm{s} + \sqrt{1.4 \cdot 370 \mathrm{K} \cdot 287.3 \mathrm{J}\cdot \mathrm{kg}^{-1} \cdot \mathrm{K}^{-1}} = 395.5 \mathrm{m}/\mathrm{s}. c = 10 m / s + 1.4 ⋅ 370 K ⋅ 287.3 J ⋅ kg − 1 ⋅ K − 1 = 395.5 m / s .
Without being very careful to check whether changing the two temperature parameters changes anything else, this indicates
that we might expect about a + 50 m / s + 50 \mathrm{m}/\mathrm{s} + 50 m / s
change in wave speed. This once again seems consistent.
Something important to note: changing the temperature creates an increase in the strength of the zonal jet. This
complicates things somewhat.
With T + 45 K T + 45\mathrm{K} T + 45 K
: latmax = [33.04, 30.23, 24.60]
, lonmax = [180.0, 192.65, 203.90]
Increasing divergence damping in the SE model:
If this were actually a gravity wave, we would expect that increasing divergence damping would severely
curtail the ability of the wave to propagate (see lecture notes on gravity waves). In order to test this
we increase se_nu_div
from 0.1 × 1 0 16 0.1 \times 10^{16} 0.1 × 1 0 16
(the CAM default) by a factor of 4 to 0.4 × 1 0 16 0.4 \times 10^{16} 0.4 × 1 0 16
This is shown below, i.e. with default divergence hyperviscosity on top and with increased hyperviscosity below.
This seems to show that increasing divergence damping does little to curtail the propagation of this wave.
This is evidence that we are, in fact, not observing a gravity wave.
Next steps:
read lin again
read Vallis chapter
Look in holton?