Skip to content

Commit ce92f64

Browse files
committed
Check for equality with float(t) instead of t
This fixed the bug that resulted in `NaN`s in the first time slice of any radiation-related diagnostics.
1 parent 2f43019 commit ce92f64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cache/surface_albedo.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ so the initial callback initialization doesn't lead to NaNs in the radiation mod
110110
Subsequently, the surface albedo will be updated by the coupler.
111111
"""
112112
function set_surface_albedo!(Y, p, t, ::CouplerAlbedo)
113-
if t == 0
113+
if float(t) == 0
114114
FT = eltype(Y)
115115
# set initial insolation initial conditions
116116
!(p.atmos.insolation isa IdealizedInsolation) &&

0 commit comments

Comments
 (0)