Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Sep 18, 2023
1 parent 94ea883 commit 2eace80
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/prognostic_equations/edmfx_closures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,12 @@ function pi_groups_entr(
) where {FT}

if ᶜaʲ <= FT(0) || !entr_detr_flag
return (; entr = FT(0), detr = FT(0))
return FT(0)
else
g = CAP.grav(params)

entr_coeff = CAP.entr_coeff(params)
entr_tau = CAP.entr_tau(params)
detr_coeff = CAP.detr_coeff(params)

turbconv_params = CAP.turbconv_params(params)
ᶜaʲ_max = TCP.max_area(turbconv_params)
Expand Down Expand Up @@ -219,7 +218,7 @@ function pi_groups_detr(
) where {FT}

if ᶜaʲ <= FT(0) || !entr_detr_flag
return (; entr = FT(0), detr = FT(0))
return FT(0)
else
g = CAP.grav(params)

Expand All @@ -242,13 +241,6 @@ function pi_groups_detr(
Π₃ = sqrt(ᶜaʲ)
Π₄ = ᶜRHʲ - ᶜRH⁰
Π₆ = (ᶜz - z_sfc) / ref_H
entr = max(
0,
ᶜwʲ / (ᶜz - z_sfc) * (
-4.013288 - 0.000968 * Π₁ + 0.356974 * Π₃ - 0.403124 * Π₄ +
1.503261 * Π₆
),
)
detr = max(
0,
ᶜwʲ * (
Expand Down

0 comments on commit 2eace80

Please sign in to comment.