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:
altitudesfor the altitude range of the neutrals. It must go higher than the D-region altitudes, since neutrals contribute to the absorption of the solar fluxN2, O2, O, He, Ar, H, N, AO, NO, H2O, O3: Densities (in cm-3) of the various chemical species in the atmosphere.AOis the anomalous oxygen.Mis the sum ofO2andN2Tnis the neutrals temperaturef107is the f10.7 indiceglat/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-regiondensities: Density (in cm-3) of electrons in the D-region, for each altitude inaltitudestemperature: 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 timeEUV_times, EUV_array: Time-array for EUV data and EUV data. This should be the EUV daily average from GOESXR_times, SXR_array, HXR_array: X-ray data (soft and hard) and time-array. This should be the 1s fluxes from GOEStau_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 altitudesaltitudes_D: Altitudes in the D-regionChandH: 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 computationfile_EUV, file_XR: Complete path to the EUV and XR dataaltitudes_D: Altitudes (in km) in the D-regionn_here: Neutrals class instancechi: 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) arraysdensity: Density of the ion (in cm-3). It should have the same shape as the altitudes arrayz: 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