CliMA / ClimateMachine.jl

Climate Machine: an Earth System Model that automatically learns from data
https://clima.github.io/ClimateMachine.jl/latest/
Other
452 stars 78 forks source link

Update reference states for atmosphere and moist thermodynamic tests #882

Closed tapios closed 4 years ago

tapios commented 4 years ago

Description

The reference states with piecewise linear temperatures have discontinuous derivatives of energy. This led to spurious generation of unbalanced waves and stability problems at the discontinuity.

I have rewritten the reference state section (chapter 7) in the atmosphere design doc, introducing smoothly varying but realistic reference states for the atmosphere. These need to be implemented. At the same time, this is an opportunity to update the moist thermodynamics tests (issue #263) to draw tuples of values from the updated reference state, now with exactly matching tuples of temperature, density, and specific humidities.

Additional context

@bischtob please review design doc; @charleskawczynski could you implement this?

Note that in the design doc, I suggest to use a state with RH = 0 for IMEX linearizations (the specific humidity makes little difference to sound and gravity waves), so you do not need to solve a saturation adjustment problem for these purposes, and you can set temperature = virtual temperature. The RH > 0 cases are useful for moist thermodynamic tests and initialization of various canonical test cases, and for these, we need a saturation adjustment procedure that calculates temperature from virtual temperature.

For CLIMA Developers

OsKnoth commented 4 years ago

I have send some peace of code to Charles, to compute profiles. Furthermore moisture can also play a role in background profiles. I suggest also for IMEX methods to have an option to recompute the linear operator from the actual vertical profiles.

I recommend also the paper https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2015MS000532

tapios commented 4 years ago

Thanks, @OsKnoth. Charlie showed me your code. What I propose is a bit different and adapted to our equations of motion--have a look at the design doc on Overleaf, and please feel free to comment there (e.g., put comments in \hl{...}).

Thanks also for the note about the WRF substepping issues. Since we use a total energy (including moisture) as a prognostic variable, also for acoustic substeps, we should be less sensitive to this problem, but it does raise question about including moisture variables in acoustic substeps.

OsKnoth commented 4 years ago

How can I find the documentation in Overleaf

fxgiraldo commented 4 years ago

I have send some peace of code to Charles, to compute profiles. Furthermore moisture can also play a role in background profiles. I suggest also for IMEX methods to have an option to recompute the linear operator from the actual vertical profiles.

I recommend also the paper https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2015MS000532

Hi @OsKnoth I agree with your recommendation regarding recomputing the linear operator from the actual vertical profiles. Have you had experience doing this successfully?

charleskawczynski commented 4 years ago

This was partially addressed by #1050