NetCDF (Network Common Data Form) is an interface for array-oriented data access and a library that provides an implementation of the interface. The netCDF library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data.
Availability & Restrictions
NetCDF is available without restriction to all OSC users.
The following versions of NetCDF are available at OSC:
To initalize either system prior to using NetCDF, run the following comand:
module load netcdf
To use the parallel implementation of netcdf, run the following command instead:
module load pnetcdf
Building With NetDCF
With the netcdf library loaded, the following environment variables will be available for use:
|$NETCDF_CFLAGS||Use during your compilation step for C programs.|
|$NETCDF_FFLAGS||Use during your compilation step for Fortran programs.|
|$NETCDF_LIBS||Use when linking your program to NetCDF.|
Similarly, when the pnetcdf module is loaded, the following environment variables will be available:
|$PNETCDF_CFLAGS||Use during your compilation step for C programs.|
|$PNETCDF_FFLAGS||Use during your compilation step for Fortran programs.|
|$PNETCDF_LIBS||Use when linking your program to NetCDF.
For example, to build the code myprog.c with the netcdf library you would use:
icc -c $NETCDF_CFLAGS myprog.c icc -o myprog myprog.o $NETCDF_LIBS
You must load the netcdf or pnetcdf module in your batch script before executing a program which is built with the netcdf library
#PBS -N AppNameJob #PBS -l nodes=1:ppn=12 module load netcdf cd $PBS_O_WORKDIR cp foo.dat $TMPDIR cd $TMPDIR appname < foo.dat > foo.out cp foo.out $PBS_O_WORKDIR
- hdf5 software page