Python bindings for NCAR GLOW model
Project description
GLOW
The GLobal airglOW Model, independently and easily accessed from Fortran 2003 compiler. Optionally available from Python ≥ 3.7.
A Fortran compiler, as well as the meson
build system, is REQUIRED.
Installation
Direct install using pip:
$ pip install glowpython
Install from source repository by:
$ git clone https://github.com/sunipkm/glowpython
$ cd glowpython && pip install .
Requires (and installs) geomagdata for timezone aware geomagnetic parameters retrieval.
Confirm the install with:
pytest glowpython
Then use examples such as:
- Maxwellian.py: Maxwellian precipiation, specify Q and E0.
- Monoenergetic.py: Specify unit flux for one energy bin, all other energy bins are zero flux.
- NoPrecipitation.py: No precipitating electrons.
or use GLOW in your own Python program by:
import glowpython as glow
iono = glow.maxwellian(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.
All available keys carry unit and description.
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.
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
Built Distribution
Hashes for glowpython-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60fb9fe87c51cf022686fb0df19cbb1488447ded126e2facf2db8e11ac265c6a |
|
MD5 | 5be86fa939c239c6ca3726b9ce851016 |
|
BLAKE2b-256 | 1afa996fa4693e7e16b36636d732b234944680f56fee82e5f794a32ec6b75f96 |