10577 Rate this article:

Some Fun with HDF5

Celebrating the Launch of the Global Precipitation Measurement Satellite


It is no secret that California is experiencing the worst drought it has seen in decades, and researchers have already begun to dig into the underlying cause; hats off to those folks. It is true though, that the more information available on a situation, the better equipped we will be to solve the problem at hand. It is an exciting day for the remote sensing community, as well as those researching the drought in California, as they are about to get another (more distant) perspective.

Today marks the launch of the Global Precipitation Measurement (GPM) Core Observatory satellite, which if things go well, will begin its journey into Earth's outer atmosphere and beyond to inhabit its new home. It will be the inaugural launch for an international satellite constellation with partners in the United States, Japan, India, and Europe. The sensor on board will be responsible for taking measurements of where, when, and how much precipitation falls around the globe. It will become an invaluable asset in understanding our climate, weather systems, as well as our most precious resource: water.

The thing that I'm most excited about though? The datasets, once they make it down here, are going to be distributed in HDF5. This format has been one of my favorites ever since working with them in the remote sensing department at CU Boulder. It not only organizes the data, it opens up options for direct access to the datasets that you are interested in. I can't wait to tear in to the new data with some code I put together:


I'd like to give Dave Huslander credit for helping me out with an initial code example created for opening SMAP files, which have a similar format that will be used by a satellite of the same constellation scheduled for launch in November.

IDL has robust commands to access HDF5 files, and has added a few new routines with the release of IDL 8.3. These are H5_GETDATA, H5_LIST,and H5_PUTDATA, which do exactly what you would expect from the name. I like them a lot better than the old routines used to access HDF4 files, and they area lot easier to use.

If GUIs are more your style, opening image data from these puppies in ENVI 5.1 is now supported with the HDF5 Browser. I got to do some work on the browser with Ben Foreback when I started at Exelis in engineering, so I might be biased, but I think it's the cat's meow. It opens any HDF5 file, and can display any two or three dimensional dataset in the interleave of your choice.

In the browser, as long as 2-dimensional datasets are the same size, you can merge them in to a multi-spectral raster. It's actually kind of fun messing with it - you can make all sorts of fun pictures (though some might question the practicality). Here's an image with longitude as the red band, latitude as the green band, and height as the blue band for an HDF5 format image over the United States: 


From a quick inspection, you can see that this image was taken with South at the top. The high green values in the North are at the bottom of the screen, and the high red values in the East are to the left on the screen. The blue in the upper right corner is land near the California coast, and black is the ocean.

If you've never used HDF5 before I encourage you to give it a shot! It takes a bit to learn the format, but I know I wouldn't choose any other format for data ingest and export given the option.