From 4cd35abbfca7f783e2e284ab1f597d15c6cb11bc Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 8 Sep 2022 13:45:08 -0400 Subject: [PATCH] clean up samfdeepcnv and sascnvn changes to address review comments --- physics/samfdeepcnv.f | 14 +++++--------- physics/sascnvn.F | 14 +++++--------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 7c6f0880a..2552ac622 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -1637,15 +1637,11 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, & ! aa2(i) = aa2(i) + !! & dz1 * eta(i,k) * grav * fv * ! & dz1 * grav * fv * -! & max(val,(qeso(i,k) - qo(i,k))) - if(aa2(i) < 0.) then - ktcon1(i) = k - flg(i) = .false. - endif -!NRL MNM: Limit overshooting not to be deeper than the actual cloud - tem = zi(i,ktcon(i))-zi(i,kbcon(i)) - tem1 = zi(i,ktcon1(i))-zi(i,ktcon(i)) - if(tem1.ge.tem) then +! & max(val,(qeso(i,k) - qo(i,k))) +!NRL MNM: Limit overshooting not to be deeper than half the actual cloud + tem = 0.5 * (zi(i,ktcon(i))-zi(i,kbcon(i))) + tem1 = zi(i,k)-zi(i,ktcon(i)) + if(aa2(i) < 0. .or. tem1 >= tem) then ktcon1(i) = k flg(i) = .false. endif diff --git a/physics/sascnvn.F b/physics/sascnvn.F index 08e7b4669..673231e05 100644 --- a/physics/sascnvn.F +++ b/physics/sascnvn.F @@ -1000,18 +1000,14 @@ subroutine sascnvn_run( aa2(i) = aa2(i) + & dz1 * (g / (cp * to(i,k))) & * dbyo(i,k) / (1. + gamma) - & * rfact - if(aa2(i).lt.0.) then - ktcon1(i) = k - flg(i) = .false. - endif + & * rfact !NRL MNM: Limit overshooting not to be deeper than the actual cloud - tem = zi(i,ktcon(i))-zi(i,kbcon(i)) - tem1 = zi(i,ktcon1(i))-zi(i,ktcon(i)) - if(tem1.ge.tem) then + tem = 0.5 * (zi(i,ktcon(i))-zi(i,kbcon(i))) + tem1 = zi(i,k)-zi(i,ktcon(i)) + if(aa2(i) < 0. .or. tem1 >= tem) then ktcon1(i) = k flg(i) = .false. - endif + endif endif endif enddo