Skip to content

Commit 25240aa

Browse files
authored
Merge pull request #3944 from CliMA/aj/cloud_fraction
Materialize a lazy function to fix coupler test
2 parents 3c6eac1 + a95de9d commit 25240aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cache/cloud_fraction.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ NVTX.@annotate function set_cloud_fraction!(
9494
end
9595
end
9696

97-
ᶜmixing_length = compute_gm_mixing_length(Y, p)
97+
# TODO - tmp fix for the Coupler test. To be removed soon.
98+
ᶜmixing_length_field = p.scratch.ᶜtemp_scalar
99+
ᶜmixing_length_field .= compute_gm_mixing_length(Y, p)
98100

99101
diagnostic_covariance_coeff = CAP.diagnostic_covariance_coeff(params)
100102
@. cloud_diagnostics_tuple = quad_loop(
@@ -103,7 +105,7 @@ NVTX.@annotate function set_cloud_fraction!(
103105
Geometry.WVector(p.precomputed.ᶜgradᵥ_q_tot),
104106
Geometry.WVector(p.precomputed.ᶜgradᵥ_θ_liq_ice),
105107
diagnostic_covariance_coeff,
106-
ᶜmixing_length,
108+
ᶜmixing_length_field,
107109
thermo_params,
108110
)
109111
end

0 commit comments

Comments
 (0)