Installing NetCDF-Fortran
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following commands to install NetCDF-Fortran.
export PATH=/path/to/GNU/bin:/path/to/OPENMPI/bin:$PATH export LD_LIBRARY_PATH=/path/to/GNU/lib64:/path/to/OPENMPI/lib:$LD_LIBRARY_PATH tar -xvf netcdf-fortran-4.4.1.tar.gz cd netcdf-fortran-4.4.1 ./configure --prefix=/path/to/NETCDF --build=aarch64-unknown-linux-gnu --enable-shared --with-pic --disable-doxygen --enable-largefile --enable-static CC=mpicc CXX=mpicxx FC=mpifort F77=mpifort CPPFLAGS="-I/path/to/HDF5/include -I/path/to/NETCDF/include" LDFLAGS="-L/path/to/HDF5/lib -L/path/to/NETCDF/lib -Wl,-rpath=/path/to/HDF5/lib -Wl,-rpath=/path/to/NETCDF/lib" CFLAGS="-L/path/to/HDF5/lib -L/path/to/NETCDF/lib -I/path/to/HDF5/include -I/path/to/NETCDF/include" CXXFLAGS="-L/path/to/HDF5/lib -L/path/to/NETCDF/lib -I/path/to/HDF5/include -I/path/to/NETCDF/include" FCFLAGS="-L/path/to/HDF5/lib -L/path/to/NETCDF/lib -I/path/to/HDF5/include -I/path/to/NETCDF/include" make -j 16 make install
If the environment variables of the compiler and MPI have been declared, skip the first two commands for declaring environment variables in this step.
- Check whether NetCDF-Fortran is successfully installed.
cd /path/to/NETCDF ls lib
If the following information is displayed, the installation is successful.

Parent topic: Configuring the Compilation Environment