ClimateMachine.jl
ClimateMachine.jl copied to clipboard
Solve the well-balancing problem (hydrostatic balance)
Description
co-authored by @szy21
We need a solution strategy to address the well-balancing problem in the ClimateMachine. The current fixes seem to still cause some issues in the case of solid-body rotation tests and may be the source of some issues in more complex simulations.
All plots below show the difference between initial condition and t=12hours and are latitude-height zonal averages of zonal velocity and temperature. The initial condition is the same as the reference state. The simulations are run using IMEX with Rusanov fluxes, and with the exponential filter (but no hyperdiffusion). The titles indicate polynomial order (p), horizontal element number (h), and vertical element number (v), as well as the maximum absolute values of the differences.
Only changing horizontal number of elements (no change in the vertical behavior is expected)
Only changing polynomial order (we expect better performance due to higher vertical resolution)
Only changing vertical number of elements (we expect better performance due to higher vertical resolution)
The balancing issues improve with increases vertical resolution (unchanged with changed horizontal resolution, as expected). This is expected when our model is not in balance discretely.
Additional context
We cannot proceed on the GCM numerics paper or with integrating GCM components without a satisfactory solution to the well-balancing problem, because it impacts the quality of climate simulations on the sphere substantially. Increasing the vertical resolution (as done in some other models) is not satisfactory alone.
For CLIMA Developers
- [ ] This feature can be added (if it cannot be, explain why in a comment below -- lack of technical expertise, not relevant to the scope of this project, too ambitious)
- [ ] There is a timeline for when this feature can be implemented
- [ ] The feature has been (or will be) implemented (Please link the PR)
@szy21, does this mean, we are OK for the simple setup? Next thing is to have an initial state that is hydrostatic but not the ref state to test if the balance of the initial state is respected. Filtering, of course will destroy this to some extent according to @mwarusz's point.
@szy21, does this mean, we are OK for the simple setup? Next thing is to have an initial state that is hydrostatic but not the ref state to test if the balance of the initial state is respected. Filtering, of course will destroy this to some extent according to @mwarusz's point.
Yes, it is ok for the simple setup. According to Maciej, a different initial hydrostatic state is also preserved if the filter is applying to the perturbations from the initial state. I will add a test on that once the thermodynamics issue is sorted out. The question, I think, is whether we are ok with the solution about the filter (I guess not)?
I guess @mwarusz's point is simply that if the inital conditon is in hydrostatic balance and the reference state is in hydrostatic balance, then the inital conditon (even though it is balanced) may start evolving because of the filter (when filter is being applied to difference between state and reference state). This is because the filter is like an additional source term in the equations, which means the initial hydrostatic state is not a solution to the equations + filter. If the filter is however applied to the difference between state and inital state, then at t=0, the filter is applied to zeros only. Hence, the initial condition won't evolve.
The discretely balanced initial state (not necessarily the same as the ref state) is preserved if we use a numerical flux that has the contact property. The plot below shows a simulation using IMEX with Central fluxes. The initial condition is in discrete hydrostatic balance, but different from the reference state. It is run with exponential filter (but no hyperdiffusion). The filter is applied to perturbations from the initial state (rather the reference state), otherwise the model is not balanced. polyorder = 3, n_horz = 12, n_vert = 8.
With branches #1530 and #1618 combined I can run the solid body rotation test without filtering (other than the cutoff filter used to do the density projection) for a long time (at least 100 days). The deviation from the initial state (different from the reference state) is plotted below
Roe flux was used, see here for details of the setup.
@Zhengyu-Huang see the results here.
What are these new changes?