Project

General

Profile

Convert hdf5 to netCDF

Added by Karsten Peters about 14 years ago

Hi,

I hereby have the honour to post the first question :-)

I want to convert hdf5 datafiles to netCDF format. I have an IDL script which was especially coded for this by the creators of the hdf5-files (Oxford University). Unfortunately, this script does not run as batchjob on the squall compute-nodes, as IDL demands an X-Server no matter what you want to do.

Is there a way to do this with the CDOs, because now I am always copying hdf-files to my local machine, converting them and copying them back.... ? I know, that CDOs can be used to convert CMSAF HDF5 data to netCDF, but my data look exceptionally different from that.

I am providing two example files on our FTP server in the directory "outgoing/peters_karsten".

grape-atsr2_29802_200101010101_l2v03.hdf
grape-atsr2_29802_200101010101_l2v03.nc

The file with the .hdf suffix is the original one and the file with the .nc suffix is the one produced by the IDL routine when being run on squall1.

I am looking forward to responses !

Cheers,
Karsten


Replies (1)

RE: Convert hdf5 to netCDF - Added by Ralf Mueller about 14 years ago

Hi Karsten,
Thank you for posting! and sorry for the late response ;)

Unfortunately cdo is not a general hdf5 converter. HDF5 is a highly complex data format with it's own meta data. Generally speaking hdf5 files behave like a posix file system, you can store nearly any kind of data in it.
CMSAF uses a special setting to store its data and cdo's operator is exactly made for this purpose.

For batch jobs, ncl may work for you. It's available through the module system on all workstations (+squall) and supports at least a subset of hdf5 (http://www.ncl.ucar.edu/overview.shtml)
Another option could be the h5py hdf5-python library. But I'm not sure, if this would run on squall.

Regards
Ralf

    (1-1/1)