Download ncdump from The HDF Group Web Site
- Go to Pre-Compiled Binary Distributions.
- Select the appropriate directory for your platform.
- Follow the link to the utilities directory.
- Download ncdump to your local drive using an ftp application.
- Type the following command to ensure the owner and the group of the file have read, write, and execute permission for running ncdump:
- chmod 775 ncdump
Dump HDF to ASCII Format
Choose one of the following steps:
- To dump the entire contents of an HDF file to ASCII format, type the following command:
- To dump one data variable from the HDF file to ASCII format, type the following command:
ncdump –v <variable name> <inputfilename.hdf>
Note 1: Use double quotes around the variable name if it consists of two or more words, for example "Sea Ice by Reflectance."
- To dump only the metadata information to the screen, type the following command:
ncdump -h <inputfilename.hdf> | more
- To dump this metadata information to an output file named ascii.out, type the following command:
ncdump -h <inputfilename.hdf> > ascii.out