Skip to content

Commit

Permalink
Add more promotion and remove restriction on SA tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisYatunin committed Feb 22, 2024
1 parent 16b1f86 commit 56762c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Thermodynamics"
uuid = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"
authors = ["Climate Modeling Alliance"]
version = "0.12.1"
version = "0.12.2"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand Down
12 changes: 7 additions & 5 deletions src/relations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,8 @@ isobaric specific heat capacities of the two phases, given
T_0 = TP.T_0(param_set)
return LH_0 + Δcp * (T - T_0)
end
latent_heat_generic(param_set, T, LH_0, Δcp) =

Check warning on line 837 in src/relations.jl

View check run for this annotation

Codecov / codecov/patch

src/relations.jl#L837

Added line #L837 was not covered by tests
latent_heat_generic(param_set, promote(T, LH_0, Δcp)...)

"""
weighted_latent_heat(param_set, T, λ)
Expand Down Expand Up @@ -1568,7 +1570,7 @@ See also [`saturation_adjustment`](@ref).
q_tot::FT,
::Type{phase_type},
maxiter::Int,
relative_temperature_tol::FT,
relative_temperature_tol::Real,
T_guess::Union{FT, Nothing} = nothing,
) where {FT <: Real, sat_adjust_method, phase_type <: PhaseEquil}
_T_min = TP.T_min(param_set)
Expand Down Expand Up @@ -1708,7 +1710,7 @@ See also [`saturation_adjustment`](@ref).
q_tot::FT,
::Type{phase_type},
maxiter::Int,
relative_temperature_tol::FT,
relative_temperature_tol::Real,
T_guess::Union{FT, Nothing} = nothing,
) where {FT <: Real, sat_adjust_method, phase_type <: PhaseEquil}
_T_min = TP.T_min(param_set)
Expand Down Expand Up @@ -1813,7 +1815,7 @@ See also [`saturation_adjustment`](@ref).
q_tot::FT,
::Type{phase_type},
maxiter::Int,
relative_temperature_tol::FT,
relative_temperature_tol::Real,
T_guess::Union{FT, Nothing} = nothing,
) where {FT <: Real, sat_adjust_method, phase_type <: PhaseEquil}
_T_min = TP.T_min(param_set)
Expand Down Expand Up @@ -1925,7 +1927,7 @@ See also [`saturation_adjustment`](@ref).
q_tot::FT,
::Type{phase_type},
maxiter::Int,
relative_temperature_tol::FT = sqrt(eps(FT)),
relative_temperature_tol::Real = sqrt(eps(FT)),
T_guess::Union{FT, Nothing} = nothing,
) where {FT <: Real, sat_adjust_method, phase_type <: PhaseEquil}
tol = RS.RelativeSolutionTolerance(relative_temperature_tol)
Expand Down Expand Up @@ -2124,7 +2126,7 @@ See also [`saturation_adjustment`](@ref).
q_tot::FT,
::Type{phase_type},
maxiter::Int,
relative_temperature_tol::FT,
relative_temperature_tol::Real,
T_guess::Union{FT, Nothing} = nothing,
) where {FT <: Real, sat_adjust_method, phase_type <: PhaseEquil}
tol = RS.RelativeSolutionTolerance(relative_temperature_tol)
Expand Down

0 comments on commit 56762c9

Please sign in to comment.