Skip to content

Commit

Permalink
GitHub Issue NOAA-EMC#431. Replace ncdiag submodule with hpc-stack nc…
Browse files Browse the repository at this point in the history
…diag/1.0.0.
  • Loading branch information
MichaelLueken committed Jul 13, 2022
1 parent 1a3fb13 commit 8f9e20c
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 26 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "fix"]
path = fix
url = gerrit:GSI-fix
[submodule "ncdiag"]
path = src/ncdiag
url = https://github.com/NOAA-EMC/GSI-ncdiag
branch = v1.0.0
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ endif()
# User options
option(OPENMP "Enable OpenMP Threading" OFF)
option(ENABLE_MKL "Use MKL for LAPACK implementation (if available)" ON)
option(BUILD_NCDIAG "Build GSI NetCDF Diagnostic Library" ON)
option(BUILD_GSDCLOUD "Build GSD Cloud Analysis Library" OFF)
option(BUILD_GSI "Build GSI" ON)
option(BUILD_ENKF "Build EnKF" ON)
Expand All @@ -37,7 +36,6 @@ option(BUILD_REG_TESTING "Build the Regression Testing Suite" OFF)
# Echo user options
message(STATUS "OPENMP ................. ${OPENMP}")
message(STATUS "ENABLE_MKL ............. ${ENABLE_MKL}")
message(STATUS "BUILD_NCDIAG ........... ${BUILD_NCDIAG}")
message(STATUS "BUILD_GSDCLOUD ......... ${BUILD_GSDCLOUD}")
message(STATUS "BUILD_GSI .............. ${BUILD_GSI}")
message(STATUS "BUILD_ENKF ............. ${BUILD_ENKF}")
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ NCEP Libraries (NCEPLibs) compiled with the same compiler and MPI library (where
| SFCIO | 1.4.1 and above |
| NEMSIO | 2.5.2 and above |
| NCIO | 1.0.0 and above |
| NCDIAG | 1.0.0 and above |
| WRF_IO | 1.2.0 and above |

### Building the GSI
Expand Down Expand Up @@ -77,7 +78,6 @@ CMake allows for various options that can be specified on the command line via `
|---------------------|--------------------------------------------------------|
| `OPENMP` | Enable OpenMP Threading (`OFF`) |
| `ENABLE_MKL` | Use MKL (`ON`), If not found use LAPACK |
| `BUILD_NCDIAG` | Build GSI NetCDF Diagnostics Library (`ON`) |
| `BUILD_GSDCLOUD` | Build GSD Cloud Library (`OFF`) |
| `BUILD_GSI` | Build GSI library and executable (`ON`) |
| `BUILD_ENKF` | Build EnKF library and executable (`ON`) |
Expand Down
2 changes: 2 additions & 0 deletions modulefiles/gsi_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ local nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
local wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0"
local ncio_ver=os.getenv("ncio_ver") or "1.1.2"
local crtm_ver=os.getenv("crtm_ver") or "2.3.0"
local ncdiag_ver=os.getenv("ncdiag_ver") or "1.0.0"

load(pathJoin("netcdf", netcdf_ver))

Expand All @@ -29,4 +30,5 @@ load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("wrf_io", wrf_io_ver))
load(pathJoin("ncio", ncio_ver))
load(pathJoin("crtm", crtm_ver))
load(pathJoin("ncdiag",ncdiag_ver))

2 changes: 2 additions & 0 deletions modulefiles/gsi_wcoss2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ load(pathJoin("prod_util", prod_util_ver))

load("gsi_common")
unload("ncio")
unload("ncdiag")

pushenv("HPC_OPT", "/apps/ops/para/libs")
prepend_path("MODULEPATH", "/apps/ops/para/libs/modulefiles/compiler/intel/19.1.3.304")
prepend_path("MODULEPATH", "/apps/ops/para/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.7")

load("ncio/1.1.2")
load("ncdiag/1.0.0")

whatis("Description: GSI environment on WCOSS2")
5 changes: 0 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ if(BUILD_GSDCLOUD)
add_subdirectory(GSD)
endif()

if(BUILD_NCDIAG)
message(STATUS "Building GSI NetCDF diagnostic library")
add_subdirectory(ncdiag)
endif()

if(BUILD_GSI)
message(STATUS "Building GSI")
add_subdirectory(gsi)
Expand Down
2 changes: 1 addition & 1 deletion src/enkf/cmake/PackageConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-config-version.cmake")
include(CMakeFindDependencyMacro)

# Get the ENKF_MODE attribute
-set(ENKF_MODE @ENKF_MODE@)
set(ENKF_MODE @ENKF_MODE@)

find_dependency(MPI)
find_dependency(NetCDF COMPONENTS Fortran)
Expand Down
9 changes: 1 addition & 8 deletions src/gsi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ find_package(sigio REQUIRED)
find_package(sfcio REQUIRED)
find_package(nemsio REQUIRED)
find_package(ncio REQUIRED)
find_package(ncdiag REQUIRED)
find_package(sp REQUIRED)
find_package(ip REQUIRED)
find_package(w3emc REQUIRED)
Expand All @@ -79,11 +80,6 @@ endif()
# See https://github.com/NOAA-EMC/NCEPLIBS-nemsio/pull/22
target_link_libraries(nemsio::nemsio INTERFACE w3emc::w3emc_d bacio::bacio_4)

# NetCDF Diagnostic IO library dependency
if(NOT TARGET ncdiag)
find_package(ncdiag REQUIRED)
endif()

# GSD Cloud Analysis library dependency
if(USE_GSDCLOUD)
if(NOT TARGET gsdcloud)
Expand Down Expand Up @@ -155,9 +151,6 @@ target_link_libraries(gsi_fortran_obj PUBLIC crtm::crtm)
if(GSI_MODE MATCHES "Regional")
target_link_libraries(gsi_fortran_obj PUBLIC wrf_io::wrf_io)
endif()
if(TARGET ncdiag)
add_dependencies(gsi_fortran_obj ncdiag)
endif()
target_link_libraries(gsi_fortran_obj PUBLIC ncdiag::ncdiag)
if(USE_GSDCLOUD)
if(TARGET gsdcloud)
Expand Down
5 changes: 1 addition & 4 deletions src/gsi/cmake/PackageConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ find_dependency(sigio REQUIRED)
find_dependency(sfcio REQUIRED)
find_dependency(nemsio REQUIRED)
find_dependency(ncio REQUIRED)
find_dependency(ncdiag REQUIRED)
find_dependency(sp REQUIRED)
find_dependency(ip REQUIRED)
find_dependency(w3emc REQUIRED)
Expand All @@ -45,10 +46,6 @@ if(${GSI_MODE} MATCHES "Regional")
find_dependency(wrf_io REQUIRED)
endif()

# This gives more trouble since GSIApp is a nested project of projects
# and targets are built in the GSIApp project
#find_dependency(ncdiag REQUIRED)

# Get the build type from library target
get_target_property(@PROJECT_NAME@_BUILD_TYPES @PROJECT_NAME@::@PROJECT_NAME@ IMPORTED_CONFIGURATIONS)

Expand Down
1 change: 0 additions & 1 deletion src/ncdiag
Submodule ncdiag deleted from ad714a

0 comments on commit 8f9e20c

Please sign in to comment.