CliMA/ClimateMachine.jl

Enable construction of reference state from user-defined profiles

Open

#2036 aperta il 12 feb 2021

Vedi su GitHub
 (0 commenti) (0 reazioni) (3 assegnatari)Julia (77 fork)batch import
Atmoshelp wanted

Metriche repository

Star
 (436 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor