pyGPI5: A python D- and E-region chemistry and ionization model

We present a Python implementation of a D- and E-region chemistry and ionization code called pyGPI5. Particle precipitation that penetrates into the E- and D-region of the ionosphere-thermosphere causes significant enhancements of the electron density. Dissociative recombination of molecular ions with electrons is the primary electron loss mechanism in the E-region, down to approximately 85 km. However, below 85 km, chemical processes become significantly more complicated with positive and negative ions being generated in addition to electrons. The complex D-region ion chemistry has been known for many decades. We present a formulation to quantify the concentrations of four ion species composed of positive and negative, light and heavy ions, and the electrons. The implementation we describe in this investigation solves five ordinary stiff differential equations simultaneously. We present an overview of the code, along with discussions of the reaction rates, and assumptions used in the model. We describe an implementation of the electron transport model to quantify the altitude ionization profile caused by energetic particle precipitation. We show how to instantiate the model, generate the ion and electron profiles as a function of altitude for background conditions, how to generate altitude ionization profiles, and running the code to produce ion and electron profiles caused by energetic particle precipitation. Recent investigations that have used a D-region chemistry model are discussed, along with some applications.