Skip to content

Commit 741af5d

Browse files
authored
fix divide by zero (#1623)
* fix divide by zero * up to 1.5.2
1 parent 7d50b52 commit 741af5d

7 files changed

Lines changed: 10 additions & 6 deletions

File tree

.buildkite/Manifest-v1.11.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ version = "0.3.0"
516516
deps = ["Adapt", "ClimaComms", "ClimaCore", "ClimaDiagnostics", "ClimaParams", "ClimaTimeSteppers", "ClimaUtilities", "Dates", "DocStringExtensions", "Insolation", "Interpolations", "LazyArtifacts", "LazyBroadcast", "LinearAlgebra", "NCDatasets", "RootSolvers", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics"]
517517
path = ".."
518518
uuid = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532"
519-
version = "1.5.1"
519+
version = "1.5.2"
520520
weakdeps = ["BSON", "CSV", "CairoMakie", "ClimaAnalysis", "DataFrames", "DelimitedFiles", "Flux", "GeoMakie", "HTTP", "Printf", "StatsBase"]
521521

522522
[deps.ClimaLand.extensions]

.buildkite/Manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ version = "0.3.0"
513513
deps = ["Adapt", "ClimaComms", "ClimaCore", "ClimaDiagnostics", "ClimaParams", "ClimaTimeSteppers", "ClimaUtilities", "Dates", "DocStringExtensions", "Insolation", "Interpolations", "LazyArtifacts", "LazyBroadcast", "LinearAlgebra", "NCDatasets", "RootSolvers", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics"]
514514
path = ".."
515515
uuid = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532"
516-
version = "1.5.1"
516+
version = "1.5.2"
517517
weakdeps = ["BSON", "CSV", "CairoMakie", "ClimaAnalysis", "DataFrames", "DelimitedFiles", "Flux", "GeoMakie", "HTTP", "Printf", "StatsBase"]
518518

519519
[deps.ClimaLand.extensions]

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ ClimaLand.jl Release Notes
33

44
main
55
------
6+
v1.5.2
7+
------
8+
- Fix divide by zero bug
9+
610
v1.5.1
711
------
812
- Adjust RootSolvers lower compat

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ClimaLand"
22
uuid = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532"
33
authors = ["Clima Land Team"]
4-
version = "1.5.1"
4+
version = "1.5.2"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

docs/Manifest-v1.11.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ version = "0.3.0"
440440
deps = ["Adapt", "ClimaComms", "ClimaCore", "ClimaDiagnostics", "ClimaParams", "ClimaTimeSteppers", "ClimaUtilities", "Dates", "DocStringExtensions", "Insolation", "Interpolations", "LazyArtifacts", "LazyBroadcast", "LinearAlgebra", "NCDatasets", "RootSolvers", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics"]
441441
path = ".."
442442
uuid = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532"
443-
version = "1.5.1"
443+
version = "1.5.2"
444444
weakdeps = ["BSON", "CSV", "CairoMakie", "ClimaAnalysis", "DataFrames", "DelimitedFiles", "Flux", "GeoMakie", "HTTP", "Printf", "StatsBase"]
445445

446446
[deps.ClimaLand.extensions]

docs/Manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ version = "0.3.0"
437437
deps = ["Adapt", "ClimaComms", "ClimaCore", "ClimaDiagnostics", "ClimaParams", "ClimaTimeSteppers", "ClimaUtilities", "Dates", "DocStringExtensions", "Insolation", "Interpolations", "LazyArtifacts", "LazyBroadcast", "LinearAlgebra", "NCDatasets", "RootSolvers", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics"]
438438
path = ".."
439439
uuid = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532"
440-
version = "1.5.1"
440+
version = "1.5.2"
441441
weakdeps = ["BSON", "CSV", "CairoMakie", "ClimaAnalysis", "DataFrames", "DelimitedFiles", "Flux", "GeoMakie", "HTTP", "Printf", "StatsBase"]
442442

443443
[deps.ClimaLand.extensions]

src/standalone/Soil/soil_heat_parameterizations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function soil_Tf_depressed(
4747
θtot = min(_ρ_ice / _ρ_liq * θ_i + θ_l, ν)
4848
# This is consistent with Equation (22) of Dall'Amico
4949
ψw0 = matric_potential(hydrology_cm, effective_saturation(ν, θtot, θ_r))
50-
Tf_depressed = max(_T_freeze * exp(_grav * ψw0 / _LH_f0), FT(0))
50+
Tf_depressed = max(_T_freeze * exp(_grav * ψw0 / _LH_f0), FT(1)) # if Tf_depressed is zero, we divide by it later and get NaNs.
5151
return Tf_depressed
5252
end
5353

0 commit comments

Comments
 (0)