added Liang's changes for saving the velocity field