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

Update gsl/develop from develop 2021/02/22 #73

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a898cca
Fix for updating stochastic physics on separate time-step. (#199)
pjpegion Nov 30, 2020
d10e450
Bug fixes in (1) running with frac_grid=T and GFDL MP and (2) restart…
ShanSunNOAA Dec 2, 2020
babf6dc
jedi-ufs with ccpp-physics submodule update (contains #201) (#211)
climbfuji Dec 11, 2020
3aad398
Final-final GFS v16 updates / restart reproducibility bugfixes (#212)
climbfuji Dec 14, 2020
f5a6d1a
RRTMGP coupling to Thompson MP in ccpp-physics (#208)
dustinswales Dec 17, 2020
377c7e5
Minor bug fixes to CCPP UGWP (update submodule pointer for ccpp-physi…
climbfuji Dec 18, 2020
846d257
Remove IPD (step 1) (#215)
climbfuji Dec 29, 2020
9c73d96
Update submodule pointers for ccpp-framework (ccpp_prebuild bugfix) a…
climbfuji Dec 30, 2020
45618a9
Remove unnecessary SIMD instruction sets from ccpp/CMakeLists.txt (#220)
climbfuji Jan 7, 2021
ae4c8bf
Implementation of CCPP timestep_init and timestep_final phases (#217)
climbfuji Jan 8, 2021
c697af2
add radiation_clouds_thompson_dependency in ccpp physics (#225)
junwang-noaa Jan 12, 2021
e763de0
Remove IPD steps 3 and 5 (#224)
climbfuji Jan 14, 2021
a4cf6db
Add CCPP rrtmgp fix (#237)
junwang-noaa Jan 20, 2021
34c326c
Update develop from NOAA-GSL: RUC ice, MYNN sfclay, stochastic land p…
climbfuji Jan 22, 2021
307f001
Dycore change to add an option to zero-gradient BC for height advecti…
XiaqiongZhou-NOAA Jan 25, 2021
c2fc3de
Remove gnumake build remnants, change v16beta to v16 (#234)
climbfuji Jan 29, 2021
9412b85
Move LSM vegetation lookup tables into CCPP, clean up RUC snow cover …
climbfuji Feb 6, 2021
d235fb8
UGWP v0 v1 combined (#241)
climbfuji Feb 16, 2021
70e55f2
SDF for GFSv16 with Thompson (#238)
XiaSun-Atmos Feb 19, 2021
9a0285d
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into upd…
climbfuji Feb 22, 2021
f8765f3
Update .gitmodules for code review and testing
climbfuji Feb 22, 2021
33fb4f0
Revert change to .gitmodules and update submodule pointers for ccpp-f…
climbfuji Feb 22, 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
# 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 PRIVATE 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