Skip to content

Commit

Permalink
Merge pull request #114 from grantfirl/ufs-dev-PR122
Browse files Browse the repository at this point in the history
UFS-dev PR#122
  • Loading branch information
grantfirl authored Feb 14, 2024
2 parents eaf91e2 + 6f9826b commit 6a1d23b
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 7 deletions.
21 changes: 18 additions & 3 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,9 @@ module GFS_typedefs
integer :: seed0 !< random seed for radiation

real(kind=kind_phys) :: rbcr !< Critical Richardson Number in the PBL scheme
real(kind=kind_phys) :: betascu !< Tuning parameter for prog. closure shallow clouds
real(kind=kind_phys) :: betamcu !< Tuning parameter for prog. closure midlevel clouds
real(kind=kind_phys) :: betadcu !< Tuning parameter for prog. closure deep clouds

!--- MYNN parameters/switches
logical :: do_mynnedmf
Expand Down Expand Up @@ -3072,7 +3075,6 @@ subroutine coupling_create (Coupling, IM, Model)
Coupling%psurfi_cpl = clear_val
endif

!--prognostic closure - moisture coupling
if(Model%progsigma)then
allocate(Coupling%dqdt_qmicro (IM,Model%levs))
Coupling%dqdt_qmicro = clear_val
Expand Down Expand Up @@ -3627,6 +3629,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
real(kind=kind_phys) :: var_ric = 1.0
real(kind=kind_phys) :: coef_ric_l = 0.16
real(kind=kind_phys) :: coef_ric_s = 0.25
!Prognostic convective closure
real(kind=kind_phys) :: betascu = 8.0 !< Tuning parameter for prog. closure shallow clouds
real(kind=kind_phys) :: betamcu = 1.0 !< Tuning parameter for prog. closure midlevel clouds
real(kind=kind_phys) :: betadcu = 2.0 !< Tuning parameter for prog. closure deep clouds
! *DH
logical :: do_myjsfc = .false. !< flag for MYJ surface layer scheme
logical :: do_myjpbl = .false. !< flag for MYJ PBL scheme
Expand Down Expand Up @@ -3945,8 +3951,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
do_ugwp_v1, do_ugwp_v1_orog_only, do_ugwp_v1_w_gsldrag, &
ugwp_seq_update, var_ric, coef_ric_l, coef_ric_s, hurr_pbl, &
do_myjsfc, do_myjpbl, &
hwrf_samfdeep, hwrf_samfshal,progsigma, &
h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf, &
hwrf_samfdeep, hwrf_samfshal,progsigma,betascu,betamcu, &
betadcu,h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf,&
shinhong, do_ysu, dspheat, lheatstrg, lseaspray, cnvcld, &
random_clds, shal_cnv, imfshalcnv, imfdeepcnv, isatmedmf, &
do_deep, jcap, &
Expand Down Expand Up @@ -4726,11 +4732,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%hwrf_samfdeep = hwrf_samfdeep
Model%hwrf_samfshal = hwrf_samfshal

!--prognostic closure - moisture coupling
if ((progsigma .and. imfdeepcnv/=2) .and. (progsigma .and. imfdeepcnv/=5)) then
write(*,*) 'Logic error: progsigma requires imfdeepcnv=2 or 5'
stop
end if
Model%progsigma = progsigma
Model%betascu = betascu
Model%betamcu = betamcu
Model%betadcu = betadcu

if (oz_phys .and. oz_phys_2015) then
write(*,*) 'Logic error: can only use one ozone physics option (oz_phys or oz_phys_2015), not both. Exiting.'
Expand Down Expand Up @@ -6732,6 +6742,11 @@ subroutine control_print(Model)
print *, ' do_spp : ', Model%do_spp
print *, ' n_var_spp : ', Model%n_var_spp
print *, ' '
print *, 'convection'
print *, 'betascu : ', Model%betascu
print *, 'betamcu : ', Model%betamcu
print *, 'betadcu : ', Model%betadcu
print *, ' '
print *, 'cellular automata'
print *, ' nca : ', Model%nca
print *, ' ncells : ', Model%ncells
Expand Down
21 changes: 21 additions & 0 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -5299,6 +5299,27 @@
units = flag
dimensions = ()
type = logical
[betascu]
standard_name = tuning_param_for_shallow_cu
long_name = tuning param for shallow cu in case prognostic closure is used
units = none
dimensions = ()
type = real
kind = kind_phys
[betamcu]
standard_name = tuning_param_for_midlevel_cu
long_name = tuning param for midlevel cu in case prognostic closure is used
units = none
dimensions = ()
type = real
kind = kind_phys
[betadcu]
standard_name = tuning_param_for_deep_cu
long_name = tuning param for deep cu in case prognostic closure is used
units = none
dimensions = ()
type = real
kind = kind_phys
[isatmedmf]
standard_name = choice_of_scale_aware_TKE_moist_EDMF_PBL
long_name = choice of scale-aware TKE moist EDMF PBL scheme
Expand Down
95 changes: 95 additions & 0 deletions ccpp/suites/suite_FV3_global_nest_v1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="FV3_global_nest_v1" version="1">
<!-- <init></init> -->
<group name="time_vary">
<subcycle loop="1">
<scheme>GFS_time_vary_pre</scheme>
<scheme>GFS_rrtmg_setup</scheme>
<scheme>GFS_rad_time_vary</scheme>
<scheme>GFS_phys_time_vary</scheme>
</subcycle>
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>sgscloud_radpre</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw_pre</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>sgscloud_radpost</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
<scheme>GFS_surface_generic_pre</scheme>
<scheme>GFS_surface_composites_pre</scheme>
<scheme>dcyc2t3</scheme>
<scheme>GFS_surface_composites_inter</scheme>
<scheme>GFS_suite_interstitial_2</scheme>
</subcycle>
<!-- Surface iteration loop -->
<subcycle loop="2">
<scheme>mynnsfc_wrapper</scheme>
<scheme>GFS_surface_loop_control_part1</scheme>
<scheme>sfc_nst_pre</scheme>
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>noahmpdrv</scheme>
<scheme>sfc_sice</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
<subcycle loop="1">
<scheme>GFS_surface_composites_post</scheme>
<scheme>sfc_diag</scheme>
<scheme>sfc_diag_post</scheme>
<scheme>GFS_surface_generic_post</scheme>
<scheme>mynnedmf_wrapper</scheme>
<scheme>GFS_GWD_generic_pre</scheme>
<scheme>ugwpv1_gsldrag</scheme>
<scheme>ugwpv1_gsldrag_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
<scheme>h2ophys</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
<scheme>GFS_DCNV_generic_pre</scheme>
<scheme>cu_c3_driver_pre</scheme>
<scheme>cu_c3_driver</scheme>
<scheme>GFS_DCNV_generic_post</scheme>
<scheme>GFS_SCNV_generic_pre</scheme>
<scheme>GFS_SCNV_generic_post</scheme>
<scheme>GFS_suite_interstitial_4</scheme>
<scheme>cnvc90</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<scheme>mp_thompson_pre</scheme>
</subcycle>
<subcycle loop="1">
<scheme>mp_thompson</scheme>
</subcycle>
<subcycle loop="1">
<scheme>mp_thompson_post</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>cu_c3_driver_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
</subcycle>
</group>
<group name="stochastics">
<subcycle loop="1">
<scheme>GFS_stochastics</scheme>
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
<!-- <finalize></finalize> -->
</suite>
2 changes: 1 addition & 1 deletion fv3_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ subroutine InitializeAdvertise(gcomp, rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

call ESMF_ConfigGetAttribute(config=CF,value=quilting_restart, &
default=.false., label ='quilting_restart:',rc=rc)
default=.true., label ='quilting_restart:',rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

if (.not.quilting) quilting_restart = .false.
Expand Down
13 changes: 12 additions & 1 deletion io/post_fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp)
dustpm10, dustcb, bccb, occb, sulfcb, sscb, &
dustallcb, ssallcb, dustpm, sspm, pp25cb, pp10cb, &
no3cb, nh4cb, dusmass, ducmass, dusmass25,ducmass25, &
snownc, graupelnc, qrmax
snownc, graupelnc, qrmax, hail_maxhailcast
use soil, only: sldpth, sh2o, smc, stc, sllevel
use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice
use ctlblk_mod, only: im, jm, lm, lp1, jsta, jend, jsta_2l, jend_2u, jsta_m,jend_m, &
Expand Down Expand Up @@ -995,6 +995,17 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp)
enddo
endif

! Maximum hail diameter (mm) since last output
if(trim(fieldname)=='hailcast_dhail') then
!$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,hail_maxhailcast,arrayr42d,fillValue,spval)
do j=jsta,jend
do i=ista, iend
hail_maxhailcast(i,j)=arrayr42d(i,j)
if(abs(arrayr42d(i,j)-fillValue) < small) hail_maxhailcast(i,j)=spval
enddo
enddo
endif

! biomass burning emissions
if(trim(fieldname)=='ebb_smoke_hr') then
!$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ebb,arrayr42d,fillValue,spval)
Expand Down

0 comments on commit 6a1d23b

Please sign in to comment.