Installing NetCDF-C
Procedure
- Use PuTTY to log in to the server as the root user.
- Decompress the offline NetCDF-C installation package.
tar -zxvf netcdf-c-4.8.1.tar.gz
- Go to the directory generated after the decompression.
cd netcdf-c-4.8.1
- Perform the configuration.
./configure --prefix=/path/to/NETCDF CPPFLAGS="-I/path/to/HDF5/include" LDFLAGS="-L/path/to/HDF5/lib -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
The configuration is successful if the following information in is displayed:

- Perform the compilation and installation.
make make install
After the installation is complete, the following information is displayed:

- 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
- Check whether NetCDF-C is installed.
nc-config --all
The installation is successful if the following information in is displayed:

Parent topic: Configuring the Compilation Environment