---
name: "h4fromh5"
section: "1"
platform: "linux"
package: "h5utils"
version: "1.13.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/h4fromh5"
---

# h4fromh5(1)

convert HDF5 scientific dataset to an HDF4 file

## NAME

h4fromh5 - convert HDF5 scientific dataset to an HDF4 file

## SYNOPSIS

**h4fromh5**  \[*OPTIONS*\] \[*HDF5-FILES*\]

## DESCRIPTION

**h4fromh5** takes one or more files in HDF5 format and outputs files in HDF4 format containing the datasets from the HDF5 files. (Currently, only a single dataset per HDF5 file is converted.)

HDF4 and HDF5 are free, portable binary formats and supporting libraries developed by the National Center for Supercomputing Applications at the University of Illinois in Urbana-Champaign.

A single h5 file can contain multiple data sets; by default, **h4fromh5** converts the first dataset, but this can be changed via the FC**-d**F\[0\] option, or by using the syntax FCHDF5FILE:DATASETF\[0\].

The most basic usage is something like ’**h4fromh5** FC*foo.h5*F\[0\]’, which will output a file FC*foo.hdf*F\[0\] containing the scientific dataset from FC*foo.h5*F\[0\].

## OPTIONS

- FC**-h**F\[0\]

  Display help on the command-line options and usage.

- FC**-V**F\[0\]

  Print the version number and copyright info for **h4fromh5**.

- FC**-v**F\[0\]

  Verbose output.

- FC**-T**F\[0\]

  Transpose the output dataset (e.g. LxMxN becomes NxMxL). This is often useful because HDF5 programs typically follow C (row-major) conventions while HDF4 programs often follow Fortran (column-major, transposed) conventions for array ordering.

- FC**-o**F\[0\] *file*

  Send HDF output to *file* rather than to the input filename with FC.h5F\[0\] replaced with FC.hdfF\[0\] (the default).

- FC**-d**F\[0\] *name*

  Read from dataset *name* in the input; otherwise, the first dataset in the input file is used. Alternatively, use the syntax FCHDF5FILE:DATASETF\[0\] when the input file names are specified.

## BUGS

Send bug reports to S. G. Johnson, stevenj@alum.mit.edu.

## AUTHORS

Written by Steven G. Johnson. Copyright (c) 2005 by the Massachusetts Institute of Technology.
