Rate This Document
Findability
Accuracy
Completeness
Readability

Installing NetCDF-Fortran

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the offline NetCDF-Fortran installation package.
    tar -zxvf netcdf-fortran-4.5.3.tar.gz
  3. Go to the directory generated after the decompression.
    cd netcdf-fortran-4.5.3
  4. Perform the configuration.
    ./configure --prefix=/path/to/NETCDF CPPFLAGS="-I/path/to/HDF5/include -I/path/to/NETCDF/include" LDFLAGS="-L/path/to/HDF5/lib -L/path/to/NETCDF/lib -lnetcdf -Wl,--build-id" --build=aarch64-unknown-linux-gnu --enable-fortran --enable-static=yes --enable-parallel --enable-shared CFLAGS="-O3 -fPIC -Wno-incompatible-pointer-types-discards-qualifiers -Wno-non-literal-conversion" FCFLAGS="-O3 -fPIC"  --enable-fortran --enable-netcdf4 --enable-parallel CC=mpicc FC=mpif90 CXX=mpicxx F77=mpif77

    The configuration is successful if the following information in is displayed:

  5. Perform the compilation and installation.
    make
    make install

    The installation is successful if the following information in is displayed:

  6. Set the NetCDF-Fortran 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
  7. Check whether NetCDF-Fortran is installed.
    nf-config --all

    The installation is successful if the following information in is displayed: