Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

NCAR GLOW model

Project description

DOI

Build Status Build status

GLOW

The GLobal airglOW Model, independently and easily accessed from Fortran 2003 compiler. Optionally available from scripting languages including:

  • Python ≥ 3.6
  • Matlab
  • GNU Octave ≥ 4.2
  • IDL / GDL

We describe each language below; pick the one(s) that apply for you. Python is the easiest and recommennded choice. A Fortran compiler is required in any case.

Python

Install/compile by:

git clone https://github.com/space-physics/ncar-glow

pip install -e ncar-glow

Confirm the install with:

pytest ncar-glow

Then use examples such as:

  • Simple.py: Maxwellian precipiation, specify Q and E0.
  • Monoenergetic.py: Specify unit flux for one energy bin, all other energy bins are zero flux.

or use GLOW in your own Python program by:

import ncarglow as glow

iono = glow.simple(time, glat, glon, Q, Echar, Nbins)

iono is an xarray.Dataset containing outputs from GLOW, including:

  • number densities of neutrals, ions and electrons
  • Pedersen and Hall currents
  • volume emssion rate vs. wavelength and altitude
  • precipitating flux vs. energy
  • many more, request if you want it.

Fortran

You can call this repo from a Meson wrap or CMake Fetch. To build Fortran code by itself, do either:

meson build

meson test -C build

or

cmake -B build

cmake --build build

MPI / NetCDF

The parallel version of GLOW requires MPI and NetCDF for TIEGCM I/O.

mpirun -np 2 ./mpi_glow.bin < ~/data/in.namelist.tgcm

Note, for an unknown reason, in.namelist.msis only works with -O0 or -O1 with gfortran 7. We didn't look into why. Otherwise, -O3 works fine.

Matlab / GNU Octave

The Matlab interface is in the matlab directory, and passes data to / from Glow over stdin / stdout pipes.

First, compile the Fortran code by running setup.m

Then,

NOTE: if using GNU Octave, version ≥ 4.2 is required for proper textscan() functionality

IDL / GDL

We have a small script for IDL / GDL thanks to Guy Grubbs. Let us know if you want this, we haven't taken the time to upload it yet.

Project details


Release history Release notifications

Download files

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

Files for ncarglow, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size ncarglow-1.1.1.tar.gz (362.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page