diff --git a/Project.toml b/Project.toml index 7e4e5cf0..92c0fd9e 100644 --- a/Project.toml +++ b/Project.toml @@ -13,4 +13,5 @@ RootSolvers = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74" DocStringExtensions = "0.8.1, 0.9" KernelAbstractions = "0.7, 0.8, 0.9" RootSolvers = "0.4" +Random = "<0.0.1, 1" julia = "1.6" diff --git a/docs/src/Formulation.md b/docs/src/Formulation.md index 516da519..a2cbe96f 100644 --- a/docs/src/Formulation.md +++ b/docs/src/Formulation.md @@ -356,24 +356,31 @@ where ``\Pi`` is known as the Exner function ``` Note that the adiabatic exponent ``κ`` takes the effect of moisture on the effective gas ``constant`` and specific heat capacity of air into account. -### Virtual (Potential) Temperature +### Virtual Temperature and Virtual Potential Temperature -The virtual or density temperature ``T_v`` is the temperature dry air would need to have to have the same density as moist air at the same pressure. Using the ideal gas law ``p/ρ = R_m T``, this implies ``R_m T = R_d T_v ``, or +The virtual or density temperature ``T_v`` is the temperature dry air would need to have to have the same density as moist air at the same pressure. +Using the ideal gas law ``p/ρ = R_m T``, this implies ``R_m T = R_d T_v ``, or ```math -\begin{equation}\label{e:virtual_temp} +\begin{equation} \label{e:virtual_temp} T_v = \frac{R_m}{R_d} T. \end{equation} ``` A virtual potential temperature can be defined analogously: + ```math \begin{equation} θ_v = \frac{R_m}{R_d} θ. \label{e:virtual_pottemp} \end{equation} ``` -Some texts distinguish virtual and density (potential) temperatures, where density (potential) temperatures take the mass of condensate into account, whereas virtual (potential) temperatures do not. We always take the mass of any condensate into account in the thermodynamics of moist air and do not make this distinction here. + +!!! note "Relationship between virtual temperature and 'density temperature'" + Some texts distinguish a "(condensate-ignoring) virtual temperature" and a "density temperature", and an analogous condensate-ignoring virtual potential temperature and density potential temperature. + In those texts, the definition of density temperature incorporates condensate mass but their "condensate-ignoring virtual temperature" does not. + We always take the mass of any condensate into account in the thermodynamics of moist air, so this distinction is irrelevant here. + In other words, because the virtual temperature defined above incorporates the mass of condensate into ``R_m(q)`` (and virtual potential temperature is additionally defined in terms of ``c_pm(q)``) via the potential temperature exponent ``κ``), there is no distinction between our virtual temperature and a hypothetical "density temperature". ### Liquid-Ice Potential Temperature diff --git a/test/aqua.jl b/test/aqua.jl index ce47cdb4..6d280151 100644 --- a/test/aqua.jl +++ b/test/aqua.jl @@ -30,8 +30,7 @@ end Aqua.test_stale_deps(Thermodynamics) Aqua.test_deps_compat(Thermodynamics) Aqua.test_project_extras(Thermodynamics) - Aqua.test_project_toml_formatting(Thermodynamics) - Aqua.test_piracy(Thermodynamics) + Aqua.test_piracies(Thermodynamics) end nothing