Personal tools


From MohidWiki

Jump to: navigation, search

H5utils are open-source command-line tools to manipulate HDF5 files. They can be downloadaded from h5utils-1.12.1.tar.gz.


h5totxt is an alternative to H5dump , with the advantage of being quicker and produce single value or csv output. Examples are:

  • Export matrix to csv file:
  h5totxt -. 5 -d "/Grid/Bathymetry" 2006/MM5_Tejo200m_2006-01-01_2006-04-01.hdf5 > bat.csv
  • Extract single value:
  h5totxt -. 6 -x i -y j -d "/Grid/Bathymetry" 2006/MM5_Tejo200m_2006-01-01_2006-04-01.hdf5

where (i,j) start in 0 and correspond to MOHID (LOCATION_J - 1, LOCATION_I - 1).

This is the alternative to:

  h5dump -d "/Grid/Bathymetry" -s "i,j" -c "1,1" MM5_Tejo200m_2006-01-01_2006-04-01.hdf5 | grep '(i'

External References