NetCDF

General Information

Home pageVersionsModule dependencies
CompilerMPT
www.unidata.ucar.edu/software/netcdf3.6.2intelcomp/12.0.5.220-
4.1.3intelcomp/12.0.5.220mpt/2.06
4.3.0intelcomp/13.0.1mpt/2.06
4.3.1intelcomp/14.0.1mpt/2.09
4.3.2intelcomp/15.0.1mpt/2.10
4.4.0intelcomp/16.0.1mpt/2.13
4.4.1intelcomp/17.0.0mpt/2.14

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.

Usage on Vilje

Load one of the netcdf, and the corresponding intel compiler and mpt modules to use NetCDF on Vilje, e.g.:

$ module load intelcomp/13.0.1 mpt/2.06 netcdf/4.3.0

Compile and link examples:

$ icc test_netcdf.c -lnetcdf           # C code
$ ifort test_netcdf.f90 -lnetcdff      # Fortran code

Ncview

The Ncview visual browser is installed as part of the netcdf installations, and the ncview executable is available when one of the netcdf module files are loaded. See the manual page, man ncview.

Parallel netCDF

pnetcdf versionModule dependencies
NetCDF
1.3.1netcdf/4.3.0
1.4.1netcdf/4.3.1
1.5.0netcdf/4.3.2
1.6.1netcdf/4.4.0
1.7.0netcdf/4.4.1

PnetCDF is a library providing high-performance parallel I/O while maintaining file-format compatibility with NetCDF.

For example, compile and link a program that uses the PnetCDF C interfaces:

$ module load intelcomp/13.0.1 mpt/2.06 netcdf/4.3.0
$ icc pnetcdf_test.c -lpnetcdf -lmpi

For more information see the manual pages, man pnetcdf and man pnetcdf_f90.

netCDF4

NetCDF4 VersionModule dependencies
NetCDFPython
1.0.2netcdf/4.3.0python/2.7.3
1.0.7netcdf/4.3.1python/2.7.6
1.1.3netcdf/4.3.2python/2.7.9
1.2.2netcdf/4.4.0python/2.7.11
1.2.6netcdf/4.4.1python/2.7.13

The netCDF4 Python interface to the NetCDF library is available when loading one of the 4.3 versions of netcdf and the corresponding python module.

For example, create a netCDF file from python:

$ module load intelcomp/14.0.1 mpt/2.09 netcdf/4.3.1
$ module load python/2.7.6
$ python
>>> from netCDF4 import Dataset
>>> rootgrp = Dataset('test.nc', 'w', format='NETCDF4')
>>> print rootgrp.file_format
NETCDF4
>>> rootgrp.close()
>>> exit()

Further Information

Scroll to Top