From 58d207b6644c27aafc77f6f6d20821218fa56926 Mon Sep 17 00:00:00 2001 From: "Gregory L. Wagner" Date: Sat, 2 Dec 2023 10:17:44 -0700 Subject: [PATCH 1/9] Update Formulation.md --- docs/src/Formulation.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/src/Formulation.md b/docs/src/Formulation.md index 516da519..ff5b5898 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 + 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 From 74ada9125743cd3e25a55fee6704f05c3f733f88 Mon Sep 17 00:00:00 2001 From: "Gregory L. Wagner" Date: Tue, 5 Dec 2023 11:08:05 -0700 Subject: [PATCH 2/9] Update Formulation.md --- docs/src/Formulation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/Formulation.md b/docs/src/Formulation.md index ff5b5898..a2cbe96f 100644 --- a/docs/src/Formulation.md +++ b/docs/src/Formulation.md @@ -376,7 +376,7 @@ A virtual potential temperature can be defined analogously: \end{equation} ``` -!!! note +!!! 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. From 24586a44b44fea3c49f85e8cb1fe61902de42f76 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Tue, 5 Dec 2023 15:21:53 -0500 Subject: [PATCH 3/9] Fix CI due to Aqua changes --- test/aqua.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/test/aqua.jl b/test/aqua.jl index ce47cdb4..ee4bfc6e 100644 --- a/test/aqua.jl +++ b/test/aqua.jl @@ -30,7 +30,6 @@ 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) end From 628311f7b005f6c5f869a572068efd1d5e441589 Mon Sep 17 00:00:00 2001 From: "Gregory L. Wagner" Date: Sat, 2 Dec 2023 10:17:44 -0700 Subject: [PATCH 4/9] Update Formulation.md --- docs/src/Formulation.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/src/Formulation.md b/docs/src/Formulation.md index 516da519..ff5b5898 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 + 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 From 90e7833dbef0edd70fc675db9bec5a2fd87dcea0 Mon Sep 17 00:00:00 2001 From: "Gregory L. Wagner" Date: Tue, 5 Dec 2023 11:08:05 -0700 Subject: [PATCH 5/9] Update Formulation.md --- docs/src/Formulation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/Formulation.md b/docs/src/Formulation.md index ff5b5898..a2cbe96f 100644 --- a/docs/src/Formulation.md +++ b/docs/src/Formulation.md @@ -376,7 +376,7 @@ A virtual potential temperature can be defined analogously: \end{equation} ``` -!!! note +!!! 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. From eace6176bad48b7cca17becb6decea7d4d95af6e Mon Sep 17 00:00:00 2001 From: Gregory Wagner Date: Thu, 7 Dec 2023 05:13:53 -0700 Subject: [PATCH 6/9] Add compat for Random at 1.9 --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index 7e4e5cf0..eeadc14a 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 = "1.9" julia = "1.6" From ca1a6b00295fca416b00a2ce4e97b4c64ca98e47 Mon Sep 17 00:00:00 2001 From: Gregory Wagner Date: Thu, 7 Dec 2023 05:15:04 -0700 Subject: [PATCH 7/9] Try using a compat to Random at 1.6 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index eeadc14a..dc29ce83 100644 --- a/Project.toml +++ b/Project.toml @@ -13,5 +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 = "1.9" +Random = "1.6" julia = "1.6" From 5e56b5dce2f4b0a5493c3ec1747c6edf368ee932 Mon Sep 17 00:00:00 2001 From: Gregory Wagner Date: Thu, 7 Dec 2023 05:29:30 -0700 Subject: [PATCH 8/9] Attempt to assign a more liberal compat to Random --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index dc29ce83..92c0fd9e 100644 --- a/Project.toml +++ b/Project.toml @@ -13,5 +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 = "1.6" +Random = "<0.0.1, 1" julia = "1.6" From 0d97c3e701612fcdda3fd7fab22d299b2a55bf91 Mon Sep 17 00:00:00 2001 From: Gregory Wagner Date: Thu, 7 Dec 2023 05:36:03 -0700 Subject: [PATCH 9/9] Rename to test_piracies --- test/aqua.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/aqua.jl b/test/aqua.jl index ee4bfc6e..6d280151 100644 --- a/test/aqua.jl +++ b/test/aqua.jl @@ -30,7 +30,7 @@ end Aqua.test_stale_deps(Thermodynamics) Aqua.test_deps_compat(Thermodynamics) Aqua.test_project_extras(Thermodynamics) - Aqua.test_piracy(Thermodynamics) + Aqua.test_piracies(Thermodynamics) end nothing