Jean Zay: The NetCDF library


NetCDF (Network Common Data Form), a product of Unidata, is a library used to create and manipulate files using the NetCDF format. With this format you can conserve and exchange scientific data. It is software which allows handling self-describing files in the NetCDF format.

Installed versions

  $ module avail netcdf
--------------------------------------- /gpfslocalsup/pub/modules-idris-env4/modulefiles/linux-rhel7-x86_64 ----------------------------------------
netcdf-cxx4/4.3.1      netcdf-cxx4/4.3.1-mpi-cuda  netcdf-fortran/4.5.2-mpi       netcdf/4.7.2      netcdf/4.7.2-mpi-cuda  
netcdf-cxx4/4.3.1-mpi  netcdf-fortran/4.5.2        netcdf-fortran/4.5.2-mpi-cuda  netcdf/4.7.2-mpi

These versions are compiled with HDF5 version 1.10.5.


The NetCDF library is in 64-bit addressing mode.


The different versions are accessible with the module command (we recommend that you read the documentation about the ''module'' command for more detailed information.


  • To load the parallel version compiled with Intel 2019.4 :
$ module load intel-compilers/19.0.4 netcdf/4.7.2-mpi
Loading netcdf/4.7.2-mpi
  Loading requirement: intel-mpi/2019.4
$ module list
Currently Loaded Modulefiles:
 1) intel-compilers/19.0.4   2) intel-mpi/2019.4   3) netcdf/4.7.2-mpi
  • To load the sequential version compiled with PGI 19.10 :
$ module load pgi/19.10 netcdf/4.7.2
$ module list
Currently Loaded Modulefiles:
 1) pgi/19.10   2) netcdf/4.7.2


For more portability, we strongly encourage you to use the Fortran 90 interface. The NetCDF variables and functions all begin with nf90_ and these allow passing 4 or 8-byte integers/reals in argument without changing the function call.


Some man (netcdf, ncdump and ncgen) corresponding to the versions used are available.

Reference site: Unidata NetCDF