hdfeos2 to netcdf-4 Conversion Tool

h4toh5 is a command-line tool that can convert HDF4 file into HDF5 file. It can also convert HDF-EOS2 file to netCDF-4 file because HDF-EOS2 is based on HDF4 and netCDF-4 is based on HDF5. This page will highlight some information of converting HDF-EOS2 to netCDF-4. Check the links to the download, demo and other conversion tool pages at the end.

Installation

Please run configure with --with-hdfeos2=/path/to/hdfeos2 as shown in Figure 1.

Figure 1. How to compile h4toh5 tool with HDF-EOS2 support
$tar zxvf h4h5tools-2.2.3.tar.gz && cd h4h5tools-2.2.3
$./configure CC=/usr/local/bin/h4cc --with-hdf5=/usr/local --with-hdfeos2=/usr/local --prefix=/usr/local
$gmake && gmake check && gmake install
The above example assumes that HDF4, HDF-EOS2, and HDF5 are all installed with /usr/local installation prefix. h4toh5 tool will be installed under /usr/local/bin/ as well.

Usage

If the --with-hdfeos2 option is used, the h4toh5 conversion utility will recognize the following additional command line arguments:

You can type the following command to convert the HDF-EOS2 file "AR_RnGd.hdf" to a netCDF-4-compliant HDF5 file "AR_RnGd.nc" as shown in Figure 2.

Figure 2. How to convert HDF-EOS2 file to netCDF-4 file
$/usr/local/bin/h4toh5 -eos -nc4strict AR_RnGd.hdf AR_RnGd.nc

Optional Verifier

An optional HDF-EOS2/netCDF-4 verifier utility is in the subdirectory misc/verify_eos2nc4/ can be found from the source distribution. See the README.txt file in that directory.

Limitation

The latest h4toh5 command-line utility, with the options (-eos -nc4strict) that can convert HDF-EOS2 to netCDF-4, is tested with HDF4 V4.2.15, HDF5 1.10.6, HDF-EOS2 2.20, and ncdump from the netCDF 4.7.3 distribution on the following platform and compiler:

See Also

  1. HDF-EOS2 to netCDF-4 conversion download
  2. HDF-EOS2 to netCDF-4 conversion demo
  3. Converting HDF4/HDF-EOS2 to netCDF3/netCDF4 by following the CF Conventions
  4. Converting HDF4 to HDF5

Last modified: 03/11/2020
About Us | Contact Info | Archive Info | Disclaimer
Sponsored by Subcontract number 4400528183 under Raytheon Contract number NNG15HZ39C, funded by NASA / Maintained by The HDF Group