From 24ceadb3f2620b0b21d0060c959624984ec92382 Mon Sep 17 00:00:00 2001 From: Zhaoyi Shen <11598433+szy21@users.noreply.github.com> Date: Mon, 8 Apr 2024 14:11:14 -0700 Subject: [PATCH] limit tke to 0 in pi groups --- src/prognostic_equations/edmfx_entr_detr.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/prognostic_equations/edmfx_entr_detr.jl b/src/prognostic_equations/edmfx_entr_detr.jl index 9a42720944..2da439de5a 100644 --- a/src/prognostic_equations/edmfx_entr_detr.jl +++ b/src/prognostic_equations/edmfx_entr_detr.jl @@ -59,7 +59,7 @@ function entrainment( # non-dimensional pi-groups Π₁ = (ᶜz - z_sfc) * (ᶜbuoyʲ - ᶜbuoy⁰) / ((ᶜwʲ - ᶜw⁰)^2 + eps(FT)) / 100 - Π₂ = ᶜtke⁰ / ((ᶜwʲ - ᶜw⁰)^2 + eps(FT)) / 2 + Π₂ = max(ᶜtke⁰, 0) / ((ᶜwʲ - ᶜw⁰)^2 + eps(FT)) / 2 Π₃ = sqrt(ᶜaʲ) Π₄ = ᶜRHʲ - ᶜRH⁰ Π₅ = (ᶜz - z_sfc) / ref_H @@ -177,7 +177,7 @@ function detrainment( # non-dimensional pi-groups Π₁ = (ᶜz - z_sfc) * (ᶜbuoyʲ - ᶜbuoy⁰) / ((ᶜwʲ - ᶜw⁰)^2 + eps(FT)) / 100 - Π₂ = ᶜtke⁰ / ((ᶜwʲ - ᶜw⁰)^2 + eps(FT)) / 2 + Π₂ = max(ᶜtke⁰, 0) / ((ᶜwʲ - ᶜw⁰)^2 + eps(FT)) / 2 Π₃ = sqrt(ᶜaʲ) Π₄ = ᶜRHʲ - ᶜRH⁰ Π₅ = (ᶜz - z_sfc) / ref_H