Child pages
  • NetCDF library
Skip to end of metadata
Go to start of metadata

 

 

General Information

Home pageVersionsModule dependencies
netCDFnetCDF-FortranCompilerMPI
www.unidata.ucar.edu/software/netcdf4.4.04.4.3GCC/4.9.3-2.25OpenMPI/1.10.2
4.4.14.4.4GCC/5.4.0-2.26OpenMPI/1.10.3

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 Idun

Load one of the netCDF, and the corresponding GCC and OpenMPI modules to use NetCDF on Idun, e.g. for C:

$ module load GCC/5.4.0-2.26 OpenMPI/1.10.3 netCDF/4.4.1

Compile and link:

$ icc test_netcdf.c -lnetcdf

or for Fortran:

$ module load GCC/5.4.0-2.26 OpenMPI/1.10.3 netCDF-Fortran/4.4.4
$ ifort test_netcdf.f90 -lnetcdff

Ncview

VersionsModule dependencies
GCCMPI
2.1.7GCC/4.9.3-2.25OpenMPI/1.10.2
2.1.7GCC/5.4.0-2.26OpenMPI/1.10.3

Ncview is a visual browser for netCDF format files. Load the ncview, and the corresponding GCC and OpenMPI modules to use ncview on Idun, e.g.

$ module load GCC/5.4.0-2.26 OpenMPI/1.10.3 ncview/2.1.7

netcdf4-python

VersionsModule dependencies
GCCMPI
1.2.6GCC/5.4.0-2.26OpenMPI/1.10.3

The Python 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 GCC/5.4.0-2.26 OpenMPI/1.10.3 netcdf4-python/1.2.6-Python-2.7.12
$ python
>>> from netCDF4 import Dataset
>>> rootgrp = Dataset('test.nc', 'w', format='NETCDF4')
>>> print rootgrp.file_format
NETCDF4
>>> rootgrp.close()
>>> exit()

Further Information

 

 

  • No labels