pileheightrecord works at each time step