reorder_output function

Reorder a simulation output in time order