ali-ramadhan / Atmosfoolery.jl

Compressible non-hydrostatic model built on top of Oceananigans.jl so it runs on CPUs and GPUs
MIT License
3 stars 0 forks source link

Adding pressure as a prognostic thermodynamic variable #61

Open thabbott opened 4 years ago

thabbott commented 4 years ago

Using pressure as a prognostic thermodynamic variable has fallen out of fashion in mesoscale atmospheric models (you generally won't conserve energy to numerical precision if you don't use it as a prognostic variable) but apparently it's necessarily in compressible ocean models since the equation of state is generally too complicated to diagnose pressure from a different prognostic thermodynamic variable. Depending on the level of interest in eventually using the dynamic core from this model for ocean simulations it might be worth adding it as an option, even if it's not the best choice for atmospheric simulations.

ali-ramadhan commented 4 years ago

Yeah if it unlocks the potential to use the CompressibleModel as an ocean model then it might be worth adding a model property for DiagnosticPressure and PrognosticPressure (maybe with a specified speed of sound).

We can dispatch on the two. I guess time-stepping another variable (which has to be treated differently from all other variables) could make the time-stepping code a bit more messy but we already have a function that returns pressure so now it would just return pressure from an array/field instead of diagnosing it.

But I guess this won't come until after #60 is merged.