From 51ad51ff53060a0a4235fd7841d8c786026a7063 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 7 Oct 2024 07:54:53 -0600 Subject: [PATCH 1/2] Update .gitmodules and submodule pointer for ccpp-physics for code review and testing --- .gitmodules | 6 ++++-- ccpp/physics | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index dc0798c32..0b9942ec3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,8 +4,10 @@ branch = main [submodule "ccpp-physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = main + #url = https://github.com/NCAR/ccpp-physics + #branch = main + url = https://github.com/climbfuji/ccpp-physics + branch = feature/ip5 [submodule "CMakeModules"] path = CMakeModules url = https://github.com/noaa-emc/CMakeModules diff --git a/ccpp/physics b/ccpp/physics index f0fbb34a3..be05d12e0 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f0fbb34a350acac90e71de6e51351f78174eb8de +Subproject commit be05d12e00fc51722084ad75c044e19d25c0b6d0 From eca10219581f3239b5c460447d7b745f61e22304 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 7 Oct 2024 07:55:37 -0600 Subject: [PATCH 2/2] Use ip@5: if available instead of sp if available --- scm/src/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scm/src/CMakeLists.txt b/scm/src/CMakeLists.txt index 4938e1b57..eb1871f75 100644 --- a/scm/src/CMakeLists.txt +++ b/scm/src/CMakeLists.txt @@ -69,7 +69,11 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/../../CMakeModule find_package(NetCDF REQUIRED COMPONENTS C Fortran) find_package(bacio REQUIRED) -find_package(sp REQUIRED) +# Use ip@5 or later if available, fall back to sp +find_package(ip 5) +if(NOT ip_FOUND) + find_package(sp REQUIRED) +endif() find_package(w3emc REQUIRED) find_package(MPI REQUIRED) if(NOT MPI_Fortran_HAVE_F08_MODULE) @@ -302,7 +306,11 @@ if(OPENMP) endif() TARGET_LINK_LIBRARIES(scm NetCDF::NetCDF_Fortran) TARGET_LINK_LIBRARIES(scm bacio::bacio_4) -TARGET_LINK_LIBRARIES(scm sp::sp_d) +if(ip_FOUND) + target_link_libraries(scm ip::ip_d) +else() + target_link_libraries(scm sp::sp_d) +endif() TARGET_LINK_LIBRARIES(scm w3emc::w3emc_d) TARGET_LINK_LIBRARIES(scm ccpp_framework) TARGET_LINK_LIBRARIES(scm ccpp_physics)