Main objects

This package is organised around 4 classes, representing real-life objects:

Details about each of those classes are presented below.

Neutrals

The neutral class is the most complex of the four classes. In this single class are all the different neutral species, as attributes to the class:

  • altitudes for the altitude range of the neutrals. It must go higher than the D-region altitudes, since neutrals contribute to the absorption of the solar flux

  • N2, O2, O, He, Ar, H, N, AO, NO, H2O, O3: Densities (in cm-3) of the various chemical species in the atmosphere. AO is the anomalous oxygen.

  • M is the sum of O2 and N2

  • Tn is the neutrals temperature

  • f107 is the f10.7 indice

  • glat/glon: geographic latitude and longitude (in °) of the point of interest

To initialise this class, you need the time (time_here) as a timezone-unaware datetime, the altitudes for the computation, and the latitude and longitude (glat and glon) in °. For more details on the initialisation of the different species, please refer to Neutral densities.

n_here = neutrals(today, altitudes, glat, glon)

Electrons

The electrons class represents the electrons present in the D-region. Those are initialised from FIRI [friedrich2018], although they are set to 0 at the beginning of the modelling. The initialisation thus only serves as a guideline, and for use in chemistry scheme coefficient, but it does not intervene at t=0 for the electron density.

This class has several attributes:

  • altitudes: Altitudes (in km) in the D-region

  • densities: Density (in cm-3) of electrons in the D-region, for each altitude in altitudes

  • temperature: Temperature (in K) of the electrons, assuming that they have the same as the ions

To initialise the electron class, you need the latitude glat (in °), the longitude glon (in °), the time as a datetime (today) and the value of the f10.7 parameter. This last value may be obtained through the neutrals class. You also need the value of the neutral class initialised previously (n_here) to have the temperature.

e_here = electrons(glat, glon, today, n_here.f107, n_here)

Radiation

The radiation class keeps track of the solar radiation. Its attributes are:

  • HXR, SXR, EUV: Soft X-rays, Hard X-rays and EUV fluxes at the specified time

  • EUV_times, EUV_array: Time-array for EUV data and EUV data. This should be the EUV daily average from GOES

  • XR_times, SXR_array, HXR_array: X-ray data (soft and hard) and time-array. This should be the 1s fluxes from GOES

  • tau_SXR, tau_HXR, tau_EUV: Absorption factors for SXR HXR and EUV fluxes (see Absorption of the solar flux). They are arrays with the same shape as the altitudes

  • altitudes_D: Altitudes in the D-region

  • Ch and H: Values of the Chapman function and H, to avoid having to recomputes them each time

To initialise this class, you need:

  • today: Datetime, timezone-unaware, date of the computation

  • file_EUV, file_XR: Complete path to the EUV and XR data

  • altitudes_D: Altitudes (in km) in the D-region

  • n_here: Neutrals class instance

  • chi: Solar zenith angle in °

rad_here = radiation(today, EUV_file, XR_file, altitudes_D, n_here, chi)

This class also has a method, get_flux_now which updates the values of the SXR and HXR fluxes.

Ions

The ion class is the simplest. It has only three parameters:

  • altitudes: Altitudes (in km) arrays

  • density: Density of the ion (in cm-3). It should have the same shape as the altitudes array

  • z: Number charge of the ion

Everything should be inputted by hand, once the ion density is known (after the chemistry code has run for example)

O2m = cd.ion_species(e_here.altitudes, -1) # density is not initialised here
O2m.density = example_density_array