Space Research Software

This page uses frames, but your browser doesn't support them.


Home

Welcome to the HDF Explorer HTML help page.

This file presents the help items for HDF Explorer. Sections specific to the Professional version of HDF Explorer are marked Professional version specific

HDF Explorer is a data visualization program that reads the HDF, HDF-EOS and HDF5 data formats. HDF (Hierarchical Data Format) is a free library and platform independent data format for the storage and exchange of scientific data. HDF is developed and supported by NCSA.
Space Research

Software

Click on image to visit our Web site


Menu

Help Index

Using HDF Explorer
SDS views
The properties window
The dump window
SDS scalar map options
SDS vector options
The layer toolbar
Exporting your data
Dimension selection
HDF data objects
HDF Explorer icons

Tutorial

Saving your data in HDF
Home


HDF Explorer

Saving your data in HDF format

The HDF API is supported in the two most used programming languages by scientists and engineers, FORTRAN and C. A complete description of the HDF API is available in the HDF User's Guide, available from NCSA.

In the following pages we present you a quick tutorial of how to save data in the HDF format. We show an example from a real database available to the scientific community, the Mediterranean Oceanic Data Base (MODB) at the University of Liege, in Belgium.

First obtain the data
First you must obtain the data. The MODB offers different kinds of data you can download. In this tutorial we give examples of how to read the raw MODB data format and how to save this format to HDF. You can adapt the examples to fit our own data format.

Databases used are the Seasonal gridded Data Sets (salinity, temperature, velocities of the Mediterranean Sea) and the ETOPO5 data base, which contains gridded data representing bathymetries and elevations from all over the world.

You can download the data from the MODB server

Converting the data to HDF
We modified the MODB data reading FORTRAN program modb2hdf_ex1.f to save the data in HDF format. To compile and link this program you must install the HDF library. Please refer to the HDF NCSA home site for instructions of how to install HDF in your system.
Example 1. Read and save scalar data
This example reads a MODB scalar data file and saves it in HDF format. Dimension scales are used and text annotations are added to the HDF file.

MODB data file | autmedoo.sal.zip
FORTRAN file | modb2hdf_ex1.f
HDF output file | modb_ex1_hdf.zip

Example 1 image in HDF Explorer, click for a larger image.
Example 2. Read and save vector data
This example reads two MODB files (two components of the sea current velocity) and saves the data as two HDF SDS. You can later use HDF Explorer to visualize your data as scalar or vector form.

MODB data files | summedoo.u.zip summedoo.v.zip
FORTRAN file | modb2hdf_ex2.f
HDF output file | modb_ex2_hdf.zip

Example2 image in HDF Explorer, click for a larger image.

ETOPO5 Database
The ETOPO5 data base contains gridded data representing bathymetries and elevations from all over the world. The MODB offers an online extraction.

This example reads the raw ETOPO5 data file and saves it in HDF SDS format. The ETOPO5 uses negative values for the bathymetric data and positive values for the land elevations.

You can use this feature to convert one or another kind of information to a fill value, which is a value that is discarded by HDF Explorer in the map generation.

ETOPO5 data file | extract2-etopoe10abbd6.z
FORTRAN file | etopo2hdf.f

ETOPO5 Example image in HDF Explorer, click for a larger image.

©2000 Space Research Software | Home


Help

Using HDF Explorer

How to view the HDF files

HDF Explorer reads HDF files. To open a file just choose the File Open command menu. After the file is opened, the kind of data it contains is shown in the form of tree items, using the Microsoft Windows tree control. Each kind of HDF data has its own associated icon.

In this example a file called test.hdf was opened. Each HDF file is placed under a root item with the name of the file.

Browse the HDF file

To browse the HDF file just click on the expandable tree item. The tree will show the corresponding sub-items. In this example a SDS item was expanded to show the SDS atributes.

Visualize your data

To visualize your data click with the mouse right-button on the selected tree item. A menu will appear that lists the kind of views available for that HDF data type. The HDF data format can store images, text, and numeric arrays. HDF Explorer shows each data object accordingly. There are mainly two types of views in HDF Explorer: a grid view, where the numbers are displayed in a rectangular grid of values, and image views, where the numbers are translated into a map of colors. For the SDS data object a third kind of view is available, the vector view.

After the view is opened the tree contents of the selected item turn to a bold face. When the view is closed the tree contents revert to the normal face.

©2000-2002 Space Research Software | Home


Help

SDS views

The SDS data type has four kinds of associated views.

Grid View

In the grid view the SDS is showed as a grid of numbers. The grid origin is placed in the top left corner of the grid.

Professional version specific

Discrete Map View

In the discrete map view the SDS is visualized as a map of colors. The colors are associated with a discrete range of values.

Professional version specific

Continuous Map View

In the continuous map view the SDS is visualized as a map of colors. The colors are associated with a continuous range of values.

Professional version specific

Vector View

In the vector view the two SDS are visualized as a vector field.


Help

The properties window

To view each tree item HDF properties just click with the mouse right button on the selected tree item and choose the properties menu.

Properties

The properties window shows some features of the HDF object, like its reference number, its number type or its dimensions. Addicional information on these properties can be found on the NCSA HDF user´s guide.


Help

The dump window

The dump window lets you analyze the HDF contents by tag and reference. Just click with the mouse right button on the root tree item and choose the dump menu.

The dump window in a grid

The HDF tag and reference numbers are displayed in a grid. Addicional information on the tag and reference properties of the HDF file can be found on the NCSA HDF user´s guide.


Help

Professional version specific

SDS scalar map options

The SDS scalar object in a HDF file can be visualized as a map of colors. The user has some control on the appearence of the map, like changing the legend values, choosing another font or palette. All options are available on the Options menu item.

Draw options

In the Draw options dialog box the user can choose to draw the color of each cell and to draw a grid surrounding each cell.

The map grid feature

When this option is enabled each cell is surrounded by a rectangle. This option is useful to visualize grids with variable dimensions.

Fill options

In the Fill options dialog box the user can choose to ignore or not a SDS fill value. If a SDS contains a fill value, by default HDF Explorer ignores this value in the making of the map, that is, the fill value is not translated to a color. The user also has an option to draw the fill value border in the grid.

Fill value example

In this example (salinity map of the Mediterranean Sea), a fill value was assigned to the land values.

Dimension options

In the Dimensions options dialog box the user can choose to visualize or not the SDS dimensions in the map. It is also possible to invert the heigth scale. By default the height origin is placed in the bottom left corner of the map.

Axis options

In the Axis options dialog box the user can choose to visualize the space legend in the map.

Size options

In the Size options dialog box it is possible to change the size of the image.

Legend options

In the Legend options dialog box it is possible to change the values of the legend. To change a value, click on the color, and the enter the new value in the input box. This option is only available for the SDS discrete map view.

Choosing another palette

To select another palette into the map choose the Options Palette menu item. HdfExplorer has two built in palettes, but it is possible to load a palette from a file (PAL files), which is a standard format in the Microsoft Windows environment.

The PAL format

The PAL format stores the RGB values of the palette in ASCII file. An example of the format of the file is

CWPAL File ident string

100 version number

256 number of colors N

0 0 0 Array of RGB Nvalues

128 0 0

0 128 0

...........

Choosing another font

To select another font into the map choose the Options Font menu item.


Help

Professional version specific

SDS vector options

If the HDF file contains two datasets of the same size, it is possible to generate a vector field with these two sets. Typically these two data sets contains two velocity components.

To visualize your data as a vector field:

First, select the vector view menu option. Note that this option is only enabled when the HDF file contains two or more data sets with the same dimension.

Tip: Select the tree item that has the horizontal component of the velocity.

Now, you must choose the two velocity components. Just click on the listed SDS on the dialog and press Ok.

The SDS map vector options are similar to the SDS scalar map options. There is one aditional dialog option for the vector field and the Draw option has some extra features.

Vector options

The vector options dialog box lets you choose the scale of the vectors, to define a value for the legend, and to choose the space between grid cells that each vector is drawn.

Draw options

The Draw options of the vector view are similar to the scalar view. The user can choose to draw some basic features of the map. These are the arrow representing the vector, the rectangular grid, and the magnitude of each vector as a color. It is also possible to invert this palette.

©2000 Space Research Software | Home


Help

The layer toolbar

The layer toobar lets you browse between layers on a SDS 3D data set or GR multi component image.

The current layer and the number of layers is written on the Hdf Explorer status bar.

Goes to the next layer
Goes to the previous layer
Goes to the last layer
Goes to the first layer

©2000-2002 Space Research Software | Home


Help

HDF Explorer icons and HDF data objects

Each HDF data object has one or several HDF Explorer associated icons. These icons are displayed in the data window as part of the tree items. Addicional information on the HDF data objects can be found on the NCSA HDF user´s guide.

SDS icons

The SDS data model has seven associated icons

One dimensional data set

Two dimensional data set

Three dimensional data set

Attribute

Numerical attribute

Pre-defined attribute

Pre-defined numerical attribute

RIS8 icons

The RIS8 data model has two associated icons

RIS8 image

Palette

RIS24 icon

The RIS24 data model has one associated icon

RIS24 image

GR icons

The GR data model has seven associated icons

One layer GR image

Multi layer GR image

Palette

Attribute

Numerical attribute

Pre-defined attribute

Pre-defined numerical attribute

Palette icon

The Palette data model has one associated icon

Palette

AN icon

The AN data model has one associated icon

Annotation

Vdata icon

The Vdata data model has one associated icon

Vdata

Vgroup icon

The Vgroup data model has one associated icon

Vgroup

©2000-2002 Space Research Software | Home


Help

HDF Explorer icons Quick Reference

This section lists all the HDF Explorer icons associated with the HDF data objects

One dimensional data set

Two dimensional data set

Three dimensional data set

Attribute

Numerical attribute

Pre-defined attribute

Pre-defined numerical attribute

RIS8 image

Palette

RIS24 image

One layer GR image

Multi layer GR image

Annotation

Vdata

Vgroup

©2000 Space Research Software | Home


Help

Professional version specific

Exporting your data

HDF Explorer has several data exporting features. There are basically two ways to export your data:

  • To a file
  • To the Windows clipboard

Each dataset can be exported to an ASCII text file. This is done by choosing the menu option "Export as text...", available on the floating data viewer menu.

Each image generated by the scalar and vector views can be saved as a bitmap image file. This is done by choosing the menu option "Export as image...", from the main "File" menu.

Data can also be exported to the Windows clipboard. Image data can be exported as

  • Windows bitmap (BMP)
  • Windows metafile (WMF), which gives better resolution on high quality printers, compared to the former format.

Numerical data can also be exported to the Windows clipboard as ASCII. To export data to the clipboard just choose "Copy", from the Edit main menu.


Help

Professional version specific

HDF Explorer allows switching the dimensions of a dataset for viewing purposes. This feature allows switching between the horizontal, vertical and depth dimensions of a dataset.