Skip to content

Commit

Permalink
clean up samfdeepcnv and sascnvn changes to address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Grant Firl authored and Grant Firl committed Sep 8, 2022
1 parent 1944081 commit 4cd35ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
14 changes: 5 additions & 9 deletions physics/samfdeepcnv.f
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 5 additions & 9 deletions physics/sascnvn.F
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4cd35ab

Please sign in to comment.