Skip to main content
⚠ INFORMATION
This page was translated by an AI (LLM) with a cursory human check and is awaiting full review.

The NetCDF Library

Description

NetCDF is a product of Unidata; it is a library for creating and manipulating files in the NetCDF format; this format allows for the storage and exchange of scientific data. It is a software that allows the manipulation of self-describing files in the NetCDF format.

Installed Versions

NetCDF is accessible via the module command.

$ module avail netcdf
--------- /lustre/fshomisc/sup/hpe/pub/modules-idris-env4/modulefiles/linux-rhel9-skylake_avx512 ---------
netcdf-c/4.7.2 netcdf-c/4.7.4-mpi netcdf-fortran/4.5.2 netcdf/4.7.2
netcdf-c/4.7.2-mpi netcdf-c/4.7.4-mpi-cuda netcdf-fortran/4.5.2-mpi netcdf/4.7.2-mpi
netcdf-c/4.7.2-mpi-cuda netcdf-c/4.8.1-mpi-cuda netcdf-fortran/4.5.2-mpi-cuda netcdf/4.7.2-mpi-cuda
netcdf-c/4.7.3 netcdf-cxx4/4.3.1 netcdf-fortran/4.5.3 netcdf95/0.3
netcdf-c/4.7.3-mpi netcdf-cxx4/4.3.1-mpi netcdf-fortran/4.5.3-mpi netcdf95/0.3-mpi
netcdf-c/4.7.4 netcdf-cxx4/4.3.1-mpi-cuda netcdf-fortran/4.5.3-mpi-cuda

Features

The NetCDF library is in 64-bit addressing mode.

Usage

The different versions are accessible using the module command. For example:

  • to load the parallel version compiled with intel-compilers/19.0.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 nvidia-compilers/25.1:
$ module load nvidia-compilers/25.1 netcdf/4.7.2
$ module list
Currently Loaded Modulefiles:
1) nvidia-compilers/25.1 2) netcdf/4.7.2

Remarks

For better portability, we encourage you to use the Fortran 90 interface. NetCDF variables and functions all start with nf90_ and these allow passing 4 or 8 byte integers/reals as arguments without changing the function call.

Documentation

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

NetCDF server: https://www.unidata.ucar.edu/software/netcdf/

Your opinion matters!

To give your feedback, report an error, or suggest an improvement, click here:

quick anonymous questionnaire

This questionnaire is temporary and will take less than a minute, so take the opportunity!