Rate This Document
Findability
Accuracy
Completeness
Readability

Installing NetCDF-C

Procedure

  1. Download the NetCDF-C source package.
  1. Upload the source package to its installation directory on the server, for example, /path/to/download/netcdf-c.
  2. Go to the source package directory.
    cd /path/to/download/netcdf-c
  3. Decompress the installation package.
    tar -zxvf netcdf-c-4.7.4.tar.gz
  4. Switch to the directory of the configure script.
    cd netcdf-c-4.7.4
  5. Install NetCDF-C.
    ./configure --prefix=/path/to/install/NETCDF --build=aarch64-unknown-linux-gnu --enable-shared --enable-netcdf-4 --enable-dap --with-pic --disable-doxygen --enable-static --enable-pnetcdf --enable-largefile CC=mpicc CXX=mpicxx FC=mpifort F77=mpifort CPPFLAGS="-I/path/to/install/HDF5/include -I/path/to/install/PNETCDF/include" LDFLAGS="-L/path/to/install/HDF5/lib -L/path/to/install/PNETCDF/lib -Wl,-rpath=/path/to/install/HDF5/lib -Wl,-rpath=/path/to/install/PNETCDF/lib" CFLAGS="-L/path/to/install/HDF5/lib -L/path/to/install/PNETCDF/lib -I/path/to/install/HDF5/include -I/path/to/install/PNETCDF/include"
  6. Perform the compilation and installation.
    make -j 16
    make install
  7. Set the environment variables.
    export PATH=/path/to/install/NETCDF/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/install/NETCDF/lib:$LD_LIBRARY_PATH