Skip to content
Merged
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 .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: 21 additions & 9 deletions sorc/ncep_post.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,12 @@ 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
LFMFLD_GFS.f
LOOKUP.f
machine.f
map_routines.F90
MAPSSLP.f
MASKS_mod.f
MDL2AGL.f
Expand Down Expand Up @@ -137,6 +129,22 @@ 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
map_routines.F90)

if(BUILD_WITH_GTG)
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 +208,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