CliMA/ClimateMachine.jl

Enable construction of reference state from user-defined profiles

Open

#2,036 opened on Feb 12, 2021

View on GitHub
 (0 comments) (0 reactions) (3 assignees)Julia (77 forks)batch import
Atmoshelp wanted

Repository metrics

Stars
 (436 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description

The reference state is currently constructed from a finite set of hardcoded temperature profiles, see TemperatureProfiles.jl. These profiles have been chosen because the pressure field can be constructed analytically imposing hydrostatic balance.

In the more general case, a reference state can be constructed from a user-defined profile of a given thermodynamic variable (e.g., pressure, density or temperature). Of particular interest to users would be the possibility to construct a reference state given a (virtual) potential temperature profile, θ=θ(z).

The code does not currently support easily this option because it requires performing the following integral to recover the pressure field p,

(pᵏ - pᵏ₀)/k = -gpᵏ₀ ∫ 1/(Rθ) dz, k = Rd/Cp

Ideally, we would want to construct a PrescribedTemperatureProfile function that returns the pointwise p given a function θ=θ(z). For that, we need to be able to integrate in TemperatureProfiles.jl.

Contributor guide