From bbc791528f2ed202dc1fdfb8a8105d38bfcb5d2c Mon Sep 17 00:00:00 2001 From: dudhia Date: Wed, 17 Apr 2024 09:53:20 -0600 Subject: [PATCH] Correct diffusion coefficients for tke in LES (#2034) TYPE: bug-fix KEYWORDS: Diffusion of tke SOURCE: internal (issue raised by Branko Kosovic) DESCRIPTION OF CHANGES: Problem: Reported in #2026 For km_opt=2, tke diffusion should be twice momentum diffusion, but was twice heat diffusion (three times larger). For km_opt=5 it was 3 times momentum diffusion instead of twice. Solution: xkmv and xkmh passed into diffusion routines for tke calls instead of xkhv and xkhh. ISSUE: For use when this PR closes an issue. Fixes #2026 LIST OF MODIFIED FILES: modified: dyn_em/module_diffusion_em.F TESTS CONDUCTED: 1. LES case was run with shalconv sounding to verify the change. 2. The Jenkins tests are all passing. RELEASE NOTE: km_opt=2 and km_opt=5 tke diffusion was reduced to one third its value to match theory. --- dyn_em/module_diffusion_em.F | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dyn_em/module_diffusion_em.F b/dyn_em/module_diffusion_em.F index 2a2db2b5..21d602fd 100644 --- a/dyn_em/module_diffusion_em.F +++ b/dyn_em/module_diffusion_em.F @@ -3023,7 +3023,7 @@ SUBROUTINE horizontal_diffusion_2 ( rt_tendf, ru_tendf, rv_tendf, rw_tendf, & config_flags, & tke(ims,kms,jms), & msftx, msfty, msfux, msfuy, & - msfvx, msfvy, xkhh, rdx, rdy, & + msfvx, msfvy, xkmh, rdx, rdy, & fnm, fnp, cf1, cf2, cf3, & zx, zy, rdz, rdzw, dnw, dn, rho, & .true., & @@ -4332,7 +4332,7 @@ SUBROUTINE vertical_diffusion_2 ( ru_tendf, rv_tendf, rw_tendf, rt_tendf, & If (km_opt .eq. 2) then CALL vertical_diffusion_s( tke_tendf(ims,kms,jms), & config_flags, tke(ims,kms,jms), & - xkhv, & + xkmv, & dn, dnw, rdz, rdzw, fnm, fnp, rho, & .true., & ids, ide, jds, jde, kds, kde, & @@ -8157,7 +8157,7 @@ END SUBROUTINE phy_bc DO j = j_start, j_end DO k = kts+1, ktf DO i = i_start, i_end - xkxavg(i,k,j) = ( fnm(k) * xkhv(i,k,j) + fnp(k) * xkhv(i,k-1,j) ) & + xkxavg(i,k,j) = ( fnm(k) * 2. * xkmv(i,k,j) + fnp(k) * 2. * xkmv(i,k-1,j) ) & *( fnm(k) * rho (i,k,j) + fnp(k) * rho (i,k-1,j) ) END DO END DO -- 2.11.4.GIT