Skip to content

Commit 42ba5ae

Browse files
committed
Fixes to work with ClimaCore 0.14.52
1 parent bfa8d70 commit 42ba5ae

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/standalone/Soil/rre.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,12 +448,11 @@ function ClimaLand.make_compute_jacobian(model::RichardsModel{FT}) where {FT}
448448
MatrixFields.LowerDiagonalMatrixRow(p.soil.topBC_scratch)
449449
end
450450
# Compute divergence matrix
451+
negative_dtγ = FT(-float(dtγ))
451452
@. ∂ϑres∂ϑ =
452-
FT(-1) *
453-
float(dtγ) *
453+
negative_dtγ *
454454
(divf2c_matrix() p.soil.full_bidiag_matrix_scratch) - (I,)
455455

456-
457456
end
458457
return compute_jacobian!
459458
end

test/standalone/Vegetation/canopy_model.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,15 @@ import ClimaParams
211211
LW_d = FT.(longwave_radiation(t0))
212212
LW_d_canopy = @. (1 - ϵ_canopy) * LW_d + ϵ_canopy ** T_canopy^4
213213
LW_u_soil = @. ϵ_soil ** T_soil^4 + (1 - ϵ_soil) * LW_d_canopy
214-
@test p.canopy.radiative_transfer.LW_n == @. (
215-
ϵ_canopy * LW_d - 2 * ϵ_canopy ** T_canopy^4 +
216-
ϵ_canopy * LW_u_soil
214+
@test all(
215+
Array(
216+
parent(
217+
@. p.canopy.radiative_transfer.LW_n (
218+
ϵ_canopy * LW_d - 2 * ϵ_canopy ** T_canopy^4 +
219+
ϵ_canopy * LW_u_soil
220+
)
221+
),
222+
),
217223
)
218224

219225
@test all(Array(parent(p.canopy.energy.fa_energy_roots)) .== FT(0))

0 commit comments

Comments
 (0)