jan 12

The top boundary is characterized by the quantity r^2pϕ \hat{r}^2 p \phi, if we want to set a dirichlet (i.e. point value) boundary condition. This is needed for cancellation of terms in an integration-by-parts needed for energy conservation.

However, there are several problems with this. ϕ\phi is a prognostic variable at the model top in shallow atmosphere homme. We therefore cannot constrain it directly.

The discrete averaging scheme used in HOMME states that we can extrapolate the model-level quantity pp to the model top using pi+1/2=(pΔη)i+1+(pΔη)i2Δηi+1/2, p_{i+1/2} = \frac{(p\Delta \eta)_{i+1} + (p\Delta \eta)_i}{2\Delta \eta_{i+1/2}}, p1/2=p1p_{1/2} = p_1. I don't think this actually agrees with how the calculation of μ\mu is handled in shallow HOMME. In shallow HOMME, ptop=πtop=p0,p_{\textrm{top}} = \pi_{\textrm{top}} = p_0, which disagrees with this averaging identity.

In any case, the equation of state r^2ϕη=RdΘvΠp \hat{r}^2 \frac{\partial \phi}{\partial \eta} = - R_d \Theta_v \frac{\Pi}{p} implies that if we know dp3d\textrm{dp3d}, ϕ\phi ( and thus r^2\hat{r}^2), and ϕη, \frac{\partial \phi}{\partial \eta}, then we know non-hydrostatic pp at the top model level. Combining this equation of state with the discrete averaging, this constrains the value of pp at the top interface level. Therefore, we actually cannot constrain the boundary values r^2pϕ\hat{r}^2 p \phi at the top interface level (for example setting (r^2pϕ)top=C (\hat{r}^2 p \phi)_{\textrm{top}} = C) without forcing pp to be a value that violates the discrete averaging/extrapolation that is used elsewhere, or by setting the value of ϕ\phi at the model top which is not consistent with the prognostic equation for ϕ\phi.

There is another alternative boundary condition that we could try to use. μ=pηπηpπ\mu = \frac{\frac{\partial p}{\partial \eta}}{\frac{\partial \pi}{\partial \eta}} \sim \frac{\partial p}{\partial \pi} measures the deviation of physical pressure from hydrostatic balance. The importance of this term shows up in the prognostic equation for vertical velocity: wt=1r^uηw+η˙wηurfcu+g(1μ)=0. \frac{\partial w}{\partial t} = \frac{1}{\hat{r}}\mathbf{u} \cdot \nabla_\eta w + \dot{\eta} \frac{\partial w}{\partial \eta} - \frac{\|\mathbf{u}\|}{r} - f_c u + g(1-\mu) = 0. If μ1\mu \neq 1 at the top boundary, then a benign atmosphere in hydrostatic balance with no wind begins to experience vertical acceleration. In the deep atmosphere we have defined μ=r^2pηπη \mu = \hat{r}^2\frac{\frac{\partial p}{\partial \eta}}{\frac{\partial \pi}{\partial \eta}} and if we so desire we can set μ1\mu \equiv 1 to get r^2pη=πη=dp3d. \hat{r}^2\frac{\partial p}{\partial \eta} = \frac{\partial \pi}{\partial \eta} = \textrm{dp3d}. This gives us a Neumann boundary condition (i.e. a constraint on the vertical derivative) for pressure. As I just discovered an hour ago, this is the recommended upper boundary condition for the height vertical coordinate in Taylor et al, 2020. However, it turns out that a Neumann boundary condition also runs into the same problem as the Dirichlet boundary condition (r^2pϕ)top=C (\hat{r}^2p \phi)_{\textrm{top}}=C, which is that the EOS (and the constraint η˙=0\dot{\eta} = 0 on dp3d\textrm{dp3d}) combined with discrete averaging already determines the values of ϕ,p\phi, p at the top boundary.

There are two strategies to fix this problem. The more suspicious one is as follows. If we sacrifice energy conservation at the upper boundary, we can solve all of these issues. If we allow Θv\Theta_v to vary, then we can change the EOS such that our boundary condition is satisfied. This preserves mass conservation of the model, and gives us the ability to implement either a Neumann or Dirichlet boundary condition. My current strategy is to use this approach to implement a Neumann (i.e. μtop=1\mu_{\textrm{top}} = 1 ) boundary condition at the expense of energy conservation near the model top. I believe this is unobjectionable for two reasons. Firstly, models almost always have damping mechanisms near the model top which are not energy preserving. Secondly, in the lagrangian mass coordinate, HOMME does not use an energy-conserving remap (according to Chris Eldred, because using an energy preserving remap tended to result in spurious generation of circulation). Therefore, using an upper boundary condition which is not energy preserving should be an acceptable concession. Furthermore, I'm not actually sure that the method of calculating μ\mu at the in shallow HOMME is necessarily correct.

The second strategy is less fleshed out. I mentioned above that the μ=1\mu=1 boundary condition is similar to what is recommended in the paper for height coordinates. However, they use the slightly different condition s˙ws+g(1μ)=0 \dot{s} \frac{\partial w}{\partial s} + g(1-\mu) = 0 and make the somewhat confusing observation that although s˙=0\dot{s}=0 should be satisfied for the top boundary, "here we retain this term to allow for the possibility that the discretized vertical transport term may not vanish." They do this in order to allow for the possibility that the discretized vertical transport may be non-zero. In their case, they are using the condition on μ\mu to constrain discrete violations of s˙=0\dot{s}=0, but we could go in the opposite direction and use the s˙ws\dot{s} \frac{\partial w}{\partial s} term to ensure that μ=1. \mu = 1. This concisely shows that we can either fiddle with ws\frac{\partial w}{\partial s} (i.e. energy conservation) or s˙\dot{s} (i.e. mass conservation) to enforce a Neumann boundary condition.

What's actually happening in initialization:

If we rootfind progressively from the surface to the model top such that the atmosphere satisfies μ1\mu \equiv 1, what is actually happening is that for hydrostatically balanced initial conditions, we can use the hydrostatic equation to back out ρ\rho from pressure, and initialize the model such that interface belowinterface abover^2ρdz=dp3d\int_{\textrm{interface below}}^{\textrm{interface above}} \hat{r}^2 \rho \intd{z} = \textrm{dp3d} for externally provided dp3d\textrm{dp3d}. In the more general (i.e. nonhydrostatic) case, the rootfinding and/or interpolation must be provided the form of ρ\rho and zz. If we are provided these fields, then we can use monotonicity of the discrete analogue of model bottomzr^2ρdz\int_{\textrm{model bottom}}^{z} \hat{r}^2 \rho \intd{z'} and the sum i=0i(dp3d)i \sum_{i'=0}^i (\textrm{dp3d})_{i'} to map initial conditions from, e.g., data onto the deep mass coordinates.

Parent post: