Hybrid Coordinates
Ok so the code assumes that Atopp0+∑dp3d=psv
.
Our initialization must satisfy this relation.
Philosophical interpretation of initialization:
We initialize UMJS14 based on point-wise hydrostatic pressure
at a particular position in the atmosphere. The calculated dp
variable
that comes out of initialization and is used to call, e.g., set_elem_state
is actually dp3d
due to how the η
coordinate behaves in
the deep atmosphere.
The key to this problem is that
⟹⟹⟹r^2∂sgz=−RdpΠΘv(aa+2z0+z)2(g(z−z0))=Q(1+2az0+z)2(g(z−z0))=Qg((1+2az0)+2az)2(z−z0)=Q
and the derivative is
∂z[g((1+2az0)+2az)2(z−z0)]≈g(a1(z−z0)((1+2az0)+2az)+((1+2az0)+2az)2)
the integration by parts
∫∫pr^2δ[∂η[ϕ]]+BC+r^2∂η[p]δϕdηdA=∫[pr^2ϕ]η=1η=0+BC+∫−∂η[pr^2]δϕ+r^2∂η[p]δϕdηdA=∫[pr^2ϕ]η=1η=0+BC+∫−r^2∂η[p]δϕ−p∂η[r^2]δϕ+r^2∂η[p]δϕdηdA=∫[pr^2ϕ]η=1η=0+BC−∫p∂η[r^2]δϕdηdA=∫[pr^2ϕ]η=1η=0+BC−∫p∂η[r^2]δϕdηdA
If we don't expand out and use the typical boundary conditions, then
δϕδH=∂η[π](1−∂η[π]∂η[r^2p])
Idea: μ
is used to calculate the vertical pressure gradient force, i.e. ρ1∇p⋅k=gρ1∂ηϕ∂ηp=−gμ
.
In our new, fucked coordinates, the area of the upper surface is larger than the lower surface.
Therefore in calculating the pressure gradient (and associated quantities), the quantity μ
should take this into account.
Therefore, the choice BC=r^top2ptopϕtop
gives
∫∫pr^2δ[∂η[ϕ]]+r^2ptopϕtop+∂η[r^2p]δϕdηdA=∫(pr^2δϕ)bot−(pr^2δϕ)top+r^2ptopϕtop+∫∂η[r^2p]δϕ−∂η[r^2p]δϕdηdA
and assuming that we have solved the boundary condition problems at the bottom such that [δϕ]bot=0
, then we get that the boundary condition and integration by parts
perform essentially the same as in the shallow atmosphere case.
In the new coordinates we must assume that μtop=1
?
How to constrain the quantities
The recent paper by the MPAS folks
makes a compelling case that our choice of upper boundary condition should retain an essentially isobaric character. IMPORTANT: this publication
concedes conservation of energy near the boundary!
The core takeaway from their paper is that we can use discrete hydrostatic balance to link pressure and height near the top boundary
in a principled way, allowing for hybrids of pressure and height coordinates to be used.
However, we have a bit of a problem. It's immediately obvious that if we set r^2pϕ=C
as our boundary condition, we can either set p
or ϕ
, as r^
is uniquely determined by ϕ
.
The vertical velocity term prognostic equation takes the form
∂t[w]+r^u⋅∇sw+s˙∂s[w]−ru2−fc[u]+(1−μ)g=0
it would be highly undesirable if the top boundary initiated motion in
a benign atmosphere (i.e. no wind, vertical hydrostatic balance). In such an atmosphere
the prognostic equations reduce to a constraint μ=1
.
Using the new definition of μ
, this constrains that ∂sr^2p=∂sπ
.
The pressure is known at the midpoint below the top interface,
and geopotential is prognostic at the upper boundary in pressure coordinates.
The only option for enforcing μ=1
at the top boundary is changing how dp3d
is treated
near the top boundary. As this may wreak havoc on discrete averaging identities, it may actually be prefereable to
allow a mismatch between hydrostatic and nonhydrostatic pressure at the top barrier. Either that or enforce
If we allow such a free surface, then ϕ
is allowed to evolve according to the prognostic equation.
As such ptop
is determined to satisfy the boundary condition algebraically.
However, this may violate the agreement between discrete EOS, which is r^2∂sϕ=−RdΘvpΠ
and the requirement that midpoints lie halfway between interfaces.
Can we just change to a Neumann boundary condition at the top?
- Phi at top interface is prognostic
- Combination of discrete averaging and EOS uniquely extrapolates p to top level given phi and pdensity.
Things to note:
- Sponge layers etc already strongly violate energy conservation at the top boundary!
- Remapping violates energy conservation on interior of model for lagrangian vertical coordinate!
- All things considered, math is quite clean and concise on interior of model.
- Still want to avoid mass loss, as that's sacrosanct.
- If we allow energy loss at top barrier, then we can just twiddle
Θv
to accomodate.
If we allow energy loss at top barrier, then we have a choice of either Neumann or Dirichlet
boundary conditions at the top.
The plan for implementation:
μ=1
condition determines p
at model top given prognostic ϕ
.
- Slack is taken up by
Θv
. Unclear if Θv
needs to be modified to match definition.
(r^top,i2ptop,i−r^top,m2ptop, m)=2dp3dtop,m
The Deep Atmosphere Baroclinic Wave
So the constraining equation given in the paper is
−ru2−2Ωucosϕ+g0r2a2+RT∂r[logp]=−ru2−2Ωucosϕ+g0r2a2+ρ1∂z[p]
This can only be satisfied if μ=1
. `
Initializing the atmosphere in general
Idea:
p≡ps
and ϕ≡ϕs
indicate that we should start initialization at the surface
- Assume that we know physical pressure
p
and geometric height z
.
- The eta coordinates used for initialization give us
dp3d
.
- The EOS states that if we know
Δϕ
, then we can calculate p=−r^2ΔϕRdT⋅dp3d.
- Therefore a consistent initialization results from progressively rootfinding
from the lowest model level to the top such that the EOS is satisfied.
- Justifying that this is guaranteed to converge for an (approximately) hydrostatic atmosphere
should be possible.
- The above strategy can also be rephrased in terms of guaranteeing that
∫0zρgdz=dp3d
,
which can be translated into a monotonicity constraint. When this is combined with Δϕ>0
,
I expect this gives us the best strategy to show that this initialization strategy works.
- Current progress:
- (ongoing) determine why this fails for the DCMIP2016 test case. It seems to hold analytically,
but is the code right?
- Possible missing term in
τint
terms
- Write up these initialization findings into a document to share with Sandia.
Boundary conditions and initialization
We define our mass coordinate in terms of column-integrated mass M
.
∫1ηR02r2∂η[r]ρdη.
.
For an atmosphere where w(0)≡0
, the quasi hydrostatic equation is given by:
−ru2−2Ωcos(φ)u+g(1−μ)=0
with μ=r^2∂η∂π∂η∂p=r^2−ρ∂η∂ϕ∂η∂p=continuum−r^2ρ1∂ϕ∂p
For a stationary atmosphere where u=v=0
, hydrostatic balance still translates into μ=1
.