Skip to content

ionization

Michael Hirsch edited this page Jan 10, 2021 · 15 revisions

An ionospheric simulation necessarily must address ionization processes. The Gemini3D executable that's used to run simulations is named "gemini.bin". gemini.bin is run from the command line, Python or Matlab like other executable programs one might run. gemini.bin has a built-in command line parser, help text output, etc.

Ionization state variables

gemini.bin contains the key ionospheric state variables and passes the variables to modules for computation of ionospheric state at each time step. The important ionospheric state variables include the following. The variables ns, nn, Ts, Tn are 4-D, where the last dimension is by species, and the first 3 dimensions are spatial. Note: in PyGemini, the first dimension is species due to the C-ordering inherent in Python vs. Fortran-ordering inherent in Fortran and Matlab.

  • ns: ionized species density and electron density. There are six ions plus electrons in ns.
  • nn: neutral species density. Ion interactions with neutrals is important, including for neutral perturbations.
  • Ts: ion and electron temperatures
  • Tn: neutral temperatures
  • vs1, vs2, vs3: ion and electron velocities
  • vn1, vn2, vn3: neutral velocities

Additional electrodynamic state variables include: E1,E2,E3; J1,J2,J3; Phi; v1,v2,v3 The following discussion focuses on ns for brevity. ns is allocated as follows, where:

  • lsp=7 for six ions and electrons
  • lx1, lx2, lx3 are the grid sizes of each dimensions. 2 "ghost cells" are padded to both ends of each dimension to account for MPI haloing, a technique used for information exchange at grid boundaries between CPU cores that may be on distinct physical motherboards.
allocate(ns(-1:lx1+2,-1:lx2+2,-1:lx3+2,lsp))

The initial plasma state is read from disk by the MPI root node using the routine io:input_plasma:input_root_mpi_hdf5 (netcdf4 is also supported). The MPI root node broadcasts this information to the MPI workers. The disk files may come from a previous simulation "milestone", or it may be generated by MatGemini or Pygemini as a brand new simulation. The Gemini3D variable ns comes directly from HDF5/NetCDF4 disk variable /nsall in a file named like "inputs/initial_conditions.h5".

MatGemini and PyGemini intentionally have a very similar API. Since PyGemini is the "official" interface to Gemini3D, we will discuss PyGemini. Disk variable /nsall comes from PyGemini gemini3d.plasma.equilibrium_state, which invokes the Gemini3D MSIS interface executable msis_setup via gemini3d.plasma.msis_setup, which parses MSIS output into a Numpy ndarray natm. natm contains number density of neutral species: O, N2, O2, N, NO, and H as well as neutral temperature Tn. The initial ionized state is computed from a Chapman profile PyGemini MatGemini

Ionization: Dependers

The Gemini3D ionization module depender graph depicts modules that depend on it.

ionization depender graph

multifluid contains fluid advection routines encompassing ionization and other plasma physics. gemini.bin uses multifluid:fluid_adv at each simulation time step to update the plasma state for every grid point.

Ionization: Dependees

In turn, ionization depends on numerous modules, including those external to Gemini3D to compute ionization at every grid point. The ionization dependee graph is large--one might view it full screen by right clicking the graphic below and picking "open image in new tab" or similar. The ionization module directly depends on modules:

  • MPI / mpimod: parallelization routines that send/receive data across CPU cores -- no physics
  • timeutils: time conversions -- no physics
  • grid / mesh: coordinate transformation and configuration -- no ionization physics
  • neutral: implements self-consistent neutral background of the ionosphere. ionization module only gets exospheric boundary temperature (a scalar Tnmsis) from neutral module.
  • fang: implements Fang 2008 (Maxwellian precipitation) and Fang 2010 (monoenergetic precipitation) papers that model ionization profiles vs. energetic particle precipitation.
  • GLOW: NCAR GLOW model (described in GLOW subsection below)

ionization dependee graph

NCAR GLOW

The GLOW module has slight modifications from NCAR code to make GLOW work across compilers and operating systems. GLOW models photoionization and particle precipitation kinetics, including IR/visible/UV spectrum for the following wavelengths (Angstrom):

  • infrared: 7320 10400 7774 8446
  • UV: 1356 1493 1304 3726 3644 3371 LBH(1400...1800)
  • visible: 4278 5200 5577 6300

Neutral

The Gemini3D neutral module and submodules use MSIS (the new MSIS v2 is planned feature in near future) to initialize the neutral ionospheric species.

Other Gemini3D modules

The lower two rows of the ionization dependee graph describe the external libraries MPI and HDF5, which are generally useful for many type of programs. The third row from the bottom shows the dependency on h5fortran, nc4fortran and pathlib modules developed under NASA HDEE funding. They provide object-oriented Fortran interfaces to the HDF5, NetCDF4 and filesystem that are easier for scientists to use than the complex low-level functional interfaces intended for use by software engineers. The const module is a structure that holds numerous physical numerical constants and other program parameters.

Clone this wiki locally