Skip to content

Commit

Permalink
Merge pull request NCAR#96 from grantfirl/update_SDFs
Browse files Browse the repository at this point in the history
Updating SCM codebase to work with CCPP physics and framework changes since the new year (plus updating SDFs and input namelists)
  • Loading branch information
grantfirl authored Mar 18, 2019
2 parents d6482e8 + 2cc2c88 commit 601f2ba
Show file tree
Hide file tree
Showing 54 changed files with 1,765 additions and 1,348 deletions.
54 changes: 32 additions & 22 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# Add all files with metadata tables on the host model side,
# relative to basedir = top-level directory of host model
VARIABLE_DEFINITION_FILES = [
'ccpp/physics/physics/machine.F',
'scm/src/GFS_typedefs.F90',
'scm/src/gmtb_scm_type_defs.f90',
'scm/src/gmtb_scm_physical_constants.f90'
]
Expand Down Expand Up @@ -42,6 +44,7 @@
'ccpp/physics/physics/micro_mg2_0.F90',
'ccpp/physics/physics/micro_mg3_0.F90',
'ccpp/physics/physics/module_bfmicrophysics.f',
'ccpp/physics/physics/module_gfdl_cloud_microphys.F90',
'ccpp/physics/physics/module_nst_model.f90',
'ccpp/physics/physics/module_nst_parameters.f90',
'ccpp/physics/physics/module_nst_water_prop.f90',
Expand All @@ -52,6 +55,7 @@
'ccpp/physics/physics/namelist_soilveg.f',
'ccpp/physics/physics/mfpblt.f',
'ccpp/physics/physics/mfscu.f',
'ccpp/physics/physics/num_parthds.F',
'ccpp/physics/physics/ozinterp.f90',
'ccpp/physics/physics/ozne_def.f',
'ccpp/physics/physics/physcons.F90',
Expand All @@ -67,6 +71,7 @@
'ccpp/physics/physics/radsw_datatb.f',
'ccpp/physics/physics/radsw_param.f',
'ccpp/physics/physics/rascnvv2.f',
'ccpp/physics/physics/sfcsub.F',
'ccpp/physics/physics/set_soilveg.f',
'ccpp/physics/physics/sflx.f',
'ccpp/physics/physics/surface_perturbation.F90',
Expand All @@ -80,6 +85,7 @@
'ccpp/physics/physics/module_soil_pre.F90',
'ccpp/physics/physics/wv_saturation.F',
'scm/src/GFS_typedefs.F90',
'scm/src/CCPP_typedefs.F90'
]

# Add all physics scheme files relative to basedir
Expand Down Expand Up @@ -144,6 +150,7 @@
'ccpp/physics/physics/sfc_drv.f' : ['physics'],
'ccpp/physics/physics/sfc_drv_ruc.F90' : ['physics'],
'ccpp/physics/physics/sfc_nst.f' : ['physics'],
'ccpp/physics/physics/sfc_ocean.F' : ['physics'],
'ccpp/physics/physics/sfc_sice.f' : ['physics'],
'ccpp/physics/physics/gmtb_scm_sfc_flux_spec.F90' : ['physics'],
}
Expand Down Expand Up @@ -237,6 +244,9 @@
MODULE_INCLUDE_FILE = 'ccpp_modules.inc'
FIELDS_INCLUDE_FILE = 'ccpp_fields.inc'

# Directory where to write static API to
STATIC_API_DIR = 'scm/src/'

# HTML document containing the model-defined CCPP variables
HTML_VARTABLE_FILE = 'ccpp/physics/CCPP_VARIABLES_SCM.html'

Expand All @@ -252,25 +262,25 @@
# in the case of SCM, this is a vector with loop index i
CCPP_DATA_STRUCTURE = 'cdata(i)'

# Modules to load for auto-generated ccpp_field_add code
# in the host model cap (e.g. error handling)
MODULE_USE_TEMPLATE_HOST_CAP = \
'''
use ccpp_errors, only: ccpp_error
'''

# Modules to load for auto-generated ccpp_field_get code
# in the physics scheme cap (e.g. derived data types)
MODULE_USE_TEMPLATE_SCHEME_CAP = \
'''
use machine, only: kind_phys
use module_radlw_parameters, only: sfcflw_type, topflw_type
use module_radsw_parameters, only: cmpfsw_type, sfcfsw_type, topfsw_type
use GFS_typedefs, only: GFS_statein_type, GFS_stateout_type, &
GFS_sfcprop_type, &
GFS_coupling_type, GFS_control_type, &
GFS_grid_type, GFS_tbd_type, &
GFS_cldprop_type, GFS_radtend_type, &
GFS_diag_type, GFS_interstitial_type,&
GFS_init_type
'''
# # Modules to load for auto-generated ccpp_field_add code
# # in the host model cap (e.g. error handling)
# MODULE_USE_TEMPLATE_HOST_CAP = \
# '''
# use ccpp_errors, only: ccpp_error
# '''
#
# # Modules to load for auto-generated ccpp_field_get code
# # in the physics scheme cap (e.g. derived data types)
# MODULE_USE_TEMPLATE_SCHEME_CAP = \
# '''
# use machine, only: kind_phys
# use module_radlw_parameters, only: sfcflw_type, topflw_type
# use module_radsw_parameters, only: cmpfsw_type, sfcfsw_type, topfsw_type
# use GFS_typedefs, only: GFS_statein_type, GFS_stateout_type, &
# GFS_sfcprop_type, &
# GFS_coupling_type, GFS_control_type, &
# GFS_grid_type, GFS_tbd_type, &
# GFS_cldprop_type, GFS_radtend_type, &
# GFS_diag_type, GFS_interstitial_type,&
# GFS_init_type
# '''
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 61 files
+116 −38 CMakeLists.txt
+7 −1 physics/GFS_DCNV_generic.F90
+44 −10 physics/GFS_MP_generic.F90
+105 −99 physics/GFS_PBL_generic.F90
+430 −283 physics/GFS_debug.F90
+103 −47 physics/GFS_phys_time_vary.fv3.F90
+130 −48 physics/GFS_phys_time_vary.scm.F90
+25 −21 physics/GFS_rad_time_vary.fv3.F90
+15 −25 physics/GFS_rad_time_vary.scm.F90
+6 −6 physics/GFS_rrtmg_post.F90
+31 −33 physics/GFS_rrtmg_pre.F90
+9 −5 physics/GFS_suite_interstitial.F90
+10 −2 physics/GFS_time_vary_pre.fv3.F90
+55 −42 physics/GFS_time_vary_pre.scm.F90
+11 −14 physics/aer_cloud.F
+3 −1 physics/cs_conv.F90
+311 −140 physics/cu_gf_deep.F90
+97 −49 physics/cu_gf_driver.F90
+13 −5 physics/cu_gf_driver_pre.F90
+100 −14 physics/cu_gf_sh.F90
+3,836 −0 physics/cu_ntiedtke.F90
+53 −0 physics/cu_ntiedtke_post.F90
+84 −0 physics/cu_ntiedtke_pre.F90
+8 −6 physics/gcm_shoc.F90
+31 −4,634 physics/gfdl_cloud_microphys.F90
+171 −145 physics/gfdl_fv_sat_adj.F90
+0 −39 physics/gfdl_fv_sat_adj_pre.F90
+11 −0 physics/iccninterp.F90
+3 −5 physics/m_micro_interstitial.F90
+19 −3 physics/machine.F
+259 −157 physics/module_MYNNPBL_wrapper.F90
+38 −20 physics/module_MYNNSFC_wrapper.F90
+4 −4 physics/module_MYNNrad_post.F90
+56 −13 physics/module_MYNNrad_pre.F90
+1,110 −1,907 physics/module_bl_mynn.F90
+4,786 −0 physics/module_gfdl_cloud_microphys.F90
+17 −2 physics/module_mp_thompson_hrrr.F90
+43 −37 physics/module_sf_mynn.F90
+35 −38 physics/module_sf_ruclsm.F90
+4 −3 physics/module_soil_pre.F90
+54 −50 physics/mp_thompson_hrrr.F90
+54 −24 physics/mp_thompson_hrrr_post.F90
+102 −12 physics/mp_thompson_hrrr_pre.F90
+6 −0 physics/namelist_soilveg_ruc.F90
+11 −14 physics/physcons.F90
+2 −2 physics/radiation_clouds.f
+4 −4 physics/rrtmg_lw_post.F90
+4 −4 physics/rrtmg_lw_pre.F90
+5 −5 physics/rrtmg_sw_post.F90
+4 −4 physics/rrtmg_sw_pre.F90
+6 −1 physics/samfshalcnv.f
+4 −4 physics/satmedmfvdif.F
+37 −1 physics/set_soilveg_ruc.F90
+662 −585 physics/sfc_drv_ruc.F90
+2 −4 physics/sfc_nst.f
+202 −0 physics/sfc_ocean.F
+2,106 −0 physics/shinhongvdif.F90
+1,271 −0 physics/ysuvdif.F90
+21 −21 stochastic_physics/get_stochy_pattern.F90
+5 −5 stochastic_physics/stochastic_physics.F90
+5 −0 stochastic_physics/stochy_patterngenerator.F90
19 changes: 11 additions & 8 deletions ccpp/suites/suite_SCM_CPT_advanced.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
<scheme>dcyc2t3</scheme>
<scheme>GFS_suite_interstitial_2</scheme>
<scheme>GFS_surface_generic_pre</scheme>
<scheme>GFS_suite_interstitial_2</scheme>
</subcycle>
<!-- Surface iteration loop -->
<subcycle loop="2">
Expand All @@ -51,7 +51,7 @@
<scheme>sfc_diag_post</scheme>
<scheme>GFS_surface_generic_post</scheme>
<scheme>GFS_PBL_generic_pre</scheme>
<scheme>moninshoc</scheme>
<scheme>hedmf</scheme>
<scheme>GFS_PBL_generic_post</scheme>
<scheme>gwdps_pre</scheme>
<scheme>gwdps</scheme>
Expand All @@ -63,21 +63,24 @@
<scheme>GFS_DCNV_generic_pre</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
<scheme>shoc</scheme>
<scheme>samfdeepcnv</scheme>
<scheme>cs_conv_pre</scheme>
<scheme>cs_conv</scheme>
<scheme>cs_conv_post</scheme>
<scheme>GFS_DCNV_generic_post</scheme>
<scheme>gwdc_pre</scheme>
<scheme>gwdc</scheme>
<scheme>gwdc_post</scheme>
<!-- <scheme>GFS_SCNV_generic_pre</scheme>
<scheme>GFS_SCNV_generic_pre</scheme>
<scheme>samfshalcnv</scheme>
<scheme>samfshalcnv_post</scheme>
<scheme>GFS_SCNV_generic_post</scheme> -->
<scheme>GFS_SCNV_generic_post</scheme>
<scheme>GFS_suite_interstitial_4</scheme>
<scheme>cnvc90</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<scheme>zhaocarr_gscond</scheme>
<scheme>zhaocarr_precpd</scheme>
<scheme>m_micro_pre</scheme>
<scheme>m_micro</scheme>
<scheme>m_micro_post</scheme>
<scheme>cs_conv_aw_adj</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>sfc_sice_post</scheme>
</subcycle>
Expand Down
73 changes: 73 additions & 0 deletions ccpp/suites/suite_SCM_CPT_advanced_prescribed_surface.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="SCM_CPT_advanced_prescribed_surface" lib="ccppphys" ver="2.0.0">
<!-- <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>GFS_rrtmg_pre</scheme>
<scheme>rrtmg_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw_pre</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>dcyc2t3</scheme>
<scheme>GFS_suite_interstitial_2</scheme>
<scheme>GFS_surface_generic_pre</scheme>
<scheme>gmtb_scm_sfc_flux_spec</scheme>
<scheme>dcyc2t3_post</scheme>
<scheme>GFS_PBL_generic_pre</scheme>
<scheme>hedmf</scheme>
<scheme>GFS_PBL_generic_post</scheme>
<scheme>gwdps_pre</scheme>
<scheme>gwdps</scheme>
<scheme>gwdps_post</scheme>
<scheme>rayleigh_damp</scheme>
<scheme>GFS_suite_stateout_update</scheme>
<scheme>ozphys_2015</scheme>
<scheme>h2ophys</scheme>
<scheme>GFS_DCNV_generic_pre</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
<scheme>cs_conv_pre</scheme>
<scheme>cs_conv</scheme>
<scheme>cs_conv_post</scheme>
<scheme>GFS_DCNV_generic_post</scheme>
<scheme>gwdc_pre</scheme>
<scheme>gwdc</scheme>
<scheme>gwdc_post</scheme>
<scheme>GFS_SCNV_generic_pre</scheme>
<scheme>samfshalcnv</scheme>
<scheme>samfshalcnv_post</scheme>
<scheme>GFS_SCNV_generic_post</scheme>
<scheme>GFS_suite_interstitial_4</scheme>
<scheme>cnvc90</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<scheme>m_micro_pre</scheme>
<scheme>m_micro</scheme>
<scheme>m_micro_post</scheme>
<scheme>cs_conv_aw_adj</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>sfc_sice_post</scheme>
</subcycle>
</group>
<!-- <finalize></finalize> -->
</suite>
2 changes: 1 addition & 1 deletion ccpp/suites/suite_SCM_GFS_2017_updated.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
<scheme>dcyc2t3</scheme>
<scheme>GFS_suite_interstitial_2</scheme>
<scheme>GFS_surface_generic_pre</scheme>
<scheme>GFS_suite_interstitial_2</scheme>
</subcycle>
<!-- Surface iteration loop -->
<subcycle loop="2">
Expand Down
88 changes: 88 additions & 0 deletions ccpp/suites/suite_SCM_GFS_2017_updated_csawmgshoc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="SCM_GFS_2017_updated_csawmgshoc" lib="ccppphys" ver="2">
<!-- <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>GFS_rrtmg_pre</scheme>
<scheme>rrtmg_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw_pre</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>dcyc2t3</scheme>
<scheme>GFS_surface_generic_pre</scheme>
<scheme>GFS_suite_interstitial_2</scheme>
</subcycle>
<!-- Surface iteration loop -->
<subcycle loop="2">
<scheme>sfc_ex_coef</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>dcyc2t3_post</scheme>
<scheme>sfc_diag</scheme>
<scheme>sfc_diag_post</scheme>
<scheme>GFS_surface_generic_post</scheme>
<scheme>GFS_PBL_generic_pre</scheme>
<scheme>moninshoc</scheme>
<scheme>GFS_PBL_generic_post</scheme>
<scheme>gwdps_pre</scheme>
<scheme>gwdps</scheme>
<scheme>gwdps_post</scheme>
<scheme>rayleigh_damp</scheme>
<scheme>GFS_suite_stateout_update</scheme>
<scheme>ozphys_2015</scheme>
<scheme>h2ophys</scheme>
<scheme>GFS_DCNV_generic_pre</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
<scheme>shoc</scheme>
<scheme>cs_conv_pre</scheme>
<scheme>cs_conv</scheme>
<scheme>cs_conv_post</scheme>
<scheme>GFS_DCNV_generic_post</scheme>
<scheme>gwdc_pre</scheme>
<scheme>gwdc</scheme>
<scheme>gwdc_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>m_micro_pre</scheme>
<scheme>m_micro</scheme>
<scheme>m_micro_post</scheme>
<scheme>cs_conv_aw_adj</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>sfc_sice_post</scheme>
</subcycle>
</group>
<!-- <finalize></finalize> -->
</suite>
Loading

0 comments on commit 601f2ba

Please sign in to comment.