Skip to content

Commit

Permalink
Remove dependency on sfcio and use sigio only when nemsio is enabled (N…
Browse files Browse the repository at this point in the history
…OAA-EMC#930)

* Remove sfcio and use sigio only when numsio is enabled

* Remove sfcio from modulefiles/wcoss2.lua

* Compile GFSPOSTSIG.F only if nemsio is enabled
  • Loading branch information
DusanJovic-NOAA committed Apr 19, 2024
1 parent 91921f4 commit 5d6d179
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ endif()
if(BUILD_POSTEXEC)
if(BUILD_WITH_NEMSIO)
find_package(nemsio REQUIRED)
find_package(sigio REQUIRED)
endif()
find_package(sfcio REQUIRED)
find_package(sigio REQUIRED)
find_package(sp REQUIRED)
find_package(w3emc REQUIRED)
if(BUILD_WITH_WRFIO)
Expand Down
1 change: 0 additions & 1 deletion modulefiles/upp_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ local ufs_modules = {
{["w3emc"] = "2.10.0"},
{["nemsio"] = "2.5.4"},
{["sigio"] = "2.3.2"},
{["sfcio"] = "1.4.1"},
{["wrf-io"] = "1.2.0"},
}

Expand Down
2 changes: 0 additions & 2 deletions modulefiles/wcoss2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ load(pathJoin("w3emc", w3emc_ver))

nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
sigio_ver=os.getenv("sigio_ver") or "2.3.2"
sfcio_ver=os.getenv("sfcio_ver") or "1.4.1"
wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0"
load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("sigio", sigio_ver))
load(pathJoin("sfcio", sfcio_ver))
load(pathJoin("wrf_io", wrf_io_ver))

setenv("CC","cc")
Expand Down
8 changes: 3 additions & 5 deletions sorc/ncep_post.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ endif()
list(APPEND LIB_SRC ${GTG_LIB_SRC})

list(APPEND EXE_SRC
GFSPOSTSIG.F
INITPOST.F
INITPOST_NETCDF.f
WRFPOST.F
Expand All @@ -171,6 +170,7 @@ if(BUILD_WITH_NEMSIO)
list(APPEND EXE_SRC
ASSIGNNEMSIOVAR.f
GETNEMSNDSCATTER.f
GFSPOSTSIG.F
INITPOST_GFS_NEMS_MPIIO.f
INITPOST_NEMS.f)
endif()
Expand Down Expand Up @@ -239,9 +239,7 @@ if(BUILD_POSTEXEC)
target_link_libraries(${EXENAME} PRIVATE
${LIBNAME}
w3emc::w3emc_4
sp::sp_4
sfcio::sfcio
sigio::sigio)
sp::sp_4)
set_target_properties(${EXENAME} PROPERTIES LINKER_LANGUAGE Fortran)
if(IFI_FOUND)
target_link_libraries(${EXENAME} PRIVATE IFI)
Expand All @@ -251,7 +249,7 @@ if(BUILD_POSTEXEC)
set_target_properties(nemsio::nemsio PROPERTIES
INTERFACE_LINK_LIBRARIES "w3emc::w3emc_4;bacio::bacio_4")
target_link_libraries(${EXENAME} PRIVATE
nemsio::nemsio)
nemsio::nemsio sigio::sigio)
target_compile_definitions(${EXENAME} PRIVATE BUILD_WITH_NEMSIO)
endif()
if(wrf_io_FOUND)
Expand Down

0 comments on commit 5d6d179

Please sign in to comment.