skip to content
 

NetCDF is a set of software libraries and self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.

Availability: 
Instructions for users: 

Load the appropriate modules. Note that in newer versions of the NetCDF software the C library and Fortran interface are distributed as separate packages with separate version numbers. For some versions we built these as separate modules, so you therefore need to load both a netcdf/compilertype/c and a netcdf/compilertype/fortran module in order to use the Fortran interface. This is unecessarily complicated so on the latest modules we put both interfaces into the same modulefile and call it netcdf/compilertype/version.

The 'compilertype' needs to match the compiler family you want to use, eg 'intel' for Intel compilers. Once you have loaded the modules, the nc-config and nf-config commands will tell you how to link the library.

Admin notes: 

To build this you first need to build szip, then hdf5, and then netcdf. Although Ubuntu has its own copy of this library, it doesn't have the Fortran interfaces built for other compilers than gfortran. Our versions are also newer.

 module purge 
 #module add szlib # on 18.04 use szlib2 system package
 module add hdf5/gnu 
 # unpack C interface 
 ./configure --prefix=/usr/local/shared/ubuntu-18.04/x86_64/netcdf/gnu/4.6.1 --enable-netcdf-4 
 make 
 make check 
 make install 
 # unpack Fortran interface, set environment to see C interface 
module add hdf5/gnu netcdf/gnu
 ./configure --prefix=/usr/local/shared/ubuntu-18.04/x86_64/netcdf/gnu/4.6.1

 make 
 make check 
 make install 

Now clean up everything, environment included (module purge)

# module add szlib 
module add icc/64/2013/5 
module add hdf5/intel 
# in c interface 
CC=icc FC=ifort ./configure --prefix=/usr/local/shared/ubuntu-18.04/x86_64/netcdf/intel/4.6.1 --enable-netcdf-4 
make 
make check 
make install 
# unpack Fortran interface, set environment to see C interface 
module add netcdf/intel
CC=icc FC=ifort ./configure --prefix=/usr/local/shared/ubuntu-18.04/x86_64/netcdf/intel/4.6.1
 make 
make check 
make install 

Can't find what you're looking for?

Then you might find our A-Z site index useful. Or, you can search the site using the box at the top of the page, or by clicking here.