My data

My data in HDF5 My data in HDF My data in netCDF
Saving my data in HDF format

The HDF API is supported in the two most used programming languages by scientists and engineers, FORTRAN and C.

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 



In our server we put the data files used in the examples.

Converting the data to HDF
We modified the MODB data reading FORTRAN program modb2hdf_ex1.f to save the data in HDF format.

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. To open the file with HDF Explorer click on the link. modb_ex1_hdf



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. To open the file with HDF Explorer click on the link. modb_ex2_hdf


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

 

ETOPO5 Database

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.

In our server we also put the ETOPO5 example file

ETOPO5 data file (Europe and part of Africa) Notes extract2-etopoe10abbd6.z
FORTRAN file etopo2hdf.f

 

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

 


© 2000-2012 Space Research Software LLC | Contact Information | Home