NERSC logo National Energy Research Scientific Computing Center
  A DOE Office of Science User Facility
  at Lawrence Berkeley National Laboratory
 

NetCDF I/O Library and Related Softwares at NERSC

The NetCDF (network Common Data Form) library provides a set of programming interfaces that can be used for storing and retrieving scientific data. It also defines a machine-independent format for representing scientific data. The netCDF software was developed at the Unidata Program Center in Boulder, Colorado.

Files written with previous versions can be read or written with the current version.

How to use NetCDF Library

  • On Cray XT4 (Franklin)
         % module load netcdf 
         % ftn  ... $NETCDF 
         % cc  ... $NETCDF 
         % CC  ... $NETCDF 
    
    Notice that on Franklin, all objective files need to present before the netcdf libraries while linking.
  • On Bassi
    • 32-bit library
      % module load netcdf_32 
      
           % xlf  $NETCDF ... 
           % xlc  $NETCDF ... 
           % xlC  $NETCDF ... 
      
    • 64-bit library
      % module load netcdf 
      
           % xlf -q64  $NETCDF ... 
           % xlc -q64  $NETCDF ... 
           % xlC -q64  $NETCDF ... 
      
  • On opteron Linux cluster (Jacquard)
         % module load netcdf 
         % pathf90  $NETCDF ... 
         % pathcc  $NETCDF ... 
         % pathCC  $NETCDF ... 
    
  • On SGI Altix (Davinci)
         % module load netcdf 
         % g77  $NETCDF ... 
         % gcc  $NETCDF ... 
         % g++  $NETCDF ... 
    

Example

  • First, one must issue the module load command to set up paths and environment: module load netcdf.
  • Example 1 s_ex1.f.
  • The makefile that illustrates the use of environment variables set up by the module load command.
  • To run this example do : make run_prog
  • The file created in example 1 (using 4 processors) in CDL notation created by the command ncdump.

netCDF Operators (NCO)

The netCDF Operators (NCO) are a suite of file operators which facilitate manipulation and analysis of self-describing data stored in the netCDF or HDF4 formats.

To access netCDF operators, first load the module nco with module load nco. The nco module automatically loads the module netcdf.

NCVIEW

NCVIEW is a visual browser for NetCDF format files.

To use NCVIEW, first set up the necessary x-term environment, then load the module ncview with module load ncview. The ncview module automatically loads the module netcdf.

NCCMP

The NCCMP compares two NetCDF files bitwise or with a user defined tolerance (absolute or relative percentage).

To use NCCMP, first load the module nccmp with module load nccmp. The nccmp module automatically loads the module netcdf.

Climate Data Operators (CDO)

The Climate Data Operators (CDO) are a collection of command line Operators to manipulate and analyse Climate model Data. Supported data formats are GRIB, netCDF, SERVICE, EXTRA and IEG. There are more than 350 operators available.

To use CDO, first load the module cdo with module load cdo. The cdo module automatically loads the module netcdf.

Further information

PackagePlatformVersionModule Docs
netcdf bassi 3.6.0 netcdf/3.6.0  Vendor
netcdf bassi 3.6.2 netcdf  Vendor
netcdf bassi 32-bit 3.6.0 netcdf_32  Vendor
netcdf davinci 3.6.0 netcdf/3.6.0  Vendor
netcdf davinci 3.6.2 netcdf  Vendor
netcdf franklin 3.6.1 netcdf/3.6.1  Vendor
netcdf franklin 3.6.2 netcdf  Vendor
netcdf franklin 3.6.2 netcdf-pathscale  Vendor
netcdf jacquard 3.6.0 netcdf/3.6.0  Vendor
netcdf jacquard 3.6.2 netcdf  Vendor
(*) Denotes limited support
PackagePlatformVersionModule Docs
nco bassi 3.0.2 nco  Vendor
nco bassi 3.9.1 nco  Vendor
nco davinci 3.0.2 nco/3.0.2  Vendor
nco davinci 3.9.1 nco  Vendor
nco franklin 3.1.6 nco  Vendor
nco jacquard 3.0.1 nco/3.0.1  Vendor
nco jacquard 3.9.1 nco  Vendor
(*) Denotes limited support
PackagePlatformVersionModule Docs
ncview bassi 1.93c ncview  Vendor
ncview davinci 1.93a ncview  Vendor
ncview jacquard 1.93c ncview  Vendor
(*) Denotes limited support
PackagePlatformVersionModule Docs
nccmp bassi 0.5.1 nccmp  Vendor
nccmp davinci 0.5.1 nccmp  Vendor
nccmp davinci 0.5.1 nccmp  Vendor
nccmp davinci 0.5.2 nccmp  Vendor
(*) Denotes limited support
PackagePlatformVersionModule Docs
cdo bassi 1.0.9 cdo  Vendor
cdo davinci 1.0.9 cdo  Vendor
cdo franklin 1.0.9 cdo  Vendor
cdo jacquard 1.0.9 cdo  Vendor
(*) Denotes limited support

LBNL Home
Page last modified: Thu, 10 Apr 2008 23:57:42 GMT
Page URL: http://www.nersc.gov/nusers/resources/software/libs/io/netcdf/
Web contact: webmaster@nersc.gov
Computing questions: consult@nersc.gov

Privacy and Security Notice
DOE Office of Science