Skip to content
This repository has been archived by the owner. It is now read-only.
DEPRECATED: NCAR GLOW 0.981 from Python: easy, clean and fast!
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
data
glowiono
reference
src
tests
.appveyor.yml
.gitattributes
.gitignore
.travis.yml
Glow.txt
Glowlicense.txt
Makefile.glowbasic
Makefile.glowbasic.gfort
Makefile.glowdriver
PlotSolarZenithAngle.py
Quickstart.txt
README.md
ReleaseNotes.rst
Releasenotes.txt
RunGlow.py
Todolist.txt
in.basic.aur
in.basic.day
in.namelist.msis
in.namelist.tgcm
pyproject.toml
runglow.job
setup.cfg
setup.py

README.md

Build Status Coverage Status Build status PyPi version PyPi Download stats

GLOW

The GLobal airglOW Model 0.981 -- aurora and dayglow, IR-VIS-UV-EUV

Install

This command automatically compiles the Fortran code to access from Python on any platform:

pip install -e .

Run self-test with:

pytest -v

Usage

Much more data is readily available, just let me know.

RunGlow

Fortran-only (optional)

While many users use the Python interface to Glow, users on HPCC may want to use MPI directly in Fortran using the Makefiles or CMake. Here's how to compile the basic example with CMake

cd bin

cmake ../src
cmake --build .
ctest -V

cd ..

This creates:

  • basic basic GLOW
  • driver MPI/NetCDF GLOW
  • testdrv Python intfc test

Fortran examples

With regard to precision, at first try I occasionally see the least digit of precision in the text output files differ. This can be related to Stan using Intel Fortran compiler and I'm using Gfortran. E.g. I get 4.34e-9 and Stan got 4.33e-9.

I also get the message:

Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL

Which is a warning sign that different compilers and platforms may yield different results of unpredictable variance.

Aurora example (night)

Compare your results vs. Stan's results:: with meld:

./basic < in.basic.aur > aur.basic.out

meld reference/aur981.basic.out <(./basic < in.basic.aur)
Dayglow Example (day)
./basic < in.basic.day > day.basic.out

Compare:

meld reference/out.basic.day <(./basic < in.basic.day)

MPI Prereq

Allows parallel execution of GLOW Fortran code for HPC:

apt install libopenmpi-dev

NetCDF prereq

allows reading/writing data in NetCDF (optional):

apt install libnetcdf-dev libnetcdff-dev

Select Fortran compiler

Simply use the variable FC:

FC=ifort cmake ../src
cmake --build .

NOTE: Using the Intel compiler requires that you have built NetCDF using Intel Fortran. This is an issue ANYTIME you use the Intel Compiler and NetCDF.

You can’t perform that action at this time.