Rate This Document
Findability
Accuracy
Completeness
Readability

Installing NetCDF-C

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Create a NetCDF-C installation directory, for example, /path/to/NETCDF.
    mkdir -p /path/to/NETCDF
  3. Install the dependency.
    yum install curl* -y
  4. Go to the NetCDF-C installation directory.
    cd /path/to/NETCDF
  5. Obtain the NetCDF-C installation package.
    wget https://codeload.github.com/Unidata/netcdf-c/tar.gz/refs/tags/v4.7.3 --no-check-certificate
  6. Rename and decompress the NetCDF-C installation package.
    mv v4.7.3 netcdf-c-4.7.3.tar.gz
    tar -zxvf netcdf-c-4.7.3.tar.gz
  7. Go to the directory generated after the decompression.
    cd netcdf-c-4.7.3
  8. Perform the configuration.
    ./configure --prefix=/path/to/NETCDF --build=aarch64-unknown-linux-gnu --enable-shared --enable-netcdf-4 --enable-dap --with-pic --disable-doxygen --enable-static --enable-largefile CC=gcc CXX=g++ FC=gfortran F77=gfortran CPPFLAGS="-I/path/to/HDF5/include" 	LDFLAGS="-L/path/to/HDF5/lib -Wl,-rpath=/path/to/HDF5/lib " CFLAGS="-	L/path/to/HDF5/lib -I/path/to/HDF5/include"

  9. Perform the compilation and installation.
    make -j

    make install

  10. Verify the installation.
    ls /path/to/NETCDF/bin
    ls /path/to/NETCDF/lib

    If the following information is displayed, the installation is successful:

  11. Load the environment variables.
    export PATH=/path/to/NETCDF/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/NETCDF/lib:$LD_LIBRARY_PATH