Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "sorc/post_gtg.fd"]
path = sorc/post_gtg.fd
url = https://github.com/NCAR/UPP_GTG
update = none
[submodule "post_gtg.fd"]
path = sorc/ncep_post.fd/post_gtg.fd
url = https://github.com/NCAR/UPP_GTG
update = none
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
30 changes: 22 additions & 8 deletions sorc/ncep_post.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ list(APPEND LIB_SRC
GPVS.f
grib2_module.f
GRIDSPEC.f
gtg_algo.F90
gtg_compute.F90
gtg_config.F90
gtg_ctlblk.F90
gtg_filter.F90
gtg_indices.F90
gtg_smoothseams.F90
ICAOHEIGHT.f
kinds_mod.F
LFMFLD.f
Expand Down Expand Up @@ -137,6 +130,23 @@ 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(APPEND GTG_LIB_SRC
map_routines.F90)
list(TRANSFORM GTG_LIB_SRC PREPEND post_gtg.fd/)
endif()

list(APPEND LIB_SRC ${GTG_LIB_SRC})

list(APPEND EXE_SRC
ASSIGNNEMSIOVAR.f
GETNEMSNDSCATTER.f
Expand Down Expand Up @@ -200,10 +210,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