From 3a7fb97b682ccedf8d79fc51f7e706de6c2e5563 Mon Sep 17 00:00:00 2001 From: Laurie Carson Date: Thu, 14 Jun 2018 11:43:12 -0600 Subject: [PATCH 01/10] Add radiation routines to ccpp compile --- examples/suite_FV3_test.xml | 2 +- scripts/ccpp_prebuild_config_FV3.py | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/suite_FV3_test.xml b/examples/suite_FV3_test.xml index 01e54479..a8514d38 100644 --- a/examples/suite_FV3_test.xml +++ b/examples/suite_FV3_test.xml @@ -9,7 +9,7 @@ - cnvc90 + rrtmg_sw diff --git a/scripts/ccpp_prebuild_config_FV3.py b/scripts/ccpp_prebuild_config_FV3.py index f26645fc..6f4d053d 100755 --- a/scripts/ccpp_prebuild_config_FV3.py +++ b/scripts/ccpp_prebuild_config_FV3.py @@ -24,7 +24,7 @@ # 'ccpp/physics/physics/h2o_def.f', # 'ccpp/physics/physics/iounitdef.f', 'ccpp/physics/physics/machine.F', # DH should this be in FV3/gfsphysics/physics/physparam.f ? -# 'ccpp/physics/physics/mersenne_twister.f', + 'ccpp/physics/physics/mersenne_twister.f', # 'ccpp/physics/physics/mfpbl.f', # 'ccpp/physics/physics/module_bfmicrophysics.f', # 'ccpp/physics/physics/module_nst_model.f90', @@ -32,17 +32,17 @@ # 'ccpp/physics/physics/module_nst_water_prop.f90', # 'ccpp/physics/physics/namelist_soilveg.f', # 'ccpp/physics/physics/ozne_def.f', -# 'ccpp/physics/physics/physcons.f90', + 'ccpp/physics/physics/physcons.f90', 'ccpp/physics/physics/physparam.f', # DH should this be in FV3/gfsphysics/physics/physparam.f ? -# 'ccpp/physics/physics/radcons.f90', -# 'ccpp/physics/physics/radiation_aerosols.f', -# 'ccpp/physics/physics/radiation_astronomy.f', -# 'ccpp/physics/physics/radiation_clouds.f', -# 'ccpp/physics/physics/radiation_gases.f', -# 'ccpp/physics/physics/radiation_surface.f', -# 'ccpp/physics/physics/radlw_datatb.f', + 'ccpp/physics/physics/radcons.f90', + 'ccpp/physics/physics/radiation_aerosols.f', + 'ccpp/physics/physics/radiation_astronomy.f', + 'ccpp/physics/physics/radiation_clouds.f', + 'ccpp/physics/physics/radiation_gases.f', + 'ccpp/physics/physics/radiation_surface.f', + 'ccpp/physics/physics/radlw_datatb.f', 'ccpp/physics/physics/radlw_param.f', # DH should this be in FV3/gfsphysics/physics/radlw_param.f -# 'ccpp/physics/physics/radsw_datatb.f', + 'ccpp/physics/physics/radsw_datatb.f', 'ccpp/physics/physics/radsw_param.f', # DH should this be in FV3/gfsphysics/physics/radsw_param.f # 'ccpp/physics/physics/rascnvv2.f', # 'ccpp/physics/physics/sflx.f', @@ -79,8 +79,8 @@ # 'ccpp/physics/physics/moninedmf.f', # 'ccpp/physics/physics/ozphys.f', # 'ccpp/physics/physics/precpd.f', -# 'ccpp/physics/physics/radlw_main.f', -# 'ccpp/physics/physics/radsw_main.f', + 'ccpp/physics/physics/radlw_main.f', + 'ccpp/physics/physics/radsw_main.f', # 'ccpp/physics/physics/rayleigh_damp.f', # 'ccpp/physics/physics/rrtmg_lw_post.F90', # 'ccpp/physics/physics/rrtmg_lw_pre.F90', @@ -223,4 +223,4 @@ MODULE_USE_TEMPLATE_SCHEME_CAP = \ ''' use machine, only: kind_phys -''' \ No newline at end of file +''' From 8ff2954005152f148368bc9aeb889b786f4a0ff1 Mon Sep 17 00:00:00 2001 From: Laurie Carson Date: Thu, 14 Jun 2018 11:52:41 -0600 Subject: [PATCH 02/10] a few more module dependencies --- scripts/ccpp_prebuild_config_FV3.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/ccpp_prebuild_config_FV3.py b/scripts/ccpp_prebuild_config_FV3.py index 6f4d053d..8f641777 100755 --- a/scripts/ccpp_prebuild_config_FV3.py +++ b/scripts/ccpp_prebuild_config_FV3.py @@ -18,20 +18,20 @@ SCHEME_FILES_DEPENDENCIES = [ # 'ccpp/physics/physics/GFDL_parse_tracers.F90', # 'ccpp/physics/physics/date_def.f', -# 'ccpp/physics/physics/funcphys.f90', -# 'ccpp/physics/physics/gfs_phy_tracer_config.f', + 'ccpp/physics/physics/funcphys.f90', + 'ccpp/physics/physics/gfs_phy_tracer_config.f', # 'ccpp/physics/physics/gocart_tracer_config_stub.f', # 'ccpp/physics/physics/h2o_def.f', -# 'ccpp/physics/physics/iounitdef.f', + 'ccpp/physics/physics/iounitdef.f', 'ccpp/physics/physics/machine.F', # DH should this be in FV3/gfsphysics/physics/physparam.f ? 'ccpp/physics/physics/mersenne_twister.f', # 'ccpp/physics/physics/mfpbl.f', -# 'ccpp/physics/physics/module_bfmicrophysics.f', + 'ccpp/physics/physics/module_bfmicrophysics.f', # 'ccpp/physics/physics/module_nst_model.f90', # 'ccpp/physics/physics/module_nst_parameters.f90', # 'ccpp/physics/physics/module_nst_water_prop.f90', # 'ccpp/physics/physics/namelist_soilveg.f', -# 'ccpp/physics/physics/ozne_def.f', + 'ccpp/physics/physics/ozne_def.f', 'ccpp/physics/physics/physcons.f90', 'ccpp/physics/physics/physparam.f', # DH should this be in FV3/gfsphysics/physics/physparam.f ? 'ccpp/physics/physics/radcons.f90', From 41c0240dd60386deec088681b62b6764646091bc Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 19 Jun 2018 10:56:07 -0600 Subject: [PATCH 03/10] Remove HRRR Thompson MP from default SDF for FV3, create separate SDF --- examples/suite_FV3_test.xml | 1 - examples/suite_FV3_test_thompson.xml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 examples/suite_FV3_test_thompson.xml diff --git a/examples/suite_FV3_test.xml b/examples/suite_FV3_test.xml index 7cb36aa6..59638e31 100644 --- a/examples/suite_FV3_test.xml +++ b/examples/suite_FV3_test.xml @@ -11,7 +11,6 @@ rrtmg_sw cnvc90 - mp_thompson_hrrr diff --git a/examples/suite_FV3_test_thompson.xml b/examples/suite_FV3_test_thompson.xml new file mode 100644 index 00000000..7cb36aa6 --- /dev/null +++ b/examples/suite_FV3_test_thompson.xml @@ -0,0 +1,18 @@ + + + + + + + FV3_test + + + + + rrtmg_sw + cnvc90 + mp_thompson_hrrr + + + + From 3fa1aaff040dcea9472bfadaf0e11add911eb4f2 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 21 Jun 2018 08:47:25 -0600 Subject: [PATCH 04/10] scripts/ccpp_prebuild_config_SCM.py: add new optional arguments (clouds) for RRTMG lw/sw schemes, change name of schemefile GFS_suite_interstitial.ccpp.F90 to GFS_suite_interstitial.F90 --- scripts/ccpp_prebuild_config_SCM.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/ccpp_prebuild_config_SCM.py b/scripts/ccpp_prebuild_config_SCM.py index 63f1dc98..8f407a64 100755 --- a/scripts/ccpp_prebuild_config_SCM.py +++ b/scripts/ccpp_prebuild_config_SCM.py @@ -32,7 +32,7 @@ 'ccpp-physics/physics/GFS_rad_time_vary.scm.f90', 'ccpp-physics/physics/GFS_rrtmg_post.F90', 'ccpp-physics/physics/GFS_rrtmg_pre.F90', - 'ccpp-physics/physics/GFS_suite_interstitial.ccpp.F90', + 'ccpp-physics/physics/GFS_suite_interstitial.F90', 'ccpp-physics/physics/GFS_surface_generic.f90', 'ccpp-physics/physics/GFS_surface_loop_control.f', 'ccpp-physics/physics/GFS_zhao_carr_pre.f90', @@ -97,6 +97,8 @@ 'mean_effective_radius_for_rain_drop', 'cloud_snow_water_path', 'mean_effective_radius_for_snow_flake', + 'cloud_optical_depth_weighted', + 'cloud_optical_depth_layers_678', ], }, 'rrtmg_lw' : { @@ -110,6 +112,8 @@ 'mean_effective_radius_for_rain_drop', 'cloud_snow_water_path', 'mean_effective_radius_for_snow_flake', + 'cloud_optical_depth_weighted', + 'cloud_optical_depth_layers_678', ], }, #'subroutine_name_1' : 'all', From 41afcfb233b55d34147a3fbc69b8d9ae8f2badfa Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 21 Jun 2018 08:49:14 -0600 Subject: [PATCH 05/10] scripts/ccpp_prebuild_config_FV3.py: enable RRTMG lw/sw schemes and interstitials and their dependencies; add new optional arguments (clouds) for RRTMG lw/sw schemes, change name of schemefile GFS_suite_interstitial.ccpp.F90 to GFS_suite_interstitial.F90 --- scripts/ccpp_prebuild_config_FV3.py | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/scripts/ccpp_prebuild_config_FV3.py b/scripts/ccpp_prebuild_config_FV3.py index 1045f146..d7414ec2 100755 --- a/scripts/ccpp_prebuild_config_FV3.py +++ b/scripts/ccpp_prebuild_config_FV3.py @@ -16,12 +16,12 @@ # Add all physics scheme dependencies relative to basedir - note that these are all violations # of the CCPP requirement to not use any external modules except Fortran standard modules! SCHEME_FILES_DEPENDENCIES = [ -# 'ccpp/physics/physics/GFDL_parse_tracers.F90', + 'ccpp/physics/physics/GFDL_parse_tracers.F90', # 'ccpp/physics/physics/date_def.f', 'ccpp/physics/physics/funcphys.f90', 'ccpp/physics/physics/gfs_phy_tracer_config.f', -# 'ccpp/physics/physics/gocart_tracer_config_stub.f', -# 'ccpp/physics/physics/h2o_def.f', + 'ccpp/physics/physics/gocart_tracer_config_stub.f', + 'ccpp/physics/physics/h2o_def.f', 'ccpp/physics/physics/iounitdef.f', 'ccpp/physics/physics/machine.F', # DH should this be in FV3/gfsphysics/physics/physparam.f ? 'ccpp/physics/physics/mersenne_twister.f', @@ -43,14 +43,15 @@ 'ccpp/physics/physics/radiation_gases.f', 'ccpp/physics/physics/radiation_surface.f', 'ccpp/physics/physics/radlw_datatb.f', - 'ccpp/physics/physics/radlw_param.f', # DH should this be in FV3/gfsphysics/physics/radlw_param.f + 'ccpp/physics/physics/radlw_param.f', 'ccpp/physics/physics/radsw_datatb.f', - 'ccpp/physics/physics/radsw_param.f', # DH should this be in FV3/gfsphysics/physics/radsw_param.f -# 'ccpp/physics/physics/rascnvv2.f', + 'ccpp/physics/physics/radsw_param.f', + 'ccpp/physics/physics/rascnvv2.f', # 'ccpp/physics/physics/sflx.f', + 'ccpp/physics/physics/surface_perturbation.F90', # 'ccpp/physics/physics/tridi.f', -# 'ccpp/physics/physics/wam_f107_kp_mod.f90', -# 'FV3/gfsphysics/GFS_layer/GFS_typedefs.F90', + 'ccpp/physics/physics/wam_f107_kp_mod.f90', + 'FV3/gfsphysics/GFS_layer/GFS_typedefs.F90', ] # Add all physics scheme files relative to basedir @@ -63,10 +64,11 @@ # 'ccpp/physics/physics/GFS_SCNV_generic.f90', # 'ccpp/physics/physics/GFS_calpreciptype.f90', # 'ccpp/physics/physics/GFS_debug.F90', -# 'ccpp/physics/physics/GFS_rrtmg_post.F90', -# 'ccpp/physics/physics/GFS_rrtmg_pre.F90', + 'ccpp/physics/physics/GFS_rrtmg_post.F90', + 'ccpp/physics/physics/GFS_rrtmg_pre.F90', + 'ccpp/physics/physics/GFS_rrtmg_setup.F90', # 'ccpp/physics/physics/GFS_stochastics.f90', -# 'ccpp/physics/physics/GFS_suite_interstitial.ccpp.F90', + 'ccpp/physics/physics/GFS_suite_interstitial.F90', # 'ccpp/physics/physics/GFS_surface_generic.f90', # 'ccpp/physics/physics/GFS_surface_loop_control.f', # 'ccpp/physics/physics/GFS_zhao_carr_pre.f90', @@ -85,10 +87,10 @@ 'ccpp/physics/physics/radlw_main.f', 'ccpp/physics/physics/radsw_main.f', # 'ccpp/physics/physics/rayleigh_damp.f', -# 'ccpp/physics/physics/rrtmg_lw_post.F90', -# 'ccpp/physics/physics/rrtmg_lw_pre.F90', -# 'ccpp/physics/physics/rrtmg_sw_post.F90', -# 'ccpp/physics/physics/rrtmg_sw_pre.F90', + 'ccpp/physics/physics/rrtmg_lw_post.F90', + 'ccpp/physics/physics/rrtmg_lw_pre.F90', + 'ccpp/physics/physics/rrtmg_sw_post.F90', + 'ccpp/physics/physics/rrtmg_sw_pre.F90', # 'ccpp/physics/physics/sfc_diag.f', # 'ccpp/physics/physics/sfc_diff.f', # 'ccpp/physics/physics/sfc_drv.f', @@ -156,6 +158,8 @@ 'mean_effective_radius_for_rain_drop', 'cloud_snow_water_path', 'mean_effective_radius_for_snow_flake', + 'cloud_optical_depth_weighted', + 'cloud_optical_depth_layers_678', ], }, 'rrtmg_lw' : { @@ -169,6 +173,8 @@ 'mean_effective_radius_for_rain_drop', 'cloud_snow_water_path', 'mean_effective_radius_for_snow_flake', + 'cloud_optical_depth_weighted', + 'cloud_optical_depth_layers_678', ], }, 'mp_thompson_hrrr' : { @@ -222,24 +228,18 @@ use ccpp_api, 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 -#''' - # 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 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 ''' From 1afac15938db08b2e5b3c861e0f55a3d4519df58 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 21 Jun 2018 08:52:09 -0600 Subject: [PATCH 06/10] examples/suite_FV3_test.xml and examples/suite_FV3_test_thompson.xml: add new group 'time_vary' that currently contains only the GFS_rrtmg_setup scheme and new group 'radiation' that contains all schemes required in this group --- examples/suite_FV3_test.xml | 22 +++++++++++++++++++++- examples/suite_FV3_test_thompson.xml | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/examples/suite_FV3_test.xml b/examples/suite_FV3_test.xml index 59638e31..31d455af 100644 --- a/examples/suite_FV3_test.xml +++ b/examples/suite_FV3_test.xml @@ -7,9 +7,29 @@ FV3_test - + + + GFS_rrtmg_setup + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + rrtmg_sw_pre rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + + + cnvc90 diff --git a/examples/suite_FV3_test_thompson.xml b/examples/suite_FV3_test_thompson.xml index 7cb36aa6..0686fffe 100644 --- a/examples/suite_FV3_test_thompson.xml +++ b/examples/suite_FV3_test_thompson.xml @@ -7,9 +7,29 @@ FV3_test - + + + GFS_rrtmg_setup + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + rrtmg_sw_pre rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + + + cnvc90 mp_thompson_hrrr From 2e7e4ffa348fa96c51a5e24d958cefb5330156a2 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 25 Jun 2018 14:38:55 -0600 Subject: [PATCH 07/10] Activate GFS_debug.F90 scheme in FV3 CCPP prebuild config --- scripts/ccpp_prebuild_config_FV3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ccpp_prebuild_config_FV3.py b/scripts/ccpp_prebuild_config_FV3.py index d7414ec2..50f83c5c 100755 --- a/scripts/ccpp_prebuild_config_FV3.py +++ b/scripts/ccpp_prebuild_config_FV3.py @@ -63,7 +63,7 @@ # 'ccpp/physics/physics/GFS_PBL_generic.f90', # 'ccpp/physics/physics/GFS_SCNV_generic.f90', # 'ccpp/physics/physics/GFS_calpreciptype.f90', -# 'ccpp/physics/physics/GFS_debug.F90', + 'ccpp/physics/physics/GFS_debug.F90', 'ccpp/physics/physics/GFS_rrtmg_post.F90', 'ccpp/physics/physics/GFS_rrtmg_pre.F90', 'ccpp/physics/physics/GFS_rrtmg_setup.F90', From e82ede816285d6a6baa9f69f0e14bcdc47ac6979 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 25 Jun 2018 14:39:38 -0600 Subject: [PATCH 08/10] src/ccpp_fcall.F90: add information on current stage to debugging output --- src/ccpp_fcall.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ccpp_fcall.F90 b/src/ccpp_fcall.F90 index 2600e65e..964a92c4 100644 --- a/src/ccpp_fcall.F90 +++ b/src/ccpp_fcall.F90 @@ -178,7 +178,7 @@ subroutine ccpp_run_suite(suite, cdata, stage, ierr) ierr = 0 - call ccpp_debug('Called ccpp_run_suite') + call ccpp_debug('Called ccpp_run_suite for stage ' // trim(stage)) do i=1,suite%groups_max call ccpp_run_group(suite%groups(i), cdata, stage=stage, ierr=ierr) @@ -243,7 +243,7 @@ subroutine ccpp_run_group(group, cdata, stage, ierr) ierr = 0 - call ccpp_debug('Called ccpp_run_group') + call ccpp_debug('Called ccpp_run_group for stage ' // trim(stage)) do i=1,group%subcycles_max call ccpp_run_subcycle(group%subcycles(i), cdata, stage=stage, ierr=ierr) @@ -307,7 +307,7 @@ subroutine ccpp_run_subcycle(subcycle, cdata, stage, ierr) ierr = 0 - call ccpp_debug('Called ccpp_run_subcycle') + call ccpp_debug('Called ccpp_run_subcycle for stage ' // trim(stage)) do i=1,subcycle%loop do j=1,subcycle%schemes_max From 99286b449caa003954f12addfb8160c80d5d3ab9 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 25 Jun 2018 16:48:29 -0600 Subject: [PATCH 09/10] Add GFS_suite_interstitial_phys_reset to list of known schemes in group 'physics' --- examples/suite_FV3_test.xml | 1 + examples/suite_FV3_test_thompson.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/suite_FV3_test.xml b/examples/suite_FV3_test.xml index 31d455af..0da8233c 100644 --- a/examples/suite_FV3_test.xml +++ b/examples/suite_FV3_test.xml @@ -30,6 +30,7 @@ + GFS_suite_interstitial_phys_reset cnvc90 diff --git a/examples/suite_FV3_test_thompson.xml b/examples/suite_FV3_test_thompson.xml index 0686fffe..94c37ced 100644 --- a/examples/suite_FV3_test_thompson.xml +++ b/examples/suite_FV3_test_thompson.xml @@ -30,6 +30,7 @@ + GFS_suite_interstitial_phys_reset cnvc90 mp_thompson_hrrr From 0b32d821f1be771f27feed2a0b2ebc28b93f9249 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 26 Jun 2018 17:58:58 -0600 Subject: [PATCH 10/10] examples/suite_FV3_test.xml and examples/suite_FV3_test_thompson.xml: add missing entries for hedmf and samfdeepcnv schemes to SDF group physics in order as they appear in the physics driver --- examples/suite_FV3_test.xml | 2 ++ examples/suite_FV3_test_thompson.xml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/examples/suite_FV3_test.xml b/examples/suite_FV3_test.xml index 0da8233c..c5ba02f5 100644 --- a/examples/suite_FV3_test.xml +++ b/examples/suite_FV3_test.xml @@ -31,6 +31,8 @@ GFS_suite_interstitial_phys_reset + hedmf + samfdeepcnv cnvc90 diff --git a/examples/suite_FV3_test_thompson.xml b/examples/suite_FV3_test_thompson.xml index 94c37ced..f1ee3333 100644 --- a/examples/suite_FV3_test_thompson.xml +++ b/examples/suite_FV3_test_thompson.xml @@ -31,6 +31,8 @@ GFS_suite_interstitial_phys_reset + hedmf + samfdeepcnv cnvc90 mp_thompson_hrrr