SH010-0008
PyGemini: modular GEMINI-3D ionospheric MPI Fortran model orchestrated by Python

Tuesday, 8 December 2020
Poster
Michael Hirsch, Boston University, ECE, Boston, MA, United States, Matthew D Zettergren, Embry-Riddle Aeronautical University, Daytona Beach, FL, United States, Joshua L Semeter, Boston Univ, Boston, MA, United States and Jeffrey Klenzing, NASA Goddard Space Flight Center, Greenbelt, MD, United States
Abstract:
PyGemini is funded by NASA HDEE to provide a Python interface to the object-oriented Fortran GEMINI-3D local scale ionosphere dynamics model. PyGemini provides comprehensive modeling capabilities for the ionosphere-thermosphere (IT) system across spatial scales ranging from sub-100 m routinely observed in spacecraft and GNSS scintillation data to thousands of km at sub-second temporal resolution. GEMINI-3D also works with large grids such as geomagnetic conjugate up to global grids. PyGemini bridges the gap from kinetic scale models such as NCAR GLOW to global and data assimilative models. GEMINI-3D has been coupled with models such as MAGIC coupling lithospheric and ocean forcing effects into the ionosphere.

PyGemini and GEMINI-3D adhere to language and community standards and are rigorously tested via continuous integration. As a result, PyGemini can be run on MacOS, Windows and Linux on hardware scaling from Raspberry Pi, laptops, IBM OpenPower blades up to the largest HPCs. GEMINI-3D uses Fortran 2008 submodules that allow almost instant recompilation when swapping out code modules, such as ionization models. PyGemini and GEMINI-3D use object-oriented and functional HDF5 and NetCDF4 Fortran interfaces we created named "h5fortran" and "nc4fortran" that can be used with nearly any Fortran project. HDF5 and NetCDF4 file read/write operations from Fortran are done simply by:

use h5fortran, only : h5write, h5read

real :: x, y

call h5write('myfile.h5', '/x', x)

call h5read('myfile.h5', '/y', y)

PyGemini communicates parameters with GEMINI-3D using Fortran 95 standard Namelists. The file-based API handles arbitrarily large and complex simulation data while being self-describing, community standard, and user-friendly.

Python 3.7 is the minimum Python version supported by current releases of the Numpy stack and other Python packages holding to NEP-29. Python 3.7 introduced mechanisms that make using compiled binaries with Python more robust. PyGemini demonstrates several contemporary techniques following community standards to control arbitrarily complex compiled executables from any code language with Python packages. It is important to PyHC and geoscience as a whole to strive for techniques that scale beyond a single operating system and library stack, that use a modular standard architecture.