diff --git a/.gitmodules b/.gitmodules index a6770b7e98..d25e4be5e9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index fc8825e157..e3bf92736c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ############################################################################### @@ -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) @@ -283,7 +263,6 @@ target_link_libraries(NEMS.exe fv3cpl stochastic_physics fms - ${WW3_LIBS} ${NCEP_LIBS} ${ESMF_LIBS} ${NETCDF_LIBS} ${MKL_LIB}) ############################################################################### diff --git a/WW3 b/WW3 index 19f3126c83..3f003c202c 160000 --- a/WW3 +++ b/WW3 @@ -1 +1 @@ -Subproject commit 19f3126c832b26ae4c5b27bca6c1dcc676755602 +Subproject commit 3f003c202cf773f361996fd36bf40c755fed1ef7