Skip to content

Commit

Permalink
Ensure prognostic closure is not used at coarse resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
lisa-bengtsson committed Oct 25, 2023
1 parent 2fc4a64 commit 12b400a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion physics/cu_c3_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5758,7 +5758,7 @@ subroutine calculate_updraft_velocity(its,itf,ktf,ite,kts,kte,ierr,progsigma,
do k = 2, ktf-1
do i = 1, itf
if (ierr(i)==0) then
if(k >= kbcon(i) .and. k < ktcon(i) .and. dbyo(i,k)>0.)then
if(k >= kbcon(i) .and. k < ktcon(i))then
gamma = el2orc * qeso(i,k+1) / (to(i,k+1)**2)
if(k >= kbcon(i) .and. clw_all(i,k)>0.)then
buo(i,k) = buo(i,k) - g * qlk(i,k)
Expand Down
16 changes: 12 additions & 4 deletions physics/cu_c3_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ end subroutine cu_c3_driver_init
!!
!>\section gen_c3_driver Grell-Freitas Cumulus Scheme Driver General Algorithm
subroutine cu_c3_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
do_ca,progsigma,cactiv,cactiv_m,g,cp,fv,r_d,xlv,r_v,forcet, &
do_ca,progsigma,cnx,cactiv,cactiv_m,g,cp,fv,r_d,xlv,r_v,forcet, &
forceqv_spechum,phil,delp,raincv,tmf,qmicro,sigmain, &
betascu,betamcu,betadcu,qv_spechum,t,cld1d,us,vs,t2di,w, &
qv2di_spechum,p2di,psuri, &
Expand Down Expand Up @@ -93,14 +93,14 @@ subroutine cu_c3_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
integer :: ishallow_g3 ! depend on imfshalcnv
!-------------------------------------------------------------
integer :: its,ite, jts,jte, kts,kte
integer, intent(in ) :: im,km,ntracer
integer, intent(in ) :: im,km,ntracer,cnx
integer, intent(in ) :: ichoice_in,ichoicem_in,ichoice_s_in
logical, intent(in ) :: flag_init, flag_restart, do_mynnedmf
logical, intent(in ) :: flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend, &
do_ca,progsigma
do_ca
real (kind=kind_phys), intent(in) :: g,cp,fv,r_d,xlv,r_v,betascu,betamcu,betadcu
logical, intent(in ) :: ldiag3d

logical, intent(inout) :: progsigma
real(kind=kind_phys), intent(inout) :: dtend(:,:,:)
!$acc declare copy(dtend)
integer, intent(in) :: dtidx(:,:), &
Expand Down Expand Up @@ -280,6 +280,14 @@ subroutine cu_c3_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
!$acc end kernels
endif


if(progsigma)then
if(cnx < 384)then
progsigma=.false.
write(*,*)'Forcing prognostic closure to .false. due to coarse resolution'
endif
endif

if(ldiag3d) then
if(flag_for_dcnv_generic_tend) then
cliw_deep_idx=0
Expand Down
7 changes: 7 additions & 0 deletions physics/cu_c3_driver.meta
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@
units = flag
dimensions = ()
type = logical
intent = inout
[cnx]
standard_name = number_of_x_points_for_current_cubed_sphere_tile
long_name = number of points in x direction for this cubed sphere face
units = count
dimensions = ()
type = integer
intent = in
[cactiv]
standard_name = counter_for_grell_freitas_convection
Expand Down

0 comments on commit 12b400a

Please sign in to comment.