Radbelt: Work in progress to refactor the AE-8/AP-8 Van Allen belt model.
A Fortran Package Manager manifest file is included, so that the library and test cases can be compiled with FPM. For example:
fpm build --profile release
fpm test --profile release
To use radbelt
within your fpm project, add the following to your fpm.toml
file:
[dependencies]
radbelt = { git="https://github.com/jacobwilliams/radbelt.git" }
The latest API documentation can be found here. This was generated from the source code using FORD.
See the radbelt_test.f90
and test.py
files:
Code | Runtime (sec) | Cases per second |
---|---|---|
Python version | 3.514 | 409 |
Fortran Function version (get_flux() ) |
1.622 | 1198 |
Fortran Class version (radbelt_type%get_flux() ) |
0.017 | 112259 |
The main difference in speed from using the class method is that the data files are only read once, rather than each time the function is called (which is done in the other two versions).
These empirical models describe the differential or integral, omnidirectional fluxes of electrons (AE-8) and protons (AP-8) in the inner and outer radiation belts (electrons: L=1.1 to 11, protons: L=1.1 to 7) for two epochs representing solar maximum (1970) and minimum (1964) conditions. The energy spectrum ranges from 0.1 to 400 MeV for the protons and from 0.04 to 7 MeV for the electrons. AE-8 and AP-8 are the most recent ones in a series of models established by J. Vette and his colleges at NSSDC starting in the early sixties. The models are based on almost all available satellite data. It is IMPORTANT that the models maps for solar maximum are used with a magnetic field model for epoch=1970 and for solar minimum for epoch=1964.
For each epoch and particle the model consists of a three- dimensional table of (logarithm of) particle fluxes in energy, L-value, and B/B0 (magnetic field strength normalized to the equator). The program MODEL finds the particle fluxes for given energy, L-value and B/B0 by interpolating in energy (subroutine TRARA1) and in L * B/B0 space (TRARA2). The program RADBELT produces tables of integral or differential fluxes for different energies varying with L or B/B0.
The coefficient files are provided in ASCII (*.asc) format:
Description | Filename | Size (KB) |
---|---|---|
AE-8, epoch 1970, solar maximum | ae8max.asc | 84 |
AE-8, epoch 1964, solar minimum | ae8min.asc | 81 |
AP-8, epoch 1970, solar maximum | ap8max.asc | 101 |
AP-8, epoch 1964, solar minimum | ap8min.asc | 102 |
In March 1995 the earlier used compressed model maps AP8MIC and AP8MAC were replaced with the full maps AP8MIN/MAX with the help of D. Heynderickx (BIRA, Brussel, Belgium) and A. Beliaev (INP/MSU, Moscow, Russia). Heynderickx and Beliaev (1995) had found and corrected a small error in the AP8MIN map; two lines had been exchanged.