Atmospheric electricity is the study of electrical charges in the Earth's atmosphere (or that of another planet). The movement of charge between the Earth's surface, the atmosphere, and the ionosphere is known as the global atmospheric electrical circuit. Atmospheric electricity is an interdisciplinary topic, involving concepts from electrostatics, atmospheric physics, meteorology and Earth science.
Thunderstorms act as a giant battery in the atmosphere, charging up the ionosphere to about 400,000 volts with respect to the surface. This sets up an electric field throughout the atmosphere, which decreases with increase in altitude. Atmospheric ions created by cosmic rays and natural radioactivity move in the electric field, so a very small current flows through the atmosphere, even away from thunderstorms. Near the surface of the earth, the magnitude of the field is around 100 V/m.
Atmospheric electricity involves both thunderstorms, which create lightning bolts to rapidly discharge huge amounts of atmospheric charge stored in storm clouds, and the continual electrification of the air due to ionization from cosmic rays and natural radioactivity, which ensure that the atmosphere is never quite neutral.
Sparks drawn from electrical machines and from Leyden jars suggested to the early experimenters, Hauksbee, Newton, Wall, Nollet, and Gray, that lightning was caused by electric discharges. In 1708, Dr. William Wall was one of the first to observe that spark discharges resembled miniature lightning, after observing the sparks from a charged piece of amber.