Skip to content

Commit

Permalink
Replace w3nco library with w3emc (#802)
Browse files Browse the repository at this point in the history
The w3nco library was merged into the w3emc library starting with
version 2.9. Update to use this latest version.

Fixes #801.
  • Loading branch information
GeorgeGayno-NOAA committed Apr 5, 2023
1 parent 5bcbde6 commit 7efbe0f
Show file tree
Hide file tree
Showing 15 changed files with 52 additions and 93 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/Linux_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
g2_version: [3.4.3]
sp_version: [2.3.3]
ip_version: [3.3.3]
w3nco_version: [2.4.0]
w3emc_version: [2.9.3]
nemsio_version: [2.5.0]
sfcio_version: [1.4.0]
sigio_version: [2.3.0]
Expand Down Expand Up @@ -267,28 +267,28 @@ jobs:
make -j2
make install
- name: cache-w3nco
id: cache-w3nco
- name: cache-w3emc
id: cache-w3emc
uses: actions/cache@v2
with:
path: ~/w3nco
key: Linux_versions-w3nco-${{ runner.os }}-${{ matrix.w3nco_version }}
path: ~/w3emc
key: Linux_versions-w3emc-${{ runner.os }}-${{ matrix.w3emc_version }}

- name: checkout-w3nco
if: steps.cache-w3nco.outputs.cache-hit != 'true'
- name: checkout-w3emc
if: steps.cache-w3emc.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-w3nco
path: w3nco
ref: v${{ matrix.w3nco_version }}
repository: NOAA-EMC/NCEPLIBS-w3emc
path: w3emc
ref: v${{ matrix.w3emc_version }}

- name: build-w3nco
if: steps.cache-w3nco.outputs.cache-hit != 'true'
- name: build-w3emc
if: steps.cache-w3emc.outputs.cache-hit != 'true'
run: |
cd w3nco
cd w3emc
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/w3nco
cmake .. -DCMAKE_INSTALL_PREFIX=~/w3emc -DCMAKE_PREFIX_PATH=~/bacio
make -j2
make install
Expand All @@ -313,7 +313,7 @@ jobs:
cd nemsio
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/nemsio -DCMAKE_PREFIX_PATH="~/bacio;~/w3nco" ..
cmake -DCMAKE_INSTALL_PREFIX=~/nemsio -DCMAKE_PREFIX_PATH="~/bacio;~/w3emc" ..
make -j2
make install
Expand Down Expand Up @@ -362,7 +362,7 @@ jobs:
mkdir build
cd build
export ESMFMKFILE=~/esmf/lib/esmf.mk
cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/g2;~/w3nco;~/sfcio;~/sigio;~/nemsio;~/sp;~/ip" ..
cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/g2;~/w3emc;~/sfcio;~/sigio;~/nemsio;~/sp;~/ip" ..
make -j2 VERBOSE=1
- name: test
Expand Down
48 changes: 16 additions & 32 deletions .github/workflows/Linux_versions_ext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
g2_version: [3.4.3]
sp_version: [2.3.3]
ip_version: [3.3.3]
w3nco_version: [2.4.0]
w3emc_version: [2.9.3]
nemsio_version: [2.5.0]
sfcio_version: [1.4.0]
sigio_version: [2.3.0]
Expand Down Expand Up @@ -210,22 +210,6 @@ jobs:
make -j2
make install
# - name: checkout-w3emc
# uses: actions/checkout@v2
# with:
# repository: NOAA-EMC/NCEPLIBS-w3emc
# path: w3emc
# ref: develop

# - name: build-w3emc
# run: |
# cd w3emc
# mkdir build
# cd build
# cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc ..
# make -j2
# make install

# - name: checkout-g2c
# uses: actions/checkout@v2
# with:
Expand Down Expand Up @@ -267,28 +251,28 @@ jobs:
make -j2
make install
- name: cache-w3nco
id: cache-w3nco
- name: cache-w3emc
id: cache-w3emc
uses: actions/cache@v2
with:
path: ~/w3nco
key: Linux_versions-w3nco-${{ runner.os }}-${{ matrix.w3nco_version }}
path: ~/w3emc
key: Linux_versions-w3emc-${{ runner.os }}-${{ matrix.w3emc_version }}

- name: checkout-w3nco
if: steps.cache-w3nco.outputs.cache-hit != 'true'
- name: checkout-w3emc
if: steps.cache-w3emc.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-w3nco
path: w3nco
ref: v${{ matrix.w3nco_version }}
repository: NOAA-EMC/NCEPLIBS-w3emc
path: w3emc
ref: v${{ matrix.w3emc_version }}

- name: build-w3nco
if: steps.cache-w3nco.outputs.cache-hit != 'true'
- name: build-w3emc
if: steps.cache-w3emc.outputs.cache-hit != 'true'
run: |
cd w3nco
cd w3emc
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/w3nco
cmake .. -DCMAKE_INSTALL_PREFIX=~/w3emc -DCMAKE_PREFIX_PATH=~/bacio
make -j2
make install
Expand All @@ -313,7 +297,7 @@ jobs:
cd nemsio
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/nemsio -DCMAKE_PREFIX_PATH="~/bacio;~/w3nco" ..
cmake -DCMAKE_INSTALL_PREFIX=~/nemsio -DCMAKE_PREFIX_PATH="~/bacio;~/w3emc" ..
make -j2
make install
Expand Down Expand Up @@ -362,7 +346,7 @@ jobs:
mkdir build
cd build
export ESMFMKFILE=~/esmf/lib/esmf.mk
cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/g2;~/w3nco;~/sfcio;~/sigio;~/nemsio;~/sp;~/ip" ..
cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/g2;~/w3emc;~/sfcio;~/sigio;~/nemsio;~/sp;~/ip" ..
make -j2 VERBOSE=1
- name: test
Expand Down
29 changes: 2 additions & 27 deletions .github/workflows/developer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:
with:
repository: NOAA-EMC/NCEPLIBS-w3emc
path: w3emc
ref: v2.9.0
ref: v2.9.3

- name: build-w3emc
run: |
Expand Down Expand Up @@ -246,31 +246,6 @@ jobs:
make -j2
make install
- name: cache-w3nco
id: cache-w3nco
uses: actions/cache@v2
with:
path: ~/w3nco
key: developer-w3nco-${{ runner.os }}-2.4.1

- name: checkout-w3nco
if: steps.cache-w3nco.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-w3nco
path: w3nco
ref: v2.4.1

- name: build-w3nco
if: steps.cache-w3nco.outputs.cache-hit != 'true'
run: |
cd w3nco
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/w3nco
make -j2
make install
- name: cache-nemsio
id: cache-nemsio
uses: actions/cache@v2
Expand Down Expand Up @@ -341,7 +316,7 @@ jobs:
doxygen --version
export ESMFMKFILE=~/esmf/lib/esmf.mk
cd build
cmake -DTEST_FILE_DIR=/home/runner/data -DENABLE_DOCS=On -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/g2;~/w3emc;~/w3nco;~/sfcio;~/sigio;~/nemsio;~/sp;~/ip" -DCMAKE_Fortran_FLAGS="-g -fprofile-arcs -ftest-coverage -O0" -DCMAKE_C_FLAGS="-g -fprofile-arcs -ftest-coverage -O0" -DCMAKE_BUILD_TYPE=Debug ..
cmake -DTEST_FILE_DIR=/home/runner/data -DENABLE_DOCS=On -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/g2;~/w3emc;~/sfcio;~/sigio;~/nemsio;~/sp;~/ip" -DCMAKE_Fortran_FLAGS="-g -fprofile-arcs -ftest-coverage -O0" -DCMAKE_C_FLAGS="-g -fprofile-arcs -ftest-coverage -O0" -DCMAKE_BUILD_TYPE=Debug ..
make -j2 VERBOSE=1
- name: test
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if(OPENMP)
endif()

find_package(sfcio 1.4.0 REQUIRED)
find_package(w3nco 2.4.0 REQUIRED)
find_package(w3emc 2.9.0 REQUIRED)
find_package(bacio 2.4.0 REQUIRED)
find_package(nemsio 2.5.0 REQUIRED)
find_package(sigio 2.3.0 REQUIRED)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ UFS_UTILS Code managers: George Gayno, Jeff Beck, Larissa Reames

This package uses the [hpc-stack](https://github.com/NOAA-EMC/hpc-stack) for the following NCEPLIBS packages:
- [NCEPLIBS-sfcio](https://github.com/NOAA-EMC/NCEPLIBS-sfcio)
- [NCEPLIBS-w3nco](https://github.com/NOAA-EMC/NCEPLIBS-w3nco)
- [NCEPLIBS-w3emc](https://github.com/NOAA-EMC/NCEPLIBS-w3emc)
- [NCEPLIBS-bacio](https://github.com/NOAA-EMC/NCEPLIBS-bacio)
- [NCEPLIBS-nemsio](https://github.com/NOAA-EMC/NCEPLIBS-nemsio)
- [NCEPLIBS-sigio](https://github.com/NOAA-EMC/NCEPLIBS-sigio)
Expand Down Expand Up @@ -91,7 +91,7 @@ are called from driver scripts.

The `util` directory contains utility scripts.

The `parm` directory contains variable mapping parameter tables used by
The `parm` directory contains parameter files used by
the chgres_cube program.

The `driver_scripts` directory contains high-level driver scripts to
Expand Down
4 changes: 2 additions & 2 deletions modulefiles/build.hera.gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ load(pathJoin("nemsio", nemsio_ver))
sp_ver=os.getenv("sp_ver") or "2.3.3"
load(pathJoin("sp", sp_ver))

w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
load(pathJoin("w3nco", w3nco_ver))
w3emc_ver=os.getenv("w3emc_ver") or "2.9.2"
load(pathJoin("w3emc", w3emc_ver))

sfcio_ver=os.getenv("sfcio_ver") or "1.4.1"
load(pathJoin("sfcio", sfcio_ver))
Expand Down
4 changes: 2 additions & 2 deletions modulefiles/build.hera.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ load(pathJoin("nemsio", nemsio_ver))
sp_ver=os.getenv("sp_ver") or "2.3.3"
load(pathJoin("sp", sp_ver))

w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
load(pathJoin("w3nco", w3nco_ver))
w3emc_ver=os.getenv("w3emc_ver") or "2.9.2"
load(pathJoin("w3emc", w3emc_ver))

sfcio_ver=os.getenv("sfcio_ver") or "1.4.1"
load(pathJoin("sfcio", sfcio_ver))
Expand Down
4 changes: 2 additions & 2 deletions modulefiles/build.jet.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ load(pathJoin("nccmp", nccmp_ver))
esmf_ver=os.getenv("esmf_ver") or "8.4.0b08"
load(pathJoin("esmf", esmf_ver))

w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
load(pathJoin("w3nco", w3nco_ver))
w3emc_ver=os.getenv("w3emc_ver") or "2.9.2"
load(pathJoin("w3emc", w3emc_ver))

sp_ver=os.getenv("sp_ver") or "2.3.3"
load(pathJoin("sp", sp_ver))
Expand Down
4 changes: 2 additions & 2 deletions modulefiles/build.orion.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ load(pathJoin("nemsio", nemsio_ver))
sp_ver=os.getenv("sp_ver") or "2.3.3"
load(pathJoin("sp", sp_ver))

w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
load(pathJoin("w3nco", w3nco_ver))
w3emc_ver=os.getenv("w3emc_ver") or "2.9.2"
load(pathJoin("w3emc", w3emc_ver))

sfcio_ver=os.getenv("sfcio_ver") or "1.4.1"
load(pathJoin("sfcio", sfcio_ver))
Expand Down
4 changes: 2 additions & 2 deletions modulefiles/build.wcoss2.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ load(pathJoin("bacio", bacio_ver))
sfcio_ver=os.getenv("sfcio_ver") or "1.4.1"
load(pathJoin("sfcio", sfcio_ver))

w3nco_ver=os.getenv("w3nco_ver") or "2.4.1"
load(pathJoin("w3nco", w3nco_ver))
w3emc_ver=os.getenv("w3emc_ver") or "2.9.2"
load(pathJoin("w3emc", w3emc_ver))

nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
load(pathJoin("nemsio", nemsio_ver))
Expand Down
2 changes: 1 addition & 1 deletion sorc/chgres_cube.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ target_link_libraries(
bacio::bacio_4
ip::ip_d
sp::sp_d
w3nco::w3nco_d
w3emc::w3emc_d
esmf
msis2
MPI::MPI_Fortran
Expand Down
2 changes: 1 addition & 1 deletion sorc/emcsfc_ice_blend.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ target_link_libraries(
${exe_name}
bacio::bacio_4
g2::g2_4
w3nco::w3nco_4)
w3emc::w3emc_4)

install(TARGETS ${exe_name})

Expand Down
2 changes: 1 addition & 1 deletion sorc/emcsfc_snow2mdl.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ target_link_libraries(snow2mdl_lib
ip::ip_d
sp::sp_d
bacio::bacio_4
w3nco::w3nco_d)
w3emc::w3emc_d)

if(OpenMP_Fortran_FOUND)
target_link_libraries(${exe_name} PUBLIC OpenMP::OpenMP_Fortran)
Expand Down
2 changes: 1 addition & 1 deletion sorc/global_cycle.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ target_include_directories(global_cycle_lib INTERFACE ${mod_dir})
target_link_libraries(
global_cycle_lib
PUBLIC
w3nco::w3nco_d
w3emc::w3emc_d
bacio::bacio_4
ip::ip_d
sp::sp_d
Expand Down
2 changes: 1 addition & 1 deletion sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ target_link_libraries(
orog_lib
PUBLIC
bacio::bacio_4
w3nco::w3nco_d
w3emc::w3emc_d
ip::ip_d
sp::sp_d
NetCDF::NetCDF_Fortran)
Expand Down

0 comments on commit 7efbe0f

Please sign in to comment.