Skip to content

Commit

Permalink
Merge pull request #121 from XiaqiongZhou-NOAA/switch_sas
Browse files Browse the repository at this point in the history
Add a condition to turn off samfdeepcnv when MYNN shallow convection active
  • Loading branch information
grantfirl authored Nov 9, 2023
2 parents c751a5a + fffadd8 commit c2ec9e5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
8 changes: 6 additions & 2 deletions physics/samfdeepcnv.f
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
& CNV_DQLDT,CLCN,CNV_FICE,CNV_NDROP,CNV_NICE,mp_phys,mp_phys_mg,&
& clam,c0s,c1,betal,betas,evef,pgcon,asolfac, &
& do_ca, ca_closure, ca_entr, ca_trigger, nthresh,ca_deep, &
& rainevap,sigmain, sigmaout, errmsg,errflg)
& rainevap,sigmain, sigmaout, maxMF, do_mynnedmf, errmsg,errflg)
!
use machine , only : kind_phys
use funcphys , only : fpvs
Expand All @@ -99,11 +99,12 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
& prslp(:,:), garea(:), hpbl(:), dot(:,:), phil(:,:)
real(kind=kind_phys), dimension(:), intent(in) :: fscav
logical, intent(in) :: first_time_step,restart,hwrf_samfdeep, &
& progsigma
& progsigma,do_mynnedmf
real(kind=kind_phys), intent(in) :: nthresh
real(kind=kind_phys), intent(in) :: ca_deep(:)
real(kind=kind_phys), intent(in) :: sigmain(:,:),qmicro(:,:), &
& tmf(:,:,:),q(:,:), prevsq(:,:)
real(kind=kind_phys), dimension (:), intent(in) :: maxMF
real(kind=kind_phys), intent(out) :: rainevap(:)
real(kind=kind_phys), intent(out) :: sigmaout(:,:)
logical, intent(in) :: do_ca,ca_closure,ca_entr,ca_trigger
Expand Down Expand Up @@ -347,6 +348,9 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
!
do i=1,im
cnvflg(i) = .true.
if(do_mynnedmf) then
if(maxMF(i).gt.0.)cnvflg(i)=.false.
endif
sfcpbl(i) = sfclfac * hpbl(i)
rn(i)=0.
mbdt(i)=10.
Expand Down
15 changes: 15 additions & 0 deletions physics/samfdeepcnv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,21 @@
type = real
kind = kind_phys
intent = out
[maxMF]
standard_name = maximum_mass_flux
long_name = maximum mass flux within a column
units = m s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
[do_mynnedmf]
standard_name = flag_for_mellor_yamada_nakanishi_niino_pbl_scheme
long_name = flag to activate MYNN-EDMF
units = flag
dimensions = ()
type = logical
intent = in
[qlcn]
standard_name = mass_fraction_of_convective_cloud_liquid_water
long_name = mass fraction of convective cloud liquid water
Expand Down

0 comments on commit c2ec9e5

Please sign in to comment.