On the production mechanism of electric currents and fields in the ionosphere