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. Decompress the NetCDF-C installation package.
    tar -zxvf netcdf-c-4.7.0.tar.gz
  3. Go to the directory generated after the decompression.
    cd netcdf-c-4.7.0
  4. Set the variables.
    export CPPFLAGS="-I/path/toHDF5/include"
    export LDFLAGS="-L/path/to/HDF5/lib -Wl,-rpath=/path/to/SMOKE/HDF5/lib"
    export CFLAGS="-L/path/to/HDF5/lib -I/path/to/SMOKE/HDF5/include - "
    export CXXFLAGS="-L/path/to/HDF5/lib -I/path/to/SMOKE/HDF5/include "
    export FCFLAGS="-L/path/to/HDF5/lib -I/path/to/SMOKE/HDF5/include"
  5. Perform the configuration. (If the CC, FC, and CXX environment variables fail to be set, you can use an absolute path.)
    ./configure --prefix=/path/to/NETCDF LDFLAGS="-L/path/to/HDF5/lib" CPPFLAGS="-I/path/to/HDF5/include" CC=mpicc --disable-dap FC=mpif90 CXX=mpicxx
  6. Perform the compilation and installation.
    make
    make install
  7. Set the NetCDF-C environment variables.
    export PATH=/path/to/NETCDF/bin:$PATH
    export LD_LIBRARY_PATH=/path/to/NETCDF/lib:$LD_LIBRARY_PATH
    export NETCDF=/path/to/NETCDF