Skip to content

Commit b04481c

Browse files
authored
Merge pull request #283 from CliMA/zs/error_on_non_convergence
set error_on_non_convergence to false
2 parents b505982 + 98d9e81 commit b04481c

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

NEWS.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
Thermodynamics.jl Release Notes
22
========================
33

4-
main
5-
----
6-
74
v1.xxx (TODO: release once refactoring is done)
85
--------
96

@@ -21,6 +18,16 @@ v1.xxx (TODO: release once refactoring is done)
2118
PR [259](https://github.com/CliMA/Thermodynamics.jl/pull/259)
2219
PR [263](https://github.com/CliMA/Thermodynamics.jl/pull/263)
2320

21+
main
22+
----
23+
24+
v0.15.0
25+
--------
26+
- Remove `q_vap_saturation_from_density` and `condensate`.
27+
PR [284](https://github.com/CliMA/Thermodynamics.jl/pull/284)
28+
- Set error_on_non_covergence and print_warning to false by default.
29+
PR [283](https://github.com/CliMA/Thermodynamics.jl/pull/283)
30+
2431
v0.14.2
2532
--------
2633
- Add specific enthalpy functions. PR [282](https://github.com/CliMA/Thermodynamics.jl/pull/282)

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Thermodynamics"
22
uuid = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"
33
authors = ["Climate Modeling Alliance"]
4-
version = "0.14.2"
4+
version = "0.15.0"
55

66
[deps]
77
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"

src/Thermodynamics.jl

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,16 @@ const APS = TP.AbstractThermodynamicsParameters
5555
# For printing literal strings on the gpu
5656
include("printing.jl")
5757

58-
# Allow users to skip error on non-convergence
58+
# Allow users to print warning and throw errors on non-convergence
5959
# by importing:
6060
# ```julia
6161
# import Thermodynamics
62-
# Thermodynamics.error_on_non_convergence() = false
62+
# Thermodynamics.error_on_non_convergence() = true
63+
# Thermodynamics.print_warning() = true
6364
# ```
64-
# Error on convergence must be the default
65-
# behavior because this can result in printing
66-
# very large logs resulting in CI to seemingly hang.
67-
@inline error_on_non_convergence() = true
68-
69-
# Allow users to skip printing warnings on non-convergence
70-
@inline print_warning() = true
65+
# By default, we don't print warnings and don't throw errors on non-convergence.
66+
@inline error_on_non_convergence() = false
67+
@inline print_warning() = false
7168

7269
# Default phase partition for dry air
7370
@inline q_pt_0(::Type{FT}) where {FT} = PhasePartition(FT(0), FT(0), FT(0))

test/exceptions.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ This file contains tests for error handling on failed convergence.
1616
tol = FT(1e-10)
1717
T_virt = T
1818

19+
TD.error_on_non_convergence() = true
20+
TD.print_warning() = true
21+
1922
@testset "Saturation Adjustment" begin
2023
@test_throws ErrorException TD.saturation_adjustment.(
2124
RS.NewtonsMethod,

0 commit comments

Comments
 (0)