Skip to content

Commit

Permalink
Connect nTiedtke 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_ntiedtke.nml
	new file:   ccpp/physics_namelists/input_RAP_ufs_ntiedtke.nml
	modified:   ccpp/suites/suite_SCM_RAP_ntiedtke.xml
	new file:   ccpp/suites/suite_SCM_RAP_ufs_ntiedtke.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/run_scm.py
	modified:   scm/src/scm_physical_constants.F90
	modified:   scm/src/scm_physical_constants.meta
	modified:   scm/src/suite_info.py
  • Loading branch information
bluefinweiwei committed Oct 9, 2024
1 parent 90d8844 commit 4782a58
Show file tree
Hide file tree
Showing 14 changed files with 422 additions and 232 deletions.
12 changes: 6 additions & 6 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@
'ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv.F90',
'ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv_post.F90',
'ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv_aw_adj.F90',
'ccpp/physics/physics/CONV/nTiedtke/cu_ntiedtke_pre.F90',
'ccpp/physics/physics/CONV/nTiedtke/cu_ntiedtke.F90',
'ccpp/physics/physics/CONV/nTiedtke/cu_ntiedtke_post.F90',
'ccpp/physics/physics/CONV/nTiedtke/ufs_cu_ntiedtke_pre.F90',
'ccpp/physics/physics/CONV/nTiedtke/ufs_cu_ntiedtke.F90',
'ccpp/physics/physics/CONV/nTiedtke/ufs_cu_ntiedtke_post.F90',
'ccpp/physics/physics/CONV/SAMF/samfdeepcnv.f',
'ccpp/physics/physics/CONV/SAMF/samfshalcnv.f',
'ccpp/physics/physics/CONV/SAS/sascnvn.F',
Expand Down Expand Up @@ -229,9 +229,9 @@
'ccpp/physics/physics/tools/get_phi_fv3.F90',

# CNU_NTIEDTKE
'ccpp/physics/physics/mmm_physics/mmm_cu_ntiedtke.F90' ,
'ccpp/physics/physics/CONV/nTiedtke/mmm_cu_ntiedtke_pre.F90' ,
'ccpp/physics/physics/CONV/nTiedtke/mmm_cu_ntiedtke_post.F90' ,
'ccpp/physics/physics/CONV/nTiedtke/gfs_mmm_cu_ntiedtke_pre.F90' ,
'ccpp/physics/physics/mmm_physics/cu_ntiedtke.F90' ,
'ccpp/physics/physics/CONV/nTiedtke/gfs_mmm_cu_ntiedtke_post.F90' ,

# NCAR MMM
# 'ccpp/physics/physics/mmm_physics/sfclayrev_pre.F90' ,
Expand Down
4 changes: 2 additions & 2 deletions ccpp/physics_namelists/input_RAP_ntiedtke.nml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
random_clds = .false.
trans_trac = .true.
cnvcld = .true.
imfshalcnv = 3
imfdeepcnv = 3
imfshalcnv = 6
imfdeepcnv = 6
ras = .false.
cdmbgwd = 0.14,1.8,1.0,1.0
do_mynnsfclay= .true.
Expand Down
132 changes: 132 additions & 0 deletions ccpp/physics_namelists/input_RAP_ufs_ntiedtke.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
&gfs_physics_nml
fhzero = 6
h2o_phys = .true.
ldiag3d = .true.
qdiag3d = .true.
print_diff_pgr = .false.
fhcyc = 24
use_ufo = .true.
pre_rad = .false.
imp_physics = 8
ltaerosol = .true.
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.
dt_inner = 60
ttendlim = -999
pdfcld = .false.
fhswr = 1200.
fhlwr = 1200.
ialb = 2
iems = 2
iaer = 5111
icliq_sw = 1
iovr = 1
icloud = 0
ico2 = 2
isubc_sw = 2
isubc_lw = 2
isol = 2
lwhtr = .true.
swhtr = .true.
cnvgwd = .true.
do_deep = .true.
shal_cnv = .true.
cal_pre = .false.
redrag = .true.
dspheat = .true.
hybedmf = .false.
satmedmf = .false.
isatmedmf = 0
do_mynnedmf = .true.
lheatstrg = .false.
lseaspray = .false.
random_clds = .false.
trans_trac = .true.
cnvcld = .true.
imfshalcnv = 4
imfdeepcnv = 4
ras = .false.
cdmbgwd = 0.14,1.8,1.0,1.0
do_mynnsfclay= .true.
prslrd0 = 0.
ivegsrc = 1
isot = 1
lsm = 3
lsoil = 4
lsoil_lsm = 9
kice = 9
iopt_dveg = 4
iopt_crs = 2
iopt_btr = 1
iopt_run = 1
iopt_sfc = 3
iopt_frz = 1
iopt_inf = 1
iopt_rad = 3
iopt_alb = 1
iopt_snf = 4
iopt_tbot = 2
iopt_stc = 3
iopt_trs = 2
debug = .false.
oz_phys = .false.
oz_phys_2015 = .true.
nstf_name = 2,0,0,0,0
nst_anl = .true.
lkm = 0
psautco = 0.0008,0.0005
prautco = 0.00015,0.00015
lgfdlmprad = .true.
cplchm = .false.
cplwav = .false.
cplwav2atm = .false.
effr_in = .true.
ldiag_ugwp = .false.
do_ugwp = .false.
do_tofd = .false.
gwd_opt = 3
ldiag_ugwp = .false.
do_ugwp_v0 = .false.
do_ugwp_v0_orog_only = .false.
do_gsl_drag_ls_bl = .true.
do_gsl_drag_ss = .true.
do_gsl_drag_tofd = .true.
do_ugwp_v1 = .false.
do_ugwp_v1_orog_only = .false.
do_sppt = .false.
do_shum = .false.
do_skeb = .false.
do_ysu = .true.
lndp_type = 0
n_var_lndp = 0
fscav_aero = "'*:0.0'"
icloud_bl = 1
bl_mynn_tkeadvect = .true.
bl_mynn_edmf = 1
bl_mynn_edmf_mom = 1
do_RRTMGP = .false.
doGP_cldoptics_LUT = .false.
doGP_lwscat = .false.
/

&cires_ugwp_nml
knob_ugwp_solver = 2
knob_ugwp_source = 1,1,0,0
knob_ugwp_wvspec = 1,25,25,25
knob_ugwp_azdir = 2,4,4,4
knob_ugwp_stoch = 0,0,0,0
knob_ugwp_effac = 1,1,1,1
knob_ugwp_doaxyz = 1
knob_ugwp_doheat = 1
knob_ugwp_dokdis = 1
knob_ugwp_ndx4lh = 1
knob_ugwp_version = 0
launch_level = 54
/
19 changes: 7 additions & 12 deletions ccpp/suites/suite_SCM_RAP_ntiedtke.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<!-- <scheme>rrtmg_lw_pre</scheme> moved to NOTUSED during restructuring -->
<scheme>rrtmg_lw</scheme>
<scheme>sgscloud_radpost</scheme>
<scheme>rrtmg_lw_post</scheme>
Expand Down Expand Up @@ -59,29 +58,25 @@
<scheme>drag_suite</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
<!-- <scheme>module_ozphys</scheme> used to be ozphys_2015 -->
<scheme>h2ophys</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
<scheme>GFS_DCNV_generic_pre</scheme>
<scheme>cu_gf_driver_pre</scheme>
<scheme>cu_gf_driver</scheme>
<scheme>gfs_mmm_cu_ntiedtke_pre</scheme>
<scheme>cu_ntiedtke</scheme>
<scheme>gfs_mmm_cu_ntiedtke_post</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> -->
<!-- <scheme>mp_thompson</scheme> -->
<!-- <scheme>mp_thompson_post</scheme> -->
<scheme>mmm_cu_ntiedtke_pre</scheme>
<scheme>mmm_cu_ntiedtke</scheme>
<scheme>mmm_cu_ntiedtke_post</scheme>
<scheme>mp_thompson_pre</scheme>
<scheme>mp_thompson</scheme>
<scheme>mp_thompson_post</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>cu_gf_driver_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
<scheme>GFS_physics_post</scheme> <!-- used to be phys_tend -->
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
<!-- <finalize></finalize> -->
Expand Down
83 changes: 83 additions & 0 deletions ccpp/suites/suite_SCM_RAP_ufs_ntiedtke.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="SCM_RAP_ufs_ntiedtke" 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</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>lsm_ruc</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>drag_suite</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>ufs_cu_ntiedtke_pre</scheme>
<scheme>ufs_cu_ntiedtke</scheme>
<scheme>ufs_cu_ntiedtke_post</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>
<scheme>mp_thompson</scheme>
<scheme>mp_thompson_post</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
<!-- <finalize></finalize> -->
</suite>
27 changes: 23 additions & 4 deletions scm/src/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ module CCPP_typedefs
real (kind=kind_phys), pointer :: rainmp(:) => null() !<
real (kind=kind_phys), pointer :: raincd(:) => null() !<
real (kind=kind_phys), pointer :: raincs(:) => null() !<
real (kind=kind_phys), pointer :: raincd_mm(:) => null() !<
real (kind=kind_phys), pointer :: raincs_mm(:) => null() !<
real (kind=kind_phys), pointer :: rainmcadj(:) => null() !<
real (kind=kind_phys), pointer :: rainp(:,:) => null() !<
real (kind=kind_phys), pointer :: rb(:) => null() !<
Expand Down Expand Up @@ -356,6 +358,7 @@ module CCPP_typedefs
real (kind=kind_phys), pointer :: tv_lay(:,:) => null() !<
real (kind=kind_phys), pointer :: qs_lay(:,:) => null() !<
real (kind=kind_phys), pointer :: q_lay(:,:) => null() !<
real (kind=kind_phys), pointer :: dqvdt_nonphy(:,:) => null() !<
real (kind=kind_phys), pointer :: deltaZ(:,:) => null() !<
real (kind=kind_phys), pointer :: deltaZc(:,:) => null() !<
real (kind=kind_phys), pointer :: deltaP(:,:) => null() !<
Expand Down Expand Up @@ -420,6 +423,8 @@ module CCPP_typedefs
real (kind=kind_phys), pointer :: xland(:) => null()
real (kind=kind_phys), pointer :: qcx(:,:) => null()
real (kind=kind_phys), pointer :: qix(:,:) => null()
real (kind=kind_phys), pointer :: geoph(:,:) => null()
real (kind=kind_phys), pointer :: geophi(:,:) => null()
real (kind=kind_phys), pointer :: hfx(:) => null()
real (kind=kind_phys), pointer :: qfx(:) => null()
real (kind=kind_phys), pointer :: qgh(:) => null()
Expand Down Expand Up @@ -661,6 +666,8 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%qss_water (IM))
allocate (Interstitial%raincd (IM))
allocate (Interstitial%raincs (IM))
allocate (Interstitial%raincd_mm (IM))
allocate (Interstitial%raincs_mm (IM))
allocate (Interstitial%rainmcadj (IM))
allocate (Interstitial%rainp (IM,Model%levs))
allocate (Interstitial%rb (IM))
Expand Down Expand Up @@ -856,9 +863,13 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model)
end if

! RRTMGP and NCAR MMM physics
if (Model%do_ysu .or. Model%do_RRTMGP .or. Model%do_mmm_sfclayrev) then
if (Model%do_ysu .or. Model%do_RRTMGP .or. Model%do_mmm_sfclayrev .or. Model%imfdeepcnv .eq. Model%imfdeepcnv_mmm_ntiedtke &
.or. Model%imfshalcnv .eq. Model%imfshalcnv_mmm_ntiedtke) then
allocate (Interstitial%q_lay (IM, Model%levs))
allocate (Interstitial%deltaZ (IM, Model%levs))
allocate (Interstitial%dqvdt_nonphy (IM, Model%levs))
allocate (Interstitial%geoph (IM, Model%levs))
allocate (Interstitial%geophi (IM, Model%levs))
end if

! NCAR MMM physics
Expand All @@ -876,7 +887,8 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model)

Interstitial%scm_force_flux = .false. ! If MMM surface scheme used, fluxes are not prescribed
endif
if (Model%do_ysu .or. Model%do_mmm_sfclayrev) then
if (Model%do_ysu .or. Model%do_mmm_sfclayrev .or. Model%imfdeepcnv .eq. Model%imfdeepcnv_mmm_ntiedtke &
.or. Model%imfshalcnv .eq. Model%imfshalcnv_mmm_ntiedtke) then
allocate (Interstitial%xland (IM))
allocate (Interstitial%hfx (IM))
allocate (Interstitial%qfx (IM))
Expand Down Expand Up @@ -1404,6 +1416,8 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model)
Interstitial%qss_water = Model%huge
Interstitial%raincd = clear_val
Interstitial%raincs = clear_val
Interstitial%raincd_mm = clear_val
Interstitial%raincs_mm = clear_val
Interstitial%rainmcadj = clear_val
Interstitial%rainp = clear_val
Interstitial%rb = clear_val
Expand Down Expand Up @@ -1491,9 +1505,13 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model)
end if

! RRTMGP and NCAR MMM physics
if (Model%do_ysu .or. Model%do_RRTMGP .or. Model%do_mmm_sfclayrev) then
if (Model%do_ysu .or. Model%do_RRTMGP .or. Model%do_mmm_sfclayrev .or. Model%imfdeepcnv .eq. Model%imfdeepcnv_mmm_ntiedtke &
.or. Model%imfshalcnv .eq. Model%imfshalcnv_mmm_ntiedtke) then
Interstitial%q_lay = clear_val
Interstitial%deltaZ = clear_val
Interstitial%dqvdt_nonphy = clear_val
Interstitial%geoph = clear_val
Interstitial%geophi = clear_val
endif

! NCAR MMM physics
Expand All @@ -1517,7 +1535,8 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model)
Interstitial%its = 0
Interstitial%ite = 0
endif
if (Model%do_ysu .or. Model%do_mmm_sfclayrev) then
if (Model%do_ysu .or. Model%do_mmm_sfclayrev .or. Model%imfdeepcnv .eq. Model%imfdeepcnv_mmm_ntiedtke &
.or. Model%imfshalcnv .eq. Model%imfshalcnv_mmm_ntiedtke) then
Interstitial%xland = 0
Interstitial%hfx = clear_val
Interstitial%qfx = clear_val
Expand Down
Loading

0 comments on commit 4782a58

Please sign in to comment.