TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/PRBEM/IRBEM/llms.txt
Use this file to discover all available pages before exploring further.
maginput array is a 25-element array of double-precision values that supplies geophysical driving parameters — such as solar wind conditions and geomagnetic indices — to IRBEM’s external field models. Different models read different elements of this array; unused elements should be set to 0 (or to the sentinel value −9999 in the Python wrapper, which handles this automatically).
Parameter Table
The table below lists all namedmaginput elements. Indices follow Fortran 1-based convention (matching the IRBEM documentation); in Python’s 0-based arrays these are shifted by one. Elements 18–25 are reserved for future use.
| Index (1-based) | Python key | Description | Used by |
|---|---|---|---|
| 1 | Kp | Kp index × 10 as in OMNI2 (range 0–90, so Kp=4 → 40) | MF75, TS87, TL87, T89, MT |
| 2 | Dst | Dst index (nT) | OPD88, T96, OM97, T01, T01S, T04, A00 |
| 3 | dens | Solar wind density (cm⁻³) | |
| 4 | velo | Solar wind velocity (km/s) | OPD88, A00 |
| 5 | Pdyn | Solar wind dynamic pressure (nPa) | T96, OM97, T01, T01S, T04 |
| 6 | ByIMF | IMF By in GSM (nT) | T96, T01, T01S, T04 |
| 7 | BzIMF | IMF Bz in GSM (nT) | T96, T01, T01S, T04, A00, OPD88 |
| 8 | G1 | Coupling parameter G1 = ⟨Vsw (Bperp/40)² / (1 + Bperp/40) sin³(θ/2)⟩ — 1-hour average | T01 |
| 9 | G2 | Coupling parameter G2 = ⟨a Vsw Bs⟩ where Bs = |IMF Bz| when Bz < 0 else 0, a = 0.005 — 1-hour average | T01, T01S |
| 10 | G3 | Coupling parameter G3 = ⟨Vsw dens Bs / 2000⟩ — 1-hour average | T01S |
| 11 | W1 | T04 storm-time coupling parameter W1 (see Tsyganenko et al., 2005) | T04 |
| 12 | W2 | T04 storm-time coupling parameter W2 | T04 |
| 13 | W3 | T04 storm-time coupling parameter W3 | T04 |
| 14 | W4 | T04 storm-time coupling parameter W4 | T04 |
| 15 | W5 | T04 storm-time coupling parameter W5 | T04 |
| 16 | W6 | T04 storm-time coupling parameter W6 | T04 |
| 17 | AL | Auroral AL index (nT) | A00 |
| 18–25 | — | Reserved for future use | — |
Kp encoding: Kp is stored as
Kp × 10 consistent with the NASA OMNI2 data format. A Kp value of 4 should be passed as 40.0, Kp = 3.3 as 33.0, and so on. Valid range is 0–90.Python Dictionary Interface
The PythonMagFields wrapper accepts maginput as a plain dictionary. You only need to supply keys for the parameters actually required by your chosen model; the wrapper fills all other slots with the sentinel value −9999.
orderedKeys list in IRBEM.py:
Per-Model Parameter Requirements
The table below summarises whichmaginput parameters each external model actually reads. Parameters not listed for a given model are ignored.
Model (kext) | Required maginput keys |
|---|---|
| 0 — No external field | (none) |
| 1 — MF75 | Kp |
| 2 — TS87 | Kp |
| 3 — TL87 | Kp |
| 4 — T89 | Kp |
| 5 — OPQ77 | (none) |
| 6 — OPD88 | dens, velo, Dst |
| 7 — T96 | Dst, Pdyn, ByIMF, BzIMF |
| 8 — OM97 | Dst, Pdyn, BzIMF, Kp |
| 9 — T01 | Dst, Pdyn, ByIMF, BzIMF, G1, G2 |
| 10 — T01S | Dst, Pdyn, ByIMF, BzIMF, G2, G3 |
| 11 — T04 | Dst, Pdyn, ByIMF, BzIMF, W1–W6 |
| 12 — A00 | dens, velo, Dst, BzIMF, AL |
| 13 — T07 | (see T07 documentation) |
| 14 — MT | Kp |
MATLAB Helper
IRBEM’s MATLAB interface provides a convenience function that assembles themaginput array in the correct order:
0 for any parameter not used by the model you have selected.
Fortran Interface
In Fortran,maginput is a DOUBLE PRECISION array with dimensions (25, ntime) stored in column-major order:
Solar wind inputs (density, velocity, pressure, IMF) must be measured near the dayside magnetopause, not at the L1 Lagrange point. The hourly NASA OMNI2 dataset, which propagates solar wind observations to the nose of the magnetosphere, is a standard source for these values.