NETCDF-C安装包下载地址:https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.8.1.tar.gz
NETCDF-F安装包下载地址:https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.5.4.tar.gz
cd /path/to/NETCDF/src tar -xvf v4.8.1.tar.gz tar -xvf v4.5.4.tar.gz
cd netcdf-c-4.8.1 export CC=mpicc CXX=mpicxx FC=mpifort export HDF5_DIR=/path/to/NETCDF export PNETCDF_DIR=/path/to/PNETCDF/install export NETCDF_DIR=/path/to/NETCDF ./configure --prefix=${NETCDF_DIR} --build=aarch64-unknown-linux-gnu --enable-shared --enable-netcdf-4 --disable-dap --with-pic --disable-doxygen --enable-static --enable-pnetcdf --enable-largefile CPPFLAGS="-O3 -I${HDF5_DIR}/include -I${PNETCDF_DIR}/include" LDFLAGS="-L${HDF5_DIR}/lib -L${PNETCDF_DIR}/lib -Wl,-rpath=${HDF5_DIR}/lib -Wl,-rpath=${PNETCDF_DIR}/lib" CFLAGS="-O3 -L${HDF5_DIR}/lib -L${PNETCDF_DIR}/lib -I${HDF5_DIR}/include -I${PNETCDF_DIR}/include" make -j make install
cd ../netcdf-fortran-4.5.4 ./configure --prefix=${NETCDF_DIR} --build=aarch64-unknown-linux-gnu --enable-shared --with-pic --disablecI${NETCDF_DIR}/include" LDFLAGS="-L${HDF5_DIR}/lib -L${NETCDF_DIR}/lib -Wl,-rpath=${HDF5_DIR}/lib -Wl,-rpath=${NETCDF_DIR}/lib" CFLAGS="-O3 -L${HDF5_DIR}/HDF5/lib -L${NETCDF_DIR}/lib -I${HDF5_DIR}/include -I${NETCDF_DIR}/include" CXXFLAGS="-O3 -L${HDF5_DIR}/lib -L${NETCDF_DIR}/lib -I${HDF5_DIR}/include -I${NETCDF_DIR}/include" FCFLAGS="-O3 -L${HDF5_DIR}/lib -L${NETCDF_DIR}/lib -I${HDF5_DIR}/include -I${NETCDF_DIR}/include" sed -i '11686c wl="-Wl,"' libtool sed -i '11838c wl="-Wl,"' libtool make -j make install