Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-organize GFDLMP (v1) and GFDLMP v3 into ccpp/physics #779

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
branch = main
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/ufs-community/ccpp-physics
branch = ufs/dev
#url = https://github.com/ufs-community/ccpp-physics
#branch = ufs/dev
url = https://github.com/RuiyuSun/ccpp-physics
branch = feature_gfdlmpv3

[submodule "upp"]
path = upp
url = https://github.com/NOAA-EMC/UPP
Expand Down
6 changes: 4 additions & 2 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@
'physics/physics/photochem/h2ophys.f',
'physics/physics/photochem/module_ozphys.F90',
'physics/physics/MP/Ferrier_Aligo/mp_fer_hires.F90',
'physics/physics/MP/GFDL/gfdl_cloud_microphys.F90',
'physics/physics/MP/GFDL/fv_sat_adj.F90',
'physics/physics/MP/GFDL_2019_v1/gfdl_cloud_microphys.F90',
'physics/physics/MP/GFDL_2019_v1/fv_sat_adj.F90',
'physics/physics/MP/GFDL_2022_v3/gfdl_cld_mp_v3.F90',
'physics/physics/MP/GFDL_2022_v3/fv_sat_adj_v3.F90',
'physics/physics/MP/Morrison_Gettelman/m_micro.F90',
'physics/physics/MP/Morrison_Gettelman/m_micro_pre.F90',
'physics/physics/MP/Morrison_Gettelman/m_micro_post.F90',
Expand Down
18 changes: 12 additions & 6 deletions ccpp/data/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -829,8 +829,10 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model)
end if
!
! Allocate arrays that are conditional on physics choices
if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson &
.or. Model%imp_physics == Model%imp_physics_nssl &
if (Model%imp_physics == Model%imp_physics_gfdl &
.or. Model%imp_physics == Model%imp_physics_gfdl_v3 &
.or. Model%imp_physics == Model%imp_physics_thompson &
.or. Model%imp_physics == Model%imp_physics_nssl &
) then
allocate (Interstitial%graupelmp (IM))
allocate (Interstitial%icemp (IM))
Expand Down Expand Up @@ -988,7 +990,8 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model)
Interstitial%ntcwx = 2
Interstitial%ntiwx = 3
Interstitial%ntrwx = 4
elseif (Model%imp_physics == Model%imp_physics_gfdl) then
elseif (Model%imp_physics == Model%imp_physics_gfdl &
.or. Model%imp_physics == Model%imp_physics_gfdl_v3 ) then
Interstitial%ntcwx = 2
Interstitial%ntiwx = 3
Interstitial%ntrwx = 4
Expand Down Expand Up @@ -1016,7 +1019,8 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model)
else
Interstitial%nvdiff = 10
endif
elseif (Model%imp_physics == Model%imp_physics_gfdl) then
elseif (Model%imp_physics == Model%imp_physics_gfdl &
.or. Model%imp_physics == Model%imp_physics_gfdl_v3) then
Interstitial%nvdiff = 7
elseif (Model%imp_physics == Model%imp_physics_thompson) then
if (Model%ltaerosol) then
Expand Down Expand Up @@ -1438,8 +1442,10 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model)
end if
!
! Reset fields that are conditional on physics choices
if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson &
.or. Model%imp_physics == Model%imp_physics_nssl &
if (Model%imp_physics == Model%imp_physics_gfdl &
.or. Model%imp_physics == Model%imp_physics_gfdl_v3 &
.or. Model%imp_physics == Model%imp_physics_thompson &
.or. Model%imp_physics == Model%imp_physics_nssl &
) then
Interstitial%graupelmp = clear_val
Interstitial%icemp = clear_val
Expand Down
8 changes: 4 additions & 4 deletions ccpp/data/CCPP_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme)
active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_gfdl_microphysics_v3_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme)
[gwdcu]
standard_name = tendency_of_x_wind_due_to_convective_gravity_wave_drag
long_name = zonal wind tendency due to convective gravity wave drag
Expand Down Expand Up @@ -1219,7 +1219,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme)
active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_gfdl_microphysics_v3_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme)
[dry]
standard_name = flag_nonzero_land_surface_fraction
long_name = flag indicating presence of some land surface area fraction
Expand Down Expand Up @@ -1726,7 +1726,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme)
active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_gfdl_microphysics_v3_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme)
[rainp]
standard_name = tendency_of_rain_water_mixing_ratio_due_to_microphysics
long_name = tendency of rain water mixing ratio due to microphysics
Expand Down Expand Up @@ -1982,7 +1982,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme)
active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_gfdl_microphysics_v3_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme)
[snowmt]
standard_name = surface_snow_melt
long_name = snow melt during timestep
Expand Down
16 changes: 13 additions & 3 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@ module GFS_typedefs
!--- new microphysical switch
integer :: imp_physics !< choice of microphysics scheme
integer :: imp_physics_gfdl = 11 !< choice of GFDL microphysics scheme
integer :: imp_physics_gfdl_v3 = 13 !< choice of GFDL microphysics version 3 scheme
integer :: imp_physics_thompson = 8 !< choice of Thompson microphysics scheme
integer :: imp_physics_wsm6 = 6 !< choice of WSMG microphysics scheme
integer :: imp_physics_zhao_carr = 99 !< choice of Zhao-Carr microphysics scheme
Expand Down Expand Up @@ -4691,7 +4692,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%use_ufo = use_ufo
Model%exticeden = exticeden
if (Model%exticeden .and. &
(Model%imp_physics /= Model%imp_physics_gfdl .and. Model%imp_physics /= Model%imp_physics_thompson .and. &
(Model%imp_physics /= Model%imp_physics_gfdl .and. &
Model%imp_physics /= Model%imp_physics_gfdl_v3 .and. &
Model%imp_physics /= Model%imp_physics_thompson .and. &
Model%imp_physics /= Model%imp_physics_nssl )) then
!see GFS_MP_generic_post.F90; exticeden is only compatible with GFDL,
!Thompson, or NSSL MP
Expand Down Expand Up @@ -6038,7 +6041,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
' mg_alf=', Model%mg_alf, ' mg_qcmin=', Model%mg_qcmin, &
' mg_do_ice_gmao=', Model%mg_do_ice_gmao, ' mg_do_liq_liu=', Model%mg_do_liq_liu

elseif (Model%imp_physics == Model%imp_physics_gfdl) then !GFDL microphysics
elseif (Model%imp_physics == Model%imp_physics_gfdl .or. &
Model%imp_physics == Model%imp_physics_gfdl_v3) then !GFDL microphysics
Model%npdf3d = 0
if(Model%effr_in) then
Model%num_p3d = 5
Expand Down Expand Up @@ -6567,7 +6571,13 @@ subroutine control_print(Model)
print *, ' '
endif
if (Model%imp_physics == Model%imp_physics_gfdl) then
print *, ' GFDL microphysical parameters'
print *, ' GFDL microphysical parameters v1'
print *, ' GFDL MP radiation inter: ', Model%lgfdlmprad
print *, ' lrefres : ', Model%lrefres
print *, ' '
endif
if (Model%imp_physics == Model%imp_physics_gfdl_v3) then
print *, ' GFDL microphysical parameters v3'
print *, ' GFDL MP radiation inter: ', Model%lgfdlmprad
print *, ' lrefres : ', Model%lrefres
print *, ' '
Expand Down
8 changes: 7 additions & 1 deletion ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -4074,6 +4074,12 @@
units = flag
dimensions = ()
type = integer
[imp_physics_gfdl_v3]
standard_name = identifier_for_gfdl_microphysics_v3_scheme
long_name = choice of GFDL microphysics v3 scheme
units = flag
dimensions = ()
type = integer
[imp_physics_thompson]
standard_name = identifier_for_thompson_microphysics_scheme
long_name = choice of Thompson microphysics scheme
Expand Down Expand Up @@ -9867,7 +9873,7 @@
dependencies = hooks/machine.F,hooks/physcons.F90
dependencies = Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f
dependencies = photochem/h2o_def.f,photochem/module_ozphys.F90
dependencies = MP/GFDL/GFDL_parse_tracers.F90
dependencies = MP/GFDL_parse_tracers.F90

[ccpp-arg-table]
name = GFS_typedefs
Expand Down
92 changes: 92 additions & 0 deletions ccpp/suites/suite_FV3_GFS_v16_gfdlmpv3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="FV3_GFS_v16_gfdlmpv3" version="1">
<!-- <init></init> -->
<group name="fast_physics">
<subcycle loop="1">
<scheme>fv_sat_adj_v3</scheme>
</subcycle>
</group>
<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>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>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>sfc_diff</scheme>
<scheme>GFS_surface_loop_control_part1</scheme>
<scheme>sfc_nst_pre</scheme>
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>lsm_noah</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>GFS_PBL_generic_pre</scheme>
<scheme>satmedmfvdifq</scheme>
<scheme>GFS_PBL_generic_post</scheme>
<scheme>GFS_GWD_generic_pre</scheme>
<scheme>cires_ugwp</scheme>
<scheme>cires_ugwp_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>samfdeepcnv</scheme>
<scheme>GFS_DCNV_generic_post</scheme>
<scheme>GFS_SCNV_generic_pre</scheme>
<scheme>samfshalcnv</scheme>
<scheme>GFS_SCNV_generic_post</scheme>
<scheme>GFS_suite_interstitial_4</scheme>
<scheme>cnvc90</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<scheme>gfdl_cld_mp_v3</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
<group name="stochastics">
<subcycle loop="1">
<scheme>GFS_stochastics</scheme>
</subcycle>
</group>
<!-- <finalize></finalize> -->
</suite>
92 changes: 92 additions & 0 deletions ccpp/suites/suite_FV3_HAFS_v1_gfdlmpv3_tedmf.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="FV3_HAFS_v1_gfdlmpv3_tedmf" version="1">
<!-- <init></init> -->
<group name="fast_physics">
<subcycle loop="1">
<scheme>fv_sat_adj_v3</scheme>
</subcycle>
</group>
<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>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>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>sfc_diff</scheme>
<scheme>GFS_surface_loop_control_part1</scheme>
<scheme>sfc_nst_pre</scheme>
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>lsm_noah</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>GFS_PBL_generic_pre</scheme>
<scheme>satmedmfvdifq</scheme>
<scheme>GFS_PBL_generic_post</scheme>
<scheme>GFS_GWD_generic_pre</scheme>
<scheme>unified_ugwp</scheme>
<scheme>unified_ugwp_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>samfdeepcnv</scheme>
<scheme>GFS_DCNV_generic_post</scheme>
<scheme>GFS_SCNV_generic_pre</scheme>
<scheme>samfshalcnv</scheme>
<scheme>GFS_SCNV_generic_post</scheme>
<scheme>GFS_suite_interstitial_4</scheme>
<scheme>cnvc90</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<scheme>gfdl_cld_mp_v3</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
<group name="stochastics">
<subcycle loop="1">
<scheme>GFS_stochastics</scheme>
</subcycle>
</group>
<!-- <finalize></finalize> -->
</suite>
Loading