Skip to main content

IRI2016 International Reference Ionosphere from Python

Project description

IRI2016 ionosphere model from Python and Matlab

image Actions Status PyPi version PyPi Download stats


Python and Matlab interfaces to the International Reference Ionosphere (IRI) 2016 model. A Fortran compiler is required to build the IRI2016 code.



  • Python >= 3.6
  • Fortran compiler--any modern Fortran compiler will do. Here's how to get Gfortran:
    • Linux: apt install gfortran
    • Mac: brew install gcc
    • Windows: consider MSYS2

and then install latest release:

pip install iri2016

if you want the latest development version:

git clone

cd iri2016

python3 develop --user

This Python wrapper of IRI2016 uses our build-on-run technique. The first time you use IRI2016, you will see messages from the Meson build system and your C compiler.

If you have errors about building on the first run, ensure that your Fortran compiler is specified in environment variable FC--this is what most build systems use to indicate the desired Fortran compiler (name or full path).

Manual build

This should not be necessary, but is included for troubleshooting purposes. This assumess you have a local copy of IRI2016 like:

git clone

cd iri2016

cmake -S iri2016 -B iri2016/build

cmake --build iri2016/build


  • Altitude Profile: plot density and temperatures vs altitude

    python 2003-11-21T12 -11.95 -76.77


  • Latitude profile: plot densities and height at the peak of F2, F2, and E regions vs geographic latitude

    python 2004-11-21T17 -76.77


  • Time profile: plot densities and height at the peak of F2, F2, and E regions vs UTC

    python 2014-11-21 2014-11-22 1 -11.95 -76.77




  • Latitude vs Longitude: plot of foF2 a function of geographic latitude and longitude image

setting JF flags

iri2016.for has a few dozen logical flags stored in variable JF. To reconfigure those flags, edit iri2016_driver.f90 and recompile iri2016_driver.exe.

Matlab / GNU Octave

IRI2016 is readily accessible from Matlab and GNU Octave. From within Matlab / Octave, verify everything is working by from the iri2016/tests directory:


Matlab IRI2016 plot

Data files

iri2016/iri2016/data/index/{apf107,ig_rz}.dat are regularly updated. Currently we don't auto-update those.



if error

ImportError: cannot open shared object file: No such file or directory

try installing Atlas math library used by Numpy

apt install libatlas-base-dev

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for iri2016, version 1.8.6
Filename, size File type Python version Upload date Hashes
Filename, size iri2016-1.8.6.tar.gz (1.6 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page