diff --git a/cime_config/machines/cmake_macros/amdclang_alvarez.cmake b/cime_config/machines/cmake_macros/amdclang_alvarez.cmake
index fa26eac845e8..be2d5a3facc7 100644
--- a/cime_config/machines/cmake_macros/amdclang_alvarez.cmake
+++ b/cime_config/machines/cmake_macros/amdclang_alvarez.cmake
@@ -1,13 +1,7 @@
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack -lamdlibm")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
string(APPEND CXXFLAGS " -O2 -g")
diff --git a/cime_config/machines/cmake_macros/amdclang_chicoma-cpu.cmake b/cime_config/machines/cmake_macros/amdclang_chicoma-cpu.cmake
index 2c869e218e15..24afe1200a1e 100644
--- a/cime_config/machines/cmake_macros/amdclang_chicoma-cpu.cmake
+++ b/cime_config/machines/cmake_macros/amdclang_chicoma-cpu.cmake
@@ -1,13 +1,7 @@
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack -lamdlibm")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
set(PIO_FILESYSTEM_HINTS "lustre")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
diff --git a/cime_config/machines/cmake_macros/amdclang_crusher.cmake b/cime_config/machines/cmake_macros/amdclang_crusher.cmake
index 2dc267930638..cf774e04276e 100644
--- a/cime_config/machines/cmake_macros/amdclang_crusher.cmake
+++ b/cime_config/machines/cmake_macros/amdclang_crusher.cmake
@@ -5,15 +5,9 @@ set(SCC "cc")
set(SCXX "CC")
set(SFC "ftn")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CPPDEFS " -DLINUX")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{CRAY_LIBSCI_PREFIX_DIR}/lib -lsci_amd")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
+string(APPEND SLIBS " -L$ENV{CRAY_LIBSCI_PREFIX_DIR}/lib -lsci_amd")
set(CRAY_LIBSCI_PREFIX_DIR "$ENV{CRAY_LIBSCI_PREFIX_DIR}")
diff --git a/cime_config/machines/cmake_macros/amdclang_frontier.cmake b/cime_config/machines/cmake_macros/amdclang_frontier.cmake
index 2dc267930638..cf774e04276e 100644
--- a/cime_config/machines/cmake_macros/amdclang_frontier.cmake
+++ b/cime_config/machines/cmake_macros/amdclang_frontier.cmake
@@ -5,15 +5,9 @@ set(SCC "cc")
set(SCXX "CC")
set(SFC "ftn")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CPPDEFS " -DLINUX")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{CRAY_LIBSCI_PREFIX_DIR}/lib -lsci_amd")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
+string(APPEND SLIBS " -L$ENV{CRAY_LIBSCI_PREFIX_DIR}/lib -lsci_amd")
set(CRAY_LIBSCI_PREFIX_DIR "$ENV{CRAY_LIBSCI_PREFIX_DIR}")
diff --git a/cime_config/machines/cmake_macros/amdclang_pm-cpu.cmake b/cime_config/machines/cmake_macros/amdclang_pm-cpu.cmake
index 6378428084b2..ec0e1fd0b1f3 100644
--- a/cime_config/machines/cmake_macros/amdclang_pm-cpu.cmake
+++ b/cime_config/machines/cmake_macros/amdclang_pm-cpu.cmake
@@ -1,16 +1,7 @@
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack -lamdlibm")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
string(APPEND CXXFLAGS " -O2 -g")
diff --git a/cime_config/machines/cmake_macros/amdclanggpu_crusher.cmake b/cime_config/machines/cmake_macros/amdclanggpu_crusher.cmake
index 4a096af55f44..5968c8627c64 100644
--- a/cime_config/machines/cmake_macros/amdclanggpu_crusher.cmake
+++ b/cime_config/machines/cmake_macros/amdclanggpu_crusher.cmake
@@ -5,8 +5,6 @@ set(SCC "cc")
set(SCXX "CC")
set(SFC "ftn")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CPPDEFS " -DLINUX")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY")
@@ -17,8 +15,6 @@ if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
string(APPEND SLIBS " -L$ENV{CRAY_LIBSCI_PREFIX_DIR}/lib -lsci_amd")
@@ -26,9 +22,6 @@ set(MPICXX "hipcc")
set(SCXX "hipcc")
string(APPEND CXXFLAGS " -I$ENV{MPICH_DIR}/include --offload-arch=gfx90a")
string(APPEND SLIBS " -L$ENV{MPICH_DIR}/lib -lmpi -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On")
set(USE_HIP "TRUE")
diff --git a/cime_config/machines/cmake_macros/amdclanggpu_frontier.cmake b/cime_config/machines/cmake_macros/amdclanggpu_frontier.cmake
index 4a096af55f44..5968c8627c64 100644
--- a/cime_config/machines/cmake_macros/amdclanggpu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/amdclanggpu_frontier.cmake
@@ -5,8 +5,6 @@ set(SCC "cc")
set(SCXX "CC")
set(SFC "ftn")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CPPDEFS " -DLINUX")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY")
@@ -17,8 +15,6 @@ if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
string(APPEND SLIBS " -L$ENV{CRAY_LIBSCI_PREFIX_DIR}/lib -lsci_amd")
@@ -26,9 +22,6 @@ set(MPICXX "hipcc")
set(SCXX "hipcc")
string(APPEND CXXFLAGS " -I$ENV{MPICH_DIR}/include --offload-arch=gfx90a")
string(APPEND SLIBS " -L$ENV{MPICH_DIR}/lib -lmpi -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On")
set(USE_HIP "TRUE")
diff --git a/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-cpu.cmake b/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-cpu.cmake
index c5773380c926..e9ae066609a2 100644
--- a/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-cpu.cmake
+++ b/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-cpu.cmake
@@ -5,12 +5,6 @@ if (compile_threaded)
string(APPEND LDFLAGS " -fopenmp")
endif()
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
set(PIO_FILESYSTEM_HINTS "gpfs")
string(APPEND CXX_LIBS " -lstdc++")
diff --git a/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-gpu.cmake b/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-gpu.cmake
index de73e2845c19..20a7b89907d1 100644
--- a/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-gpu.cmake
+++ b/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-gpu.cmake
@@ -5,12 +5,6 @@ if (compile_threaded)
string(APPEND LDFLAGS " -fopenmp")
endif()
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
set(PIO_FILESYSTEM_HINTS "gpfs")
string(APPEND CXX_LIBS " -lstdc++")
diff --git a/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream.cmake b/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream.cmake
index 17f5ca0f0de4..ad33ac5878ff 100644
--- a/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream.cmake
+++ b/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream.cmake
@@ -10,8 +10,5 @@ endif()
string(APPEND FFLAGS " -hipa0 -hzero")
string(APPEND FFLAGS " -em -ef")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
set(PIO_FILESYSTEM_HINTS "gpfs")
string(APPEND CXX_LIBS " -lstdc++")
diff --git a/cime_config/machines/cmake_macros/crayclang_crusher.cmake b/cime_config/machines/cmake_macros/crayclang_crusher.cmake
index b7977176523d..6292038ab681 100644
--- a/cime_config/machines/cmake_macros/crayclang_crusher.cmake
+++ b/cime_config/machines/cmake_macros/crayclang_crusher.cmake
@@ -9,10 +9,4 @@ string(APPEND FFLAGS " -hipa0 -hzero")
# Scorpio installs
string(APPEND FFLAGS " -em -ef")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CXX_LIBS " -lstdc++")
diff --git a/cime_config/machines/cmake_macros/crayclang_frontier.cmake b/cime_config/machines/cmake_macros/crayclang_frontier.cmake
index b7977176523d..6292038ab681 100644
--- a/cime_config/machines/cmake_macros/crayclang_frontier.cmake
+++ b/cime_config/machines/cmake_macros/crayclang_frontier.cmake
@@ -9,10 +9,4 @@ string(APPEND FFLAGS " -hipa0 -hzero")
# Scorpio installs
string(APPEND FFLAGS " -em -ef")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CXX_LIBS " -lstdc++")
diff --git a/cime_config/machines/cmake_macros/crayclanggpu_crusher.cmake b/cime_config/machines/cmake_macros/crayclanggpu_crusher.cmake
index 680fd0bdbd85..b53ebc3a2d2f 100644
--- a/cime_config/machines/cmake_macros/crayclanggpu_crusher.cmake
+++ b/cime_config/machines/cmake_macros/crayclanggpu_crusher.cmake
@@ -60,17 +60,12 @@ endif()
# https://github.com/E3SM-Project/E3SM/pull/5208
string(APPEND FFLAGS " -hipa0 -hzero -em -ef -hnoacc")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
string(APPEND CXX_LIBS " -lstdc++")
string(APPEND CXXFLAGS " -I$ENV{MPICH_DIR}/include --offload-arch=gfx90a")
string(APPEND SLIBS " -L$ENV{MPICH_DIR}/lib -lmpi -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa")
string(APPEND SLIBS " -L$ENV{ROCM_PATH}/lib -lamdhip64")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On")
diff --git a/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake b/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake
index 57e0cfc2953a..28fe05b151f6 100644
--- a/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake
@@ -60,18 +60,12 @@ endif()
# https://github.com/E3SM-Project/E3SM/pull/5208
string(APPEND FFLAGS " -hipa0 -hzero -em -ef -hnoacc")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
string(APPEND CXX_LIBS " -lstdc++")
string(APPEND CXXFLAGS " -I$ENV{MPICH_DIR}/include --offload-arch=gfx90a")
string(APPEND SLIBS " -L$ENV{MPICH_DIR}/lib -lmpi -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa")
string(APPEND SLIBS " -L$ENV{ROCM_PATH}/lib -lamdhip64")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-
string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On")
diff --git a/cime_config/machines/cmake_macros/fj.cmake b/cime_config/machines/cmake_macros/fj.cmake
index f90a86c61406..b62c3de878a7 100644
--- a/cime_config/machines/cmake_macros/fj.cmake
+++ b/cime_config/machines/cmake_macros/fj.cmake
@@ -32,12 +32,7 @@ set(MPIFC "mpifrt")
set(SCC "fcc")
set(SCXX "FCC")
set(SFC "frt")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
-execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1} -lblas -llapack")
+string(APPEND SLIBS " -lblas -llapack")
if (COMP_NAME MATCHES "^pio")
string(APPEND CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
endif()
diff --git a/cime_config/machines/cmake_macros/gnu9_mappy.cmake b/cime_config/machines/cmake_macros/gnu9_mappy.cmake
index 8adaceed0895..15af79822531 100644
--- a/cime_config/machines/cmake_macros/gnu9_mappy.cmake
+++ b/cime_config/machines/cmake_macros/gnu9_mappy.cmake
@@ -8,10 +8,7 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
-string(APPEND FFLAGS " -I$ENV{NETCDFROOT}/include")
-set(NETCDF_PATH "$ENV{NETCDFROOT}")
if (MPILIB STREQUAL mpi-serial AND NOT compile_threaded)
set(PFUNIT_PATH "$ENV{SEMS_PFUNIT_ROOT}")
endif()
-execute_process(COMMAND ${NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lblas -llapack")
+string(APPEND SLIBS " -lblas -llapack")
diff --git a/cime_config/machines/cmake_macros/gnu_WSL2.cmake b/cime_config/machines/cmake_macros/gnu_WSL2.cmake
index d73f8d42caca..63b76e1c5835 100644
--- a/cime_config/machines/cmake_macros/gnu_WSL2.cmake
+++ b/cime_config/machines/cmake_macros/gnu_WSL2.cmake
@@ -1,11 +1,4 @@
set(HDF5_PATH "$ENV{HDF5_PATH}")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
set(LAPACK_LIBDIR "$ENV{BLASLAPACK_LIBDIR}")
set(CXX_LINKER "CXX")
-execute_process(COMMAND ${NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-execute_process(COMMAND ${NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
string(APPEND SLIBS " -L${LAPACK_LIBDIR} -lblas -llapack")
diff --git a/cime_config/machines/cmake_macros/gnu_alvarez.cmake b/cime_config/machines/cmake_macros/gnu_alvarez.cmake
index b43a0425c7e4..807c7d0211eb 100644
--- a/cime_config/machines/cmake_macros/gnu_alvarez.cmake
+++ b/cime_config/machines/cmake_macros/gnu_alvarez.cmake
@@ -2,14 +2,8 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}/lib -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack")
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
endif()
diff --git a/cime_config/machines/cmake_macros/gnu_anlgce-ub18.cmake b/cime_config/machines/cmake_macros/gnu_anlgce-ub18.cmake
index be997d160315..a9edbc0c0849 100644
--- a/cime_config/machines/cmake_macros/gnu_anlgce-ub18.cmake
+++ b/cime_config/machines/cmake_macros/gnu_anlgce-ub18.cmake
@@ -5,13 +5,5 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1} -lblas -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
-set(HDF5_PATH "$ENV{HDF5_PATH}")
+string(APPEND SLIBS " -lblas -llapack")
set(ZLIB_PATH "$ENV{ZLIB_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_anlgce.cmake b/cime_config/machines/cmake_macros/gnu_anlgce.cmake
index be997d160315..a9edbc0c0849 100644
--- a/cime_config/machines/cmake_macros/gnu_anlgce.cmake
+++ b/cime_config/machines/cmake_macros/gnu_anlgce.cmake
@@ -5,13 +5,5 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1} -lblas -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
-set(HDF5_PATH "$ENV{HDF5_PATH}")
+string(APPEND SLIBS " -lblas -llapack")
set(ZLIB_PATH "$ENV{ZLIB_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_anlworkstation.cmake b/cime_config/machines/cmake_macros/gnu_anlworkstation.cmake
index a4b64f364e18..90e63e0e6c9a 100644
--- a/cime_config/machines/cmake_macros/gnu_anlworkstation.cmake
+++ b/cime_config/machines/cmake_macros/gnu_anlworkstation.cmake
@@ -5,13 +5,6 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lblas -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -lpthread")
-endif()
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
-set(HDF5_PATH "$ENV{HDF5_PATH}")
+string(APPEND SLIBS " -lblas -llapack")
set(SZIP_PATH "$ENV{SZIP_PATH}")
set(ZLIB_PATH "$ENV{ZLIB_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_anvil.cmake b/cime_config/machines/cmake_macros/gnu_anvil.cmake
index dcebd48938e0..6d9d1a99f3a5 100644
--- a/cime_config/machines/cmake_macros/gnu_anvil.cmake
+++ b/cime_config/machines/cmake_macros/gnu_anvil.cmake
@@ -2,14 +2,5 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
set(PIO_FILESYSTEM_HINTS "gpfs")
-execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -L$ENV{MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl")
-execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
+string(APPEND SLIBS " -L$ENV{MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl")
string(APPEND CXX_LIBS " -lstdc++")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_ascent.cmake b/cime_config/machines/cmake_macros/gnu_ascent.cmake
index f21e5826d31c..275cd9944878 100644
--- a/cime_config/machines/cmake_macros/gnu_ascent.cmake
+++ b/cime_config/machines/cmake_macros/gnu_ascent.cmake
@@ -8,10 +8,7 @@ endif()
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
+string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND CXX_LIBS " -lstdc++")
set(MPICXX "mpiCC")
set(PIO_FILESYSTEM_HINTS "gpfs")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_badger.cmake b/cime_config/machines/cmake_macros/gnu_badger.cmake
index 55439f8d6f00..6aa953c0e2f5 100644
--- a/cime_config/machines/cmake_macros/gnu_badger.cmake
+++ b/cime_config/machines/cmake_macros/gnu_badger.cmake
@@ -1,11 +1,5 @@
set(PIO_FILESYSTEM_HINTS "lustre")
set(MPICXX "mpic++")
-execute_process(COMMAND nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-execute_process(COMMAND nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lnetcdff -llapack -lblas")
+string(APPEND SLIBS " -llapack -lblas")
string(APPEND SLIBS " $ENV{MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group $ENV{MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a -lpthread -lm -lz")
string(APPEND CXX_LIBS " -lstdc++")
-set(NETCDF_C_PATH "$ENV{NETCDF_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_bebop.cmake b/cime_config/machines/cmake_macros/gnu_bebop.cmake
index a126803427c4..1bbd53081cb4 100644
--- a/cime_config/machines/cmake_macros/gnu_bebop.cmake
+++ b/cime_config/machines/cmake_macros/gnu_bebop.cmake
@@ -2,14 +2,4 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND CXX_LIBS " -lstdc++")
-execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1}")
string(APPEND SLIBS " -L$ENV{MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
-set(HDF5_PATH "$ENV{HDF5_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_cades.cmake b/cime_config/machines/cmake_macros/gnu_cades.cmake
index ed34a30cb5f1..ba776359dc68 100644
--- a/cime_config/machines/cmake_macros/gnu_cades.cmake
+++ b/cime_config/machines/cmake_macros/gnu_cades.cmake
@@ -1,8 +1,5 @@
string(APPEND FFLAGS " -O -fno-range-check")
set(HDF5_PATH "/software/dev_tools/swtree/cs400_centos7.2_pe2016-08/hdf5-parallel/1.8.17/centos7.2_gnu5.3.0")
-set(NETCDF_PATH "/software/dev_tools/swtree/cs400_centos7.2_pe2016-08/netcdf-hdf5parallel/4.3.3.1/centos7.2_gnu5.3.0")
-set(PNETCDF_PATH "/software/dev_tools/swtree/cs400_centos7.2_pe2016-08/pnetcdf/1.9.0/centos7.2_gnu5.3.0")
set(LAPACK_LIBDIR "/software/tools/compilers/intel_2017/mkl/lib/intel64")
-string(APPEND SLIBS " -L${NETCDF_PATH}/lib -Wl,-rpath=${NETCDF_PATH}/lib -lnetcdff -lnetcdf")
set(MPICXX "mpic++")
set(SCXX "gcpp")
diff --git a/cime_config/machines/cmake_macros/gnu_chicoma-cpu.cmake b/cime_config/machines/cmake_macros/gnu_chicoma-cpu.cmake
index b6235f57ab26..90254fd08c09 100644
--- a/cime_config/machines/cmake_macros/gnu_chicoma-cpu.cmake
+++ b/cime_config/machines/cmake_macros/gnu_chicoma-cpu.cmake
@@ -2,13 +2,7 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
set(PIO_FILESYSTEM_HINTS "lustre")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
diff --git a/cime_config/machines/cmake_macros/gnu_chrysalis.cmake b/cime_config/machines/cmake_macros/gnu_chrysalis.cmake
index 18a3d46bd46a..4480fcf50692 100644
--- a/cime_config/machines/cmake_macros/gnu_chrysalis.cmake
+++ b/cime_config/machines/cmake_macros/gnu_chrysalis.cmake
@@ -2,14 +2,5 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
set(PIO_FILESYSTEM_HINTS "gpfs")
-execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1}")
string(APPEND SLIBS " -Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_gf_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
string(APPEND CXX_LIBS " -lstdc++")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_crusher.cmake b/cime_config/machines/cmake_macros/gnu_crusher.cmake
index 3ac46e85966b..ba74699e1fdd 100644
--- a/cime_config/machines/cmake_macros/gnu_crusher.cmake
+++ b/cime_config/machines/cmake_macros/gnu_crusher.cmake
@@ -16,10 +16,3 @@ if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
endif()
string(APPEND CXX_LIBS " -lstdc++")
-
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
diff --git a/cime_config/machines/cmake_macros/gnu_docker-scream.cmake b/cime_config/machines/cmake_macros/gnu_docker-scream.cmake
index 713260895c9c..15ddeb32fed7 100644
--- a/cime_config/machines/cmake_macros/gnu_docker-scream.cmake
+++ b/cime_config/machines/cmake_macros/gnu_docker-scream.cmake
@@ -33,7 +33,6 @@ string(APPEND CPPDEFS " -DFORTRANUNDERSCORE -DNO_R16 -DCPRGNU")
if (DEBUG)
string(APPEND CPPDEFS " -DYAKL_DEBUG")
endif()
-set(SLIBS "-L/opt/conda/lib -lnetcdf -lnetcdff")
set(CXX_LIBS "-lstdc++")
set(CXX_LINKER "FORTRAN")
string(APPEND FC_AUTO_R8 " -fdefault-real-8")
@@ -54,14 +53,11 @@ set(HAS_F2008_CONTIGUOUS "FALSE")
if (compile_threaded)
string(APPEND LDFLAGS " -fopenmp")
endif()
-set(SLIBS " -L/opt/conda/lib -lnetcdff -lnetcdf")
+set(SLIBS " -L/opt/conda/lib")
set(MPI_PATH "/opt/conda")
set(MPICC "/opt/conda/bin/mpicc")
set(MPICXX "/opt/conda/bin/mpicxx")
set(MPIFC "/opt/conda/bin/mpif90")
-set(NETCDF_C_PATH "/opt/conda")
-set(NETCDF_FORTRAN_PATH "/opt/conda")
-set(PNETCDF_PATH "/opt/conda")
set(SCC "/opt/conda/bin/x86_64-conda-linux-gnu-gcc")
set(SCXX "/opt/conda/bin/x86_64-conda-linux-gnu-g++")
set(SFC "/opt/conda/bin/x86_64-conda-linux-gnu-gfortran")
diff --git a/cime_config/machines/cmake_macros/gnu_eddi.cmake b/cime_config/machines/cmake_macros/gnu_eddi.cmake
index 9233b9a86846..415122278294 100644
--- a/cime_config/machines/cmake_macros/gnu_eddi.cmake
+++ b/cime_config/machines/cmake_macros/gnu_eddi.cmake
@@ -2,14 +2,13 @@ set(SUPPORTS_CXX "TRUE")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_VPRINTF -DHAVE_GETTIMEOFDAY -DHAVE_BACKTRACE")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_HOME}")
if (NOT DEBUG)
string(APPEND FFLAGS " -fno-unsafe-math-optimizations ")
endif()
if (DEBUG)
string(APPEND FFLAGS " -g -fbacktrace -fbounds-check -ffpe-trap=invalid,zero,overflow -Wall")
endif()
-string(APPEND SLIBS " -L$ENV{NETCDF_HOME}/lib/ -lnetcdff -lnetcdf -lcurl -llapack -lblas")
+string(APPEND SLIBS " -lcurl -llapack -lblas")
if (MPILIB STREQUAL mpi-serial)
set(SCC "gcc")
endif()
diff --git a/cime_config/machines/cmake_macros/gnu_frontier.cmake b/cime_config/machines/cmake_macros/gnu_frontier.cmake
index 3ac46e85966b..ba74699e1fdd 100644
--- a/cime_config/machines/cmake_macros/gnu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/gnu_frontier.cmake
@@ -16,10 +16,3 @@ if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
endif()
string(APPEND CXX_LIBS " -lstdc++")
-
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
diff --git a/cime_config/machines/cmake_macros/gnu_fugaku.cmake b/cime_config/machines/cmake_macros/gnu_fugaku.cmake
index 0a3725445650..19a42b3730c1 100644
--- a/cime_config/machines/cmake_macros/gnu_fugaku.cmake
+++ b/cime_config/machines/cmake_macros/gnu_fugaku.cmake
@@ -3,13 +3,8 @@ if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
string(APPEND FFLAGS " -O2")
endif()
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -Wl,-rpath -Wl,$ENV{NETCDF_PATH}/lib")
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -L$ENV{LAPACK_PATH}/lib64 -llapack -lblas")
+string(APPEND SLIBS " -llapack -lblas")
set(CXX_LIBS "-lstdc++")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
if (COMP_NAME MATCHES "^pio")
string(APPEND CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
endif()
diff --git a/cime_config/machines/cmake_macros/gnu_gcp10.cmake b/cime_config/machines/cmake_macros/gnu_gcp10.cmake
index aeae2278ecba..a3132725b8e3 100644
--- a/cime_config/machines/cmake_macros/gnu_gcp10.cmake
+++ b/cime_config/machines/cmake_macros/gnu_gcp10.cmake
@@ -5,12 +5,5 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -fno-unsafe-math-optimizations")
endif()
-string(APPEND SLIBS " -L$ENV{HDF5_PATH}/lib -lhdf5_fortran -lhdf5 -lhdf5_hl -lhdf5hl_fortran")
-string(APPEND SLIBS " -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff")
string(APPEND SLIBS " -L$ENV{CURL_PATH}/lib -lcurl")
string(APPEND SLIBS " -L$ENV{LAPACK_PATH}/lib64 -lblas -llapack")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-set(HDF5_PATH "$ENV{HDF5_PATH}")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_gcp12.cmake b/cime_config/machines/cmake_macros/gnu_gcp12.cmake
index aeae2278ecba..a3132725b8e3 100644
--- a/cime_config/machines/cmake_macros/gnu_gcp12.cmake
+++ b/cime_config/machines/cmake_macros/gnu_gcp12.cmake
@@ -5,12 +5,5 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -fno-unsafe-math-optimizations")
endif()
-string(APPEND SLIBS " -L$ENV{HDF5_PATH}/lib -lhdf5_fortran -lhdf5 -lhdf5_hl -lhdf5hl_fortran")
-string(APPEND SLIBS " -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff")
string(APPEND SLIBS " -L$ENV{CURL_PATH}/lib -lcurl")
string(APPEND SLIBS " -L$ENV{LAPACK_PATH}/lib64 -lblas -llapack")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-set(HDF5_PATH "$ENV{HDF5_PATH}")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_grizzly.cmake b/cime_config/machines/cmake_macros/gnu_grizzly.cmake
index 55439f8d6f00..6aa953c0e2f5 100644
--- a/cime_config/machines/cmake_macros/gnu_grizzly.cmake
+++ b/cime_config/machines/cmake_macros/gnu_grizzly.cmake
@@ -1,11 +1,5 @@
set(PIO_FILESYSTEM_HINTS "lustre")
set(MPICXX "mpic++")
-execute_process(COMMAND nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-execute_process(COMMAND nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lnetcdff -llapack -lblas")
+string(APPEND SLIBS " -llapack -lblas")
string(APPEND SLIBS " $ENV{MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group $ENV{MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a -lpthread -lm -lz")
string(APPEND CXX_LIBS " -lstdc++")
-set(NETCDF_C_PATH "$ENV{NETCDF_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_jlse.cmake b/cime_config/machines/cmake_macros/gnu_jlse.cmake
index ad9a45123623..28cdb185e6a6 100644
--- a/cime_config/machines/cmake_macros/gnu_jlse.cmake
+++ b/cime_config/machines/cmake_macros/gnu_jlse.cmake
@@ -3,10 +3,4 @@ if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
string(APPEND FFLAGS " -O2")
endif()
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -Wl,-rpath -Wl,$ENV{NETCDF_PATH}/lib")
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
string(APPEND SLIBS " -L/home/azamat/soft/libs -llapack -lblas")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_lawrencium-lr6.cmake b/cime_config/machines/cmake_macros/gnu_lawrencium-lr6.cmake
index f993f65ba981..eb7a96fd2860 100644
--- a/cime_config/machines/cmake_macros/gnu_lawrencium-lr6.cmake
+++ b/cime_config/machines/cmake_macros/gnu_lawrencium-lr6.cmake
@@ -6,7 +6,4 @@ string(APPEND CXX_LIBS " -lstdc++ -lmpi_cxx")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
-string(APPEND FFLAGS " -I$ENV{NETCDF_DIR}/include")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
-string(APPEND SLIBS " -L/global/software/sl-7.x86_64/modules/gcc/6.3.0/netcdf/4.4.1.1-gcc-p/lib -lnetcdff -lnetcdf -lnetcdf -lblas -llapack")
+string(APPEND SLIBS " -lblas -llapack")
diff --git a/cime_config/machines/cmake_macros/gnu_lobata.cmake b/cime_config/machines/cmake_macros/gnu_lobata.cmake
index 965abd357d0f..97822750d565 100644
--- a/cime_config/machines/cmake_macros/gnu_lobata.cmake
+++ b/cime_config/machines/cmake_macros/gnu_lobata.cmake
@@ -1,10 +1,8 @@
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
set(SUPPORTS_CXX "TRUE")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_VPRINTF -DHAVE_TIMES -DHAVE_GETTIMEOFDAY -DHAVE_BACKTRACE")
endif()
-string(APPEND SLIBS " -L$ENV{NETCDF_FORTRAN_PATH}/lib/ -lnetcdff -L$ENV{NETCDF_C_PATH}/lib/ -lnetcdf -lcurl -llapack -lblas")
+string(APPEND SLIBS " -lcurl -llapack -lblas")
if (DEBUG)
string(APPEND FFLAGS " -g -fbacktrace -fbounds-check -ffpe-trap=invalid,zero,overflow")
else()
diff --git a/cime_config/machines/cmake_macros/gnu_mappy.cmake b/cime_config/machines/cmake_macros/gnu_mappy.cmake
index 8adaceed0895..15af79822531 100644
--- a/cime_config/machines/cmake_macros/gnu_mappy.cmake
+++ b/cime_config/machines/cmake_macros/gnu_mappy.cmake
@@ -8,10 +8,7 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
-string(APPEND FFLAGS " -I$ENV{NETCDFROOT}/include")
-set(NETCDF_PATH "$ENV{NETCDFROOT}")
if (MPILIB STREQUAL mpi-serial AND NOT compile_threaded)
set(PFUNIT_PATH "$ENV{SEMS_PFUNIT_ROOT}")
endif()
-execute_process(COMMAND ${NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lblas -llapack")
+string(APPEND SLIBS " -lblas -llapack")
diff --git a/cime_config/machines/cmake_macros/gnu_melvin.cmake b/cime_config/machines/cmake_macros/gnu_melvin.cmake
index 8adaceed0895..15af79822531 100644
--- a/cime_config/machines/cmake_macros/gnu_melvin.cmake
+++ b/cime_config/machines/cmake_macros/gnu_melvin.cmake
@@ -8,10 +8,7 @@ string(APPEND CXX_LIBS " -lstdc++")
if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
-string(APPEND FFLAGS " -I$ENV{NETCDFROOT}/include")
-set(NETCDF_PATH "$ENV{NETCDFROOT}")
if (MPILIB STREQUAL mpi-serial AND NOT compile_threaded)
set(PFUNIT_PATH "$ENV{SEMS_PFUNIT_ROOT}")
endif()
-execute_process(COMMAND ${NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lblas -llapack")
+string(APPEND SLIBS " -lblas -llapack")
diff --git a/cime_config/machines/cmake_macros/gnu_miller.cmake b/cime_config/machines/cmake_macros/gnu_miller.cmake
index d3ce49ddff4a..6ce5e2fa733f 100644
--- a/cime_config/machines/cmake_macros/gnu_miller.cmake
+++ b/cime_config/machines/cmake_macros/gnu_miller.cmake
@@ -2,13 +2,7 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(NETCDF_C_PATH "$ENV{NETCDF_DIR}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_DIR}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
endif()
diff --git a/cime_config/machines/cmake_macros/gnu_modex.cmake b/cime_config/machines/cmake_macros/gnu_modex.cmake
index a498aa767fcc..920011fbedf8 100644
--- a/cime_config/machines/cmake_macros/gnu_modex.cmake
+++ b/cime_config/machines/cmake_macros/gnu_modex.cmake
@@ -7,7 +7,4 @@ endif()
if (DEBUG)
string(APPEND FFLAGS " -fbounds-check -ffpe-trap=invalid,zero,overflow")
endif()
-string(APPEND SLIBS " -L$ENV{HDF5_HOME}/lib -lhdf5_fortran -lhdf5 -lhdf5_hl -lhdf5hl_fortran")
-string(APPEND SLIBS " -L$ENV{NETCDF_PATH}/lib/ -lnetcdff -lnetcdf -lcurl -lblas -llapack")
-set(HDF5_PATH "$ENV{HDF5_HOME}")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
+string(APPEND SLIBS " -lcurl -lblas -llapack")
diff --git a/cime_config/machines/cmake_macros/gnu_pm-cpu.cmake b/cime_config/machines/cmake_macros/gnu_pm-cpu.cmake
index 4713c1b0ae35..807c7d0211eb 100644
--- a/cime_config/machines/cmake_macros/gnu_pm-cpu.cmake
+++ b/cime_config/machines/cmake_macros/gnu_pm-cpu.cmake
@@ -2,17 +2,8 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}/lib -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
endif()
diff --git a/cime_config/machines/cmake_macros/gnu_pm-gpu.cmake b/cime_config/machines/cmake_macros/gnu_pm-gpu.cmake
index 4713c1b0ae35..807c7d0211eb 100644
--- a/cime_config/machines/cmake_macros/gnu_pm-gpu.cmake
+++ b/cime_config/machines/cmake_macros/gnu_pm-gpu.cmake
@@ -2,17 +2,8 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}/lib -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2 -g")
endif()
diff --git a/cime_config/machines/cmake_macros/gnu_singularity.cmake b/cime_config/machines/cmake_macros/gnu_singularity.cmake
index 7fadc17a81e5..db4fac75fc16 100644
--- a/cime_config/machines/cmake_macros/gnu_singularity.cmake
+++ b/cime_config/machines/cmake_macros/gnu_singularity.cmake
@@ -1,5 +1 @@
-set(HDF5_PATH "$ENV{HDF5_PATH}")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
-execute_process(COMMAND ${NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lblas -llapack")
+string(APPEND SLIBS " -lblas -llapack")
diff --git a/cime_config/machines/cmake_macros/gnu_spock.cmake b/cime_config/machines/cmake_macros/gnu_spock.cmake
index a100d549b737..ab79175d059e 100644
--- a/cime_config/machines/cmake_macros/gnu_spock.cmake
+++ b/cime_config/machines/cmake_macros/gnu_spock.cmake
@@ -5,6 +5,4 @@ if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
string(APPEND CFLAGS " -O2")
endif()
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
set(PIO_FILESYSTEM_HINTS "gpfs")
diff --git a/cime_config/machines/cmake_macros/gnu_summit.cmake b/cime_config/machines/cmake_macros/gnu_summit.cmake
index da439e3f7c83..275cd9944878 100644
--- a/cime_config/machines/cmake_macros/gnu_summit.cmake
+++ b/cime_config/machines/cmake_macros/gnu_summit.cmake
@@ -8,13 +8,7 @@ endif()
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet -ldl")
-endif()
+string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND CXX_LIBS " -lstdc++")
set(MPICXX "mpiCC")
set(PIO_FILESYSTEM_HINTS "gpfs")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/gnu_theta.cmake b/cime_config/machines/cmake_macros/gnu_theta.cmake
index c4f260e4aa98..4ad8e7d81844 100644
--- a/cime_config/machines/cmake_macros/gnu_theta.cmake
+++ b/cime_config/machines/cmake_macros/gnu_theta.cmake
@@ -12,7 +12,4 @@ if (DEBUG)
endif()
execute_process(COMMAND nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core")
-endif()
string(APPEND CXX_LIBS " -lstdc++")
diff --git a/cime_config/machines/cmake_macros/gnu_tulip.cmake b/cime_config/machines/cmake_macros/gnu_tulip.cmake
index ae6d65ed4d29..414a62603c00 100644
--- a/cime_config/machines/cmake_macros/gnu_tulip.cmake
+++ b/cime_config/machines/cmake_macros/gnu_tulip.cmake
@@ -2,8 +2,4 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND CXX_LIBS " -lstdc++")
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1} -llapack -lblas")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
+string(APPEND SLIBS " -llapack -lblas")
diff --git a/cime_config/machines/cmake_macros/gnugpu_ascent.cmake b/cime_config/machines/cmake_macros/gnugpu_ascent.cmake
index 38f4d86b1e19..08261e7efb6f 100644
--- a/cime_config/machines/cmake_macros/gnugpu_ascent.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_ascent.cmake
@@ -9,10 +9,7 @@ endif()
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
+string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
set(MPICXX "mpiCC")
set(PIO_FILESYSTEM_HINTS "gpfs")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
set(USE_CUDA "TRUE")
diff --git a/cime_config/machines/cmake_macros/gnugpu_crusher.cmake b/cime_config/machines/cmake_macros/gnugpu_crusher.cmake
index da3697082ee1..8cb67348c46e 100644
--- a/cime_config/machines/cmake_macros/gnugpu_crusher.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_crusher.cmake
@@ -16,15 +16,10 @@ if (NOT DEBUG)
string(APPEND CXXFLAGS " -O2")
string(APPEND FFLAGS " -O2")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
string(APPEND CXXFLAGS " -I$ENV{MPICH_DIR}/include --offload-arch=gfx90a")
string(APPEND SLIBS " -Wl,--copy-dt-needed-entries -L/opt/cray/pe/gcc-libs -lgfortran -L$ENV{MPICH_DIR}/lib -lmpi -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa ")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On")
diff --git a/cime_config/machines/cmake_macros/gnugpu_frontier.cmake b/cime_config/machines/cmake_macros/gnugpu_frontier.cmake
index da3697082ee1..8cb67348c46e 100644
--- a/cime_config/machines/cmake_macros/gnugpu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_frontier.cmake
@@ -16,15 +16,10 @@ if (NOT DEBUG)
string(APPEND CXXFLAGS " -O2")
string(APPEND FFLAGS " -O2")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-set(PNETCDF_PATH "$ENV{PNETCDF_DIR}")
string(APPEND CMAKE_OPTS " -DPIO_ENABLE_TOOLS:BOOL=OFF")
string(APPEND CXXFLAGS " -I$ENV{MPICH_DIR}/include --offload-arch=gfx90a")
string(APPEND SLIBS " -Wl,--copy-dt-needed-entries -L/opt/cray/pe/gcc-libs -lgfortran -L$ENV{MPICH_DIR}/lib -lmpi -L$ENV{CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa ")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_HIP=On -DKokkos_ARCH_ZEN3=On -DKokkos_ARCH_VEGA90A=On")
diff --git a/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake b/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake
index 1cd33afe0aa2..b362b984082e 100644
--- a/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake
@@ -5,16 +5,7 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND CPPDEFS " -DTHRUST_IGNORE_CUB_VERSION_CHECK")
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
string(APPEND CUDA_FLAGS " -ccbin CC -O2 -arch sm_80 --use_fast_math")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
diff --git a/cime_config/machines/cmake_macros/gnugpu_summit.cmake b/cime_config/machines/cmake_macros/gnugpu_summit.cmake
index 4289adb81235..52faa0d641ad 100644
--- a/cime_config/machines/cmake_macros/gnugpu_summit.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_summit.cmake
@@ -10,13 +10,7 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND CPPDEFS " -DTHRUST_IGNORE_CUB_VERSION_CHECK")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet -ldl")
-endif()
+string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
set(MPICXX "mpiCC")
set(PIO_FILESYSTEM_HINTS "gpfs")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
set(USE_CUDA "TRUE")
diff --git a/cime_config/machines/cmake_macros/gnugpu_weaver.cmake b/cime_config/machines/cmake_macros/gnugpu_weaver.cmake
index 453c26ca6d26..ae2e6eba2092 100644
--- a/cime_config/machines/cmake_macros/gnugpu_weaver.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_weaver.cmake
@@ -8,13 +8,6 @@ endif()
string(APPEND CPPDEFS " -DTHRUST_IGNORE_CUB_VERSION_CHECK")
string(APPEND CXX_LIBS " -lstdc++")
set(MPICXX "mpiCC")
-set(NETCDF_C_PATH "/ascldap/users/projects/e3sm/scream/libs/netcdf-c/install/weaver/gcc/8.5.0/cuda/10.1.105")
-set(NETCDF_FORTRAN_PATH "/ascldap/users/projects/e3sm/scream/libs/netcdf-fortran/install/weaver/gcc/8.5.0/cuda/10.1.105")
-set(PNETCDF_PATH "/ascldap/users/projects/e3sm/scream/libs/pnetcdf/install/weaver/gcc/8.5.0/cuda/10.1.105")
set(HDF5_PATH "")
#string(APPEND CUDA_FLAGS " -O3 -arch sm_70 --use_fast_math")
set(USE_CUDA "TRUE")
-
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L${PNETCDF_PATH}/lib -lpnetcdf -L${NETCDF_C_PATH}/lib -lnetcdf -L${NETCDF_FORTRAN_PATH}/lib -lnetcdff")
-endif()
diff --git a/cime_config/machines/cmake_macros/ibm_ascent.cmake b/cime_config/machines/cmake_macros/ibm_ascent.cmake
index ec2e702dd09e..6baabb8d316e 100644
--- a/cime_config/machines/cmake_macros/ibm_ascent.cmake
+++ b/cime_config/machines/cmake_macros/ibm_ascent.cmake
@@ -7,7 +7,7 @@ if (COMP_NAME STREQUAL cice AND compile_threaded)
string(APPEND FFLAGS " -qsmp=omp:noopt")
endif()
string(APPEND LDFLAGS " -Wl,--relax -Wl,--allow-multiple-definition")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -lxlopt -lxl -lxlsmp -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
+string(APPEND SLIBS " -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -lxlopt -lxl -lxlsmp -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND CXX_LIBS "-lstdc++ -L$ENV{OLCF_XLC_ROOT}/lib -libmc++")
set(MPICC "mpicc")
set(MPICXX "mpiCC")
@@ -16,8 +16,5 @@ set(PIO_FILESYSTEM_HINTS "gpfs")
set(SCC "xlc_r")
set(SFC "xlf90_r")
set(SCXX "xlc++_r")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
set(SUPPORTS_CXX "TRUE")
string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_POWER9=On")
diff --git a/cime_config/machines/cmake_macros/ibm_summit.cmake b/cime_config/machines/cmake_macros/ibm_summit.cmake
index fb6f2bc7752c..6d5c731c09fc 100644
--- a/cime_config/machines/cmake_macros/ibm_summit.cmake
+++ b/cime_config/machines/cmake_macros/ibm_summit.cmake
@@ -7,10 +7,7 @@ if (COMP_NAME STREQUAL cice AND compile_threaded)
string(APPEND FFLAGS " -qsmp=omp:noopt")
endif()
string(APPEND LDFLAGS " -Wl,--relax -Wl,--allow-multiple-definition")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -lxlopt -lxl -lxlsmp -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
+string(APPEND SLIBS " -lxlopt -lxl -lxlsmp -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND CXX_LIBS "-lstdc++ -L$ENV{OLCF_XLC_ROOT}/lib -libmc++")
set(MPICC "mpicc")
set(MPICXX "mpiCC")
@@ -19,8 +16,5 @@ set(PIO_FILESYSTEM_HINTS "gpfs")
set(SCC "xlc_r")
set(SFC "xlf90_r")
set(SCXX "xlc++_r")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
set(SUPPORTS_CXX "TRUE")
string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_POWER9=On")
diff --git a/cime_config/machines/cmake_macros/ibmgpu.cmake b/cime_config/machines/cmake_macros/ibmgpu.cmake
index 2d2b199efbfd..15a4b536617d 100644
--- a/cime_config/machines/cmake_macros/ibmgpu.cmake
+++ b/cime_config/machines/cmake_macros/ibmgpu.cmake
@@ -34,7 +34,7 @@ string(APPEND FIXEDFLAGS " -qsuffix=f=f -qfixed=132")
string(APPEND FREEFLAGS " -qsuffix=f=f90:cpp=F90")
set(HAS_F2008_CONTIGUOUS "TRUE")
string(APPEND LDFLAGS " -Wl,--relax -Wl,--allow-multiple-definition -qsmp -qoffload -lcudart -L$ENV{CUDA_DIR}/lib64")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -lxlopt -lxl -lxlsmp -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
+string(APPEND SLIBS " -lxlopt -lxl -lxlsmp -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND CXX_LIBS " -lstdc++ -L$ENV{OLCF_XLC_ROOT}/lib -libmc++")
set(MPICC "mpicc")
set(MPICXX "mpiCC")
@@ -43,8 +43,5 @@ set(PIO_FILESYSTEM_HINTS "gpfs")
set(SCC "xlc_r")
set(SFC "xlf90_r")
set(SCXX "xlc++_r")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
set(SUPPORTS_CXX "TRUE")
string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_POWER9=On")
diff --git a/cime_config/machines/cmake_macros/intel18_snl-blake.cmake b/cime_config/machines/cmake_macros/intel18_snl-blake.cmake
index 0d4f006c7e7d..22fc50b887f9 100644
--- a/cime_config/machines/cmake_macros/intel18_snl-blake.cmake
+++ b/cime_config/machines/cmake_macros/intel18_snl-blake.cmake
@@ -30,7 +30,6 @@ string(APPEND LDFLAGS " -mkl -lstdc++")
if (compile_threaded)
string(APPEND LDFLAGS " -qopenmp")
endif()
-string(APPEND LDFLAGS " -L$(NETCDF_FORTRAN_PATH)/lib64")
string(APPEND FIXEDFLAGS " -fixed -132")
string(APPEND FREEFLAGS " -free")
set(HAS_F2008_CONTIGUOUS "TRUE")
diff --git a/cime_config/machines/cmake_macros/intel_anvil.cmake b/cime_config/machines/cmake_macros/intel_anvil.cmake
index 290869f36c80..ebd9ae4230b9 100644
--- a/cime_config/machines/cmake_macros/intel_anvil.cmake
+++ b/cime_config/machines/cmake_macros/intel_anvil.cmake
@@ -10,8 +10,6 @@ endif()
if (NOT DEBUG)
string(APPEND FFLAGS " -qno-opt-dynamic-align")
endif()
-execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --fflags OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND FFLAGS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
if (compile_threaded)
string(APPEND FFLAGS " -static-intel")
endif()
@@ -28,14 +26,4 @@ if (MPILIB STREQUAL impi)
set(MPIFC "mpiifort")
endif()
set(PIO_FILESYSTEM_HINTS "gpfs")
-execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
string(APPEND SLIBS " -Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/intel_badger.cmake b/cime_config/machines/cmake_macros/intel_badger.cmake
index 8f7a2d0eea7e..53d303f11b20 100644
--- a/cime_config/machines/cmake_macros/intel_badger.cmake
+++ b/cime_config/machines/cmake_macros/intel_badger.cmake
@@ -7,12 +7,5 @@ endif()
if (NOT MPILIB STREQUAL impi)
set(MPICXX "mpic++")
endif()
-execute_process(COMMAND $ENV{NETCDF_ROOT}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-execute_process(COMMAND $ENV{NETCDF_ROOT}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lnetcdff -llapack -lblas")
-string(APPEND SLIBS " -mkl -lpthread")
+string(APPEND SLIBS " -llapack -lblas -mkl -lpthread")
string(APPEND CXX_LIBS " -lstdc++")
-set(NETCDF_C_PATH "$ENV{NETCDF_ROOT}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_ROOT}")
-set(PNETCDF_PATH "$ENV{PNETCDF_ROOT}")
diff --git a/cime_config/machines/cmake_macros/intel_bebop.cmake b/cime_config/machines/cmake_macros/intel_bebop.cmake
index 83b54a2cc4cf..9012d9373ee7 100644
--- a/cime_config/machines/cmake_macros/intel_bebop.cmake
+++ b/cime_config/machines/cmake_macros/intel_bebop.cmake
@@ -10,11 +10,4 @@ if (MPILIB STREQUAL impi)
set(MPICXX "mpiicpc")
set(MPIFC "mpiifort")
endif()
-execute_process(COMMAND nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -mkl")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
+string(APPEND SLIBS " -mkl")
diff --git a/cime_config/machines/cmake_macros/intel_cascade.cmake b/cime_config/machines/cmake_macros/intel_cascade.cmake
index ba947116b98a..f63544759f5e 100644
--- a/cime_config/machines/cmake_macros/intel_cascade.cmake
+++ b/cime_config/machines/cmake_macros/intel_cascade.cmake
@@ -3,10 +3,8 @@ string(APPEND CPPDEFS " -DLINUX")
if (DEBUG)
string(APPEND FFLAGS " -check all -ftrapuv")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_HOME}")
set(PIO_FILESYSTEM_HINTS "lustre")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-string(APPEND SLIBS " -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -L$ENV{MKL_PATH}/lib/intel64 -lmkl_rt")
+string(APPEND SLIBS " -L$ENV{MKL_PATH}/lib/intel64 -lmkl_rt")
if (MPILIB STREQUAL mpich2)
string(APPEND SLIBS " -mkl=cluster")
endif()
diff --git a/cime_config/machines/cmake_macros/intel_chicoma.cmake b/cime_config/machines/cmake_macros/intel_chicoma.cmake
index 8f7a2d0eea7e..53d303f11b20 100644
--- a/cime_config/machines/cmake_macros/intel_chicoma.cmake
+++ b/cime_config/machines/cmake_macros/intel_chicoma.cmake
@@ -7,12 +7,5 @@ endif()
if (NOT MPILIB STREQUAL impi)
set(MPICXX "mpic++")
endif()
-execute_process(COMMAND $ENV{NETCDF_ROOT}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-execute_process(COMMAND $ENV{NETCDF_ROOT}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lnetcdff -llapack -lblas")
-string(APPEND SLIBS " -mkl -lpthread")
+string(APPEND SLIBS " -llapack -lblas -mkl -lpthread")
string(APPEND CXX_LIBS " -lstdc++")
-set(NETCDF_C_PATH "$ENV{NETCDF_ROOT}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_ROOT}")
-set(PNETCDF_PATH "$ENV{PNETCDF_ROOT}")
diff --git a/cime_config/machines/cmake_macros/intel_chrysalis.cmake b/cime_config/machines/cmake_macros/intel_chrysalis.cmake
index 32431b7e1f50..95dd058c33c5 100644
--- a/cime_config/machines/cmake_macros/intel_chrysalis.cmake
+++ b/cime_config/machines/cmake_macros/intel_chrysalis.cmake
@@ -17,15 +17,7 @@ if (NOT DEBUG)
string(APPEND FFLAGS " -O3 -qno-opt-dynamic-align")
endif()
set(PIO_FILESYSTEM_HINTS "gpfs")
-execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE1} -mkl")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
+string(APPEND SLIBS " -mkl")
string(APPEND LDFLAGS " -static-intel")
if (MPILIB STREQUAL impi)
set(MPICC "mpiicc")
diff --git a/cime_config/machines/cmake_macros/intel_compy.cmake b/cime_config/machines/cmake_macros/intel_compy.cmake
index f4b19f40a62c..5e3a8b982bb3 100644
--- a/cime_config/machines/cmake_macros/intel_compy.cmake
+++ b/cime_config/machines/cmake_macros/intel_compy.cmake
@@ -5,13 +5,8 @@ string(APPEND CPPDEFS " -DLINUX")
if (DEBUG)
string(APPEND FFLAGS " -check all -ftrapuv -init=snan")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_HOME}")
-set(PNETCDF_PATH "$ENV{PNETCDF_HOME}")
set(PIO_FILESYSTEM_HINTS "lustre")
-string(APPEND SLIBS " -lpmi -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -L$ENV{MKL_PATH}/lib/intel64/ -lmkl_rt $ENV{PNETCDF_LIBRARIES}")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
+string(APPEND SLIBS " -lpmi -L$ENV{MKL_PATH}/lib/intel64/ -lmkl_rt")
if (MPILIB STREQUAL impi)
set(MPICC "mpiicc")
set(MPICXX "mpiicpc")
diff --git a/cime_config/machines/cmake_macros/intel_constance.cmake b/cime_config/machines/cmake_macros/intel_constance.cmake
index 431c1b93d63f..9d192bd2ea0f 100644
--- a/cime_config/machines/cmake_macros/intel_constance.cmake
+++ b/cime_config/machines/cmake_macros/intel_constance.cmake
@@ -2,7 +2,5 @@ string(APPEND CPPDEFS " -DLINUX")
if (DEBUG)
string(APPEND FFLAGS " -check all -ftrapuv")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_HOME}")
set(PIO_FILESYSTEM_HINTS "lustre")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-string(APPEND SLIBS " -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi -L$ENV{MKL_PATH} -lmkl_rt")
+string(APPEND SLIBS " -lpmi -L$ENV{MKL_PATH} -lmkl_rt")
diff --git a/cime_config/machines/cmake_macros/intel_ghost.cmake b/cime_config/machines/cmake_macros/intel_ghost.cmake
index b91b4cecf701..4ffb13077e7e 100644
--- a/cime_config/machines/cmake_macros/intel_ghost.cmake
+++ b/cime_config/machines/cmake_macros/intel_ghost.cmake
@@ -2,14 +2,11 @@ set(ESMF_LIBDIR "/projects/ccsm/esmf-6.3.0rp1/lib/libO/Linux.intel.64.openmpi.de
if (MPILIB STREQUAL openmpi)
set(MPI_PATH "/opt/openmpi-1.8-intel")
endif()
-set(NETCDF_PATH "$ENV{NETCDFROOT}")
if (MPILIB STREQUAL mpi-serial AND NOT compile_threaded)
set(PFUNIT_PATH "/projects/ccsm/pfunit/3.2.9/mpi-serial")
endif()
set(PIO_FILESYSTEM_HINTS "lustre")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-execute_process(COMMAND ${NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -L/projects/ccsm/BLAS-intel -lblas_LINUX")
+string(APPEND SLIBS " -L/projects/ccsm/BLAS-intel -lblas_LINUX")
if (MPILIB STREQUAL openmpi)
string(APPEND SLIBS " -mkl=cluster")
endif()
diff --git a/cime_config/machines/cmake_macros/intel_grizzly.cmake b/cime_config/machines/cmake_macros/intel_grizzly.cmake
index 8f7a2d0eea7e..53d303f11b20 100644
--- a/cime_config/machines/cmake_macros/intel_grizzly.cmake
+++ b/cime_config/machines/cmake_macros/intel_grizzly.cmake
@@ -7,12 +7,5 @@ endif()
if (NOT MPILIB STREQUAL impi)
set(MPICXX "mpic++")
endif()
-execute_process(COMMAND $ENV{NETCDF_ROOT}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-execute_process(COMMAND $ENV{NETCDF_ROOT}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lnetcdff -llapack -lblas")
-string(APPEND SLIBS " -mkl -lpthread")
+string(APPEND SLIBS " -llapack -lblas -mkl -lpthread")
string(APPEND CXX_LIBS " -lstdc++")
-set(NETCDF_C_PATH "$ENV{NETCDF_ROOT}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_ROOT}")
-set(PNETCDF_PATH "$ENV{PNETCDF_ROOT}")
diff --git a/cime_config/machines/cmake_macros/intel_itasca.cmake b/cime_config/machines/cmake_macros/intel_itasca.cmake
index e6838280e61d..ea311508b7da 100644
--- a/cime_config/machines/cmake_macros/intel_itasca.cmake
+++ b/cime_config/machines/cmake_macros/intel_itasca.cmake
@@ -10,4 +10,4 @@ endif()
set(MPICC "mpiicc")
set(MPICXX "mpiicpc")
set(MPIFC "mpiifort")
-string(APPEND SLIBS " -L/soft/netcdf/fortran-4.4-intel-sp1-update3-parallel/lib -lnetcdff -L/soft/hdf5/hdf5-1.8.13-intel-2013-sp1-update3-impi-5.0.0.028/lib -openmp -fPIC -lnetcdf -lnetcdf -L/soft/intel/x86_64/2013/composer_xe_2013/composer_xe_2013_sp1.3.174/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lpthread -lm")
+string(APPEND SLIBS " -L/soft/hdf5/hdf5-1.8.13-intel-2013-sp1-update3-impi-5.0.0.028/lib -openmp -fPIC -L/soft/intel/x86_64/2013/composer_xe_2013/composer_xe_2013_sp1.3.174/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lpthread -lm")
diff --git a/cime_config/machines/cmake_macros/intel_lawrencium-lr3.cmake b/cime_config/machines/cmake_macros/intel_lawrencium-lr3.cmake
index a0090c35e9df..1e694d18cda2 100644
--- a/cime_config/machines/cmake_macros/intel_lawrencium-lr3.cmake
+++ b/cime_config/machines/cmake_macros/intel_lawrencium-lr3.cmake
@@ -2,5 +2,4 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_VPRINTF -DHAVE_GETTIMEOFDAY")
endif()
set(LAPACK_LIBDIR "/global/software/sl-6.x86_64/modules/intel/2016.1.150/lapack/3.6.0-intel/lib")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-string(APPEND SLIBS " -lnetcdff -lnetcdf -mkl")
+string(APPEND SLIBS " -mkl")
diff --git a/cime_config/machines/cmake_macros/intel_lawrencium-lr6.cmake b/cime_config/machines/cmake_macros/intel_lawrencium-lr6.cmake
index a0090c35e9df..1e694d18cda2 100644
--- a/cime_config/machines/cmake_macros/intel_lawrencium-lr6.cmake
+++ b/cime_config/machines/cmake_macros/intel_lawrencium-lr6.cmake
@@ -2,5 +2,4 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_VPRINTF -DHAVE_GETTIMEOFDAY")
endif()
set(LAPACK_LIBDIR "/global/software/sl-6.x86_64/modules/intel/2016.1.150/lapack/3.6.0-intel/lib")
-set(NETCDF_PATH "$ENV{NETCDF_DIR}")
-string(APPEND SLIBS " -lnetcdff -lnetcdf -mkl")
+string(APPEND SLIBS " -mkl")
diff --git a/cime_config/machines/cmake_macros/intel_mappy.cmake b/cime_config/machines/cmake_macros/intel_mappy.cmake
index 0d32fd47b91e..bf8aaa30ea48 100644
--- a/cime_config/machines/cmake_macros/intel_mappy.cmake
+++ b/cime_config/machines/cmake_macros/intel_mappy.cmake
@@ -2,7 +2,4 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND CXX_LIBS " -lstdc++ -lmpi_cxx")
-set(NETCDF_PATH "$ENV{NETCDFROOT}")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-execute_process(COMMAND ${NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lblas -llapack")
+string(APPEND SLIBS " -lblas -llapack")
diff --git a/cime_config/machines/cmake_macros/intel_melvin.cmake b/cime_config/machines/cmake_macros/intel_melvin.cmake
index 0d32fd47b91e..bf8aaa30ea48 100644
--- a/cime_config/machines/cmake_macros/intel_melvin.cmake
+++ b/cime_config/machines/cmake_macros/intel_melvin.cmake
@@ -2,7 +2,4 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_SLASHPROC")
endif()
string(APPEND CXX_LIBS " -lstdc++ -lmpi_cxx")
-set(NETCDF_PATH "$ENV{NETCDFROOT}")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-execute_process(COMMAND ${NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -lblas -llapack")
+string(APPEND SLIBS " -lblas -llapack")
diff --git a/cime_config/machines/cmake_macros/intel_onyx.cmake b/cime_config/machines/cmake_macros/intel_onyx.cmake
index c09f846977f8..d87e8575f383 100644
--- a/cime_config/machines/cmake_macros/intel_onyx.cmake
+++ b/cime_config/machines/cmake_macros/intel_onyx.cmake
@@ -2,5 +2,4 @@ string(APPEND FFLAGS " -fimf-use-svml")
if (NOT DEBUG)
string(APPEND FFLAGS " -qno-opt-dynamic-align")
endif()
-string(APPEND SLIBS " -Wl,--as-needed,-L$ENV{NETCDF_DIR}/lib -lnetcdf")
string(APPEND SLIBS " -mkl -lpthread")
diff --git a/cime_config/machines/cmake_macros/intel_pm-cpu.cmake b/cime_config/machines/cmake_macros/intel_pm-cpu.cmake
index cd26d8891b2c..8f1616a2cb26 100644
--- a/cime_config/machines/cmake_macros/intel_pm-cpu.cmake
+++ b/cime_config/machines/cmake_macros/intel_pm-cpu.cmake
@@ -2,17 +2,8 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}/lib -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
-#if (NOT MPILIB STREQUAL mpi-serial)
-# string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-#endif()
string(APPEND SLIBS " -qmkl")
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
set(MPICC "cc")
set(MPICXX "CC")
diff --git a/cime_config/machines/cmake_macros/intel_quartz.cmake b/cime_config/machines/cmake_macros/intel_quartz.cmake
index 6a8a87417286..3d159b514967 100644
--- a/cime_config/machines/cmake_macros/intel_quartz.cmake
+++ b/cime_config/machines/cmake_macros/intel_quartz.cmake
@@ -7,7 +7,3 @@ string(APPEND LDFLAGS " -L/usr/tce/packages/gcc/gcc-10.3.1-magic/lib/gcc/x86_64-
set(KOKKOS_OPTIONS "--with-serial --ldflags='-L/usr/tce/packages/gcc/gcc-10.3.1-magic/lib/gcc/x86_64-redhat-linux/10/'")
set(MPI_LIB_NAME "mpich")
set(MPI_PATH "/usr/tce/packages/mvapich2/mvapich2-2.3.7-intel-classic-2021.6.0/")
-set(NETCDF_PATH "$ENV{NETCDFROOT}")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-execute_process(COMMAND /usr/tce/packages/netcdf-fortran/netcdf-fortran-4.6.0-mvapich2-2.3.7-intel-classic-2021.6.0/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
diff --git a/cime_config/machines/cmake_macros/intel_ruby.cmake b/cime_config/machines/cmake_macros/intel_ruby.cmake
index 6a8a87417286..3d159b514967 100644
--- a/cime_config/machines/cmake_macros/intel_ruby.cmake
+++ b/cime_config/machines/cmake_macros/intel_ruby.cmake
@@ -7,7 +7,3 @@ string(APPEND LDFLAGS " -L/usr/tce/packages/gcc/gcc-10.3.1-magic/lib/gcc/x86_64-
set(KOKKOS_OPTIONS "--with-serial --ldflags='-L/usr/tce/packages/gcc/gcc-10.3.1-magic/lib/gcc/x86_64-redhat-linux/10/'")
set(MPI_LIB_NAME "mpich")
set(MPI_PATH "/usr/tce/packages/mvapich2/mvapich2-2.3.7-intel-classic-2021.6.0/")
-set(NETCDF_PATH "$ENV{NETCDFROOT}")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-execute_process(COMMAND /usr/tce/packages/netcdf-fortran/netcdf-fortran-4.6.0-mvapich2-2.3.7-intel-classic-2021.6.0/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
diff --git a/cime_config/machines/cmake_macros/intel_sandiatoss3.cmake b/cime_config/machines/cmake_macros/intel_sandiatoss3.cmake
index 836a8a6dbe17..4ca62c853e33 100644
--- a/cime_config/machines/cmake_macros/intel_sandiatoss3.cmake
+++ b/cime_config/machines/cmake_macros/intel_sandiatoss3.cmake
@@ -5,14 +5,11 @@ set(ESMF_LIBDIR "/projects/ccsm/esmf-6.3.0rp1/lib/libO/Linux.intel.64.openmpi.de
if (MPILIB STREQUAL openmpi)
set(MPI_PATH "$ENV{MPIHOME}")
endif()
-set(NETCDF_PATH "$ENV{NETCDFROOT}")
if (MPILIB STREQUAL mpi-serial AND NOT compile_threaded)
set(PFUNIT_PATH "/projects/ccsm/pfunit/3.2.9/mpi-serial")
endif()
set(PIO_FILESYSTEM_HINTS "lustre")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-execute_process(COMMAND ${NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -L/projects/ccsm/BLAS-intel -lblas_LINUX -L$ENV{MKL_LIBS} -lmkl_rt")
+string(APPEND SLIBS " -L/projects/ccsm/BLAS-intel -lblas_LINUX -L$ENV{MKL_LIBS} -lmkl_rt")
if (MPILIB STREQUAL openmpi)
string(APPEND SLIBS " -mkl=cluster")
endif()
diff --git a/cime_config/machines/cmake_macros/intel_sooty.cmake b/cime_config/machines/cmake_macros/intel_sooty.cmake
index 8773085262ee..be00dfa16da8 100644
--- a/cime_config/machines/cmake_macros/intel_sooty.cmake
+++ b/cime_config/machines/cmake_macros/intel_sooty.cmake
@@ -2,7 +2,5 @@ string(APPEND CPPDEFS " -DLINUX")
if (DEBUG)
string(APPEND FFLAGS " -check all -ftrapuv -init=snan")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
set(PIO_FILESYSTEM_HINTS "lustre")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-string(APPEND SLIBS " -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi -L$ENV{MKL_PATH} -lmkl_rt")
+string(APPEND SLIBS " -lpmi -L$ENV{MKL_PATH} -lmkl_rt")
diff --git a/cime_config/machines/cmake_macros/intel_stampede2.cmake b/cime_config/machines/cmake_macros/intel_stampede2.cmake
index 8cc5f38147e3..fbc783e342f9 100644
--- a/cime_config/machines/cmake_macros/intel_stampede2.cmake
+++ b/cime_config/machines/cmake_macros/intel_stampede2.cmake
@@ -11,18 +11,5 @@ endif()
string(APPEND FFLAGS " -xCORE-AVX2")
set(HDF5_PATH "$ENV{TACC_HDF5_DIR}")
set(MPI_LIB_NAME "impi")
-if (MPILIB STREQUAL impi)
- set(NETCDF_PATH "$ENV{TACC_NETCDF_DIR}")
-endif()
-if (MPILIB STREQUAL mpi-serial)
- set(NETCDF_PATH "$ENV{TACC_NETCDF_DIR}")
-endif()
set(PETSC_PATH "$ENV{PETSC_DIR}")
-if (MPILIB STREQUAL impi)
- set(PNETCDF_PATH "$ENV{TACC_PNETCDF_DIR}")
- string(APPEND SLIBS " -L${NETCDF_PATH} -lnetcdff -Wl,--as-needed,-L${NETCDF_PATH}/lib -lnetcdff -lnetcdf")
-endif()
-if (MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L${NETCDF_PATH} -lnetcdff -Wl,--as-needed,-L${NETCDF_PATH}/lib -lnetcdff -lnetcdf")
-endif()
string(APPEND SLIBS " -mkl -lpthread")
diff --git a/cime_config/machines/cmake_macros/intel_tahoma.cmake b/cime_config/machines/cmake_macros/intel_tahoma.cmake
index 94576ccad051..2dbf3e0e9c94 100644
--- a/cime_config/machines/cmake_macros/intel_tahoma.cmake
+++ b/cime_config/machines/cmake_macros/intel_tahoma.cmake
@@ -6,14 +6,9 @@ if (DEBUG)
string(APPEND FFLAGS " -check all -ftrapuv -init=snan")
endif()
string(APPEND SLIBS " -L$ENV{HDF5_PATH}/lib -lhdf5_fortran -lhdf5 -lhdf5_hl -lhdf5hl_fortran")
-string(APPEND SLIBS " -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff")
string(APPEND SLIBS " -L$ENV{CURL_PATH}/lib -lcurl")
string(APPEND SLIBS " -L$ENV{LAPACK_PATH}/lib64 -lblas -llapack")
string(APPEND SLIBS " -lpmi -L$ENV{MKL_PATH}/lib/intel64/ -lmkl_rt")
-set(HDF5_PATH "$ENV{HDF5_PATH}")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
set(PIO_FILESYSTEM_HINTS "lustre")
diff --git a/cime_config/machines/cmake_macros/intel_theta.cmake b/cime_config/machines/cmake_macros/intel_theta.cmake
index a4d6fc868521..2aac2db50980 100644
--- a/cime_config/machines/cmake_macros/intel_theta.cmake
+++ b/cime_config/machines/cmake_macros/intel_theta.cmake
@@ -8,8 +8,4 @@ string(APPEND FFLAGS " -DHAVE_ERF_INTRINSICS")
set(SCC "icc")
set(SCXX "icpc")
set(SFC "ifort")
-string(APPEND SLIBS " -L$ENV{NETCDF_DIR}/lib -lnetcdff -L$ENV{NETCDF_DIR}/lib -lnetcdf -Wl,-rpath -Wl,$ENV{NETCDF_DIR}/lib")
string(APPEND SLIBS " -mkl -lpthread")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core")
-endif()
diff --git a/cime_config/machines/cmake_macros/nag_cascade.cmake b/cime_config/machines/cmake_macros/nag_cascade.cmake
index 3d59f8b6e643..d16126b82bd9 100644
--- a/cime_config/machines/cmake_macros/nag_cascade.cmake
+++ b/cime_config/machines/cmake_macros/nag_cascade.cmake
@@ -8,7 +8,5 @@ endif()
if (MPILIB STREQUAL mvapich2)
set(MPI_PATH "$ENV{MPI_LIB}")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_ROOT}")
set(PIO_FILESYSTEM_HINTS "lustre")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-string(APPEND SLIBS " -L$ENV{NETCDF_ROOT}/lib -lnetcdf -lnetcdff -L$ENV{MKL_PATH} -lmkl_rt")
+string(APPEND SLIBS " -L$ENV{MKL_PATH} -lmkl_rt")
diff --git a/cime_config/machines/cmake_macros/nag_constance.cmake b/cime_config/machines/cmake_macros/nag_constance.cmake
index 8db30816e101..09945033696d 100644
--- a/cime_config/machines/cmake_macros/nag_constance.cmake
+++ b/cime_config/machines/cmake_macros/nag_constance.cmake
@@ -8,7 +8,5 @@ endif()
if (DEBUG)
string(APPEND FFLAGS " -O0 -v")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_HOME}")
set(PIO_FILESYSTEM_HINTS "lustre")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-string(APPEND SLIBS " -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi -L$ENV{MKL_PATH} -lmkl_rt")
+string(APPEND SLIBS " -lpmi -L$ENV{MKL_PATH} -lmkl_rt")
diff --git a/cime_config/machines/cmake_macros/nvidia_alvarez.cmake b/cime_config/machines/cmake_macros/nvidia_alvarez.cmake
index 84c5767a1b68..a704d43bdceb 100644
--- a/cime_config/machines/cmake_macros/nvidia_alvarez.cmake
+++ b/cime_config/machines/cmake_macros/nvidia_alvarez.cmake
@@ -2,14 +2,8 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack")
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
endif()
diff --git a/cime_config/machines/cmake_macros/nvidia_chicoma-cpu.cmake b/cime_config/machines/cmake_macros/nvidia_chicoma-cpu.cmake
index 94fd17b8e1f2..de1ab723e90d 100644
--- a/cime_config/machines/cmake_macros/nvidia_chicoma-cpu.cmake
+++ b/cime_config/machines/cmake_macros/nvidia_chicoma-cpu.cmake
@@ -2,14 +2,8 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack")
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
set(PIO_FILESYSTEM_HINTS "lustre")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
diff --git a/cime_config/machines/cmake_macros/nvidia_pm-cpu.cmake b/cime_config/machines/cmake_macros/nvidia_pm-cpu.cmake
index 3ea6653cada2..a704d43bdceb 100644
--- a/cime_config/machines/cmake_macros/nvidia_pm-cpu.cmake
+++ b/cime_config/machines/cmake_macros/nvidia_pm-cpu.cmake
@@ -2,17 +2,8 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
endif()
diff --git a/cime_config/machines/cmake_macros/nvidia_pm-gpu.cmake b/cime_config/machines/cmake_macros/nvidia_pm-gpu.cmake
index 9d0f90b9e33d..5c55dc6bb2f4 100644
--- a/cime_config/machines/cmake_macros/nvidia_pm-gpu.cmake
+++ b/cime_config/machines/cmake_macros/nvidia_pm-gpu.cmake
@@ -2,17 +2,8 @@ string(APPEND CONFIG_ARGS " --host=cray")
if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_SLASHPROC -DHAVE_GETTIMEOFDAY")
endif()
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
endif()
diff --git a/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake b/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake
index 27c30d373219..e9606e066060 100644
--- a/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake
+++ b/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake
@@ -6,17 +6,8 @@ if (COMP_NAME STREQUAL gptl)
endif()
string(APPEND CPPDEFS " -DTHRUST_IGNORE_CUB_VERSION_CHECK")
string(APPEND CUDA_FLAGS " -ccbin CC -O2 -arch sm_80 --use_fast_math")
-string(APPEND SLIBS " -L$ENV{CRAY_HDF5_PARALLEL_PREFIX}/lib -lhdf5_hl -lhdf5 -L$ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX} -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
string(APPEND SLIBS " -lblas -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
set(CXX_LINKER "FORTRAN")
-set(NETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
-set(NETCDF_C_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
-set(NETCDF_FORTRAN_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
-set(HDF5_PATH "$ENV{CRAY_HDF5_PARALLEL_PREFIX}")
-set(PNETCDF_PATH "$ENV{CRAY_PARALLEL_NETCDF_PREFIX}")
set(SCC "cc")
set(SCXX "CC")
set(SFC "ftn")
diff --git a/cime_config/machines/cmake_macros/oneapi-ifort.cmake b/cime_config/machines/cmake_macros/oneapi-ifort.cmake
index 32dbcf1d5e9f..d05918679ed8 100644
--- a/cime_config/machines/cmake_macros/oneapi-ifort.cmake
+++ b/cime_config/machines/cmake_macros/oneapi-ifort.cmake
@@ -46,9 +46,4 @@ set(SFC "ifort")
if (compile_threaded)
string(APPEND LDFLAGS " -qopenmp")
endif()
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -Wl,-rpath -Wl,$ENV{NETCDF_PATH}/lib -mkl")
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
+string(APPEND SLIBS " -mkl")
diff --git a/cime_config/machines/cmake_macros/oneapi-ifx_chrysalis.cmake b/cime_config/machines/cmake_macros/oneapi-ifx_chrysalis.cmake
index 78a353d19316..55203e48f587 100644
--- a/cime_config/machines/cmake_macros/oneapi-ifx_chrysalis.cmake
+++ b/cime_config/machines/cmake_macros/oneapi-ifx_chrysalis.cmake
@@ -1,11 +1,4 @@
set(MPIFC "mpif90")
set(MPICC "mpicc")
set(MPICXX "mpicxx")
-execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -Wl,-rpath -Wl,$ENV{NETCDF_FORTRAN_PATH}/lib ")
-execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -Wl,-rpath -Wl,$ENV{NETCDF_C_PATH}/lib:$ENV{PNETCDF_PATH}/lib")
string(APPEND SLIBS " -qmkl -fiopenmp -fopenmp-targets=spir64")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/oneapi-ifx_jlse.cmake b/cime_config/machines/cmake_macros/oneapi-ifx_jlse.cmake
index ab2fe60678fd..40d3a213bcf3 100644
--- a/cime_config/machines/cmake_macros/oneapi-ifx_jlse.cmake
+++ b/cime_config/machines/cmake_macros/oneapi-ifx_jlse.cmake
@@ -1,7 +1 @@
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -Wl,-rpath -Wl,$ENV{NETCDF_PATH}/lib")
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
string(APPEND SLIBS " -qmkl -fiopenmp -fopenmp-targets=spir64")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/oneapi-ifx_sunspot.cmake b/cime_config/machines/cmake_macros/oneapi-ifx_sunspot.cmake
index 6809573b8622..ce2026179743 100644
--- a/cime_config/machines/cmake_macros/oneapi-ifx_sunspot.cmake
+++ b/cime_config/machines/cmake_macros/oneapi-ifx_sunspot.cmake
@@ -1,8 +1,2 @@
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -Wl,-rpath -Wl,$ENV{NETCDF_PATH}/lib")
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
string(APPEND SLIBS " -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -fiopenmp -fopenmp-targets=spir64")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
diff --git a/cime_config/machines/cmake_macros/oneapi-ifxgpu_jlse.cmake b/cime_config/machines/cmake_macros/oneapi-ifxgpu_jlse.cmake
index c7ff49c31590..af72e0711538 100644
--- a/cime_config/machines/cmake_macros/oneapi-ifxgpu_jlse.cmake
+++ b/cime_config/machines/cmake_macros/oneapi-ifxgpu_jlse.cmake
@@ -1,12 +1,6 @@
set(CXX_LINKER "CXX")
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -Wl,-rpath -Wl,$ENV{NETCDF_PATH}/lib -lmkl_intel_lp64 -lmkl_sequential -lmkl_core")
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
-string(APPEND SLIBS " -fiopenmp -fopenmp-targets=spir64")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
+string(APPEND SLIBS " -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -fiopenmp -fopenmp-targets=spir64")
set(USE_SYCL "TRUE")
string(APPEND SYCL_FLAGS " -\-intel -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend \"-device 12.60.7\"") # for pvc node only
#string(APPEND SYCL_FLAGS " -\-intel -fsycl")
diff --git a/cime_config/machines/cmake_macros/oneapi-ifxgpu_sunspot.cmake b/cime_config/machines/cmake_macros/oneapi-ifxgpu_sunspot.cmake
index 817d18ca058f..8ce913c3a1da 100644
--- a/cime_config/machines/cmake_macros/oneapi-ifxgpu_sunspot.cmake
+++ b/cime_config/machines/cmake_macros/oneapi-ifxgpu_sunspot.cmake
@@ -1,12 +1,7 @@
set(CXX_LINKER "CXX")
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -Wl,-rpath -Wl,$ENV{NETCDF_PATH}/lib -lmkl_intel_lp64 -lmkl_sequential -lmkl_core")
-execute_process(COMMAND $ENV{NETCDF_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
+string(APPEND SLIBS " -lmkl_intel_lp64 -lmkl_sequential -lmkl_core")
string(APPEND SLIBS " -fiopenmp -fopenmp-targets=spir64")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
set(USE_SYCL "TRUE")
string(APPEND SYCL_FLAGS " -\-intel -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend \"-device 12.60.7\"")
#string(APPEND SYCL_FLAGS " -\-intel -fsycl")
diff --git a/cime_config/machines/cmake_macros/pgi_ascent.cmake b/cime_config/machines/cmake_macros/pgi_ascent.cmake
index ef4c807d72f0..40d2a115ba5e 100644
--- a/cime_config/machines/cmake_macros/pgi_ascent.cmake
+++ b/cime_config/machines/cmake_macros/pgi_ascent.cmake
@@ -10,12 +10,9 @@ endif()
if (COMP_NAME STREQUAL cice)
string(APPEND FFLAGS " -Mnovect")
endif()
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
+string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
set(MPICXX "mpiCC")
set(PIO_FILESYSTEM_HINTS "gpfs")
set(SFC "pgfortran")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
set(CMAKE_NO_SYSTEM_FROM_IMPORTED ON)
string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_POWER9=On")
diff --git a/cime_config/machines/cmake_macros/pgi_compy.cmake b/cime_config/machines/cmake_macros/pgi_compy.cmake
index 8cda2a5cf30d..5ed28a7ebe4f 100644
--- a/cime_config/machines/cmake_macros/pgi_compy.cmake
+++ b/cime_config/machines/cmake_macros/pgi_compy.cmake
@@ -12,13 +12,8 @@ endif()
if (COMP_NAME STREQUAL cice)
string(APPEND FFLAGS " -Mnovect")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_HOME}")
set(PIO_FILESYSTEM_HINTS "lustre")
-set(PNETCDF_PATH "$ENV{PNETCDF_HOME}")
-string(APPEND SLIBS " -lpmi -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -L$ENV{MKL_PATH}/lib/intel64/ -lmkl_rt $ENV{PNETCDF_LIBRARIES}")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
+string(APPEND SLIBS " -lpmi -L$ENV{MKL_PATH}/lib/intel64/ -lmkl_rt")
if (MPILIB STREQUAL impi)
set(MPICC "mpipgcc")
set(MPICXX "mpipgcxx")
diff --git a/cime_config/machines/cmake_macros/pgi_constance.cmake b/cime_config/machines/cmake_macros/pgi_constance.cmake
index 112bc32fb334..98fc6fad465b 100644
--- a/cime_config/machines/cmake_macros/pgi_constance.cmake
+++ b/cime_config/machines/cmake_macros/pgi_constance.cmake
@@ -9,7 +9,5 @@ if (DEBUG)
string(APPEND FFLAGS " -traceback -fpe0 -check all -check noarg_temp_created -ftrapuv")
string(APPEND FFLAGS " -C -Mchkfpstk -Mchkstk -Mdalign -Mdepchk -Miomutex -Mrecursive -Meh_frame")
endif()
-set(NETCDF_PATH "$ENV{NETCDF_HOME}")
set(PIO_FILESYSTEM_HINTS "lustre")
-set(PNETCDF_PATH "$ENV{PNETCDFROOT}")
-string(APPEND SLIBS " -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff -lpmi -L$ENV{MPI_LIB} -lmpich")
+string(APPEND SLIBS " -lpmi -L$ENV{MPI_LIB} -lmpich")
diff --git a/cime_config/machines/cmake_macros/pgi_summit.cmake b/cime_config/machines/cmake_macros/pgi_summit.cmake
index b040e24ab4ed..6f7e5a02f6fa 100644
--- a/cime_config/machines/cmake_macros/pgi_summit.cmake
+++ b/cime_config/machines/cmake_macros/pgi_summit.cmake
@@ -10,14 +10,8 @@ endif()
if (COMP_NAME STREQUAL cice)
string(APPEND FFLAGS " -Mnovect")
endif()
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
+string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
set(MPICXX "mpiCC")
set(PIO_FILESYSTEM_HINTS "gpfs")
set(SFC "pgfortran")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_POWER9=On")
diff --git a/cime_config/machines/cmake_macros/pgigpu.cmake b/cime_config/machines/cmake_macros/pgigpu.cmake
index 5d4604c6ca18..53739c8f76ac 100644
--- a/cime_config/machines/cmake_macros/pgigpu.cmake
+++ b/cime_config/machines/cmake_macros/pgigpu.cmake
@@ -50,7 +50,4 @@ set(MPIFC "mpif90")
set(SCC "pgcc")
set(SCXX "pgc++")
set(SFC "pgfortran")
-set(NETCDF_C_PATH "$ENV{NETCDF_C_PATH}")
-set(NETCDF_FORTRAN_PATH "$ENV{NETCDF_FORTRAN_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
set(PIO_FILESYSTEM_HINTS "gpfs")
diff --git a/cime_config/machines/cmake_macros/pgigpu_ascent.cmake b/cime_config/machines/cmake_macros/pgigpu_ascent.cmake
index 122911006fb9..7b65563470d0 100644
--- a/cime_config/machines/cmake_macros/pgigpu_ascent.cmake
+++ b/cime_config/machines/cmake_macros/pgigpu_ascent.cmake
@@ -1,3 +1,3 @@
string(APPEND LDFLAGS " -gpu=cc70,cc60 -Minfo=accel")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
+string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_POWER9=On -DKokkos_ARCH_VOLTA70=On -DKokkos_ENABLE_CUDA=On -DKokkos_ENABLE_CUDA_LAMBDA=On")
diff --git a/cime_config/machines/cmake_macros/pgigpu_blues.cmake b/cime_config/machines/cmake_macros/pgigpu_blues.cmake
index 2522cadb4717..3b532de7591f 100644
--- a/cime_config/machines/cmake_macros/pgigpu_blues.cmake
+++ b/cime_config/machines/cmake_macros/pgigpu_blues.cmake
@@ -2,7 +2,4 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND LDFLAGS " -Minline -ta=tesla:ccall,fastmath,loadcache:L1,unroll,fma,managed,deepcopy,nonvvm -Mcuda -Minfo=accel")
-execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -llapack -lblas")
-execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
+string(APPEND SLIBS " -llapack -lblas")
diff --git a/cime_config/machines/cmake_macros/pgigpu_summit.cmake b/cime_config/machines/cmake_macros/pgigpu_summit.cmake
index 19d03f930734..7b65563470d0 100644
--- a/cime_config/machines/cmake_macros/pgigpu_summit.cmake
+++ b/cime_config/machines/cmake_macros/pgigpu_summit.cmake
@@ -1,6 +1,3 @@
string(APPEND LDFLAGS " -gpu=cc70,cc60 -Minfo=accel")
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf -L$ENV{HDF5_PATH}/lib -lhdf5_hl -lhdf5 -L$ENV{NETCDF_C_PATH}/lib -lnetcdf -L$ENV{NETCDF_FORTRAN_PATH}/lib -lnetcdff -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
-if (NOT MPILIB STREQUAL mpi-serial)
- string(APPEND SLIBS " -L$ENV{ADIOS2_DIR}/lib64 -ladios2_c_mpi -ladios2_c -ladios2_core_mpi -ladios2_core -ladios2_evpath -ladios2_ffs -ladios2_dill -ladios2_atl -ladios2_enet")
-endif()
+string(APPEND SLIBS " -L$ENV{ESSL_PATH}/lib64 -lessl -L$ENV{OLCF_NETLIB_LAPACK_ROOT}/lib64 -llapack")
string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_POWER9=On -DKokkos_ARCH_VOLTA70=On -DKokkos_ENABLE_CUDA=On -DKokkos_ENABLE_CUDA_LAMBDA=On")
diff --git a/cime_config/machines/cmake_macros/pgigpu_swing.cmake b/cime_config/machines/cmake_macros/pgigpu_swing.cmake
index dc5c07537859..a7f40d8e2243 100644
--- a/cime_config/machines/cmake_macros/pgigpu_swing.cmake
+++ b/cime_config/machines/cmake_macros/pgigpu_swing.cmake
@@ -2,7 +2,4 @@ if (COMP_NAME STREQUAL gptl)
string(APPEND CPPDEFS " -DHAVE_NANOTIME -DBIT64 -DHAVE_GETTIMEOFDAY")
endif()
string(APPEND LDFLAGS " -gpu=cc70,cc60,deepcopy -Minfo=accel")
-execute_process(COMMAND $ENV{NETCDF_FORTRAN_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0} -llapack -lblas")
-execute_process(COMMAND $ENV{NETCDF_C_PATH}/bin/nc-config --libs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
+string(APPEND SLIBS " -llapack -lblas")
diff --git a/cime_config/machines/cmake_macros/userdefined.cmake b/cime_config/machines/cmake_macros/userdefined.cmake
index b8daf97ddbf4..b6067f1193a6 100644
--- a/cime_config/machines/cmake_macros/userdefined.cmake
+++ b/cime_config/machines/cmake_macros/userdefined.cmake
@@ -3,7 +3,3 @@ string(APPEND CPPDEFS " ")
set(ESMF_LIBDIR "")
set(MPI_LIB_NAME "")
set(MPI_PATH "")
-set(NETCDF_PATH "USERDEFINED_MUST_EDIT_THIS")
-set(PNETCDF_PATH "")
-execute_process(COMMAND ${NETCDF_PATH}/bin/nf-config --flibs OUTPUT_VARIABLE SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0 OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(APPEND SLIBS " # USERDEFINED ${SHELL_CMD_OUTPUT_BUILD_INTERNAL_IGNORE0}")
diff --git a/cime_config/machines/config_machines.xml b/cime_config/machines/config_machines.xml
index 3b201f352902..a4b16318eb1b 100644
--- a/cime_config/machines/config_machines.xml
+++ b/cime_config/machines/config_machines.xml
@@ -259,15 +259,17 @@
MPI_Bcast
$SHELL{if [ -z "$Albany_ROOT" ]; then echo /global/common/software/e3sm/mali_tpls/albany-e3sm-serial-release-gcc; else echo "$Albany_ROOT"; fi}
$SHELL{if [ -z "$Trilinos_ROOT" ]; then echo /global/common/software/e3sm/mali_tpls/trilinos-e3sm-serial-release-gcc; else echo "$Trilinos_ROOT"; fi}
+ $ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}
+ $ENV{CRAY_PARALLEL_NETCDF_PREFIX}
- /global/cfs/cdirs/e3sm/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.15/gcc-11.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /global/cfs/cdirs/e3sm/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.15/gcc-11.2.0; else echo "$ADIOS2_ROOT"; fi}
- /global/cfs/cdirs/e3sm/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.15/nvidia-21.11
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /global/cfs/cdirs/e3sm/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.15/nvidia-21.11; else echo "$ADIOS2_ROOT"; fi}
- /global/cfs/cdirs/e3sm/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.15/aocc-3.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /global/cfs/cdirs/e3sm/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.15/aocc-3.2.0; else echo "$ADIOS2_ROOT"; fi}
-1
@@ -391,6 +393,8 @@
FALSE
/global/cfs/cdirs/e3sm/perl/lib/perl5-only-switch
MPI_Bcast
+ $ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}
+ $ENV{CRAY_PARALLEL_NETCDF_PREFIX}
1
@@ -399,10 +403,10 @@
1
- /global/cfs/cdirs/e3sm/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.15/gcc-11.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /global/cfs/cdirs/e3sm/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.15/gcc-11.2.0; else echo "$ADIOS2_ROOT"; fi}
- /global/cfs/cdirs/e3sm/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.15/nvidia-21.11
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /global/cfs/cdirs/e3sm/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.15/nvidia-21.11; else echo "$ADIOS2_ROOT"; fi}
-1
@@ -522,6 +526,8 @@
/global/cfs/cdirs/e3sm/perl/lib/perl5-only-switch
software
MPI_Bcast
+ $ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}
+ $ENV{CRAY_PARALLEL_NETCDF_PREFIX}
-1
@@ -723,13 +729,13 @@
threads
- /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/gcc-11.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/gcc-11.2.0; else echo "$ADIOS2_ROOT"; fi}
- /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/crayclang-14.0.2
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/crayclang-14.0.2; else echo "$ADIOS2_ROOT"; fi}
- /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/amdclang-15.0.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/amdclang-15.0.0; else echo "$ADIOS2_ROOT"; fi}
@@ -846,13 +852,13 @@
threads
- /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/gcc-11.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/gcc-11.2.0; else echo "$ADIOS2_ROOT"; fi}
- /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/crayclang-14.0.2
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/crayclang-14.0.2; else echo "$ADIOS2_ROOT"; fi}
- /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/amdclang-15.0.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/amdclang-15.0.0; else echo "$ADIOS2_ROOT"; fi}
@@ -951,7 +957,7 @@
threads
- /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/crayclang-14.0.2
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/crayclang-14.0.2; else echo "$ADIOS2_ROOT"; fi}
@@ -1037,7 +1043,7 @@
threads
- /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/crayclang-14.0.2
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lustre/orion/cli133/world-shared/3rdparty/adios2/2.8.3.patch/cray-mpich-8.1.17/crayclang-14.0.2; else echo "$ADIOS2_ROOT"; fi}
@@ -1124,6 +1130,8 @@
threads
1
-l
+ $ENV{TACC_NETCDF_DIR}
+ $ENV{TACC_PNETCDF_DIR}
@@ -1406,7 +1414,7 @@
0
- $ENV{SEMS_NETCDF_ROOT}
+ $ENV{SEMS_NETCDF_ROOT}
64M
spread
threads
@@ -1464,6 +1472,9 @@
/ascldap/users/projects/e3sm/scream/libs/gcc/install/weaver/gcc/8.5.0/bin:/ascldap/users/projects/e3sm/scream/libs/gcc/install/weaver/gcc/8.5.0/libexec/gcc/powerpc64le-unknown-linux-gnu/8.5.0:/ascldap/users/projects/e3sm/scream/libs/openmpi/install/weaver/gcc/8.5.0/cuda/10.1.105/bin:/ascldap/users/projects/e3sm/scream/libs/pnetcdf/install/weaver/gcc/8.5.0/cuda/10.1.105/bin:/ascldap/users/projects/e3sm/scream/libs/netcdf-c/install/weaver/gcc/8.5.0/cuda/10.1.105/bin:/ascldap/users/projects/e3sm/scream/libs/netcdf-fortran/install/weaver/gcc/8.5.0/cuda/10.1.105/bin:/ascldap/users/projects/e3sm/scream/libs/wget/bin:/ascldap/users/jgfouca/perl5/bin:$ENV{PATH}
/ascldap/users/jgfouca/perl5/lib/perl5
/ascldap/users/jgfouca/perl5
+ /ascldap/users/projects/e3sm/scream/libs/netcdf-c/install/weaver/gcc/8.5.0/cuda/10.1.105
+ /ascldap/users/projects/e3sm/scream/libs/netcdf-fortran/install/weaver/gcc/8.5.0/cuda/10.1.105
+ /ascldap/users/projects/e3sm/scream/libs/pnetcdf/install/weaver/gcc/8.5.0/cuda/10.1.105
@@ -1627,10 +1638,10 @@
/soft/apps/packages/climate/perl5/lib/perl5
- /soft/apps/packages/climate/adios2/2.7.0/mpich-3.3.2/gcc-8.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /soft/apps/packages/climate/adios2/2.7.0/mpich-3.3.2/gcc-8.2.0; else echo "$ADIOS2_ROOT"; fi}
- /soft/apps/packages/climate/adios2/2.7.0/openmpi-2.1.5/gcc-8.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /soft/apps/packages/climate/adios2/2.7.0/openmpi-2.1.5/gcc-8.2.0; else echo "$ADIOS2_ROOT"; fi}
@@ -1720,7 +1731,7 @@
/nfs/gce/projects/climate/software/perl5/lib/perl5
- /nfs/gce/projects/climate/software/adios2/2.8.3.patch/mpich-3.4.2/gcc-11.1.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /nfs/gce/projects/climate/software/adios2/2.8.3.patch/mpich-3.4.2/gcc-11.1.0; else echo "$ADIOS2_ROOT"; fi}
@@ -1810,7 +1821,7 @@
/nfs/gce/projects/climate/software/perl5/lib/perl5
- /nfs/gce/projects/climate/software/linux-ubuntu20.04-x86_64/adios2/2.8.3.patch/mpich-4.0/gcc-11.1.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /nfs/gce/projects/climate/software/linux-ubuntu20.04-x86_64/adios2/2.8.3.patch/mpich-4.0/gcc-11.1.0; else echo "$ADIOS2_ROOT"; fi}
@@ -1880,13 +1891,11 @@
0.1
- $ENV{SEMS_NETCDF_ROOT}
- $ENV{SEMS_NETCDF_ROOT}/include
- $ENV{SEMS_NETCDF_ROOT}/lib
+ $ENV{SEMS_NETCDF_ROOT}
64M
- $ENV{SEMS_NETCDF_ROOT}
+ $ENV{SEMS_NETCDF_ROOT}
@@ -1951,13 +1960,11 @@
- $ENV{SEMS_NETCDF_ROOT}
- $ENV{SEMS_NETCDF_ROOT}/include
- $ENV{SEMS_NETCDF_ROOT}/lib
+ $ENV{SEMS_NETCDF_ROOT}
64M
- $ENV{SEMS_NETCDF_ROOT}
+ $ENV{SEMS_NETCDF_ROOT}
@@ -2090,22 +2097,22 @@
cores
- /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/intel-mpi-2019.9.304/intel-20.0.4
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/intel-mpi-2019.9.304/intel-20.0.4; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/intel-mpi-2019.9.304/gcc-8.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/intel-mpi-2019.9.304/gcc-8.2.0; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/openmpi-4.1.1/intel-20.0.4
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/openmpi-4.1.1/intel-20.0.4; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/openmpi-4.1.1/gcc-8.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/openmpi-4.1.1/gcc-8.2.0; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/mvapich2-2.3.6/intel-20.0.4
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/mvapich2-2.3.6/intel-20.0.4; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/mvapich2-2.2/gcc-8.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/anvil/adios2/2.8.3.patch/mvapich2-2.2/gcc-8.2.0; else echo "$ADIOS2_ROOT"; fi}
@@ -2232,16 +2239,16 @@
cores
- /lcrc/group/e3sm/3rdparty/chrysalis/adios2/2.8.3.patch/openmpi-4.1.3/intel-20.0.4
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/chrysalis/adios2/2.8.3.patch/openmpi-4.1.3/intel-20.0.4; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/chrysalis/adios2/2.8.3.patch/openmpi-4.1.3/gcc-9.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/chrysalis/adios2/2.8.3.patch/openmpi-4.1.3/gcc-9.2.0; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/chrysalis/adios2/2.8.3.patch/intel-mpi-2019.9.304/intel-20.0.4
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/chrysalis/adios2/2.8.3.patch/intel-mpi-2019.9.304/intel-20.0.4; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/chrysalis/adios2/2.8.3.patch/intel-mpi-2019.9.304/gcc-9.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/chrysalis/adios2/2.8.3.patch/intel-mpi-2019.9.304/gcc-9.2.0; else echo "$ADIOS2_ROOT"; fi}
@@ -2497,16 +2504,16 @@
shm:tmi
- /lcrc/group/e3sm/3rdparty/bebop/adios2/2.8.3.patch/intel-mpi-2018.4.274/intel-18.0.4
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/bebop/adios2/2.8.3.patch/intel-mpi-2018.4.274/intel-18.0.4; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/bebop/adios2/2.8.3.patch/intel-mpi-2018.4.274/gcc-8.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/bebop/adios2/2.8.3.patch/intel-mpi-2018.4.274/gcc-8.2.0; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/bebop/adios2/2.8.3.patch/mvapich2-2.3.1/intel-18.0.4
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/bebop/adios2/2.8.3.patch/mvapich2-2.3.1/intel-18.0.4; else echo "$ADIOS2_ROOT"; fi}
- /lcrc/group/e3sm/3rdparty/bebop/adios2/2.8.3.patch/mvapich2-2.3/gcc-8.2.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lcrc/group/e3sm/3rdparty/bebop/adios2/2.8.3.patch/mvapich2-2.3/gcc-8.2.0; else echo "$ADIOS2_ROOT"; fi}
@@ -2557,9 +2564,8 @@
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
- /usr/tce/packages/netcdf-fortran/netcdf-fortran-4.6.0-mvapich2-2.3.7-intel-classic-2021.6.0/
- /usr/tce/packages/netcdf-fortran/netcdf-fortran-4.6.0-mvapich2-2.3.7-intel-classic-2021.6.0/
- /usr/tce/packages/parallel-netcdf/parallel-netcdf-1.12.3-mvapich2-2.3.7-intel-classic-2021.6.0/
+ /usr/tce/packages/netcdf-fortran/netcdf-fortran-4.6.0-mvapich2-2.3.7-intel-classic-2021.6.0/
+ /usr/tce/packages/parallel-netcdf/parallel-netcdf-1.12.3-mvapich2-2.3.7-intel-classic-2021.6.0/
@@ -2613,9 +2619,8 @@
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
- /usr/gdata/climdat/install/quartz/netcdf-fortran/
/usr/gdata/climdat/install/quartz/netcdf-fortran/
- /usr/tce/packages/parallel-netcdf/parallel-netcdf-1.12.3-mvapich2-2.3.7-intel-classic-2021.6.0
+ /usr/tce/packages/parallel-netcdf/parallel-netcdf-1.12.3-mvapich2-2.3.7-intel-classic-2021.6.0
@@ -2709,6 +2714,7 @@
1
-e PMI_LABEL_ERROUT=1
+ $ENV{NETCDF_DIR}
-e OMP_NUM_THREADS=$ENV{OMP_NUM_THREADS} -e OMP_STACKSIZE=128M -e KMP_AFFINITY=granularity=thread,scatter
@@ -2717,10 +2723,10 @@
-e OMP_NUM_THREADS=$ENV{OMP_NUM_THREADS} -e OMP_STACKSIZE=128M -e OMP_PROC_BIND=spread -e OMP_PLACES=threads
- /projects/ClimateEnergy_4/3rdparty/adios2/2.7.0/cray-mpich-7.7.14/intel-19.1.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /projects/ClimateEnergy_4/3rdparty/adios2/2.7.0/cray-mpich-7.7.14/intel-19.1.0; else echo "$ADIOS2_ROOT"; fi}
- /projects/ClimateEnergy_4/3rdparty/adios2/2.7.0/cray-mpich-7.7.14/gcc-9.3.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /projects/ClimateEnergy_4/3rdparty/adios2/2.7.0/cray-mpich-7.7.14/gcc-9.3.0; else echo "$ADIOS2_ROOT"; fi}
@@ -3114,7 +3120,7 @@
$CIME_OUTPUT_ROOT/csmruns/$CASE/bld
64M
- $ENV{NETCDF_ROOT}
+ $ENV{NETCDF_ROOT}
$ENV{MLIBHOME}
@@ -3236,7 +3242,7 @@
64M
- $ENV{NETCDF_LIB}/../
+ $ENV{NETCDF_LIB}/../
$ENV{MKLROOT}
@@ -3331,7 +3337,8 @@
0.05
0
- $ENV{NETCDF_ROOT}/
+ $ENV{NETCDF_ROOT}/
+ $ENV{PNETCDF_ROOT}/
$ENV{MKLROOT}
@@ -3352,16 +3359,16 @@
cores
- /qfs/people/wuda020/3rdparty/adios2/2.8.3.patch/intelmpi-2019u4/intel-19.0.5
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /qfs/people/wuda020/3rdparty/adios2/2.8.3.patch/intelmpi-2019u4/intel-19.0.5; else echo "$ADIOS2_ROOT"; fi}
- /qfs/people/wuda020/3rdparty/adios2/2.8.3.patch/intelmpi-2019u3/pgi-19.10
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /qfs/people/wuda020/3rdparty/adios2/2.8.3.patch/intelmpi-2019u3/pgi-19.10; else echo "$ADIOS2_ROOT"; fi}
- /qfs/people/wuda020/3rdparty/adios2/2.8.3.patch/mvapich2-2.3.1/intel-19.0.4
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /qfs/people/wuda020/3rdparty/adios2/2.8.3.patch/mvapich2-2.3.1/intel-19.0.4; else echo "$ADIOS2_ROOT"; fi}
- /qfs/people/wuda020/3rdparty/adios2/2.8.3.patch/mvapich2-2.3.1/pgi-19.7
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /qfs/people/wuda020/3rdparty/adios2/2.8.3.patch/mvapich2-2.3.1/pgi-19.7; else echo "$ADIOS2_ROOT"; fi}
@@ -3560,6 +3567,8 @@
/software/user_tools/current/cades-ccsi/perl5/lib/perl5/
+ /software/dev_tools/swtree/cs400_centos7.2_pe2016-08/netcdf-hdf5parallel/4.3.3.1/centos7.2_gnu5.3.0
+ /software/dev_tools/swtree/cs400_centos7.2_pe2016-08/pnetcdf/1.9.0/centos7.2_gnu5.3.0
@@ -3637,8 +3646,6 @@
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
- $ENV{PNETCDF_PATH}
- $ENV{NETCDF_PATH}
$ENV{MKLROOT}
romio_ds_write=disable;romio_ds_read=disable;romio_cb_write=enable;romio_cb_read=enable
@@ -3717,8 +3724,6 @@
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
- $ENV{PNETCDF_PATH}
- $ENV{NETCDF_PATH}
$ENV{MKLROOT}
romio_ds_write=disable;romio_ds_read=disable;romio_cb_write=enable;romio_cb_read=enable
@@ -3830,6 +3835,8 @@
romio_ds_write=disable;romio_ds_read=disable;romio_cb_write=enable;romio_cb_read=enable
software
MPI_Bcast
+ $ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}
+ $ENV{CRAY_PARALLEL_NETCDF_PREFIX}
-1
@@ -3917,6 +3924,9 @@
+
+ /soft/netcdf/fortran-4.4-intel-sp1-update3-parallel/lib
+
@@ -3996,6 +4006,11 @@
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
+
+
+ $ENV{NETCDF_DIR}
+ $ENV{PNETCDF_DIR}
+
@@ -4075,6 +4090,11 @@
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
+
+
+ $ENV{NETCDF_DIR}
+ $ENV{PNETCDF_DIR}
+
@@ -4153,6 +4173,7 @@
/usr/local/share/cmake-3.21/
+ $ENV{NETCDF_HOME}
@@ -4324,13 +4345,13 @@
mlx5_0:1,mlx5_3:1
- /gpfs/alpine/cli115/world-shared/3rdparty/adios2/2.8.3.patch/spectrum-mpi-10.4.0.3/xl-16.1.1-10
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /gpfs/alpine/cli115/world-shared/3rdparty/adios2/2.8.3.patch/spectrum-mpi-10.4.0.3/xl-16.1.1-10; else echo "$ADIOS2_ROOT"; fi}
- /gpfs/alpine/cli115/world-shared/3rdparty/adios2/2.8.3.patch/spectrum-mpi-10.4.0.3/nvhpc-21.11
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /gpfs/alpine/cli115/world-shared/3rdparty/adios2/2.8.3.patch/spectrum-mpi-10.4.0.3/nvhpc-21.11; else echo "$ADIOS2_ROOT"; fi}
- /gpfs/alpine/cli115/world-shared/3rdparty/adios2/2.8.3.patch/spectrum-mpi-10.4.0.3/gcc-9.1.0
+ $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /gpfs/alpine/cli115/world-shared/3rdparty/adios2/2.8.3.patch/spectrum-mpi-10.4.0.3/gcc-9.1.0; else echo "$ADIOS2_ROOT"; fi}
@@ -4970,6 +4991,7 @@
FALSE
+ $ENV{NETCDF_DIR}
yes
@@ -5205,6 +5227,8 @@
1
1
+ /opt/conda
+ /opt/conda
diff --git a/cime_config/machines/scripts/cmake3ify-package b/cime_config/machines/scripts/cmake3ify-package
new file mode 100755
index 000000000000..57ad55be2f3a
--- /dev/null
+++ b/cime_config/machines/scripts/cmake3ify-package
@@ -0,0 +1,83 @@
+#! /usr/bin/env python3
+
+"""
+Rewrite config_machines.xml by converting a dependency to modern
+cmake style. Specifically, change $package_DIR to $packace_ROOT
+while allowing the user to override $package_ROOT.
+"""
+
+import argparse, sys, re, pathlib
+
+###############################################################################
+def parse_command_line(args, description):
+###############################################################################
+ parser = argparse.ArgumentParser(
+ usage="""\n{0}
+OR
+{0} --help
+
+\033[1mEXAMPLES:\033[0m
+ \033[1;32m# Cmake3-ify package "FOO" \033[0m
+ > {0} FOO $repo/cime_config/machines/config_machines.xml
+""".format(pathlib.Path(args[0]).name),
+ description=description,
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter
+ )
+
+ parser.add_argument("package_name", help="The name of the package")
+
+ parser.add_argument("config_machines", help="The path to config_machines.xml")
+
+ return parser.parse_args(args[1:])
+
+###############################################################################
+def convert_line(package_name, line):
+###############################################################################
+ r"""
+ >>> line = ' /path/to/adios'
+ >>> convert_line('ADIOS2', 'some other line')
+ 'some other line'
+ >>> convert_line('ADIOS2', line)
+ ' $SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /path/to/adios; else echo "$ADIOS2_ROOT"; fi}\n'
+ """
+ regex = re.compile(fr'^(.+)"{package_name}_DIR" *>(.+)')
+
+ re_match = regex.match(line)
+ if re_match is None:
+ return line
+ else:
+ prelude, default_path = re_match.groups()
+ default_path = default_path.strip()
+ env_var = f"{package_name}_ROOT"
+ new_line = \
+f'{prelude}"{env_var}">$SHELL{{if [ -z "${env_var}" ]; then echo {default_path}; else echo "${env_var}"; fi}}\n'
+ return new_line
+
+
+###############################################################################
+def cmake3ify_package(package_name, config_machines):
+###############################################################################
+ config_machines_p = pathlib.Path(config_machines)
+
+ with config_machines_p.open("r") as fd:
+ lines = fd.readlines()
+ new_lines = []
+ for line in lines:
+ new_lines.append(convert_line(package_name, line))
+
+ with config_machines_p.open("w") as fd:
+ fd.writelines(new_lines)
+
+ return True
+
+###############################################################################
+def _main_func(description):
+###############################################################################
+ success = cmake3ify_package(**vars(parse_command_line(sys.argv, description)))
+
+ sys.exit(0 if success else 1)
+
+###############################################################################
+
+if (__name__ == "__main__"):
+ _main_func(__doc__)
diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt
index 4fe3811b619f..152f09d5320a 100644
--- a/components/CMakeLists.txt
+++ b/components/CMakeLists.txt
@@ -12,6 +12,7 @@
cmake_minimum_required(VERSION 3.9)
cmake_policy(SET CMP0057 NEW)
cmake_policy(SET CMP0074 NEW)
+cmake_policy(SET CMP0079 NEW) # Remove once scorpio in a better state
set(CMAKE_CXX_STANDARD 17)
# Turn on wrapper
diff --git a/components/cmake/build_model.cmake b/components/cmake/build_model.cmake
index 1522d94823aa..17624ab86905 100644
--- a/components/cmake/build_model.cmake
+++ b/components/cmake/build_model.cmake
@@ -147,44 +147,6 @@ function(build_model COMP_CLASS COMP_NAME)
# create list of component libraries - hard-wired for current e3sm components
#-------------------------------------------------------------------------------
- if (NOT USE_SHARED_CLM)
- set(LNDOBJDIR "${EXEROOT}/lnd/obj")
- set(LNDLIBDIR "${LIBROOT}")
- if (COMP_LND STREQUAL "elm")
- set(LNDLIB "libelm.a")
- else()
- set(LNDLIB "liblnd.a")
- endif()
- list(APPEND INCLDIR "${LNDOBJDIR}")
- else()
- set(LNDLIB "libclm.a")
- set(LNDOBJDIR "${SHAREDLIBROOT}/${SHAREDPATH}/${COMP_INTERFACE}/${ESMFDIR}/clm/obj")
- set(LNDLIBDIR "${EXEROOT}/${SHAREDPATH}/${COMP_INTERFACE}/${ESMFDIR}/lib")
- list(APPEND INCLDIR "${INSTALL_SHAREDPATH}/${COMP_INTERFACE}/${ESMFDIR}/include")
- if (COMP_NAME STREQUAL "clm")
- set(INCLUDE_DIR "${INSTALL_SHAREDPATH}/${COMP_INTERFACE}/${ESMFDIR}/include")
- endif()
- endif()
-
- if (NOT ULIBDEP)
- if (LIBROOT)
- list(APPEND INCLDIR "${LNDOBJDIR}")
- endif()
- endif()
-
- if (COMP_GLC STREQUAL "cism")
- set(ULIBDEP "${ULIBDEP} ${CISM_LIBDIR}/libglimmercismfortran.a")
- if (CISM_USE_TRILINOS)
- set(ULIBDEP "${ULIBDEP} ${CISM_LIBDIR}/libglimmercismcpp.a")
- endif()
- endif()
- if (OCN_SUBMODEL STREQUAL "moby")
- set(ULIBDEP "${ULIBDEP} ${LIBROOT}/libmoby.a")
- endif()
-
- set(CSMSHARELIB "${INSTALL_SHAREDPATH}/${COMP_INTERFACE}/${ESMFDIR}/${NINST_VALUE}/lib/libcsm_share.a")
- set(ULIBDEP "${ULIBDEP} ${CSMSHARELIB}")
-
# do the necessary genf90s
foreach (SRC_FILE IN LISTS GEN_F90_SOURCES)
get_filename_component(BASENAME ${SRC_FILE} NAME)
@@ -262,13 +224,16 @@ function(build_model COMP_CLASS COMP_NAME)
set(TARGET_NAME "${CIME_MODEL}.exe")
add_executable(${TARGET_NAME})
target_sources(${TARGET_NAME} PRIVATE ${REAL_SOURCES})
- set(ALL_LIBS "${ULIBDEP} ${MCTLIBS} ${PIOLIB} ${GPTLLIB} ${SLIBS} ${MLIBS}")
+
+ set(ALL_LIBS "${GPTLLIB} ${SLIBS} ${MLIBS}")
separate_arguments(ALL_LIBS_LIST UNIX_COMMAND "${ALL_LIBS}")
+
foreach(ITEM IN LISTS COMP_CLASSES)
if (NOT ITEM STREQUAL "cpl")
target_link_libraries(${TARGET_NAME} ${ITEM})
endif()
endforeach()
+
foreach(ITEM IN LISTS ALL_LIBS_LIST)
target_link_libraries(${TARGET_NAME} ${ITEM})
endforeach()
@@ -277,6 +242,7 @@ function(build_model COMP_CLASS COMP_NAME)
set(TARGET_NAME ${COMP_CLASS})
add_library(${TARGET_NAME})
target_sources(${TARGET_NAME} PRIVATE ${REAL_SOURCES})
+ target_link_libraries(${TARGET_NAME} PRIVATE csm_share)
if (COMP_NAME STREQUAL "eam")
if (USE_YAKL)
target_link_libraries(${TARGET_NAME} PRIVATE yakl)
diff --git a/components/cmake/common_setup.cmake b/components/cmake/common_setup.cmake
index 6f66aeee396c..2290ec8c715d 100644
--- a/components/cmake/common_setup.cmake
+++ b/components/cmake/common_setup.cmake
@@ -70,12 +70,6 @@ if (USE_ESMF_LIB)
set(CPPDEFS "${CPPDEFS} -DUSE_ESMF_LIB")
endif()
-if (COMP_INTERFACE STREQUAL "nuopc")
- set(CPPDEFS "${CPPDEFS} -DNUOPC_INTERFACE")
-else()
- set(CPPDEFS "${CPPDEFS} -DMCT_INTERFACE")
-endif()
-
if (COMPARE_TO_NUOPC)
set(CPPDEFS "${CPPDEFS} -DCOMPARE_TO_NUOPC")
endif()
@@ -113,71 +107,6 @@ else()
endif()
endif()
-# JGF TODO: replace with findnetcdf
-if (NETCDF_C_PATH)
- if (NOT NETCDF_FORTRAN_PATH)
- message(FATAL_ERROR "NETCDF_C_PATH specified without NETCDF_FORTRAN_PATH")
- endif()
- set(NETCDF_SEPARATE TRUE)
- if (NOT INC_NETCDF_C)
- set(INC_NETCDF_C ${NETCDF_C_PATH}/include)
- endif()
- if (NOT INC_NETCDF_FORTRAN)
- set(INC_NETCDF_FORTRAN ${NETCDF_FORTRAN_PATH}/include)
- endif()
- if (NOT LIB_NETCDF_C)
- if (EXISTS ${NETCDF_C_PATH}/lib)
- set(LIB_NETCDF_C ${NETCDF_C_PATH}/lib)
- elseif (EXISTS ${NETCDF_C_PATH}/lib64)
- set(LIB_NETCDF_C ${NETCDF_C_PATH}/lib64)
- else()
- message(FATAL_ERROR "NETCDF_C_PATH does not contain a lib or lib64 directory")
- endif()
- endif()
- if (NOT LIB_NETCDF_FORTRAN)
- if(EXISTS ${NETCDF_FORTRAN_PATH}/lib)
- set(LIB_NETCDF_FORTRAN ${NETCDF_FORTRAN_PATH}/lib)
- elseif(EXISTS ${NETCDF_FORTRAN_PATH}/lib64)
- set(LIB_NETCDF_FORTRAN ${NETCDF_FORTRAN_PATH}/lib64)
- else()
- message(FATAL_ERROR "NETCDF_FORTRAN_PATH does not contain a lib or lib64 directory")
- endif()
- endif()
-elseif (NETCDF_FORTRAN_PATH)
- message(FATAL_ERROR "NETCDF_FORTRAN_PATH specified without NETCDF_C_PATH")
-elseif (NETCDF_PATH)
- set(NETCDF_SEPARATE FALSE)
- if (NOT INC_NETCDF)
- set(INC_NETCDF ${NETCDF_PATH}/include)
- endif()
- if (NOT LIB_NETCDF)
- if (EXISTS ${NETCDF_PATH}/lib)
- set(LIB_NETCDF ${NETCDF_PATH}/lib)
- elseif(EXISTS ${NETCDF_PATH}/lib64)
- set(LIB_NETCDF ${NETCDF_PATH}/lib64)
- else()
- message(FATAL_ERROR "NETCDF_PATH does not contain a lib or lib64 directory")
- endif()
- endif()
-else()
- message(FATAL_ERROR "NETCDF not found: Define NETCDF_PATH or NETCDF_C_PATH and NETCDF_FORTRAN_PATH in config_machines.xml or config_compilers.xml")
-endif()
-
-if (MPILIB STREQUAL mpi-serial)
- if (PNETCDF_PATH)
- unset(PNETCDF_PATH)
- endif()
-else()
- if (PNETCDF_PATH)
- if (NOT INC_PNETCDF)
- set(INC_PNETCDF ${PNETCDF_PATH}/include)
- endif()
- if (NOT LIB_PNETCDF)
- set(LIB_PNETCDF ${PNETCDF_PATH}/lib)
- endif()
- endif()
-endif()
-
# Set HAVE_SLASHPROC on LINUX systems which are not bluegene or Darwin (OSx)
string(FIND "${CPPDEFS}" "-DLINUX" HAS_DLINUX)
string(FIND "${CPPDEFS}" "DBG" HAS_DBG)
@@ -186,19 +115,6 @@ if (NOT HAS_DLINUX EQUAL -1 AND HAS_DBG EQUAL -1 AND HAS_DARWIN EQUAL -1)
set(CPPDEFS "${CPPDEFS} -DHAVE_SLASHPROC")
endif()
-# Atleast on Titan+cray mpi, MPI_Irsends() are buggy, causing hangs during I/O
-# Force PIO to use MPI_Isends instead of the default, MPI_Irsends
-if (PIO_VERSION STREQUAL 2)
- set(EXTRA_PIO_CPPDEFS "-DUSE_MPI_ISEND_FOR_FC")
-else()
- set(EXTRA_PIO_CPPDEFS "-D_NO_MPI_RSEND")
-endif()
-
-if (LIB_PNETCDF)
- set(CPPDEFS "${CPPDEFS} -D_PNETCDF")
- set(SLIBS "${SLIBS} -L${LIB_PNETCDF} -lpnetcdf")
-endif()
-
#===============================================================================
# User-specified INCLDIR
#===============================================================================
@@ -228,42 +144,18 @@ else()
set(LIB_MPI ${MPI_PATH}/lib)
endif()
endif()
-set(CSM_SHR_INCLUDE ${INSTALL_SHAREDPATH}/${COMP_INTERFACE}/${ESMFDIR}/${NINST_VALUE}/include)
#===============================================================================
# Set include paths (needed after override for any model specific builds below)
#===============================================================================
list(APPEND INCLDIR "${INSTALL_SHAREDPATH}/include" "${INSTALL_SHAREDPATH}/${COMP_INTERFACE}/${ESMFDIR}/${NINST_VALUE}/include")
-if (NOT NETCDF_SEPARATE)
- list(APPEND INCLDIR "${INC_NETCDF}")
-else()
- list(APPEND INCLDIR "${INC_NETCDF_C}" "${INC_NETCDF_FORTRAN}")
-endif()
-
-foreach(ITEM MOD_NETCDF INC_MPI INC_PNETCDF)
+foreach(ITEM INC_MPI)
if (${ITEM})
list(APPEND INCLDIR "${${ITEM}}")
endif()
endforeach()
-if (NOT MCT_LIBDIR)
- set(MCT_LIBDIR "${INSTALL_SHAREDPATH}/lib")
-endif()
-
-if (PIO_LIBDIR)
- if (PIO_VERSION STREQUAL ${PIO_VERSION_MAJOR})
- list(APPEND INCLDIR "${PIO_INCDIR}")
- set(SLIBS "${SLIBS} -L${PIO_LIBDIR}")
- else()
- # If PIO_VERSION_MAJOR doesnt match, build from source
- unset(PIO_LIBDIR)
- endif()
-endif()
-if (NOT PIO_LIBDIR)
- set(PIO_LIBDIR "${INSTALL_SHAREDPATH}/lib")
-endif()
-
if (NOT GPTL_LIBDIR)
set(GPTL_LIBDIR "${INSTALL_SHAREDPATH}/lib")
endif()
@@ -289,15 +181,7 @@ if (NOT HAS_COSP EQUAL -1)
set(USE_COSP TRUE)
endif()
-# System libraries (netcdf, mpi, pnetcdf, esmf, etc.)
-if (NOT SLIBS)
- if (NOT NETCDF_SEPARATE)
- set(SLIBS "-L${LIB_NETCDF} -lnetcdff -lnetcdf")
- else()
- set(SLIBS "-L${LIB_NETCDF_FORTRAN} -L${LIB_NETCDF_C} -lnetcdff -lnetcdf")
- endif()
-endif()
-
+# System libraries (mpi, esmf, etc.)
if (LAPACK_LIBDIR)
set(SLIBS "${SLIBS} -L${LAPACK_LIBDIR} -llapack -lblas")
endif()
@@ -331,29 +215,6 @@ else()
string(REGEX REPLACE "-arch[^ ]+" "" LDFLAGS "${LDFLAGS}")
endif()
-if (NOT IO_LIB_SRCROOT)
- if (PIO_VERSION STREQUAL 2)
- # This is a pio2 library
- set(PIOLIB "${PIO_LIBDIR}/libpiof.a ${PIO_LIBDIR}/libpioc.a")
- set(PIOLIBNAME "-lpiof -lpioc")
- set(PIO_SRC_DIR "${CIMEROOT}/src/externals/pio2")
- else()
- # This is a pio1 library
- set(PIOLIB "${PIO_LIBDIR}/libpio.a")
- set(PIOLIBNAME "-lpio")
- if (NOT EXISTS "${CIMEROOT}/src/externals/pio1/pio")
- set(PIO_SRC_DIR "${CIMEROOT}/src/externals/pio1")
- else()
- set(PIO_SRC_DIR "${CIMEROOT}/src/externals/pio1/pio")
- endif()
- endif()
-else()
- set(IO_LIB_SRC_DIR "IO_LIB_v${PIO_VERSION}_SRCDIR")
- set(PIO_SRC_DIR "${IO_LIB_SRCROOT}/${IO_LIB_SRC_DIR}")
-endif()
-
-set(MCTLIBS "${MCT_LIBDIR}/libmct.a ${MCT_LIBDIR}/libmpeu.a")
-
set(GPTLLIB "${GPTL_LIBDIR}/libgptl.a")
#------------------------------------------------------------------------------
diff --git a/components/cmake/find_dep_packages.cmake b/components/cmake/find_dep_packages.cmake
index 4f0594ddb6a0..c35625a9444d 100644
--- a/components/cmake/find_dep_packages.cmake
+++ b/components/cmake/find_dep_packages.cmake
@@ -37,3 +37,7 @@ endif()
if (USE_PETSC)
find_package(PETSc REQUIRED)
endif()
+
+find_package(PIO REQUIRED)
+find_package(MCT REQUIRED)
+find_package(CsmShare REQUIRED)
diff --git a/components/cmake/modules/FindCsmShare.cmake b/components/cmake/modules/FindCsmShare.cmake
new file mode 100644
index 000000000000..fa6dd0a8036c
--- /dev/null
+++ b/components/cmake/modules/FindCsmShare.cmake
@@ -0,0 +1,40 @@
+# - Try to find CsmShare
+#
+# CsmShare does not provide a cmake config file, so we have to write our
+# own find module.
+#
+# This can be controlled by setting the CsmShare_DIR (or, equivalently, the
+# csm_share_ROOT environment variable)
+#
+# Once done, this will define:
+#
+# The "csm_share" target
+#
+
+if (TARGET csm_share)
+ return()
+endif()
+
+# Build the name of the path where libcsm_share should be located
+if (USE_ESMF_LIB)
+ set(ESMFDIR "esmf")
+else()
+ set(ESMFDIR "noesmf")
+endif()
+set(CSM_SHARE "${INSTALL_SHAREDPATH}/${COMP_INTERFACE}/${ESMFDIR}/${NINST_VALUE}/csm_share")
+
+# Look for libcsm_share in the complex path we built above
+find_library(CSM_SHARE_LIB csm_share REQUIRED PATHS ${CSM_SHARE})
+
+# Grab mct and spio if we don't already have it
+find_package(MCT REQUIRED)
+find_package(PIO REQUIRED)
+
+# Create the interface library, and set target properties
+add_library (csm_share INTERFACE)
+target_link_libraries (csm_share INTERFACE ${CSM_SHARE_LIB};mct;spio)
+target_include_directories(csm_share INTERFACE ${CSM_SHARE})
+
+# Link against piof. Don't worry about this for now. Fix once spio
+# has a proper config.cmake.
+# target_link_libraries(csm_share INTERFACE piof)
diff --git a/components/cmake/modules/FindMCT.cmake b/components/cmake/modules/FindMCT.cmake
new file mode 100644
index 000000000000..068aead89f7f
--- /dev/null
+++ b/components/cmake/modules/FindMCT.cmake
@@ -0,0 +1,25 @@
+# - Try to find MCT
+#
+# MCT does not provide a cmake config file, so we have to write our
+# own find module.
+#
+# This can be controlled by setting the MCT_DIR (or, equivalently, the
+# mct_ROOT environment variable)
+#
+# Once done, this will define:
+#
+# The "mct" target
+#
+
+if (TARGET mct)
+ return()
+endif()
+
+# Look for libmct in INSTALL_SHAREDPATH/lib
+find_library(MCT_LIB mct REQUIRED PATHS ${INSTALL_SHAREDPATH}/lib)
+find_library(MPEU_LIB mpeu REQUIRED PATHS ${INSTALL_SHAREDPATH}/lib $ENV{mct_ROOT})
+
+# Create the interface library, and set target properties
+add_library(mct INTERFACE)
+target_link_libraries(mct INTERFACE ${MCT_LIB} ${MPEU_LIB})
+target_include_directories(mct INTERFACE ${INSTALL_SHAREDPATH}/include)
diff --git a/components/cmake/modules/FindNETCDF.cmake b/components/cmake/modules/FindNETCDF.cmake
new file mode 100644
index 000000000000..90d4abb3fb4f
--- /dev/null
+++ b/components/cmake/modules/FindNETCDF.cmake
@@ -0,0 +1,105 @@
+# - Try to find Netcdf
+#
+# Placeholder code until spio gets a proper config.cmake
+#
+# Once done, this will define:
+#
+# The "netcdf" target
+#
+
+if (TARGET netcdf)
+ return()
+endif()
+
+# Sets GET_NETCDF_LIBS_RESULT
+function(get_netcdf_libs ncpath nfpath)
+
+ set(ncconfig ${ncpath}/bin/nc-config)
+ set(nfconfig ${nfpath}/bin/nf-config)
+
+ # Get C libs
+ if (EXISTS ${ncconfig})
+ execute_process(COMMAND ${ncconfig} --libs OUTPUT_VARIABLE nclibs OUTPUT_STRIP_TRAILING_WHITESPACE)
+ endif()
+
+ # Fall back to find_library
+ if (NOT nclibs)
+ find_library(nclibs_temp netcdf REQUIRED PATHS ${ncpath}/lib ${ncpath}/lib64)
+ set(nclibs ${nclibs_temp})
+ endif()
+
+ # Get fortran libs
+ if (EXISTS ${nfconfig})
+ execute_process(COMMAND ${nfconfig} --flibs OUTPUT_VARIABLE nflibs OUTPUT_STRIP_TRAILING_WHITESPACE)
+ endif()
+
+ if (NOT nflibs)
+ find_library(nflibs_temp netcdff REQUIRED PATHS ${nfpath}/lib ${nfpath}/lib64)
+ set(nflibs ${nflibs_temp})
+ endif()
+
+ # C libs need to come last
+ set(GET_NETCDF_LIBS_RESULT ${nflibs} ${nclibs} PARENT_SCOPE)
+endfunction()
+
+function(create_netcdf_target)
+
+ # Grab things from env
+ set(PNETCDF_PATH $ENV{PNETCDF_PATH})
+ set(NETCDF_PATH $ENV{NETCDF_PATH})
+ set(NETCDF_C_PATH $ENV{NETCDF_C_PATH})
+ set(NETCDF_FORTRAN_PATH $ENV{NETCDF_FORTRAN_PATH})
+
+ # Pnetcdf is optional, and only if not running serial
+ if (NOT MPILIB STREQUAL mpi-serial)
+ if (PNETCDF_PATH)
+ find_library(pnetcdf_lib pnetcdf REQUIRED PATHS ${PNETCDF_PATH}/lib)
+ find_path (pnetcdf_incdir pnetcdf.h REQUIRED PATHS ${PNETCDF_PATH}/include)
+ endif()
+ endif()
+
+ if (NETCDF_C_PATH)
+ # Sanity checks
+ if (NOT NETCDF_FORTRAN_PATH)
+ message(FATAL_ERROR "NETCDF_C_PATH specified without NETCDF_FORTRAN_PATH")
+ endif()
+ if (NOT EXISTS ${NETCDF_C_PATH}/lib AND NOT EXISTS ${NETCDF_C_PATH}/lib64)
+ message(FATAL_ERROR "NETCDF_C_PATH does not contain a lib or lib64 directory")
+ endif ()
+ if (NOT EXISTS ${NETCDF_FORTRAN_PATH}/lib AND NOT EXISTS ${NETCDF_FORTRAN_PATH}/lib64)
+ message(FATAL_ERROR "NETCDF_FORTRAN_PATH does not contain a lib or lib64 directory")
+ endif ()
+
+ get_netcdf_libs(${NETCDF_C_PATH} ${NETCDF_FORTRAN_PATH})
+ find_path (netcdf_c_incdir netcdf.h REQUIRED PATHS ${NETCDF_C_PATH}/include)
+ find_path (netcdf_f_incdir netcdf.inc REQUIRED PATHS ${NETCDF_FORTRAN_PATH}/include)
+
+ elseif (NETCDF_FORTRAN_PATH)
+ message(FATAL_ERROR "NETCDF_FORTRAN_PATH specified without NETCDF_C_PATH")
+
+ elseif (NETCDF_PATH)
+ # Sanity checks
+ if (NOT EXISTS ${NETCDF_PATH}/lib AND NOT EXISTS ${NETCDF_PATH}/lib64)
+ message(FATAL_ERROR "NETCDF_PATH does not contain a lib or lib64 directory")
+ endif ()
+
+ get_netcdf_libs(${NETCDF_PATH} ${NETCDF_PATH})
+ find_path(netcdf_c_incdir netcdf.h REQUIRED PATHS ${NETCDF_PATH}/include)
+ find_path(netcdf_f_incdir netcdf.inc REQUIRED PATHS ${NETCDF_PATH}/include)
+
+ else()
+ message(FATAL_ERROR "NETCDF not found: Define NETCDF_PATH or NETCDF_C_PATH and NETCDF_FORTRAN_PATH in config_machines.xml or config_compilers.xml")
+ endif()
+
+ set(pnetcdf_lib ${pnetcdf_lib})
+ set(pnetcdf_incdir ${pnetcdf_incdir})
+ set(netcdf_c_incdir ${netcdf_c_incdir})
+ set(netcdf_f_incdir ${netcdf_f_incdir})
+
+ # Create the interface library, and set target properties
+ add_library(netcdf INTERFACE)
+ target_link_libraries(netcdf INTERFACE ${pnetcdf_lib} ${GET_NETCDF_LIBS_RESULT})
+ target_include_directories(netcdf INTERFACE ${pnetcdf_incdir};${netcdf_c_incdir};${netcdf_f_incdir})
+endfunction()
+
+create_netcdf_target()
diff --git a/components/cmake/modules/FindPIO.cmake b/components/cmake/modules/FindPIO.cmake
new file mode 100644
index 000000000000..48077caf1c82
--- /dev/null
+++ b/components/cmake/modules/FindPIO.cmake
@@ -0,0 +1,41 @@
+# - Try to find PIO
+#
+# Placeholder code until spio gets a proper config.cmake
+#
+# Once done, this will define:
+#
+# The "spio" target
+#
+
+if (TARGET spio)
+ return()
+endif()
+
+if (NOT PIO_LIBDIR)
+ set(PIO_LIBDIR "${INSTALL_SHAREDPATH}/lib")
+endif()
+
+if (PIO_VERSION STREQUAL 2)
+ # This is a pio2 library
+ set(PIOLIBS "${PIO_LIBDIR}/libpiof.a;${PIO_LIBDIR}/libpioc.a")
+else()
+ # This is a pio1 library
+ set(PIOLIBS "${PIO_LIBDIR}/libpio.a")
+endif()
+
+find_package(NETCDF REQUIRED)
+
+# Not all machines/PIO installations use ADIOS but, for now,
+# we can assume that an MPI case with ADIOS2_ROOT set is probably
+# using adios.
+if (NOT MPILIB STREQUAL mpi-serial AND DEFINED ENV{ADIOS2_ROOT})
+ find_package(MPI REQUIRED COMPONENTS C)
+ find_package(ADIOS2 REQUIRED COMPONENTS C)
+ list(APPEND PIOLIBS adios2::adios2)
+endif()
+
+list(APPEND PIOLIBS netcdf)
+
+# Create the interface library, and set target properties
+add_library(spio INTERFACE)
+target_link_libraries(spio INTERFACE ${PIOLIBS})
diff --git a/components/eam/src/physics/rrtmgp/cpp/CMakeLists.txt b/components/eam/src/physics/rrtmgp/cpp/CMakeLists.txt
index 91ec61acf625..d20078111352 100644
--- a/components/eam/src/physics/rrtmgp/cpp/CMakeLists.txt
+++ b/components/eam/src/physics/rrtmgp/cpp/CMakeLists.txt
@@ -14,11 +14,7 @@ include(${YAKL_HOME}/yakl_utils.cmake)
yakl_process_target(rrtmgp_interface)
# Libraries to link
-find_library(
- NETCDF_C_LIBRARY NAMES netcdf libnetcdf
- HINTS ${LIB_NETCDF} ${LIB_NETCDF_C}
-)
-target_link_libraries(rrtmgp_interface ${NETCDF_C_LIBRARY} rrtmgp yakl)
+target_link_libraries(rrtmgp_interface spio rrtmgp yakl)
# Where to find includes
target_include_directories(rrtmgp_interface PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../external/cpp)
diff --git a/components/eamxx/src/share/io/CMakeLists.txt b/components/eamxx/src/share/io/CMakeLists.txt
index 83ecdef872b5..7f9b64a829c3 100644
--- a/components/eamxx/src/share/io/CMakeLists.txt
+++ b/components/eamxx/src/share/io/CMakeLists.txt
@@ -15,8 +15,8 @@ set_target_properties(scream_io PROPERTIES
)
target_include_directories(scream_io PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/modules)
-if (DEFINED ENV{ADIOS2_DIR})
- target_include_directories(scream_io PRIVATE $ENV{ADIOS2_DIR}/include)
+if (DEFINED ENV{ADIOS2_ROOT})
+ target_include_directories(scream_io PRIVATE $ENV{ADIOS2_ROOT}/include)
endif ()
target_link_libraries(scream_io PUBLIC scream_share piof pioc)
diff --git a/components/mpas-framework/src/CMakeLists.txt b/components/mpas-framework/src/CMakeLists.txt
index 87fae72e57c4..53fdcf1e9fde 100644
--- a/components/mpas-framework/src/CMakeLists.txt
+++ b/components/mpas-framework/src/CMakeLists.txt
@@ -49,17 +49,7 @@ if (compile_threaded)
list(APPEND CPPDEFS "-DMPAS_OPENMP")
endif()
-set(INCLUDES "${INSTALL_SHAREDPATH}/include" "${INSTALL_SHAREDPATH}/${COMP_INTERFACE}/${ESMFDIR}/${NINST_VALUE}/csm_share" "${INSTALL_SHAREDPATH}/pio" "${PNETCDF_PATH}/include" "${CMAKE_CURRENT_SOURCE_DIR}/external/ezxml" "${CMAKE_BINARY_DIR}/framework" "${CMAKE_BINARY_DIR}/operators")
-if (NETCDF_PATH)
- list(APPEND INCLUDES ${NETCDF_PATH}/include)
-else()
- if (NETCDF_C_PATH)
- list(APPEND INCLUDES ${NETCDF_C_PATH}/include)
- endif()
- if (NETCDF_FORTRAN_PATH)
- list(APPEND INCLUDES ${NETCDF_FORTRAN_PATH}/include)
- endif()
-endif()
+set(INCLUDES "${INSTALL_SHAREDPATH}/include" "${INSTALL_SHAREDPATH}/${COMP_INTERFACE}/${ESMFDIR}/${NINST_VALUE}/csm_share" "${INSTALL_SHAREDPATH}/pio" "${CMAKE_CURRENT_SOURCE_DIR}/external/ezxml" "${CMAKE_BINARY_DIR}/framework" "${CMAKE_BINARY_DIR}/operators")
if (USE_KOKKOS)
include(${INSTALL_SHAREDPATH}/kokkos_generated_settings.cmake)
@@ -87,6 +77,8 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/operators/operators.cmake)
add_library(common)
target_compile_definitions(common PRIVATE ${CPPDEFS})
target_include_directories(common PRIVATE ${INCLUDES})
+find_package(PIO REQUIRED)
+target_link_libraries(common PUBLIC spio)
genf90_targets("${COMMON_RAW_SOURCES}" "${INCLUDES}" "${CPPDEFS}" "" "")
target_sources(common PRIVATE ${SOURCES})
diff --git a/share/build/buildlib.csm_share b/share/build/buildlib.csm_share
index 90a4765c62c0..0c4373213c87 100755
--- a/share/build/buildlib.csm_share
+++ b/share/build/buildlib.csm_share
@@ -8,6 +8,7 @@ import glob
logger = logging.getLogger(__name__)
+###############################################################################
def parse_command_line(args, description):
###############################################################################
parser = argparse.ArgumentParser(
@@ -42,7 +43,7 @@ formatter_class=argparse.ArgumentDefaultsHelpFormatter
return args.buildroot, args.installpath, args.caseroot
-
+###############################################################################
def buildlib(bldroot, installpath, case):
###############################################################################
gmake_args = get_standard_makefile_args(case, shared_lib=True)
@@ -51,6 +52,12 @@ def buildlib(bldroot, installpath, case):
caseroot = case.get_value("CASEROOT")
libroot = case.get_value("LIBROOT")
+ csm_share_dir = os.environ.get("csm_share_ROOT")
+ if csm_share_dir is not None:
+ # We are using a pre-installed csm_share
+ expect(os.path.exists(csm_share_dir), f"Non-existent csm_share root {csm_share_dir}")
+ return
+
filepath = [os.path.join(caseroot,"SourceMods","src.share"),
os.path.join(srcroot,"share","streams"),
os.path.join(srcroot,"share","util"),
@@ -137,12 +144,13 @@ def buildlib(bldroot, installpath, case):
for _file in glob.iglob(os.path.join(installdir,"include","*")):
symlink_force(_file, os.path.join(case_inc_dir,os.path.basename(_file)))
-
-
+###############################################################################
def _main(argv, documentation):
+###############################################################################
bldroot, installpath, caseroot = parse_command_line(argv, documentation)
with Case(caseroot) as case:
buildlib(bldroot, installpath, case)
+###############################################################################
if (__name__ == "__main__"):
_main(sys.argv, __doc__)
diff --git a/share/build/buildlib.gptl b/share/build/buildlib.gptl
index 2f29cf2f0b89..f022971fc88d 100755
--- a/share/build/buildlib.gptl
+++ b/share/build/buildlib.gptl
@@ -6,6 +6,7 @@ from CIME.build import get_standard_makefile_args
logger = logging.getLogger(__name__)
+###############################################################################
def parse_command_line(args, description):
###############################################################################
parser = argparse.ArgumentParser(
@@ -40,11 +41,18 @@ formatter_class=argparse.ArgumentDefaultsHelpFormatter
return args.buildroot, args.installpath, args.caseroot
+###############################################################################
def buildlib(bldroot, installpath, case):
###############################################################################
caseroot = case.get_value("CASEROOT")
comp_interface = case.get_value("COMP_INTERFACE")
+ gptl_dir = os.environ.get("gptl_ROOT")
+ if gptl_dir is not None:
+ # We are using a pre-installed gptl
+ expect(os.path.exists(gptl_dir), f"Non-existent gptl root {gptl_dir}")
+ return
+
gptl_dir = os.path.join(case.get_value("SRCROOT"), "share", "timing")
gmake_opts = "-f {gptl}/Makefile install -C {bldroot} MACFILE={macfile} COMP_NAME=gptl GPTL_DIR={gptl} GPTL_LIBDIR={bldroot}"\
" SHAREDPATH={install} COMP_INTERFACE={comp_interface} {stdargs} "\
@@ -57,10 +65,13 @@ def buildlib(bldroot, installpath, case):
cmd = "{} {}".format(gmake_cmd, gmake_opts)
run_bld_cmd_ensure_logging(cmd, logger)
+###############################################################################
def _main(argv, documentation):
+###############################################################################
bldroot, installpath, caseroot = parse_command_line(argv, documentation)
with Case(caseroot) as case:
buildlib(bldroot, installpath, case)
+###############################################################################
if (__name__ == "__main__"):
_main(sys.argv, __doc__)
diff --git a/share/build/buildlib.spio b/share/build/buildlib.spio
index c600bb9e930a..ac25e2fff95d 100755
--- a/share/build/buildlib.spio
+++ b/share/build/buildlib.spio
@@ -74,6 +74,11 @@ def buildlib(bldroot, installpath, case):
):
scorpio_src_root_dir = None
+ # find_package(ADIOS2) appears to work better with ADIOS2_DIR than
+ # ADIOS2_ROOT. This is a workaround
+ if "ADIOS2_ROOT" in os.environ:
+ os.environ["ADIOS2_DIR"] = os.environ["ADIOS2_ROOT"]
+
# If variable PIO_VERSION_MAJOR is defined in the environment then
# we assume that PIO is installed on the system
# and expect to find