The hydrodynamic equations for H+ and O+ ions in the midlatitude topsi
de ionosphere are solved analytically to study the magnetic tube deple
tion and refilling with a thermal plasma. Explicit expressions for the
electron number density in the protonosphere and the refilling time c
onstant of the tube are obtained. The influence of the H+ ion diffusio
n and of charge exchange reactions is shown to be essential. It is sho
wn that the filling of the midlatitude magnetic tubes is controlled si
gnificantly by the exospheric temperature. It is also shown that under
certain conditions the depletion time may be considerably less than t
he refilling time. Large-scale irregularities of the electron number d
ensity can arise in the inner plasmasphere from the depletion of plasm
a on certain magnetic tubes.