Behaviour of the ionospheric thermal O++ ions during various phases of geomagnetic storms