Skip to content

Commit

Permalink
Code update to connect MMM WSM6 to CCPP SCM
Browse files Browse the repository at this point in the history
	modified:   ccpp/config/ccpp_prebuild_config.py
	modified:   ccpp/physics
	modified:   ccpp/physics_namelists/input_RAP_wsm6.nml
	modified:   ccpp/suites/suite_SCM_RAP_wsm6.xml
	modified:   scm/src/CCPP_typedefs.F90
	modified:   scm/src/CCPP_typedefs.meta
	modified:   scm/src/GFS_typedefs.F90
	modified:   scm/src/GFS_typedefs.meta
	modified:   scm/src/scm_physical_constants.F90
	modified:   scm/src/scm_physical_constants.meta
  • Loading branch information
bluefinweiwei committed Oct 22, 2024
1 parent 8931a0b commit 9b27672
Show file tree
Hide file tree
Showing 10 changed files with 211 additions and 97 deletions.
5 changes: 3 additions & 2 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,10 @@
'ccpp/physics/physics/MP/Thompson/mp_thompson_pre.F90',
'ccpp/physics/physics/MP/Thompson/mp_thompson.F90',
'ccpp/physics/physics/MP/Thompson/mp_thompson_post.F90',
'ccpp/physics/physics/MP/wsm6/scm_mp_wsm6_pre.F90',
'ccpp/physics/physics/MP/wsm6/gfs_mmm_mp_wsm6_pre.F90',
'ccpp/physics/physics/mmm_physics/mp_wsm6.F90',
'ccpp/physics/physics/MP/wsm6/scm_mp_wsm6_post.F90',
'ccpp/physics/physics/mmm_physics/mp_wsm6_effectRad.F90',
'ccpp/physics/physics/MP/wsm6/gfs_mmm_mp_wsm6_post.F90',
'ccpp/physics/physics/MP/Zhao_Carr/zhaocarr_gscond.f',
'ccpp/physics/physics/MP/Zhao_Carr/zhaocarr_precpd.f',
'ccpp/physics/physics/PBL/HEDMF/hedmf.f',
Expand Down
9 changes: 5 additions & 4 deletions ccpp/physics_namelists/input_RAP_wsm6.nml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
use_ufo = .true.
pre_rad = .false.
imp_physics = 7
ltaerosol = .true.
ltaerosol = .false.
lradar = .true.
sedi_semi = .true.
decfl = 10
nssl_cccn = 0.6e9
nssl_alphah = 0.0
nssl_alphahl = 1.0
nssl_hail_on = .false.
nssl_ccn_on = .true.
nssl_invertccn = .true.
nssl_ccn_on = .false.
nssl_invertccn = .false.
dt_inner = 60
ttendlim = -999
pdfcld = .false.
Expand Down Expand Up @@ -83,7 +83,7 @@
lkm = 0
psautco = 0.0008,0.0005
prautco = 0.00015,0.00015
lgfdlmprad = .true.
lgfdlmprad = .false.
cplchm = .false.
cplwav = .false.
cplwav2atm = .false.
Expand Down Expand Up @@ -113,6 +113,7 @@
do_RRTMGP = .false.
doGP_cldoptics_LUT = .false.
doGP_lwscat = .false.
do_wsm6_mmm = .true.
hail_opt = 0
den0 = 1.28
denr = 1000
Expand Down
8 changes: 3 additions & 5 deletions ccpp/suites/suite_SCM_RAP_wsm6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,10 @@
<scheme>GFS_suite_interstitial_4</scheme>
<scheme>cnvc90</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<!-- <scheme>mp_thompson_pre</scheme> -->
<!-- <scheme>mp_thompson</scheme> -->
<!-- <scheme>mp_thompson_post</scheme> -->
<scheme>scm_mp_wsm6_pre</scheme>
<scheme>gfs_mmm_mp_wsm6_pre</scheme>
<scheme>mp_wsm6</scheme>
<scheme>scm_mp_wsm6_post</scheme>
<scheme>mp_wsm6_effectRad</scheme>
<scheme>gfs_mmm_mp_wsm6_post</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>cu_gf_driver_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
Expand Down
49 changes: 39 additions & 10 deletions scm/src/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ module CCPP_typedefs
real (kind=kind_phys), pointer :: gflx_ice(:) => null() !<
real (kind=kind_phys), pointer :: gflx_land(:) => null() !<
real (kind=kind_phys), pointer :: gflx_water(:) => null() !<
real (kind=kind_phys), pointer :: graupel_nonphy_mm(:)=> null() !<
real (kind=kind_phys), pointer :: graupelmp(:) => null() !<
real (kind=kind_phys), pointer :: graupelmp_mm(:) => null() !<
real (kind=kind_phys), pointer :: gwdcu(:,:) => null() !<
real (kind=kind_phys), pointer :: gwdcv(:,:) => null() !<
real (kind=kind_phys), pointer :: zvfun(:) => null() !<
Expand Down Expand Up @@ -247,7 +249,9 @@ module CCPP_typedefs
real (kind=kind_phys), pointer :: qss_water(:) => null() !<
logical :: fullradar_diag !<
real (kind=kind_phys) :: raddt !<
real (kind=kind_phys), pointer :: rain_nonphy_mm(:)=> null() !<
real (kind=kind_phys), pointer :: rainmp(:) => null() !<
real (kind=kind_phys), pointer :: rainmp_mm(:) => null() !<
real (kind=kind_phys), pointer :: raincd(:) => null() !<
real (kind=kind_phys), pointer :: raincs(:) => null() !<
real (kind=kind_phys), pointer :: rainmcadj(:) => null() !<
Expand Down Expand Up @@ -275,7 +279,9 @@ module CCPP_typedefs
logical :: skip_macro !<
real (kind=kind_phys), pointer :: snowc(:) => null() !<
real (kind=kind_phys), pointer :: snohf(:) => null() !<
real (kind=kind_phys), pointer :: snow_nonphy_mm(:)=> null() !<
real (kind=kind_phys), pointer :: snowmp(:) => null() !<
real (kind=kind_phys), pointer :: snowmp_mm(:) => null() !<
real (kind=kind_phys), pointer :: snowmt(:) => null() !<
real (kind=kind_phys), pointer :: stress(:) => null() !<
real (kind=kind_phys), pointer :: stress_ice(:) => null() !<
Expand Down Expand Up @@ -414,17 +420,18 @@ module CCPP_typedefs
real (kind=kind_phys), pointer :: clxss(:,:) => null() !<

!-- WSM6
integer :: hail_opt !<
real (kind=kind_phys), pointer :: qi(:,:) => null() !<
real (kind=kind_phys), pointer :: qc(:,:) => null() !<
real (kind=kind_phys), pointer :: rho_air(:,:) => null() !<
real (kind=kind_phys), pointer :: evapprod2d(:,:) => null() !<
real (kind=kind_phys), pointer :: rainprod2d(:,:) => null() !<
real (kind=kind_phys) :: q_over_R_minus_one !<
integer :: vertical_dimension_start !<
integer :: vertical_dimension_end !<
real (kind=kind_phys), pointer :: re_qc_m(:,:) => null() !<
real (kind=kind_phys), pointer :: re_qi_m(:,:) => null() !<
real (kind=kind_phys), pointer :: re_qs_m(:,:) => null() !<
integer :: vertical_begin !<
integer :: vertical_end !<
integer :: horizontal_begin !<
integer :: horizontal_end !<
real (kind=kind_phys) :: re_qc_bg,re_qi_bg,re_qs_bg !<
real (kind=kind_phys) :: re_qc_max,re_qi_max,re_qs_max !<

!-- 3D diagnostics
integer :: rtg_ozone_index, rtg_tke_index
Expand Down Expand Up @@ -778,6 +785,12 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model)
.or. Model%imp_physics == Model%imp_physics_nssl &
.or. Model%imp_physics == Model%imp_physics_wsm6_mmm &
) then
allocate (Interstitial%graupel_nonphy_mm (IM))
allocate (Interstitial%rain_nonphy_mm (IM))
allocate (Interstitial%snow_nonphy_mm (IM))
allocate (Interstitial%graupelmp_mm (IM))
allocate (Interstitial%rainmp_mm (IM))
allocate (Interstitial%snowmp_mm (IM))
allocate (Interstitial%graupelmp (IM))
allocate (Interstitial%icemp (IM))
allocate (Interstitial%rainmp (IM))
Expand Down Expand Up @@ -816,13 +829,16 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model)

! Setup WSM6
if (Model%imp_physics == Model%imp_physics_wsm6_mmm) then
Interstitial%vertical_dimension_start = 1
Interstitial%vertical_dimension_end = Model%levs
Interstitial%horizontal_begin = 1
Interstitial%horizontal_end = IM
Interstitial%vertical_begin = 1
Interstitial%vertical_end = Model%levs
allocate (Interstitial%q_lay(IM,Model%levs))
allocate (Interstitial%qi(IM,Model%levs))
allocate (Interstitial%qc(IM,Model%levs))
allocate (Interstitial%deltaZ(IM, Model%levs))
allocate (Interstitial%rho_air(IM,Model%levs))
allocate (Interstitial%re_qc_m(IM,Model%levs))
allocate (Interstitial%re_qi_m(IM,Model%levs))
allocate (Interstitial%re_qs_m(IM,Model%levs))
allocate (Interstitial%evapprod2d(IM,Model%levs))
allocate (Interstitial%rainprod2d(IM,Model%levs))
end if
Expand Down Expand Up @@ -1456,10 +1472,23 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model)
.or. Model%imp_physics == Model%imp_physics_nssl &
.or. Model%imp_physics == Model%imp_physics_wsm6_mmm &
) then
Interstitial%graupel_nonphy_mm = clear_val
Interstitial%rain_nonphy_mm = clear_val
Interstitial%snow_nonphy_mm = clear_val
Interstitial%graupelmp_mm = clear_val
Interstitial%rainmp_mm = clear_val
Interstitial%snowmp_mm = clear_val
Interstitial%graupelmp = clear_val
Interstitial%icemp = clear_val
Interstitial%rainmp = clear_val
Interstitial%snowmp = clear_val
Interstitial%re_qc_bg = clear_val
Interstitial%re_qi_bg = clear_val
Interstitial%re_qs_bg = clear_val
Interstitial%re_qc_max = clear_val
Interstitial%re_qi_max = clear_val
Interstitial%re_qs_max = clear_val

else if (Model%imp_physics == Model%imp_physics_mg) then
Interstitial%ncgl = clear_val
Interstitial%ncpr = clear_val
Expand Down
Loading

0 comments on commit 9b27672

Please sign in to comment.