write particle positions into h5 for each time