From 3561fcb69ffc9d7808f71b1f1a99741b8459b5a5 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Mon, 5 Feb 2024 16:37:30 -0500 Subject: [PATCH] Remove unused argument in virtual_temperature --- src/relations.jl | 7 ++----- test/relations.jl | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/relations.jl b/src/relations.jl index 1fd1ba6e..35b463f7 100644 --- a/src/relations.jl +++ b/src/relations.jl @@ -2345,7 +2345,7 @@ The dry potential temperature, given a thermodynamic state `ts`. ) where {FT <: AbstractFloat, phase_type <: ThermodynamicState} q_tot = RH * q_vap_saturation(param_set, T, ρ, phase_type) q_pt = PhasePartition_equil(param_set, T, ρ, q_tot, phase_type) - return virtual_temperature(param_set, T, ρ, q_pt) + return virtual_temperature(param_set, T, q_pt) end """ temperature_and_humidity_given_TᵥρRH(param_set, T_virt, ρ, RH) @@ -2568,20 +2568,18 @@ given a thermodynamic state `ts`. ) """ - virtual_temperature(param_set, T, ρ[, q::PhasePartition]) + virtual_temperature(param_set, T[, q::PhasePartition]) The virtual temperature where - `param_set` an `AbstractParameterSet`, see the [`Thermodynamics`](@ref) for more details - `T` temperature - - `ρ` (moist-)air density and, optionally, - `q` [`PhasePartition`](@ref). Without this argument, the results are for dry air. """ @inline function virtual_temperature( param_set::APS, T::FT, - ρ::FT, q::PhasePartition{FT} = q_pt_0(FT), ) where {FT <: Real} R_d::FT = TP.R_d(param_set) @@ -2598,7 +2596,6 @@ given a thermodynamic state `ts`. virtual_temperature( param_set, air_temperature(param_set, ts), - air_density(param_set, ts), PhasePartition(param_set, ts), ) diff --git a/test/relations.jl b/test/relations.jl index 23a133db..3f0b51f2 100644 --- a/test/relations.jl +++ b/test/relations.jl @@ -1299,7 +1299,7 @@ end # Test virtual temperature and inverse functions: _R_d = FT(TP.R_d(param_set)) - T_virt = virtual_temperature.(param_set, T, ρ, q_pt) + T_virt = virtual_temperature.(param_set, T, q_pt) @test all(T_virt ≈ gas_constant_air.(param_set, q_pt) ./ _R_d .* T) T_rec_qpt_rec = @@ -1318,7 +1318,7 @@ end @test all( isapprox.( T_virt, - virtual_temperature.(param_set, T_rec, ρ, q_pt_rec), + virtual_temperature.(param_set, T_rec, q_pt_rec), atol = sqrt(eps(FT)), ), )