NetCDF (NETwork Common Data Form) is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.

Using NetCDF

To use NetCDF, user should load the netcdf modules and the corresponding compiler:

System NetCDF version Compiler Command
HPC2015 GCC module load netcdf/gcc/
Intel module load netcdf/impi/
4.4 GCC module load netcdf/gcc/4.4
Intel module load netcdf/impi/4.4
4.7.1 GCC module load netcdf/gcc/4.7.1
Intel module load netcdf/impi/4.7.1

Compile and link:

For C program $ gcc test_netcdf.c -lnetcdf
$ icc test_netcdf.c -lnetcdf
For Fortran program $ gfortran test_netcdf.f90 -lnetcdff
$ ifort test_netcdf.f90 -lnetcdff

Additional Information

NetCDF Official website
NetCDF Documentation