saving simulation values to hdf5 files for later plotting