Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following command displays a list of the objects in the file OMI-Aura.he5 (an HDF-EOS5 file):

h5dump

...

-n

...

OMI-Aura.he5

...

 

As shown in the output below, the objects (groups, datasets) are listed to the left, followed by their names. You can see that this file contains two root groups, HDFEOS and HDFEOS INFORMATION:

...

The file structure of the OMI-Aura.he5 file can be seen with the following command. The -A 0 option suppresses the display of attributes:

h5dump

...

-H

...

-A

...

0

...

OMI-Aura.he5

...

 

Output of this command is shown below:

...

OptionDescriptionComment
-r
Lists all groups and objects recursivelySee  Example 3
-v
Generates verbose output (lists dataset properties, attributes 
and attribute values, but no dataset values)
 

 

Example 3

The following command shows the contents of the HDF-EOS5 file OMI-Aura.he5. The output is similar to h5dump, except that h5ls also shows dataspace information for each dataset:

...

h5ls

...

-r

...

OMI-Aura.he5

...

 

The output is shown below:

...

To view the contents of the HDFEOS group in the OMI file mentioned previously, you can specify the path and name of the group as follows:

h5dump

...

-g

...

"/HDFEOS"

...

-H

...

-A

...

0

...

OMI-Aura.he5

...

 

The -A 0 option suppresses attributes and -H suppresses printing of data values:

...

You can view the contents of a group with h5ls by specifying the group after the file name. To use h5ls to view the contents of the  /HDFEOS  group in the OMI-Aura.he5 file, type:

...

h5ls

...

-r

...

OMI-Aura.he5/HDFEOS

...

 

The output of this command is:

...

The -a A option will display an attribute. However, the path to the attribute must be included when specifying this option. For example, to see the ScaleFactor attribute in the OMI-Aura.he5 file, type:

...

h5dump

...

-a

...

"/HDFEOS/GRIDS/OMI

...

Column

...

Amount

...

O3/Data

...

Fields/SolarZenithAngle/ScaleFactor"

...

OMI-Aura.he5

...

 

This command displays:

   HDF5 "OMI-Aura.he5" {
   ATTRIBUTE "ScaleFactor" {
      DATATYPE  H5T_IEEE_F64LE
      DATASPACE  SIMPLE { ( 1 ) / ( 1 ) }
      DATA {
      (0): 1
      }
   }
   }

...

How can you determine the path to the attribute? This can be done by looking at the file contents with the -n 1 option:

...

h5dump

...

-n

...

1

...

OMI-Aura.he5

...

 

Below is a portion of the output for this command:

...

The -N option can be used to display all objects or attributes with a given name. For example, there are four attributes with the name ScaleFactor in the OMI-Aura.he5 file, as can be seen below with the -N option:

...

h5dump

...

-N

...

ScaleFactor

...

OMI-Aura.he5

...

 

It outputs:

HDF5 "OMI-Aura.he5" {
ATTRIBUTE "ScaleFactor" {
   DATATYPE  H5T_IEEE_F64LE
   DATASPACE  SIMPLE { ( 1 ) / ( 1 ) }
   DATA {
   (0): 1
   }
}
ATTRIBUTE "ScaleFactor" {
   DATATYPE  H5T_IEEE_F64LE
   DATASPACE  SIMPLE { ( 1 ) / ( 1 ) }
   DATA {
   (0): 1
   }
}
ATTRIBUTE "ScaleFactor" {
   DATATYPE  H5T_IEEE_F64LE
   DATASPACE  SIMPLE { ( 1 ) / ( 1 ) }
   DATA {
   (0): 1
   }
}
ATTRIBUTE "ScaleFactor" {
   DATATYPE  H5T_IEEE_F64LE
   DATASPACE  SIMPLE { ( 1 ) / ( 1 ) }
   DATA {
   (0): 1
   }
}
}

...