write out the byte grid to a hdf5 file