From c36ae0b45715ef8ed1e5deb10ec661a267e144d8 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 23 Oct 2020 08:48:45 -0600 Subject: [PATCH 1/3] Change working directory for calling ccpp_prebuild.py back to the top-level directory --- CMakeLists.txt | 15 +- ccpp/config/ccpp_prebuild_config.py | 234 ++++++++++++++-------------- 2 files changed, 127 insertions(+), 122 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 320a1580b..db51e2c8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,19 @@ if(CCPP) + if(DEBUG) + set(_ccpp_debug_arg "--debug") + endif() if(DEFINED CCPP_SUITES) set(_ccpp_suites_arg "--suites=${CCPP_SUITES}") + message("Calling CCPP code generator (ccpp_prebuild.py) for suites ${_ccpp_suites_arg} ...") + else() + message("Calling CCPP code generator (ccpp_prebuild.py) for all available suites ...") endif() - message("Calling CCPP code generator (ccpp_prebuild.py) ... ${_ccpp_suites_arg}") execute_process(COMMAND ${Python_EXECUTABLE} - "ccpp/framework/scripts/ccpp_prebuild.py" - "--config=ccpp/config/ccpp_prebuild_config.py" - "--builddir=${CMAKE_CURRENT_BINARY_DIR}" ${_ccpp_suites_arg} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + "FV3/ccpp/framework/scripts/ccpp_prebuild.py" + "--config=FV3/ccpp/config/ccpp_prebuild_config.py" + "--builddir=${CMAKE_CURRENT_BINARY_DIR}" ${_ccpp_suites_arg} ${_ccpp_debug_arg} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.out ERROR_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.err RESULT_VARIABLE RC) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index a3d727317..d2ef57471 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -15,17 +15,17 @@ # dependencies of these files to the list. VARIABLE_DEFINITION_FILES = [ # actual variable definition files - 'ccpp/physics/physics/machine.F', - 'ccpp/physics/physics/radsw_param.f', - 'ccpp/physics/physics/radlw_param.f', - 'gfsphysics/CCPP_layer/CCPP_typedefs.F90', - 'gfsphysics/GFS_layer/GFS_typedefs.F90', - 'gfsphysics/CCPP_layer/CCPP_data.F90', - 'ccpp/physics/physics/rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90', - 'ccpp/physics/physics/rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90', - 'ccpp/physics/physics/rte-rrtmgp/rte/mo_optical_props.F90', - 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90', - 'ccpp/physics/physics/rte-rrtmgp/rte/mo_source_functions.F90', + 'FV3/ccpp/physics/physics/machine.F', + 'FV3/ccpp/physics/physics/radsw_param.f', + 'FV3/ccpp/physics/physics/radlw_param.f', + 'FV3/gfsphysics/CCPP_layer/CCPP_typedefs.F90', + 'FV3/gfsphysics/GFS_layer/GFS_typedefs.F90', + 'FV3/gfsphysics/CCPP_layer/CCPP_data.F90', + 'FV3/ccpp/physics/physics/rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90', + 'FV3/ccpp/physics/physics/rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90', + 'FV3/ccpp/physics/physics/rte-rrtmgp/rte/mo_optical_props.F90', + 'FV3/ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90', + 'FV3/ccpp/physics/physics/rte-rrtmgp/rte/mo_source_functions.F90', ] TYPEDEFS_NEW_METADATA = { @@ -92,113 +92,113 @@ # Relative path to source (from where ccpp_prebuild.py is called) : [ list of physics sets in which scheme may be called ]; # current restrictions are that each scheme can only belong to one physics set, and all schemes within one group in the # suite definition file have to belong to the same physics set - 'ccpp/physics/physics/GFS_DCNV_generic.F90', - 'ccpp/physics/physics/GFS_GWD_generic.F90', - 'ccpp/physics/physics/GFS_MP_generic.F90', - 'ccpp/physics/physics/GFS_PBL_generic.F90', - 'ccpp/physics/physics/GFS_SCNV_generic.F90', - 'ccpp/physics/physics/GFS_debug.F90', - 'ccpp/physics/physics/GFS_phys_time_vary.fv3.F90', - 'ccpp/physics/physics/GFS_rad_time_vary.fv3.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.F90', - 'ccpp/physics/physics/GFS_surface_generic.F90', - 'ccpp/physics/physics/GFS_surface_composites.F90', - 'ccpp/physics/physics/GFS_surface_loop_control.F90', - 'ccpp/physics/physics/GFS_time_vary_pre.fv3.F90', - 'ccpp/physics/physics/cires_ugwp.F90', - 'ccpp/physics/physics/cires_ugwp_post.F90', - 'ccpp/physics/physics/cnvc90.f', - 'ccpp/physics/physics/cs_conv.F90', - 'ccpp/physics/physics/cs_conv_aw_adj.F90', - 'ccpp/physics/physics/cu_ntiedtke_pre.F90', - 'ccpp/physics/physics/cu_ntiedtke.F90', - 'ccpp/physics/physics/cu_ntiedtke_post.F90', - 'ccpp/physics/physics/dcyc2.f', - 'ccpp/physics/physics/drag_suite.F90', - 'ccpp/physics/physics/gcm_shoc.F90', - 'ccpp/physics/physics/get_prs_fv3.F90', - 'ccpp/physics/physics/gfdl_cloud_microphys.F90', - 'ccpp/physics/physics/gfdl_fv_sat_adj.F90', - 'ccpp/physics/physics/gscond.f', - 'ccpp/physics/physics/gwdc.f', - 'ccpp/physics/physics/gwdps.f', - 'ccpp/physics/physics/h2ophys.f', - 'ccpp/physics/physics/samfdeepcnv.f', - 'ccpp/physics/physics/samfshalcnv.f', - 'ccpp/physics/physics/sascnvn.F', - 'ccpp/physics/physics/shalcnv.F', - 'ccpp/physics/physics/maximum_hourly_diagnostics.F90', - 'ccpp/physics/physics/m_micro.F90', - 'ccpp/physics/physics/m_micro_interstitial.F90', - 'ccpp/physics/physics/cu_gf_driver_pre.F90', - 'ccpp/physics/physics/cu_gf_driver.F90', - 'ccpp/physics/physics/cu_gf_driver_post.F90', - 'ccpp/physics/physics/moninedmf.f', - 'ccpp/physics/physics/moninedmf_hafs.f', - 'ccpp/physics/physics/moninshoc.f', - 'ccpp/physics/physics/satmedmfvdif.F', - 'ccpp/physics/physics/satmedmfvdifq.F', - 'ccpp/physics/physics/shinhongvdif.F90', - 'ccpp/physics/physics/ysuvdif.F90', - 'ccpp/physics/physics/module_MYNNPBL_wrapper.F90', - 'ccpp/physics/physics/module_MYNNSFC_wrapper.F90', - 'ccpp/physics/physics/module_SGSCloud_RadPre.F90', - 'ccpp/physics/physics/module_SGSCloud_RadPost.F90', - 'ccpp/physics/physics/module_MYJSFC_wrapper.F90', - 'ccpp/physics/physics/module_MYJPBL_wrapper.F90', - 'ccpp/physics/physics/mp_thompson_pre.F90', - 'ccpp/physics/physics/mp_thompson.F90', - 'ccpp/physics/physics/mp_thompson_post.F90', - 'ccpp/physics/physics/ozphys.f', - 'ccpp/physics/physics/ozphys_2015.f', - 'ccpp/physics/physics/precpd.f', - 'ccpp/physics/physics/phys_tend.F90', - 'ccpp/physics/physics/radlw_main.f', - 'ccpp/physics/physics/radsw_main.f', - 'ccpp/physics/physics/rascnv.F90', - '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/sfc_diag.f', - 'ccpp/physics/physics/sfc_diag_post.F90', - 'ccpp/physics/physics/sfc_drv_ruc.F90', - 'ccpp/physics/physics/lsm_ruc_sfc_sice_interstitial.F90', - 'ccpp/physics/physics/sfc_cice.f', - 'ccpp/physics/physics/sfc_diff.f', - 'ccpp/physics/physics/sfc_drv.f', - 'ccpp/physics/physics/sfc_noahmp_drv.f', - 'ccpp/physics/physics/flake_driver.F90', - 'ccpp/physics/physics/sfc_nst.f', - 'ccpp/physics/physics/sfc_ocean.F', - 'ccpp/physics/physics/sfc_sice.f', + 'FV3/ccpp/physics/physics/GFS_DCNV_generic.F90', + 'FV3/ccpp/physics/physics/GFS_GWD_generic.F90', + 'FV3/ccpp/physics/physics/GFS_MP_generic.F90', + 'FV3/ccpp/physics/physics/GFS_PBL_generic.F90', + 'FV3/ccpp/physics/physics/GFS_SCNV_generic.F90', + 'FV3/ccpp/physics/physics/GFS_debug.F90', + 'FV3/ccpp/physics/physics/GFS_phys_time_vary.fv3.F90', + 'FV3/ccpp/physics/physics/GFS_rad_time_vary.fv3.F90', + 'FV3/ccpp/physics/physics/GFS_rrtmg_post.F90', + 'FV3/ccpp/physics/physics/GFS_rrtmg_pre.F90', + 'FV3/ccpp/physics/physics/GFS_rrtmg_setup.F90', + 'FV3/ccpp/physics/physics/GFS_stochastics.F90', + 'FV3/ccpp/physics/physics/GFS_suite_interstitial.F90', + 'FV3/ccpp/physics/physics/GFS_surface_generic.F90', + 'FV3/ccpp/physics/physics/GFS_surface_composites.F90', + 'FV3/ccpp/physics/physics/GFS_surface_loop_control.F90', + 'FV3/ccpp/physics/physics/GFS_time_vary_pre.fv3.F90', + 'FV3/ccpp/physics/physics/cires_ugwp.F90', + 'FV3/ccpp/physics/physics/cires_ugwp_post.F90', + 'FV3/ccpp/physics/physics/cnvc90.f', + 'FV3/ccpp/physics/physics/cs_conv.F90', + 'FV3/ccpp/physics/physics/cs_conv_aw_adj.F90', + 'FV3/ccpp/physics/physics/cu_ntiedtke_pre.F90', + 'FV3/ccpp/physics/physics/cu_ntiedtke.F90', + 'FV3/ccpp/physics/physics/cu_ntiedtke_post.F90', + 'FV3/ccpp/physics/physics/dcyc2.f', + 'FV3/ccpp/physics/physics/drag_suite.F90', + 'FV3/ccpp/physics/physics/gcm_shoc.F90', + 'FV3/ccpp/physics/physics/get_prs_fv3.F90', + 'FV3/ccpp/physics/physics/gfdl_cloud_microphys.F90', + 'FV3/ccpp/physics/physics/gfdl_fv_sat_adj.F90', + 'FV3/ccpp/physics/physics/gscond.f', + 'FV3/ccpp/physics/physics/gwdc.f', + 'FV3/ccpp/physics/physics/gwdps.f', + 'FV3/ccpp/physics/physics/h2ophys.f', + 'FV3/ccpp/physics/physics/samfdeepcnv.f', + 'FV3/ccpp/physics/physics/samfshalcnv.f', + 'FV3/ccpp/physics/physics/sascnvn.F', + 'FV3/ccpp/physics/physics/shalcnv.F', + 'FV3/ccpp/physics/physics/maximum_hourly_diagnostics.F90', + 'FV3/ccpp/physics/physics/m_micro.F90', + 'FV3/ccpp/physics/physics/m_micro_interstitial.F90', + 'FV3/ccpp/physics/physics/cu_gf_driver_pre.F90', + 'FV3/ccpp/physics/physics/cu_gf_driver.F90', + 'FV3/ccpp/physics/physics/cu_gf_driver_post.F90', + 'FV3/ccpp/physics/physics/moninedmf.f', + 'FV3/ccpp/physics/physics/moninedmf_hafs.f', + 'FV3/ccpp/physics/physics/moninshoc.f', + 'FV3/ccpp/physics/physics/satmedmfvdif.F', + 'FV3/ccpp/physics/physics/satmedmfvdifq.F', + 'FV3/ccpp/physics/physics/shinhongvdif.F90', + 'FV3/ccpp/physics/physics/ysuvdif.F90', + 'FV3/ccpp/physics/physics/module_MYNNPBL_wrapper.F90', + 'FV3/ccpp/physics/physics/module_MYNNSFC_wrapper.F90', + 'FV3/ccpp/physics/physics/module_SGSCloud_RadPre.F90', + 'FV3/ccpp/physics/physics/module_SGSCloud_RadPost.F90', + 'FV3/ccpp/physics/physics/module_MYJSFC_wrapper.F90', + 'FV3/ccpp/physics/physics/module_MYJPBL_wrapper.F90', + 'FV3/ccpp/physics/physics/mp_thompson_pre.F90', + 'FV3/ccpp/physics/physics/mp_thompson.F90', + 'FV3/ccpp/physics/physics/mp_thompson_post.F90', + 'FV3/ccpp/physics/physics/ozphys.f', + 'FV3/ccpp/physics/physics/ozphys_2015.f', + 'FV3/ccpp/physics/physics/precpd.f', + 'FV3/ccpp/physics/physics/phys_tend.F90', + 'FV3/ccpp/physics/physics/radlw_main.f', + 'FV3/ccpp/physics/physics/radsw_main.f', + 'FV3/ccpp/physics/physics/rascnv.F90', + 'FV3/ccpp/physics/physics/rayleigh_damp.f', + 'FV3/ccpp/physics/physics/rrtmg_lw_post.F90', + 'FV3/ccpp/physics/physics/rrtmg_lw_pre.F90', + 'FV3/ccpp/physics/physics/rrtmg_sw_post.F90', + 'FV3/ccpp/physics/physics/rrtmg_sw_pre.F90', + 'FV3/ccpp/physics/physics/sfc_diag.f', + 'FV3/ccpp/physics/physics/sfc_diag_post.F90', + 'FV3/ccpp/physics/physics/sfc_drv_ruc.F90', + 'FV3/ccpp/physics/physics/lsm_ruc_sfc_sice_interstitial.F90', + 'FV3/ccpp/physics/physics/sfc_cice.f', + 'FV3/ccpp/physics/physics/sfc_diff.f', + 'FV3/ccpp/physics/physics/sfc_drv.f', + 'FV3/ccpp/physics/physics/sfc_noahmp_drv.f', + 'FV3/ccpp/physics/physics/flake_driver.F90', + 'FV3/ccpp/physics/physics/sfc_nst.f', + 'FV3/ccpp/physics/physics/sfc_ocean.F', + 'FV3/ccpp/physics/physics/sfc_sice.f', # HAFSFER_HIRES - 'ccpp/physics/physics/mp_fer_hires.F90', + 'FV3/ccpp/physics/physics/mp_fer_hires.F90', # RRTMGP - 'ccpp/physics/physics/rrtmgp_lw_gas_optics.F90', - 'ccpp/physics/physics/rrtmgp_lw_cloud_optics.F90', - 'ccpp/physics/physics/rrtmgp_sw_gas_optics.F90', - 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90', - 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90', - 'ccpp/physics/physics/rrtmgp_lw_rte.F90', - 'ccpp/physics/physics/rrtmgp_sw_rte.F90', - 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90', - 'ccpp/physics/physics/GFS_rrtmgp_setup.F90', - 'ccpp/physics/physics/GFS_rrtmgp_pre.F90', - 'ccpp/physics/physics/rrtmgp_lw_pre.F90', - 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90', - 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90', - 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90', - 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90', - 'ccpp/physics/physics/GFS_cloud_diagnostics.F90', - 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90', - 'ccpp/physics/physics/GFS_rrtmgp_zhaocarr_pre.F90', - 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' + 'FV3/ccpp/physics/physics/rrtmgp_lw_gas_optics.F90', + 'FV3/ccpp/physics/physics/rrtmgp_lw_cloud_optics.F90', + 'FV3/ccpp/physics/physics/rrtmgp_sw_gas_optics.F90', + 'FV3/ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90', + 'FV3/ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90', + 'FV3/ccpp/physics/physics/rrtmgp_lw_rte.F90', + 'FV3/ccpp/physics/physics/rrtmgp_sw_rte.F90', + 'FV3/ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90', + 'FV3/ccpp/physics/physics/GFS_rrtmgp_setup.F90', + 'FV3/ccpp/physics/physics/GFS_rrtmgp_pre.F90', + 'FV3/ccpp/physics/physics/rrtmgp_lw_pre.F90', + 'FV3/ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90', + 'FV3/ccpp/physics/physics/GFS_rrtmgp_lw_post.F90', + 'FV3/ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90', + 'FV3/ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90', + 'FV3/ccpp/physics/physics/GFS_cloud_diagnostics.F90', + 'FV3/ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90', + 'FV3/ccpp/physics/physics/GFS_rrtmgp_zhaocarr_pre.F90', + 'FV3/ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' ] # Default build dir, relative to current working directory, @@ -224,7 +224,7 @@ CAPS_DIR = '{build_dir}/ccpp/physics' # Directory where the suite definition files are stored -SUITES_DIR = 'ccpp/suites' +SUITES_DIR = 'FV3/ccpp/suites' # Optional arguments - only required for schemes that use # optional arguments. ccpp_prebuild.py will throw an exception From cf04793253f73e394d7919c06fb9916904fd0fb7 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 23 Oct 2020 08:49:06 -0600 Subject: [PATCH 2/3] Update .gitmodules and submodule pointer for ccpp-physics --- .gitmodules | 6 ++++-- ccpp/physics | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index d253f6966..8d41c1b51 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,7 @@ branch = master [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = master + #url = https://github.com/NCAR/ccpp-physics + #branch = master + url = https://github.com/climbfuji/ccpp-physics + branch = gfsv16-update-ccpp diff --git a/ccpp/physics b/ccpp/physics index f3e6761e9..9fef3def1 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f3e6761e920089ce6343df3f2db18df842a484b0 +Subproject commit 9fef3def1448b26cc2132f2f370e5f86d24c62b1 From 187b43e7dc326e5da5ec7c8aba62dcbf77898f66 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 26 Oct 2020 07:57:47 -0600 Subject: [PATCH 3/3] Update .gitmodules and submodule pointers for GFDL_atmos_cubed_sphere and ccpp-physics --- .gitmodules | 6 ++++-- atmos_cubed_sphere | 2 +- ccpp/physics | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 8d41c1b51..da37ba452 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,9 @@ [submodule "atmos_cubed_sphere"] path = atmos_cubed_sphere - url = https://github.com/NOAA-EMC/GFDL_atmos_cubed_sphere - branch = dev/emc + #url = https://github.com/NOAA-EMC/GFDL_atmos_cubed_sphere + #branch = dev/emc + url = https://github.com/junwang-noaa/GFDL_atmos_cubed_sphere + branch = gfsv16_dzmin [submodule "ccpp/framework"] path = ccpp/framework url = https://github.com/NCAR/ccpp-framework diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 77528402f..ebc59dd70 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 77528402fe5f8067d968d6a5f09ac4488aab836a +Subproject commit ebc59dd7015c07efb1a81d2afed292be7119653c diff --git a/ccpp/physics b/ccpp/physics index 9fef3def1..d35e073f2 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 9fef3def1448b26cc2132f2f370e5f86d24c62b1 +Subproject commit d35e073f2665eeba529e25104835c620138ccfe0