diff --git a/modulefiles/gfsutils_common.lua b/modulefiles/gfsutils_common.lua index 0c36dbbd..9708ae8d 100644 --- a/modulefiles/gfsutils_common.lua +++ b/modulefiles/gfsutils_common.lua @@ -2,15 +2,16 @@ help([[ Load common modules to build GFS utilities on all machines ]]) -local netcdf_ver=os.getenv("netcdf_ver") or "4.7.4" +local netcdf_c_ver=os.getenv("netcdf_c_ver") or "4.9.2" +local netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0" local bufr_ver=os.getenv("bufr_ver") or "11.7.0" local bacio_ver=os.getenv("bacio_ver") or "2.4.1" -local w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +local w3emc_ver=os.getenv("w3emc_ver") or "2.10.0" local sp_ver=os.getenv("sp_ver") or "2.3.3" -local ip_ver=os.getenv("ip_ver") or "3.3.3" +local ip_ver=os.getenv("ip_ver") or "4.3.0" local sigio_ver=os.getenv("sigio_ver") or "2.3.2" -local nemsio_ver=os.getenv("nemsio_ver") or "2.5.2" +local nemsio_ver=os.getenv("nemsio_ver") or "2.5.4" local nemsiogfs_ver=os.getenv("nemsiogfs_ver") or "2.5.3" local wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0" local ncio_ver=os.getenv("ncio_ver") or "1.1.2" @@ -18,8 +19,12 @@ local g2_ver=os.getenv("g2_ver") or "3.4.5" local landsfcutil_ver=os.getenv("landsfcutil_ver") or "2.4.1" local gempak_ver=os.getenv("gempak_ver") or "7.14.1" local wgrib2_ver=os.getenv("wgrib2_ver") or "2.0.8" +local libpng_ver=os.getenv("libpng_ver") or "1.6.37" -load(pathJoin("netcdf", netcdf_ver)) +load(pathJoin("libpng", libpng_ver)) + +load(pathJoin("netcdf-c", netcdf_c_ver)) +load(pathJoin("netcdf-fortran", netcdf_fortran_ver)) load(pathJoin("bufr", bufr_ver)) load(pathJoin("bacio", bacio_ver)) @@ -29,7 +34,7 @@ load(pathJoin("ip", ip_ver)) load(pathJoin("sigio", sigio_ver)) load(pathJoin("sfcio", sfcio_ver)) load(pathJoin("nemsio", nemsio_ver)) -load(pathJoin("wrf_io", wrf_io_ver)) +load(pathJoin("wrf-io", wrf_io_ver)) load(pathJoin("ncio", ncio_ver)) load(pathJoin("g2", g2_ver)) load(pathJoin("landsfcutil", landsfcutil_ver)) diff --git a/modulefiles/gfsutils_hera.intel.lua b/modulefiles/gfsutils_hera.intel.lua index 37699aea..e2058d1f 100644 --- a/modulefiles/gfsutils_hera.intel.lua +++ b/modulefiles/gfsutils_hera.intel.lua @@ -2,26 +2,16 @@ help([[ Build environment for GFS utilities on Hera ]]) -prepend_path("MODULEPATH", "/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack") +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") -local hpc_ver=os.getenv("hpc_ver") or "1.1.0" -local hpc_intel_ver=os.getenv("hpc_intel_ver") or "18.0.5.274" -local hpc_impi_ver=os.getenv("hpc_impi_ver") or "2018.0.4" -local cmake_ver=os.getenv("cmake_ver") or "3.20.1" +local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0" +local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" +local cmake_ver=os.getenv("cmake_ver") or "3.23.1" -local jasper_ver=os.getenv("jasper_ver") or "2.0.25" -local zlib_ver=os.getenv("zlib_ver") or "1.2.11" -local libpng_ver=os.getenv("libpng_ver") or "1.6.35" - -load(pathJoin("hpc", hpc_ver)) -load(pathJoin("hpc-intel", hpc_intel_ver)) -load(pathJoin("hpc-impi", hpc_impi_ver)) +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) load(pathJoin("cmake", cmake_ver)) -load(pathJoin("jasper", jasper_ver)) -load(pathJoin("zlib", zlib_ver)) -load(pathJoin("png", libpng_ver)) - load("gfsutils_common") whatis("Description: GFS utilities environment on Hera with Intel Compilers") diff --git a/modulefiles/gfsutils_jet.lua b/modulefiles/gfsutils_jet.lua index 28a0f1e4..6b0b7504 100644 --- a/modulefiles/gfsutils_jet.lua +++ b/modulefiles/gfsutils_jet.lua @@ -2,26 +2,16 @@ help([[ Build environment for GFS utilities on Jet ]]) -prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/role.epic/hpc-stack/libs/intel-18.0.5.274/modulefiles/stack") +prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") -local hpc_ver=os.getenv("hpc_ver") or "1.2.0" -local hpc_intel_ver=os.getenv("hpc_intel_ver") or "18.0.5.274" -local hpc_impi_ver=os.getenv("hpc_impi_ver") or "2018.4.274" -local cmake_ver=os.getenv("cmake_ver") or "3.20.1" +local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0" +local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" +local cmake_ver=os.getenv("cmake_ver") or "3.23.1" -local jasper_ver=os.getenv("jasper_ver") or "2.0.25" -local zlib_ver=os.getenv("zlib_ver") or "1.2.11" -local libpng_ver=os.getenv("libpng_ver") or "1.6.35" - -load(pathJoin("hpc", hpc_ver)) -load(pathJoin("hpc-intel", hpc_intel_ver)) -load(pathJoin("hpc-impi", hpc_impi_ver)) +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) load(pathJoin("cmake", cmake_ver)) -load(pathJoin("jasper", jasper_ver)) -load(pathJoin("zlib", zlib_ver)) -load(pathJoin("libpng", libpng_ver)) - load("gfsutils_common") whatis("Description: GFS utilities environment on Jet with Intel Compilers") diff --git a/modulefiles/gfsutils_orion.lua b/modulefiles/gfsutils_orion.lua index 6723bf3d..98ecb775 100644 --- a/modulefiles/gfsutils_orion.lua +++ b/modulefiles/gfsutils_orion.lua @@ -2,26 +2,16 @@ help([[ Build environment for GFS utilities on Orion ]]) -prepend_path("MODULEPATH", "/apps/contrib/NCEP/hpc-stack/libs/hpc-stack/modulefiles/stack") +prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") -local hpc_ver=os.getenv("hpc_ver") or "1.2.0" -local hpc_intel_ver=os.getenv("hpc_intel_ver") or "2018.4" -local hpc_impi_ver=os.getenv("hpc_impi_ver") or "2018.4" -local cmake_ver=os.getenv("cmake_ver") or "3.22.1" +local stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2" +local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" +local cmake_ver=os.getenv("cmake_ver") or "3.23.1" -local jasper_ver=os.getenv("jasper_ver") or "2.0.25" -local zlib_ver=os.getenv("zlib_ver") or "1.2.11" -local libpng_ver=os.getenv("libpng_ver") or "1.6.35" - -load(pathJoin("hpc", hpc_ver)) -load(pathJoin("hpc-intel", hpc_intel_ver)) -load(pathJoin("hpc-impi", hpc_impi_ver)) +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) load(pathJoin("cmake", cmake_ver)) -load(pathJoin("jasper", jasper_ver)) -load(pathJoin("zlib", zlib_ver)) -load(pathJoin("png", libpng_ver)) - load("gfsutils_common") whatis("Description: GFS utilities environment on Orion with Intel Compilers") diff --git a/modulefiles/gfsutils_s4.lua b/modulefiles/gfsutils_s4.lua index 464d3a38..221d2908 100644 --- a/modulefiles/gfsutils_s4.lua +++ b/modulefiles/gfsutils_s4.lua @@ -2,25 +2,17 @@ help([[ Build environment for GFS utilities on S4 ]]) -prepend_path("MODULEPATH", "/data/prod/hpc-stack/modulefiles/stack") +prepend_path("MODULEPATH", "/data/prod/jedi/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") load("license_intel") -local hpc_ver=os.getenv("hpc_ver") or "1.1.0" -local hpc_intel_ver=os.getenv("hpc_intel_ver") or "18.0.4" -local hpc_impi_ver=os.getenv("hpc_impi_ver") or "18.0.4" +local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0" +local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.0" +local cmake_ver=os.getenv("cmake_ver") or "3.23.1" -local jasper_ver=os.getenv("jasper_ver") or "2.0.25" -local zlib_ver=os.getenv("zlib_ver") or "1.2.11" -local libpng_ver=os.getenv("libpng_ver") or "1.6.35" - -load(pathJoin("hpc", hpc_ver)) -load(pathJoin("hpc-intel", hpc_intel_ver)) -load(pathJoin("hpc-impi", hpc_impi_ver)) - -load(pathJoin("jasper", jasper_ver)) -load(pathJoin("zlib", zlib_ver)) -load(pathJoin("png", libpng_ver)) +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) +load(pathJoin("cmake", cmake_ver)) load("gfsutils_common") diff --git a/modulefiles/gfsutils_wcoss2.lua b/modulefiles/gfsutils_wcoss2.lua index e18536f4..7bfd71d6 100644 --- a/modulefiles/gfsutils_wcoss2.lua +++ b/modulefiles/gfsutils_wcoss2.lua @@ -11,6 +11,21 @@ local cmake_ver= os.getenv("cmake_ver") or "3.20.2" local jasper_ver=os.getenv("jasper_ver") or "2.0.25" local zlib_ver=os.getenv("zlib_ver") or "1.2.11" local libpng_ver=os.getenv("libpng_ver") or "1.6.37" +local netcdf_ver=os.getenv("netcdf_ver") or "4.7.4" + +local bufr_ver=os.getenv("bufr_ver") or "11.7.0" +local bacio_ver=os.getenv("bacio_ver") or "2.4.1" +local w3emc_ver=os.getenv("w3emc_ver") or "2.9.2" +local sp_ver=os.getenv("sp_ver") or "2.3.3" +local ip_ver=os.getenv("ip_ver") or "3.3.3" +local sigio_ver=os.getenv("sigio_ver") or "2.3.2" +local nemsio_ver=os.getenv("nemsio_ver") or "2.5.2" +local nemsiogfs_ver=os.getenv("nemsiogfs_ver") or "2.5.3" +local wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0" +local g2_ver=os.getenv("g2_ver") or "3.4.5" +local landsfcutil_ver=os.getenv("landsfcutil_ver") or "2.4.1" +local gempak_ver=os.getenv("gempak_ver") or "7.14.1" +local wgrib2_ver=os.getenv("wgrib2_ver") or "2.0.8" load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver)) load(pathJoin("intel", intel_ver)) @@ -22,8 +37,21 @@ load(pathJoin("jasper", jasper_ver)) load(pathJoin("zlib", zlib_ver)) load(pathJoin("libpng", libpng_ver)) -load("gfsutils_common") -unload("ncio") +load(pathJoin("netcdf", netcdf_ver)) + +load(pathJoin("bufr", bufr_ver)) +load(pathJoin("bacio", bacio_ver)) +load(pathJoin("w3emc", w3emc_ver)) +load(pathJoin("sp", sp_ver)) +load(pathJoin("ip", ip_ver)) +load(pathJoin("sigio", sigio_ver)) +load(pathJoin("sfcio", sfcio_ver)) +load(pathJoin("nemsio", nemsio_ver)) +load(pathJoin("wrf_io", wrf_io_ver)) +load(pathJoin("g2", g2_ver)) +load(pathJoin("landsfcutil", landsfcutil_ver)) +--load(pathJoin("gempak", gempak_ver)) +load(pathJoin("wgrib2", wgrib2_ver)) pushenv("HPC_OPT", "/apps/ops/para/libs") prepend_path("MODULEPATH", "/apps/ops/para/libs/modulefiles/compiler/intel/19.1.3.304") diff --git a/src/enkf_chgres_recenter_nc.fd/CMakeLists.txt b/src/enkf_chgres_recenter_nc.fd/CMakeLists.txt index bb446821..82c5abc1 100644 --- a/src/enkf_chgres_recenter_nc.fd/CMakeLists.txt +++ b/src/enkf_chgres_recenter_nc.fd/CMakeLists.txt @@ -1,7 +1,7 @@ list(APPEND fortran_src driver.f90 input_data.f90 -interp.f90 +interp.F90 output_data.f90 setup.f90 utils.f90 @@ -23,4 +23,8 @@ if(OpenMP_Fortran_FOUND) target_link_libraries(${exe_name} PRIVATE OpenMP::OpenMP_Fortran) endif() +if(ip_VERSION VERSION_GREATER_EQUAL 4.0.0) + target_compile_definitions(${exe_name} PRIVATE "IP_V4") +endif() + install(TARGETS ${exe_name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/src/enkf_chgres_recenter_nc.fd/interp.f90 b/src/enkf_chgres_recenter_nc.fd/interp.F90 similarity index 99% rename from src/enkf_chgres_recenter_nc.fd/interp.f90 rename to src/enkf_chgres_recenter_nc.fd/interp.F90 index 291e8ef0..f4e8dca3 100644 --- a/src/enkf_chgres_recenter_nc.fd/interp.f90 +++ b/src/enkf_chgres_recenter_nc.fd/interp.F90 @@ -207,6 +207,9 @@ subroutine gaus_to_gaus use output_data use input_data use setup +#ifdef IP_V4 + use ip_mod, only: ipolates, ipolatev +#endif implicit none diff --git a/src/fbwndgfs.fd/CMakeLists.txt b/src/fbwndgfs.fd/CMakeLists.txt index 938fc774..57a71a0e 100644 --- a/src/fbwndgfs.fd/CMakeLists.txt +++ b/src/fbwndgfs.fd/CMakeLists.txt @@ -1,5 +1,5 @@ list(APPEND fortran_src - fbwndgfs.f + fbwndgfs.F ) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") @@ -15,4 +15,8 @@ target_link_libraries(${exe_name} PRIVATE bacio::bacio_8 sp::sp_8 w3emc::w3emc_8) +if(w3emc_VERSION VERSION_GREATER_EQUAL 2.10) + target_compile_definitions(${exe_name} PRIVATE "W3EMC_V2_10") +endif() + install(TARGETS ${exe_name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/src/fbwndgfs.fd/fbwndgfs.f b/src/fbwndgfs.fd/fbwndgfs.F similarity index 99% rename from src/fbwndgfs.fd/fbwndgfs.f rename to src/fbwndgfs.fd/fbwndgfs.F index ce7505fd..c97db5c7 100644 --- a/src/fbwndgfs.fd/fbwndgfs.f +++ b/src/fbwndgfs.fd/fbwndgfs.F @@ -399,8 +399,13 @@ DO 110 J = 1,NRSTNS C CALL GDSWIZ(KGDS,-1,1,FILL,XPTS(J),YPTS(J), C & ALON(J),ALAT(J),IRET,0,DUM,DUM) +#ifdef W3EMC_V2_10 + CALL GDSWZD_GRIB1(KGDS,-1,1,FILL,XPTS(J),YPTS(J), + & ALON(J),ALAT(J),IRET) +#else CALL GDSWZD(KGDS,-1,1,FILL,XPTS(J),YPTS(J), & ALON(J),ALAT(J),IRET) +#endif ISTN(J) = XPTS(J) JSTN(J) = YPTS(J) C PRINT 111,STNID(J),ALAT(J),ALON(J),ISTN(J),JSTN(J) diff --git a/src/mkgfsawps.fd/CMakeLists.txt b/src/mkgfsawps.fd/CMakeLists.txt index f4079e9e..088596bf 100644 --- a/src/mkgfsawps.fd/CMakeLists.txt +++ b/src/mkgfsawps.fd/CMakeLists.txt @@ -1,5 +1,5 @@ list(APPEND fortran_src - mkgfsawps.f + mkgfsawps.F ) if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") @@ -13,11 +13,15 @@ endif() set(exe_name mkgfsawps.x) add_executable(${exe_name} ${fortran_src}) target_link_libraries(${exe_name} PRIVATE bacio::bacio_4 - ip::ip_d + ip::ip_4 sp::sp_d - w3emc::w3emc_d) + w3emc::w3emc_4) if(OpenMP_Fortran_FOUND) target_link_libraries(${exe_name} PRIVATE OpenMP::OpenMP_Fortran) endif() +if(ip_VERSION VERSION_GREATER_EQUAL 4.0.0) + target_compile_definitions(${exe_name} PRIVATE "IP_V4") +endif() + install(TARGETS ${exe_name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/src/mkgfsawps.fd/mkgfsawps.f b/src/mkgfsawps.fd/mkgfsawps.F similarity index 99% rename from src/mkgfsawps.fd/mkgfsawps.f rename to src/mkgfsawps.fd/mkgfsawps.F index 4e4e57db..27fbd281 100644 --- a/src/mkgfsawps.fd/mkgfsawps.f +++ b/src/mkgfsawps.fd/mkgfsawps.F @@ -49,6 +49,9 @@ PROGRAM MKGFSAWPS C ATTRIBUTES: C LANGUAGE: FORTRAN 90 C +#ifdef IP_V4 + USE IP_MOD, ONLY: IPOLATES, IPOLATEV +#endif PARAMETER (MXSIZE=2000000,MXSIZ3=MXSIZE*3) PARAMETER (LUGI=31,LUGB=11,LUGO=51) PARAMETER (LENHEAD=21)