  Halos and elves are Transient Luminous Events (TLEs) produced in the lower
ionosphere as a consequence of lightning-driven electromagnetic fields. These
events can influence the upper-atmospheric chemistry and produce optical
emissions. We have developed different two-dimensional self-consistent models
that couple electrodynamical equations with a chemical scheme to simulate halos
and elves produced by vertical cloud-to-ground (CG) lightning discharges,
Compact Intra-cloud Discharges (CIDs) and Energetic In-cloud Pulses (EIPs). The
optical emissions from radiative relaxation of excited states of molecular and
atomic nitrogen and oxygen have been calculated. We have upgraded previous
local models of halos and elves to calculate for the first time the
vibrationally detailed optical spectra of elves triggered by CIDs and EIPs.
According to our results, the optical spectra of elves do not depend on the
type of parent lightning discharge. Finally, we have quantified the local
chemical impact in the upper atmosphere of single halos and elves. In the case
of the halo, we follow the cascade of chemical reactions triggered by the
lightning-produced electric field during a long-time simulation of up to one
second. We obtain a production rate of NO molecules by single halos and elves
of 10$^{16}$ and 10$^{14}$ molecules/J, respectively. The results of these
local models have been used to estimate the global production of NO by halos
and elves in the upper atmopshere at $\sim10^{-7}$ Tg~N/y. This global chemical
impact of halos and elves is seven orders of magnitude below the production of
NO in the troposphere by lightning discharges.
