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 95d71eeb29e3..cf774e04276e 100644
--- a/cime_config/machines/cmake_macros/amdclang_crusher.cmake
+++ b/cime_config/machines/cmake_macros/amdclang_crusher.cmake
@@ -5,12 +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")
-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 95d71eeb29e3..cf774e04276e 100644
--- a/cime_config/machines/cmake_macros/amdclang_frontier.cmake
+++ b/cime_config/machines/cmake_macros/amdclang_frontier.cmake
@@ -5,12 +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")
-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 f34cc8d5c212..ec0e1fd0b1f3 100644
--- a/cime_config/machines/cmake_macros/amdclang_pm-cpu.cmake
+++ b/cime_config/machines/cmake_macros/amdclang_pm-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}")
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 a3e9f0450241..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")
diff --git a/cime_config/machines/cmake_macros/amdclanggpu_frontier.cmake b/cime_config/machines/cmake_macros/amdclanggpu_frontier.cmake
index a3e9f0450241..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")
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 59bea45ae5cb..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,9 +5,6 @@ if (compile_threaded)
string(APPEND LDFLAGS " -fopenmp")
endif()
-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-scream_crusher-scream-gpu.cmake b/cime_config/machines/cmake_macros/crayclang-scream_crusher-scream-gpu.cmake
index 6d9277aa6d36..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,9 +5,6 @@ if (compile_threaded)
string(APPEND LDFLAGS " -fopenmp")
endif()
-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-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 1c332b80d9dc..6292038ab681 100644
--- a/cime_config/machines/cmake_macros/crayclang_crusher.cmake
+++ b/cime_config/machines/cmake_macros/crayclang_crusher.cmake
@@ -9,7 +9,4 @@ string(APPEND FFLAGS " -hipa0 -hzero")
# Scorpio installs
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}")
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 1c332b80d9dc..6292038ab681 100644
--- a/cime_config/machines/cmake_macros/crayclang_frontier.cmake
+++ b/cime_config/machines/cmake_macros/crayclang_frontier.cmake
@@ -9,7 +9,4 @@ string(APPEND FFLAGS " -hipa0 -hzero")
# Scorpio installs
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}")
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 b6fbaeef35c4..b53ebc3a2d2f 100644
--- a/cime_config/machines/cmake_macros/crayclanggpu_crusher.cmake
+++ b/cime_config/machines/cmake_macros/crayclanggpu_crusher.cmake
@@ -60,8 +60,6 @@ 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++")
diff --git a/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake b/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake
index 076ababddd66..28fe05b151f6 100644
--- a/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/crayclanggpu_frontier.cmake
@@ -60,8 +60,6 @@ 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++")
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 a6313015032e..a9edbc0c0849 100644
--- a/cime_config/machines/cmake_macros/gnu_anlgce-ub18.cmake
+++ b/cime_config/machines/cmake_macros/gnu_anlgce-ub18.cmake
@@ -5,10 +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")
-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 b35d0c0ab57e..a9edbc0c0849 100644
--- a/cime_config/machines/cmake_macros/gnu_anlgce.cmake
+++ b/cime_config/machines/cmake_macros/gnu_anlgce.cmake
@@ -6,7 +6,4 @@ if (NOT DEBUG)
string(APPEND FFLAGS " -O2")
endif()
string(APPEND SLIBS " -lblas -llapack")
-set(NETCDF_PATH "$ENV{NETCDF_PATH}")
-set(PNETCDF_PATH "$ENV{PNETCDF_PATH}")
-set(HDF5_PATH "$ENV{HDF5_PATH}")
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 c19c9d709839..90e63e0e6c9a 100644
--- a/cime_config/machines/cmake_macros/gnu_anlworkstation.cmake
+++ b/cime_config/machines/cmake_macros/gnu_anlworkstation.cmake
@@ -5,10 +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")
-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 e9363bb9cb0e..6d9d1a99f3a5 100644
--- a/cime_config/machines/cmake_macros/gnu_anvil.cmake
+++ b/cime_config/machines/cmake_macros/gnu_anvil.cmake
@@ -2,11 +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}")
+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 d2829aa8dbbb..1bbd53081cb4 100644
--- a/cime_config/machines/cmake_macros/gnu_bebop.cmake
+++ b/cime_config/machines/cmake_macros/gnu_bebop.cmake
@@ -2,11 +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")
-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 6a8d98043511..4480fcf50692 100644
--- a/cime_config/machines/cmake_macros/gnu_chrysalis.cmake
+++ b/cime_config/machines/cmake_macros/gnu_chrysalis.cmake
@@ -2,11 +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")
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 54c247cbe999..ba74699e1fdd 100644
--- a/cime_config/machines/cmake_macros/gnu_crusher.cmake
+++ b/cime_config/machines/cmake_macros/gnu_crusher.cmake
@@ -16,7 +16,3 @@ if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
endif()
string(APPEND CXX_LIBS " -lstdc++")
-
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-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 54c247cbe999..ba74699e1fdd 100644
--- a/cime_config/machines/cmake_macros/gnu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/gnu_frontier.cmake
@@ -16,7 +16,3 @@ if (NOT DEBUG)
string(APPEND CFLAGS " -O2")
endif()
string(APPEND CXX_LIBS " -lstdc++")
-
-string(APPEND SLIBS " -L$ENV{PNETCDF_PATH}/lib -lpnetcdf")
-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 b43a0425c7e4..807c7d0211eb 100644
--- a/cime_config/machines/cmake_macros/gnu_pm-cpu.cmake
+++ b/cime_config/machines/cmake_macros/gnu_pm-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}/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_pm-gpu.cmake b/cime_config/machines/cmake_macros/gnu_pm-gpu.cmake
index b43a0425c7e4..807c7d0211eb 100644
--- a/cime_config/machines/cmake_macros/gnu_pm-gpu.cmake
+++ b/cime_config/machines/cmake_macros/gnu_pm-gpu.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_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 f21e5826d31c..275cd9944878 100644
--- a/cime_config/machines/cmake_macros/gnu_summit.cmake
+++ b/cime_config/machines/cmake_macros/gnu_summit.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_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 653f7c6cbf87..8cb67348c46e 100644
--- a/cime_config/machines/cmake_macros/gnugpu_crusher.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_crusher.cmake
@@ -16,8 +16,6 @@ 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")
diff --git a/cime_config/machines/cmake_macros/gnugpu_frontier.cmake b/cime_config/machines/cmake_macros/gnugpu_frontier.cmake
index 653f7c6cbf87..8cb67348c46e 100644
--- a/cime_config/machines/cmake_macros/gnugpu_frontier.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_frontier.cmake
@@ -16,8 +16,6 @@ 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")
diff --git a/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake b/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake
index 07b30aad2e23..b362b984082e 100644
--- a/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake
@@ -5,13 +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")
-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 26bf8f6bb88b..52faa0d641ad 100644
--- a/cime_config/machines/cmake_macros/gnugpu_summit.cmake
+++ b/cime_config/machines/cmake_macros/gnugpu_summit.cmake
@@ -10,10 +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")
+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 ec2e702dd09e..6d5c731c09fc 100644
--- a/cime_config/machines/cmake_macros/ibm_summit.cmake
+++ b/cime_config/machines/cmake_macros/ibm_summit.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 " -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/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 2f942af42418..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,11 +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")
-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 d151c21e7f25..9012d9373ee7 100644
--- a/cime_config/machines/cmake_macros/intel_bebop.cmake
+++ b/cime_config/machines/cmake_macros/intel_bebop.cmake
@@ -10,8 +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")
-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 0d9f3a32b8e5..95dd058c33c5 100644
--- a/cime_config/machines/cmake_macros/intel_chrysalis.cmake
+++ b/cime_config/machines/cmake_macros/intel_chrysalis.cmake
@@ -17,12 +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")
-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 c21003ae449c..5e3a8b982bb3 100644
--- a/cime_config/machines/cmake_macros/intel_compy.cmake
+++ b/cime_config/machines/cmake_macros/intel_compy.cmake
@@ -5,10 +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}")
+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 0de5a3fac997..8f1616a2cb26 100644
--- a/cime_config/machines/cmake_macros/intel_pm-cpu.cmake
+++ b/cime_config/machines/cmake_macros/intel_pm-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}/lib -L$ENV{CRAY_PARALLEL_NETCDF_PREFIX}/lib -lpnetcdf -lnetcdf -lnetcdff")
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 cee438757107..2aac2db50980 100644
--- a/cime_config/machines/cmake_macros/intel_theta.cmake
+++ b/cime_config/machines/cmake_macros/intel_theta.cmake
@@ -8,5 +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")
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 84c5767a1b68..a704d43bdceb 100644
--- a/cime_config/machines/cmake_macros/nvidia_pm-cpu.cmake
+++ b/cime_config/machines/cmake_macros/nvidia_pm-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}")
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 412794614cf0..5c55dc6bb2f4 100644
--- a/cime_config/machines/cmake_macros/nvidia_pm-gpu.cmake
+++ b/cime_config/machines/cmake_macros/nvidia_pm-gpu.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/nvidiagpu_pm-gpu.cmake b/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake
index 842cfc41ff4e..e9606e066060 100644
--- a/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake
+++ b/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake
@@ -6,14 +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")
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 708f1c24c54c..5ed28a7ebe4f 100644
--- a/cime_config/machines/cmake_macros/pgi_compy.cmake
+++ b/cime_config/machines/cmake_macros/pgi_compy.cmake
@@ -12,10 +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}")
+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 5f918812bbe6..6f7e5a02f6fa 100644
--- a/cime_config/machines/cmake_macros/pgi_summit.cmake
+++ b/cime_config/machines/cmake_macros/pgi_summit.cmake
@@ -10,11 +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")
+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 122911006fb9..7b65563470d0 100644
--- a/cime_config/machines/cmake_macros/pgigpu_summit.cmake
+++ b/cime_config/machines/cmake_macros/pgigpu_summit.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_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 57354ac19abb..50e7669fc205 100644
--- a/cime_config/machines/config_machines.xml
+++ b/cime_config/machines/config_machines.xml
@@ -259,6 +259,8 @@
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}
$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}
@@ -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
@@ -511,6 +515,8 @@
/global/cfs/cdirs/e3sm/perl/lib/perl5-only-switch
software
MPI_Bcast
+ $ENV{CRAY_NETCDF_HDF5PARALLEL_PREFIX}
+ $ENV{CRAY_PARALLEL_NETCDF_PREFIX}
-1
@@ -1113,6 +1119,8 @@
threads
1
-l
+ $ENV{TACC_NETCDF_DIR}
+ $ENV{TACC_PNETCDF_DIR}
@@ -1395,7 +1403,7 @@
0
- $ENV{SEMS_NETCDF_ROOT}
+ $ENV{SEMS_NETCDF_ROOT}
64M
spread
threads
@@ -1453,6 +1461,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
@@ -1869,13 +1880,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}
@@ -1940,13 +1949,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}
@@ -2546,9 +2553,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/
@@ -2602,9 +2608,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
@@ -2698,6 +2703,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
@@ -3103,7 +3109,7 @@
$CIME_OUTPUT_ROOT/csmruns/$CASE/bld
64M
- $ENV{NETCDF_ROOT}
+ $ENV{NETCDF_ROOT}
$ENV{MLIBHOME}
@@ -3225,7 +3231,7 @@
64M
- $ENV{NETCDF_LIB}/../
+ $ENV{NETCDF_LIB}/../
$ENV{MKLROOT}
@@ -3320,7 +3326,8 @@
0.05
0
- $ENV{NETCDF_ROOT}/
+ $ENV{NETCDF_ROOT}/
+ $ENV{PNETCDF_ROOT}/
$ENV{MKLROOT}
@@ -3549,6 +3556,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
@@ -3626,8 +3635,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
@@ -3706,8 +3713,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
@@ -3819,6 +3824,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
@@ -3906,6 +3913,9 @@
+
+ /soft/netcdf/fortran-4.4-intel-sp1-update3-parallel/lib
+
@@ -3985,6 +3995,11 @@
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
+
+
+ $ENV{NETCDF_DIR}
+ $ENV{PNETCDF_DIR}
+
@@ -4064,6 +4079,11 @@
$CIME_OUTPUT_ROOT/$CASE/run
$CIME_OUTPUT_ROOT/$CASE/bld
+
+
+ $ENV{NETCDF_DIR}
+ $ENV{PNETCDF_DIR}
+
@@ -4142,6 +4162,7 @@
/usr/local/share/cmake-3.21/
+ $ENV{NETCDF_HOME}
@@ -4959,6 +4980,7 @@
FALSE
+ $ENV{NETCDF_DIR}
yes
@@ -5194,6 +5216,8 @@
1
1
+ /opt/conda
+ /opt/conda
diff --git a/components/cmake/modules/FindNETCDF.cmake b/components/cmake/modules/FindNETCDF.cmake
index f5491548e3f2..56d666a58661 100644
--- a/components/cmake/modules/FindNETCDF.cmake
+++ b/components/cmake/modules/FindNETCDF.cmake
@@ -36,9 +36,12 @@ function(get_netcdf_libs ncpath nfpath)
endfunction()
function(create_netcdf_target)
- # Need to load macros to pick up netcdf vars. This should not impact
- # the scope of the caller because we are doing this within a function
- include(${CASEROOT}/Macros.cmake)
+
+ # 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)