forked from ESCOMP/CTSM
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OASIS3-MCT integration initial developments (ESCOMP#9)
Commit summary: * 6ede8a4 Avoid eCLM-Parflow deadlock by building internal MCT and depending on a patched version of OASIS3-MCT * fb58947 Fixed wrong loop index * 4160724 Added oas_sendReceiveMod and other changes * 3040a97 Added water flux QPARFLOW. This is equal to ET loss per soil layer * 3b18c34 Defined OASIS partition type and Parflow coupling fields * eafb1e1 Defined OASIS lnd grid at lnd_init_mct * b8f4a08 Prelim codes for oas_define_partition and oas_define_coupling_fields * dbcdf4e Prelim codes for oas_define_grid() * 3763f08 Scaffold for OASIS define routines * b7d87d0 Added OASIS init and terminate functions
- Loading branch information
Showing
14 changed files
with
400 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Finds the OASIS3-MCT library. | ||
# This will define the following variables: | ||
# | ||
# OASIS3MCT_FOUND - True if the system has the MCT library. | ||
# OASIS3MCT_INCLUDE_DIRS - Include directories needed to use MCT. | ||
# OASIS3MCT_LIBRARIES - Libraries needed to link to MCT. | ||
# OASIS3MCT::OASIS3MCT - A target to use with `target_link_libraries`. | ||
|
||
|
||
find_path(PSMILE_INCLUDE_DIR NAMES mod_oasis.mod PATH_SUFFIXES psmile.MPI1 lib/psmile.MPI1 build/lib/psmile.MPI1) | ||
find_path(MCT_INCLUDE_DIR NAMES oas_mct_mod.mod PATH_SUFFIXES mct lib/mct build/lib/mct) | ||
find_path(SCRIP_INCLUDE_DIR NAMES remap_conservative.mod PATH_SUFFIXES scrip lib/scrip build/lib/scrip) | ||
|
||
find_library(PSMILE_LIB NAMES psmile.MPI1 PATH_SUFFIXES lib) | ||
find_library(MCT_LIB NAMES mct PATH_SUFFIXES lib) | ||
find_library(MPEU_LIB NAMES mpeu PATH_SUFFIXES lib) | ||
find_library(SCRIP_LIB NAMES scrip PATH_SUFFIXES lib) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(OASIS3MCT DEFAULT_MSG | ||
PSMILE_INCLUDE_DIR | ||
MCT_INCLUDE_DIR | ||
SCRIP_INCLUDE_DIR | ||
PSMILE_LIB | ||
MCT_LIB | ||
MPEU_LIB | ||
SCRIP_LIB | ||
) | ||
|
||
if(OASIS3MCT_FOUND) | ||
set(OASIS3MCT_LIBRARIES ${PSMILE_LIB} ${MCT_LIB} ${MPEU_LIB} ${SCRIP_LIB}) | ||
set(OASIS3MCT_INCLUDE_DIRS ${PSMILE_INCLUDE_DIR} ${MCT_INCLUDE_DIR} ${SCRIP_INCLUDE_DIR}) | ||
if(NOT TARGET OASIS3MCT::OASIS3MCT) | ||
add_library(OASIS3MCT::OASIS3MCT INTERFACE IMPORTED) | ||
target_include_directories(OASIS3MCT::OASIS3MCT INTERFACE ${OASIS3MCT_INCLUDE_DIRS}) | ||
target_link_libraries(OASIS3MCT::OASIS3MCT INTERFACE ${OASIS3MCT_LIBRARIES}) | ||
target_link_options(OASIS3MCT::OASIS3MCT INTERFACE "-fopenmp") #TODO: see if this could be moved to SetBuildOptions.cmake | ||
endif() | ||
endif() | ||
|
||
unset(PSMILE_INCLUDE_DIR) | ||
unset(MCT_INCLUDE_DIR) | ||
unset(SCRIP_INCLUDE_DIR) | ||
unset(PSMILE_LIB) | ||
unset(MCT_LIB) | ||
unset(MPEU_LIB) | ||
unset(SCRIP_LIB) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.