From 7efbe0fd2dd373ae54d6c2954ebd484e0a3aab48 Mon Sep 17 00:00:00 2001 From: GeorgeGayno-NOAA <52789452+GeorgeGayno-NOAA@users.noreply.github.com> Date: Wed, 5 Apr 2023 11:34:55 -0400 Subject: [PATCH] Replace w3nco library with w3emc (#802) The w3nco library was merged into the w3emc library starting with version 2.9. Update to use this latest version. Fixes #801. --- .github/workflows/Linux_versions.yml | 32 ++++++------- .github/workflows/Linux_versions_ext.yml | 48 +++++++------------ .github/workflows/developer.yml | 29 +---------- CMakeLists.txt | 2 +- README.md | 4 +- modulefiles/build.hera.gnu.lua | 4 +- modulefiles/build.hera.intel.lua | 4 +- modulefiles/build.jet.intel.lua | 4 +- modulefiles/build.orion.intel.lua | 4 +- modulefiles/build.wcoss2.intel.lua | 4 +- sorc/chgres_cube.fd/CMakeLists.txt | 2 +- sorc/emcsfc_ice_blend.fd/CMakeLists.txt | 2 +- sorc/emcsfc_snow2mdl.fd/CMakeLists.txt | 2 +- sorc/global_cycle.fd/CMakeLists.txt | 2 +- .../orog_mask_tools.fd/orog.fd/CMakeLists.txt | 2 +- 15 files changed, 52 insertions(+), 93 deletions(-) diff --git a/.github/workflows/Linux_versions.yml b/.github/workflows/Linux_versions.yml index a67abe615..03baff39d 100644 --- a/.github/workflows/Linux_versions.yml +++ b/.github/workflows/Linux_versions.yml @@ -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] @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/Linux_versions_ext.yml b/.github/workflows/Linux_versions_ext.yml index 98dac4d95..954458e2a 100644 --- a/.github/workflows/Linux_versions_ext.yml +++ b/.github/workflows/Linux_versions_ext.yml @@ -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] @@ -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: @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index eea2601a6..14544b08c 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -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: | @@ -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 @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 29aa7b012..4278cc9f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/README.md b/README.md index c01fce21d..65661d60a 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 diff --git a/modulefiles/build.hera.gnu.lua b/modulefiles/build.hera.gnu.lua index daeeb9cbc..33b8e6875 100644 --- a/modulefiles/build.hera.gnu.lua +++ b/modulefiles/build.hera.gnu.lua @@ -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)) diff --git a/modulefiles/build.hera.intel.lua b/modulefiles/build.hera.intel.lua index a3c823ad6..a3734b6ce 100644 --- a/modulefiles/build.hera.intel.lua +++ b/modulefiles/build.hera.intel.lua @@ -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)) diff --git a/modulefiles/build.jet.intel.lua b/modulefiles/build.jet.intel.lua index d6a0a877b..e6ce6a54a 100644 --- a/modulefiles/build.jet.intel.lua +++ b/modulefiles/build.jet.intel.lua @@ -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)) diff --git a/modulefiles/build.orion.intel.lua b/modulefiles/build.orion.intel.lua index 553069024..10ca1a654 100644 --- a/modulefiles/build.orion.intel.lua +++ b/modulefiles/build.orion.intel.lua @@ -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)) diff --git a/modulefiles/build.wcoss2.intel.lua b/modulefiles/build.wcoss2.intel.lua index af6066c0d..c683ec7ae 100644 --- a/modulefiles/build.wcoss2.intel.lua +++ b/modulefiles/build.wcoss2.intel.lua @@ -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)) diff --git a/sorc/chgres_cube.fd/CMakeLists.txt b/sorc/chgres_cube.fd/CMakeLists.txt index c10a8bbd7..e7e3c49cd 100644 --- a/sorc/chgres_cube.fd/CMakeLists.txt +++ b/sorc/chgres_cube.fd/CMakeLists.txt @@ -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 diff --git a/sorc/emcsfc_ice_blend.fd/CMakeLists.txt b/sorc/emcsfc_ice_blend.fd/CMakeLists.txt index 79568e84a..d24a9fc64 100644 --- a/sorc/emcsfc_ice_blend.fd/CMakeLists.txt +++ b/sorc/emcsfc_ice_blend.fd/CMakeLists.txt @@ -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}) diff --git a/sorc/emcsfc_snow2mdl.fd/CMakeLists.txt b/sorc/emcsfc_snow2mdl.fd/CMakeLists.txt index 057422d83..081fa6912 100644 --- a/sorc/emcsfc_snow2mdl.fd/CMakeLists.txt +++ b/sorc/emcsfc_snow2mdl.fd/CMakeLists.txt @@ -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) diff --git a/sorc/global_cycle.fd/CMakeLists.txt b/sorc/global_cycle.fd/CMakeLists.txt index ede7ada35..0f73d4ab6 100644 --- a/sorc/global_cycle.fd/CMakeLists.txt +++ b/sorc/global_cycle.fd/CMakeLists.txt @@ -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 diff --git a/sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt b/sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt index 7cede544b..79fefcefb 100644 --- a/sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt +++ b/sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt @@ -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)