Skip to content

Commit

Permalink
Merge pull request #183 from grantfirl/update_dtc_develop_20200608
Browse files Browse the repository at this point in the history
Update dtc/develop branch to work with ccpp-physics/framework as of 20200608
  • Loading branch information
grantfirl authored Jun 9, 2020
2 parents 02f7afd + bacbc93 commit cb1dd17
Show file tree
Hide file tree
Showing 16 changed files with 882 additions and 243 deletions.
12 changes: 11 additions & 1 deletion ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
'ccpp/physics/physics/module_mp_thompson.F90',
'ccpp/physics/physics/module_mp_thompson_make_number_concentrations.F90',
'ccpp/physics/physics/module_MP_FER_HIRES.F90',
# 'ccpp/physics/physics/HWRF_mersenne_twister.F90',
# 'ccpp/physics/physics/HWRF_mcica_random_numbers.F90',
'ccpp/physics/physics/module_bl_mynn.F90',
'ccpp/physics/physics/module_sf_mynn.F90',
'ccpp/physics/physics/module_SF_JSFC.F90',
Expand Down Expand Up @@ -170,6 +172,9 @@
'ccpp/physics/physics/namelist_soilveg_ruc.F90',
'ccpp/physics/physics/set_soilveg_ruc.F90',
'ccpp/physics/physics/module_soil_pre.F90',
# 'ccpp/physics/physics/module_sf_noahlsm.F90',
# 'ccpp/physics/physics/module_sf_noahlsm_glacial_only.F90',
# 'ccpp/physics/physics/module_sf_exchcoef.f90',
# RRTMGP
'ccpp/physics/physics/rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90',
'ccpp/physics/physics/rte-rrtmgp/rrtmgp/mo_gas_optics.F90',
Expand All @@ -196,7 +201,7 @@
'ccpp/physics/physics/rte-rrtmgp/extensions/mo_heating_rates.F90',
'ccpp/physics/physics/rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90',
'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90',
'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90',
'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90',
# derived data type definitions
'scm/src/GFS_typedefs.F90',
'scm/src/gmtb_scm_kinds.F90',
Expand Down Expand Up @@ -237,6 +242,7 @@
'ccpp/physics/physics/gcm_shoc.F90' : ['physics'],
'ccpp/physics/physics/get_prs_fv3.F90' : ['physics'],
'ccpp/physics/physics/gfdl_cloud_microphys.F90' : ['physics'],
# 'ccpp/physics/physics/gfdl_sfc_layer.F90' : ['physics'],
'ccpp/physics/physics/gscond.f' : ['physics'],
'ccpp/physics/physics/gwdc.f' : ['physics'],
'ccpp/physics/physics/gwdps.f' : ['physics'],
Expand Down Expand Up @@ -269,6 +275,8 @@
'ccpp/physics/physics/ozphys.f' : ['physics'],
'ccpp/physics/physics/ozphys_2015.f' : ['physics'],
'ccpp/physics/physics/precpd.f' : ['physics'],
# 'ccpp/physics/physics/radlw_main.F90' : ['physics'],
# 'ccpp/physics/physics/radsw_main.F90' : ['physics'],
'ccpp/physics/physics/radlw_main.f' : ['physics'],
'ccpp/physics/physics/radsw_main.f' : ['physics'],
'ccpp/physics/physics/rayleigh_damp.f' : ['physics'],
Expand All @@ -283,6 +291,8 @@
'ccpp/physics/physics/sfc_cice.f' : ['physics'],
'ccpp/physics/physics/sfc_diff.f' : ['physics'],
'ccpp/physics/physics/sfc_drv.f' : ['physics'],
# 'ccpp/physics/physics/sfc_noah_wrfv4_interstitial.F90' : ['physics'],
# 'ccpp/physics/physics/sfc_noah_wrfv4.F90' : ['physics'],
'ccpp/physics/physics/sfc_noahmp_drv.f' : ['physics'],
'ccpp/physics/physics/sfc_nst.f' : ['physics'],
'ccpp/physics/physics/sfc_ocean.F' : ['physics'],
Expand Down
2 changes: 1 addition & 1 deletion ccpp/framework
Submodule framework updated 68 files
+0 −100 .travis.yml
+4 −24 CMakeLists.txt
+ doc/DevelopersGuide/CCPP_VARIABLES_FV3.pdf
+ doc/DevelopersGuide/CCPP_VARIABLES_SCM.pdf
+0 −15 doc/DevelopersGuide/Makefile
+12 −0 doc/DevelopersGuide/README.md
+0 −23 doc/DevelopersGuide/acknow.tex
+0 −2 doc/DevelopersGuide/chap_appendix.tex
+0 −328 doc/DevelopersGuide/chap_hostmodel.tex
+0 −12 doc/DevelopersGuide/chap_intro.tex
+0 −158 doc/DevelopersGuide/chap_schemes.tex
+0 −69 doc/DevelopersGuide/host_cap_template.F90
+ doc/DevelopersGuide/images/ccpp_design_with_ccpp_prebuild.pdf
+ doc/DevelopersGuide/images/dtc_logo.png
+0 −39 doc/DevelopersGuide/main.tex
+0 −28 doc/DevelopersGuide/preface.tex
+0 −129 doc/DevelopersGuide/scheme_template.F90
+0 −81 doc/DevelopersGuide/scheme_template.meta
+0 −28 doc/DevelopersGuide/title.tex
+0 −30 schemes/CMakeLists.txt
+0 −99 schemes/check/CMakeLists.txt
+0 −92 schemes/check/ccpp_prebuild_config.py
+0 −72 schemes/check/check_noop.f90
+0 −65 schemes/check/check_test.f90
+0 −61 schemes/check/nan.f90
+0 −35 schemes/check/scheme.xml
+58 −185 scripts/ccpp_prebuild.py
+9 −22 scripts/common.py
+4 −0 scripts/conversion_tools/__init__.py
+0 −718 scripts/convert_metadata.py
+0 −394 scripts/convert_metadata_schemes_using_typedef_dims.py
+14 −35 scripts/metadata_parser.py
+4 −349 scripts/mkcap.py
+6 −92 src/CMakeLists.txt
+0 −180 src/ccpp.F90
+2 −27 src/ccpp_api.F90
+0 −53 src/ccpp_dl.F90
+0 −181 src/ccpp_dl.c
+0 −34 src/ccpp_dl.h
+0 −128 src/ccpp_errors.F90
+0 −472 src/ccpp_fcall.F90
+0 −2,151 src/ccpp_fields.F90
+0 −285 src/ccpp_fields_idx.c
+0 −80 src/ccpp_fields_idx.h
+0 −159 src/ccpp_scheme.F90
+0 −101 src/ccpp_strings.F90
+0 −438 src/ccpp_suite.F90
+20 −147 src/ccpp_types.F90
+0 −89 src/ccpp_utils.c
+0 −41 src/ccpp_utils.h
+0 −396 src/ccpp_xml.F90
+0 −246 src/ccpp_xml.c
+0 −60 src/ccpp_xml.h
+0 −53 src/tests/CMakeLists.txt
+0 −49 src/tests/suite.xsd
+0 −10 src/tests/suite_EXAMPLE.xml
+0 −10 src/tests/suite_check_1.xml
+0 −10 src/tests/suite_check_2.xml
+0 −10 src/tests/suite_check_3.xml
+0 −10 src/tests/suite_noop_1.xml
+0 −10 src/tests/suite_noop_2.xml
+0 −10 src/tests/suite_noop_3.xml
+0 −22 src/tests/suite_noop_4.xml
+0 −13 src/tests/suite_noop_5.xml
+0 −10 src/tests/suite_noop_6.xml
+0 −168 src/tests/test_check.f90
+0 −50 src/tests/test_fields.c
+0 −58 src/tests/test_init_finalize.f90
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 85 files
+21 −0 .github/workflows/basic_checks.yml
+12 −43 CMakeLists.txt
+0 −93 pgifix.py
+9 −37 physics/GFS_DCNV_generic.F90
+0 −77 physics/GFS_DCNV_generic.meta
+3 −3 physics/GFS_MP_generic.F90
+8 −0 physics/GFS_MP_generic.meta
+76 −21 physics/GFS_PBL_generic.F90
+133 −9 physics/GFS_PBL_generic.meta
+27 −6 physics/GFS_debug.F90
+78 −34 physics/GFS_stochastics.F90
+51 −0 physics/GFS_stochastics.meta
+9 −9 physics/GFS_suite_interstitial.F90
+1 −1 physics/GFS_suite_interstitial.meta
+105 −97 physics/GFS_surface_composites.F90
+65 −31 physics/GFS_surface_composites.meta
+9 −9 physics/GFS_surface_generic.F90
+10 −2 physics/GFS_surface_generic.meta
+6 −5 physics/cires_ugwp.F90
+15 −15 physics/dcyc2.f
+3 −70 physics/dcyc2.meta
+467 −0 physics/docs/ccppv4_doxyfile
+292 −257 physics/docs/library.bib
+46 −23 physics/docs/pdftxt/CPT_adv_suite.txt
+17 −0 physics/docs/pdftxt/GFS_OCEAN.txt
+1 −1 physics/docs/pdftxt/GFS_OZPHYS.txt
+117 −0 physics/docs/pdftxt/GFS_UGWPv0.txt
+0 −1 physics/docs/pdftxt/GFSv14_suite.txt
+0 −1 physics/docs/pdftxt/GFSv15_suite.txt
+0 −1 physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt
+127 −0 physics/docs/pdftxt/GFSv15p2_no_nsst_suite.txt
+133 −0 physics/docs/pdftxt/GFSv15p2_suite.txt
+167 −0 physics/docs/pdftxt/GFSv16beta_no_nsst_suite.txt
+176 −0 physics/docs/pdftxt/GFSv16beta_suite.txt
+150 −82 physics/docs/pdftxt/GSD_adv_suite.txt
+0 −21 physics/docs/pdftxt/UGWPv0.txt
+27 −20 physics/docs/pdftxt/all_shemes_list.txt
+15 −11 physics/docs/pdftxt/mainpage.txt
+100 −0 physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt
+99 −0 physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt
+100 −0 physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt
+97 −0 physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt
+143 −32 physics/docs/pdftxt/suite_input.nml.txt
+4 −4 physics/drag_suite.F90
+2 −2 physics/gcm_shoc.meta
+1 −0 physics/gcycle.F90
+6 −0 physics/gfdl_fv_sat_adj.F90
+4 −4 physics/gwdps.f
+18 −8 physics/lsm_ruc_sfc_sice_interstitial.F90
+50 −0 physics/lsm_ruc_sfc_sice_interstitial.meta
+5 −14 physics/m_micro.F90
+1 −1 physics/micro_mg_utils.F90
+2 −2 physics/module_MYJPBL_wrapper.meta
+30 −30 physics/module_MYJSFC_wrapper.F90
+10 −10 physics/module_MYJSFC_wrapper.meta
+2 −2 physics/module_MYNNPBL_wrapper.meta
+27 −52 physics/module_sf_noahmplsm.f90
+2 −2 physics/moninedmf.meta
+2 −2 physics/moninedmf_hafs.meta
+2 −2 physics/moninshoc.meta
+0 −4 physics/mp_thompson.F90
+313 −143 physics/samfdeepcnv.f
+48 −0 physics/samfdeepcnv.meta
+172 −81 physics/samfshalcnv.f
+8 −0 physics/samfshalcnv.meta
+2 −2 physics/satmedmfvdif.meta
+2 −2 physics/satmedmfvdifq.F
+2 −2 physics/satmedmfvdifq.meta
+55 −47 physics/sfc_diff.f
+13 −13 physics/sfc_diff.meta
+6 −8 physics/sfc_drv_ruc.F90
+1 −1 physics/sfc_drv_ruc.meta
+8 −24 physics/sfc_noahmp_drv.f
+0 −8 physics/sfc_noahmp_drv.meta
+16 −19 physics/sfc_nst.f
+4 −4 physics/sfc_nst.meta
+11 −7 physics/sfc_ocean.F
+15 −16 physics/sfc_sice.f
+7 −7 physics/sfc_sice.meta
+67 −60 physics/sflx.f
+2 −2 physics/shalcnv.meta
+2 −2 physics/shinhongvdif.meta
+29 −13 physics/ugwp_driver_v0.F
+2 −2 physics/ysuvdif.meta
+25 −0 tools/check_encoding.py
3 changes: 1 addition & 2 deletions ccpp/physics_namelists/input_csawmg.nml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@
mg_qcvar = 1.0
fprcp = 2
pdfflag = 4
iccn = .false.
aero_in = .false.
iccn = 0
mg_do_graupel = .true.
mg_do_hail = .false.
do_sb_physics = .true.
Expand Down
1 change: 1 addition & 0 deletions scm/etc/case_config/astex.nml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ mom_forcing_type = 2,
relax_time = 7200.0,
sfc_flux_spec = .false.,
sfc_type = 0,
sfc_roughness_length_cm = 0.02,
reference_profile_choice = 1,
year = 1992,
month = 6,
Expand Down
1 change: 0 additions & 1 deletion scm/etc/case_config/fv3_model_point_noah.nml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ year = 2016,
month = 10,
day = 3,
hour = 0,
output_dir = 'output_fv3_model_point_noah'
$end

1 change: 0 additions & 1 deletion scm/etc/case_config/fv3_model_point_noahmp.nml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ year = 2016,
month = 10,
day = 3,
hour = 0,
output_dir = 'output_fv3_model_point_noahmp'
$end

1 change: 1 addition & 0 deletions scm/etc/case_config/twpice.nml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ mom_forcing_type = 3,
relax_time = 7200.0,
sfc_flux_spec = .false.,
sfc_type = 0,
sfc_roughness_length_cm = 0.02,
reference_profile_choice = 1,
year = 2006,
month = 1,
Expand Down
80 changes: 33 additions & 47 deletions scm/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,39 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(scm)
set(PROJECT "CCPP-SCM")

# The only option to build is the static build
set(STATIC TRUE)

####################################################################
# Begin CCPP prebuild step #
####################################################################
if(STATIC)
# Start with empty list of suites
message (STATUS "Generating list of suites to compile for static CCPP")
set(SUITES "")
# Get list of all suite definition files (with full path)
file(GLOB SUITE_DEFINITION_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/../../ccpp/suites/suite_*.xml"
)
# Extract file name and suite name and append to SUITES
foreach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES)
get_filename_component(suite_definition_filename ${suite_definition_filepath} NAME)
string(REGEX REPLACE "^suite_(.+)\\.xml$" "\\1" suite_name ${suite_definition_filename})
set(SUITES ${SUITES}${suite_name},)
message (STATUS " adding suite ${suite_name}")
endforeach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES)
# Abort if no suites found
if ("${SUITES}" STREQUAL "")
message(FATAL_ERROR "No suites found to compile for static CCPP")
endif("${SUITES}" STREQUAL "")
# Remove trailing comma from list of suites
string(REGEX REPLACE "(.+),$" "\\1" SUITES ${SUITES})
# Run CCPP prebuild.py
message (STATUS "Running ccpp_prebuild.py for static CCPP")
execute_process(
COMMAND ccpp/framework/scripts/ccpp_prebuild.py --config=ccpp/config/ccpp_prebuild_config.py --static --suites=${SUITES} --builddir=${CMAKE_CURRENT_BINARY_DIR}/..
OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out
ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../..
RESULT_VARIABLE return_code
)
else(STATIC)
message(FATAL_ERROR "Dynamic CCPP build no longer supported")
endif(STATIC)
# Start with empty list of suites
message (STATUS "Generating list of suites to compile for CCPP")
set(SUITES "")
# Get list of all suite definition files (with full path)
file(GLOB SUITE_DEFINITION_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/../../ccpp/suites/suite_*.xml"
)
# Extract file name and suite name and append to SUITES
foreach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES)
get_filename_component(suite_definition_filename ${suite_definition_filepath} NAME)
string(REGEX REPLACE "^suite_(.+)\\.xml$" "\\1" suite_name ${suite_definition_filename})
set(SUITES ${SUITES}${suite_name},)
message (STATUS " adding suite ${suite_name}")
endforeach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES)
# Abort if no suites found
if ("${SUITES}" STREQUAL "")
message(FATAL_ERROR "No suites found to compile for CCPP")
endif("${SUITES}" STREQUAL "")
# Remove trailing comma from list of suites
string(REGEX REPLACE "(.+),$" "\\1" SUITES ${SUITES})
# Run CCPP prebuild.py
message (STATUS "Running ccpp_prebuild.py for CCPP")
execute_process(
COMMAND ccpp/framework/scripts/ccpp_prebuild.py --config=ccpp/config/ccpp_prebuild_config.py --suites=${SUITES} --builddir=${CMAKE_CURRENT_BINARY_DIR}/..
OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out
ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../..
RESULT_VARIABLE return_code
)

# Check return code from CCPP prebuild.py
if(return_code EQUAL 0)
message (STATUS "CCPP prebuild step completed successfully")
Expand Down Expand Up @@ -88,10 +82,6 @@ ELSE(DEFINED ENV{W3NCO_LIBd})
MESSAGE(FATAL_ERROR "The W3NCO_LIBd environment variable must be set to point to your W3NCO installation (part of NCEPLIBS) before building. Stopping...")
ENDIF(DEFINED ENV{W3NCO_LIBd})

if(STATIC)
ADD_DEFINITIONS(-DSTATIC)
endif(STATIC)

SET(CCPP_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/framework)
SET(GFSPHYSICS_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/physics)

Expand Down Expand Up @@ -299,13 +289,9 @@ SET(scm_source_files gmtb_scm.F90
gmtb_scm_output.F90
)

if(STATIC)
ADD_EXECUTABLE(gmtb_scm ${scm_source_files} ccpp_static_api.F90)
TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp ${BACIO_LIB4} ${SP_LIBd} ${W3NCO_LIBd})
else(STATIC)
ADD_EXECUTABLE(gmtb_scm ${scm_source_files})
TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp)
endif(STATIC)
ADD_EXECUTABLE(gmtb_scm ${scm_source_files} ccpp_static_api.F90)
TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp ${BACIO_LIB4} ${SP_LIBd} ${W3NCO_LIBd})


set_target_properties(gmtb_scm PROPERTIES
COMPILE_FLAGS "${CMAKE_Fortran_FLAGS}"
Expand Down
Loading

0 comments on commit cb1dd17

Please sign in to comment.