Formation and evolution of subauroral ion drifts in the course of a substorm