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 an installation directory.
    mkdir -p /path/to/netcdf
  3. Install the dependencies.
    yum install curl libcurl-devel zlib-devel
  4. Go to the installation directory.
    cd /path/to/netcdf
  5. Obtain the source package and rename it.
    wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.3.3.1.tar.gz
    mv v4.3.3.1.tar.gz netcdf-4.3.3.1.tar.gz
  6. Decompress the source package.
    tar -vxf netcdf-4.3.3.1.tar.gz
  7. Go to the directory generated after the decompression.
    cd netcdf-c-4.3.3.1/
  8. Configure the compilation.
    ./configure --prefix=/path/to/netcdf --build=aarch64-linux --enable-shared --enable-netcdf-4 --enable-dap --with-pic --disable-doxygen --enable-static --enable-largefile CC=clang CXX=clang++ FC=flang F77=flang 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 8

    make install

  10. Set the environment variables.
    export PATH=/path/to/netcdf/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/netcdf/lib:$LD_LIBRARY_PATH