Skip to main content

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


Download files

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

Source Distribution

ncarglow-1.1.1.tar.gz (362.2 kB view details)

Uploaded Source

File details

Details for the file ncarglow-1.1.1.tar.gz.

File metadata

  • Download URL: ncarglow-1.1.1.tar.gz
  • Upload date:
  • Size: 362.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for ncarglow-1.1.1.tar.gz
Algorithm Hash digest
SHA256 0e470a4df84372574d02b5bb89c45772b85a3695d753d2d2e28017ba6412239f
MD5 803d0bcd275ec4f196b9b8606568b046
BLAKE2b-256 db80372894ae69407335d369fa53a6add2113e4df00f9227a8d0ae42f5b616a3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page