Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
branch = master
[submodule "WW3"]
path = WW3
url = https://github.com/NOAA-EMC/WW3
branch = develop
url = https://github.com/DusanJovic-NOAA/WW3
branch = ww3_nemslibonly_cmake
[submodule "stochastic_physics"]
path = stochastic_physics
url = https://github.com/noaa-psd/stochastic_physics
Expand Down
31 changes: 5 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,28 +198,6 @@ target_include_directories(fms PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/FMS/mod)
###############################################################################
add_subdirectory(FV3)

###############################################################################
### WW3
###############################################################################
if(WW3)
set(WW3_COMP ${CMAKE_Platform})
if(${CMAKE_Platform} STREQUAL "hera.intel")
set(WW3_COMP "hera")
endif()
if(${CMAKE_Platform} STREQUAL "orion.intel")
set(WW3_COMP "orion")
endif()
message("Build WW3:")
message(" run: ${CMAKE_BUILD_TOOL} WW3_PARCOMPN=4 WW3_COMP=${WW3_COMP} ww3_nems")
message(" in: ${PROJECT_SOURCE_DIR}/WW3/model/esmf")
message("")

add_custom_target(ww3_nems
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/WW3/model/esmf
COMMAND ${CMAKE_BUILD_TOOL} WW3_PARCOMPN=4 WW3_COMP=${WW3_COMP} ww3_nems > make.log 2>&1
)
endif()

###############################################################################
### NEMS
###############################################################################
Expand Down Expand Up @@ -260,11 +238,13 @@ target_include_directories(NEMS.exe PRIVATE ${PROJECT_BINARY_DIR}/NEMS/src)

set_target_properties(NEMS.exe PROPERTIES Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/NEMS/mod)

###############################################################################
### WW3
###############################################################################
if(WW3)
add_subdirectory(WW3/model/esmf)
target_compile_definitions(NEMS.exe PRIVATE -DFRONT_WW3=WMESMFMD)
set_target_properties(NEMS.exe PROPERTIES Fortran_MODULE_DIRECTORY ${PROJECT_SOURCE_DIR}/WW3/model/mod)
set(WW3_LIBS ${PROJECT_SOURCE_DIR}/WW3/model/obj/libww3_multi_esmf.a)
add_dependencies(NEMS.exe ww3_nems)
target_link_libraries(NEMS.exe ww3_multi_esmf)
endif()

if(CCPP)
Expand All @@ -283,7 +263,6 @@ target_link_libraries(NEMS.exe
fv3cpl
stochastic_physics
fms
${WW3_LIBS}
${NCEP_LIBS} ${ESMF_LIBS} ${NETCDF_LIBS} ${MKL_LIB})

###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion WW3