The National Institute for Computational Sciences

Nautilus Software


Category: Libraries-IO


Network Common Data Form (NetCDF) is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. The NetCDF distribution contains libraries for C, C++ and Fortran as well as the NetCDF utilities ncgen, ncdump and nccopy.

More information is available at the NetCDF Unidata Homepage.


NetCDF is available as a module. See the modules page for more information on modules. See the Example netCDF programs page for sample codes.

The NetCDF modulefile sets up environment variables to aid in compiling and linking. For compiling and linking NetCDF with FORTRAN:

> ifort netcdf_example.f90 $NETCDF_FLIB
> gfortran netcdf_example.f90 $NETCDF_FLIB
> pgfortran netcdf_example.f90 $NETCDF_FLIB

For compiling and linking with C:

> icc -o netcdf_example netcdf_example.c $NETCDF_CLIB
> gcc -o netcdf_example netcdf_example.c $NETCDF_CLIB
> pgcc -o netcdf_example netcdf_example.c $NETCDF_CLIB

Note: The environment variables $NETCDF_FLIB and $NETCDF_CLIB are set according to the currently loaded programming environment. If you change programming environments then you must update the NetCDF module. For example:

> module load netcdf
> module swap PE-intel PE-gnu
> module update netcdf


This package has the following support level : Supported

Available Versions

Version Available Builds
intel pgi gnu Other