wradlib.io.hdf.to_hdf5

wradlib.io.hdf.to_hdf5(fpath, data, mode='w', metadata=None, dataset='data', compression='gzip')

Quick storage of one <data> array and a <metadata> dict in an hdf5 file

This is more efficient than pickle, cPickle or numpy.save. The data is stored in a subgroup named data (i.e. hdf5file[“data”). See from_hdf5 for retrieving stored data.

Parameters:
  • fpath (string) – path to the hdf5 file
  • data (numpy.array) –
  • mode (string) – file open mode, defaults to “w” (create, truncate if exists)
  • metadata (dict) – dictionary of data’s attributes
  • dataset (string) – describing dataset
  • compression (string) – h5py compression type {“gzip”|”szip”|”lzf”}, see h5py documentation for details