Skip to content

HDF4

Tools and File Structures for Storing and Analyzing Scientific Data


hdf4 is one of three HDF packages available on RCC systems:

HDF4 is one of four HDF packages available on RCC Systems (the others being HDF5, h5py, and HDFView). HDF (both versions 4 and 5) is essentially a data storage format for scientific data. The HDF4 package also comes with numerous tools for working with and analyzing scientific data in HDF files, as well as an API for working with HDF files in code.

Using HDF4 on RCC Resources#

HDF4 is primarily used as a library for C or Fortran programs. To compile a file using HDF4 on RCC Systems, you must choose either the Intel or PGI compiler and then compile your code using the following commands. Replace TEST with the name of your C file and EXENAME with what you would like to name your executable file.

1
2
3
4
5
6
7
8
# Example for Intel compiler (icc)
module load intel
icc -c TEST.c -I /opt/rcc/intel/include/hdf
icc TEST.o -o EXENAME -L /opt/rcc/intel/lib64/hdf -ldf
# Example for GNU compiler (gcc)
module load gnu
gcc -c TEST.c -I /opt/rcc/gnu/include/hdf
gcc TEST.o -o EXENAME -L /opt/rcc/gnu/lib64/hdf -ldf