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

Remove IPD steps 3 and 5 #224

Merged
merged 27 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b706c9b
Implementation of CCPP timestep_init and timestep_final phases in fv3…
climbfuji Dec 18, 2020
a72b94a
Update .gitmodules and submodule pointer for GFDL_atmos_cubed_sphere,…
climbfuji Dec 18, 2020
98f5cba
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into tim…
climbfuji Dec 18, 2020
3cdfa3f
Update submodule pointer for ccpp-physics
climbfuji Dec 18, 2020
1e92259
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into tim…
climbfuji Dec 28, 2020
c249dfb
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into tim…
climbfuji Dec 29, 2020
9e59de2
Use proper index variable for surface wind enhancement due to convect…
climbfuji Dec 29, 2020
dacd56a
Add code to reset diagnostic buckets to atmos_model.F90
climbfuji Dec 30, 2020
9fc029b
Update submodule pointer for ccpp-physics
climbfuji Dec 30, 2020
4783ed1
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into tim…
climbfuji Dec 31, 2020
a86790e
Move code to clear diagnostic buckets using GFS DDT bound procedures …
climbfuji Jan 4, 2021
f3c3bdd
Update .gitmodules and submodule pointers for GFDL_atmos_cubed_sphere…
climbfuji Jan 6, 2021
8866fa8
First step of cleanup process: remove CCPP preprocessor directives, r…
climbfuji Jan 6, 2021
f84805d
Delete IPD source code
climbfuji Jan 7, 2021
9e0dded
Replace IPD DDTs with GFS DDTs
climbfuji Jan 7, 2021
325644c
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into rem…
climbfuji Jan 7, 2021
98f5142
Bugfix in atmos_model.F90; add missing call to GFS_externaldiag_populate
climbfuji Jan 7, 2021
1918b65
Move contents of gfsphysics/{CCPP_layer,GFS_layer} to ccpp/{data,driv…
climbfuji Jan 8, 2021
eb680f2
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into rem…
climbfuji Jan 8, 2021
a7b9b03
Rename module GFS_driver to GFS_init
climbfuji Jan 8, 2021
d63fdcd
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into rem…
climbfuji Jan 12, 2021
e62a882
Fix indentation in ccpp/data/CMakeLists.txt and ccpp/driver/CMakeList…
climbfuji Jan 12, 2021
7111b4b
Add logic to set DYN32 depending on 32BIT setting
climbfuji Jan 12, 2021
52a4652
Pass preprocessor directive GFS_TYPES to dycore to enable use of GFS …
climbfuji Jan 13, 2021
418be69
Update submodule pointer for GFDL_atmos_cubed_sphere
climbfuji Jan 13, 2021
f84a220
Compile GFS_diagnostics.F90 without optimization, this leads to out o…
climbfuji Jan 13, 2021
19638f8
Revert change to .gitmodules and update submodule pointers for GFDL_a…
climbfuji Jan 14, 2021
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
114 changes: 51 additions & 63 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,28 @@
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()
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} ${_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)
# Check return code from ccpp_prebuild.py
if(NOT RC EQUAL 0)
message(FATAL_ERROR "An error occured while running ccpp_prebuild.py, check ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.{out,err}")
endif()
# this should not be necessary; including CCPP_*.cmake here and passing
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
# SCHEMES, CAPS and TYPEDEFS via environment variables to CCPP build.
# CCPP should be able to directly include those three .cmake files.
include(${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics/CCPP_SCHEMES.cmake)
include(${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics/CCPP_CAPS.cmake)
include(${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics/CCPP_TYPEDEFS.cmake)
set(ENV{CCPP_SCHEMES} "${SCHEMES}")
set(ENV{CCPP_CAPS} "${CAPS}")
set(ENV{CCPP_TYPEDEFS} "${TYPEDEFS}")

# Call to CCPP code generator
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()
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} ${_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)
# Check return code from ccpp_prebuild.py
if(NOT RC EQUAL 0)
message(FATAL_ERROR "An error occured while running ccpp_prebuild.py, check ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.{out,err}")
endif()

add_subdirectory(cpl)
add_subdirectory(gfsphysics)
add_subdirectory(ipd)
add_subdirectory(io)

###############################################################################
Expand Down Expand Up @@ -82,15 +69,12 @@ list(APPEND _fv3dycore_srcs
atmos_cubed_sphere/driver/fvGFS/fv_nggps_diag.F90
atmos_cubed_sphere/driver/fvGFS/atmosphere.F90)

if(NOT CCPP)
list(APPEND _fv3dycore_srcs atmos_cubed_sphere/model/fv_cmp.F90)
endif()

add_library(fv3dycore ${_fv3dycore_srcs})

list(APPEND _fv3dycore_defs_private SPMD
use_WRTCOMP
GFS_PHYS
GFS_TYPES
USE_GFSL63
MOIST_CAPPA
USE_COND)
Expand All @@ -100,13 +84,14 @@ if(MULTI_GASES)
endif()

if(32BIT)
set(DYN32 ON CACHE BOOL "Enable support for 32bit fast physics in CCPP")
list(APPEND _fv3dycore_defs_private OVERLOAD_R4
OVERLOAD_R8)
else()
set(DYN32 OFF CACHE BOOL "Disable support for 32bit fast physics in CCPP")
endif()

if(CCPP)
list(APPEND _fv3dycore_defs_private CCPP)
endif()
list(APPEND _fv3dycore_defs_private CCPP)

if(OpenMP_Fortran_FOUND)
list(APPEND _fv3dycore_defs_private OPENMP)
Expand All @@ -118,32 +103,35 @@ set_property(SOURCE atmos_cubed_sphere/model/fv_mapz.F90 APPEND_STRING PROPERTY
set_target_properties(fv3dycore PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)

target_compile_definitions(fv3dycore PRIVATE "${_fv3dycore_defs_private}")
target_include_directories(fv3dycore PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/atmos_cubed_sphere)
target_include_directories(fv3dycore PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/atmos_cubed_sphere
${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver/mod)
target_include_directories(fv3dycore INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)

target_link_libraries(fv3dycore PUBLIC fms
gfsphysics
ipd
esmf)
if(OpenMP_Fortran_FOUND)
target_link_libraries(fv3dycore PUBLIC OpenMP::OpenMP_Fortran)
endif()

###############################################################################
### ccpp
### CCPP
###############################################################################
if(CCPP)
add_subdirectory(ccpp)
add_subdirectory(ccpp/driver)
add_dependencies(gfsphysics ccpp ccppphys)
add_dependencies(ccppdriver ccpp ccppphys)
add_dependencies(ccppphys ccpp)
target_include_directories(fv3dycore PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/framework/src
${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver)
target_link_libraries(ccppphys PUBLIC sp::sp_d
w3nco::w3nco_d)
endif()

add_subdirectory(ccpp)
add_subdirectory(ccpp/data)
add_subdirectory(ccpp/driver)
add_dependencies(ccppphys ccpp)
add_dependencies(gfsphysics ccpp ccppphys)
add_dependencies(ccppdata ccpp ccppphys gfsphysics)
add_dependencies(ccppdriver ccpp ccppphys ccppdata gfsphysics)
add_dependencies(fv3dycore ccppdriver ccpp ccppphys ccppdata gfsphysics)
target_include_directories(fv3dycore PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/framework/src
${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics
${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver)
target_link_libraries(ccppphys PUBLIC sp::sp_d
w3nco::w3nco_d)

###############################################################################
### stochastic_physics
Expand All @@ -170,13 +158,13 @@ set_target_properties(fv3atm PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT
target_include_directories(fv3atm INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)

if(CCPP)
list(APPEND _fv3atm_defs_private CCPP)
target_include_directories(fv3atm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver/mod)
set(CCPP_LIBRARIES ccppdriver ccppphys ccpp)
add_dependencies(fv3atm ccppdriver ccppphys ccpp)
target_link_libraries(fv3atm PUBLIC ccppdriver ccppphys ccpp)
endif()
list(APPEND _fv3atm_defs_private CCPP)
target_include_directories(fv3atm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics
${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver/mod)
set(CCPP_LIBRARIES ccppdriver ccppdata ccppphys ccpp)
add_dependencies(fv3atm ccppdriver ccppdata ccppphys ccpp)
target_link_libraries(fv3atm PUBLIC ccppdriver ccppdata ccppphys ccpp)

target_include_directories(fv3atm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/stochastic_physics)
target_compile_definitions(fv3atm PRIVATE "${_fv3atm_defs_private}")

Expand Down Expand Up @@ -205,7 +193,7 @@ endif()
### Install
###############################################################################
install(
TARGETS fv3atm fv3dycore io ipd gfsphysics ${CCPP_LIBRARIES} cpl stochastic_physics stochastic_physics_wrapper
TARGETS fv3atm fv3dycore io gfsphysics ${CCPP_LIBRARIES} cpl stochastic_physics stochastic_physics_wrapper
EXPORT fv3atm-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
Expand Down
Loading