Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# USE CAUTION WHEN ADDING WILDCARDS, as some builds use different filename #
# conventions than others #
##############################################################################
build/
install/
build*/
install*/

*.[aox]
*.mod
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
option(OPENMP "use OpenMP threading" ON)
option(BUILD_POSTEXEC "Build NCEPpost executable" ON)
option(BUILD_WITH_WRFIO "Build NCEPpost with WRF-IO library" OFF)
option(BUILD_WITH_GTG "Build NCEPpost with NCAR/GTG" OFF)
option(ENABLE_DOCS "Enable generation of doxygen-based documentation." OFF)

if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
Expand Down Expand Up @@ -47,7 +48,9 @@ find_package(bacio REQUIRED)
find_package(crtm REQUIRED)
find_package(g2 REQUIRED)
find_package(g2tmpl REQUIRED)
find_package(ip REQUIRED)
if(BUILD_WITH_GTG)
find_package(ip REQUIRED)
endif()

if(BUILD_POSTEXEC)
find_package(nemsio REQUIRED)
Expand Down
20 changes: 19 additions & 1 deletion sorc/ncep_post.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,20 @@ list(APPEND LIB_SRC
xml_perl_data.f
ZENSUN.f)

list(APPEND GTG_LIB_SRC
gtg_algo.F90
gtg_compute.F90
gtg_config.F90
gtg_ctlblk.F90
gtg_filter.F90
gtg_indices.F90
gtg_smoothseams.F90)

if(BUILD_WITH_GTG)
list(TRANSFORM GTG_LIB_SRC PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/../post_gtg.fd/)
list(APPEND LIB_SRC ${GTG_LIB_SRC})
endif()

list(APPEND EXE_SRC
ASSIGNNEMSIOVAR.f
GETNEMSNDSCATTER.f
Expand Down Expand Up @@ -200,10 +214,14 @@ target_link_libraries(${LIBNAME} PUBLIC
crtm::crtm
g2::g2_4
g2tmpl::g2tmpl
ip::ip_4
MPI::MPI_Fortran
NetCDF::NetCDF_Fortran)

if(BUILD_WITH_GTG)
target_link_libraries(${LIBNAME} PUBLIC
ip::ip_4)
endif()

if(OpenMP_Fortran_FOUND)
target_link_libraries(${LIBNAME} PUBLIC OpenMP::OpenMP_Fortran)
endif()
Expand Down