Difference between revisions of "HDF5"

From GISAXS
Jump to: navigation, search
(Installation)
(Installation)
Line 15: Line 15:
 
#*# cd hdf5-1.8.15-patch1/
 
#*# cd hdf5-1.8.15-patch1/
 
#*# make install
 
#*# make install
 +
#*# Compilation may take 5-10 minutes. If there are any errors, resolve the dependencies using your package manager.
 
# If necessary, install dependencies:
 
# If necessary, install dependencies:
 
## [http://cython.org/ Cython] (C extensions for Python)
 
## [http://cython.org/ Cython] (C extensions for Python)

Revision as of 09:32, 5 August 2015

Hierarchical Data Format (HDF) is a portable binary format, meant to be extensible and self-describing.

Tools

  • hdfview

Reading

In order to read HDF5 files, you will need a suitable library. Here, we describe how to arrange to open compressed HDF5 files in a Python environment.

Installation

  1. Install HDF5 library
    • To install the version from the repository:
      • sudo apt-get install libhdf5-dev
    • In some cases, the repository version may not work (or be out of date). In that case, you can manually download the source from hdfgroup, and install it by doing:
      1. wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.15-patch1.tar.gz
      2. tar xzvf hdf5-1.8.15-patch1.tar.gz
      3. cd hdf5-1.8.15-patch1/
      4. make install
      5. Compilation may take 5-10 minutes. If there are any errors, resolve the dependencies using your package manager.
  2. If necessary, install dependencies:
    1. Cython (C extensions for Python)
      • sudo apt-get install cython
    2. python-pkgconfig:
  3. Install the h5py package (Python library for HDF5).
    1. Download and extract tarball (e.g. from [1]).
    2. Setup
      • cd h5py
      • sudo python setup.py install

See Also