glow2d


Nameglow2d JSON
Version 3.3.0 PyPI version JSON
download
home_pagehttps://sunipkm.github.io/glow2d
SummaryNCAR GLOW model for 2D observation geometry
upload_time2024-03-14 05:03:38
maintainer
docs_urlNone
authorSunip K. Mukherjee
requires_python>=3.7
license
keywords thermosphere ionosphere
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GLOW2D

This package builds off of the GLobal airglOW model. The GLOW model is evaluated on an altitude grid at a location. For non-zenith observation geometries, the model requires evaluation at multiple points along the line of sight. The `glow2d` library wraps the `ncarglow.no_precipitation()` function to generate the output on a 2D grid in a geocentric (GEO) coordinate system and in a local (ZA, R) coordinate system.

## Installation
Directly using `pip`:
```sh
$ pip install glow2d
```

Indirectly by `git clone`:
```sh
$ git clone https://github.com/sunipkm/glow2d && cd glow2d
$ pip install .
```

## Dependencies
The following non-trivial dependencies are present:
- [ncarglow](https://github.com/sunipkm/ncar-glow)
- [geomagdata](https://pypi.org/projects/geomagdata)
- [geopy](https://pypi.org/project/geopy/)
- [haversine](https://pypi.org/project/haversine/)
- [xarray](https://pypi.org/project/xarray/)

This code uses [glowpython](https://pypi.org/project/glowpython/) package to run the GLOW model.
[geomagdata](https://pypi.org/project/geomagdata/) is used to get the $F_{10.7}$ and $A_p$ indices from the [new data source](https://www.gfz-potsdam.de/en/kp-index/).

## Usage
For example:

```py
from datetime import datetime
from glow2d import glow2d_polar as grc

time = datetime(2022, 2, 15, 20, 0, 0).astimezone('UTC') # 20:00 hours local in UTC
lat, lon = 42.64981361744372, -71.31681056737486 # location of observation
bearing = 40 # 40 deg northeast, refer to geopy.GreatCircleDistance().destination() for more info.

iono_loc, iono_geo = grc.polar_model(time, lat, lon, bearing, full_output=True) # generate output in local and GEO coordinates
```

The `iono_loc` dataset is:

```
<xarray.Dataset>
Dimensions:     (za: 200, r: 500, wavelength: 15, energy: 100)
Coordinates:
  * za          (za) float64 1.571 1.563 1.555 1.547 ... 0.01579 0.007893 0.0
  * r           (r) float64 0.0 7.391 14.78 ... 3.673e+03 3.681e+03 3.688e+03
  * wavelength  (wavelength) <U21 '3371' '4278' '5200' ... '1356' '1493' '1304'
  * energy      (energy) float64 0.2 0.8 1.2 1.8 2.2 ... 457.3 480.7 505.4 531.3
Data variables: (12/18)
    Tn          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    O           (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    N2          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    O2          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    NO          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    NeIn        (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    ...          ...
    pederson    (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    hall        (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    Te          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    Ti          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    ver         (za, r, wavelength) float64 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
    precip      (r, energy) float64 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
Attributes:
    geomag_params:                       Ap     Kp   f107 resolution       f1...
    time:           2022-02-15T11:00:00+00:00
    glatlon:        (42.64981361744372, -71.31681056737486)
```

The `iono_geo` dataset is:
```
<xarray.Dataset>
Dimensions:         (angle: 100, alt_km: 250, wavelength: 15, state: 12,
                     energy: 100)
Coordinates:
  * alt_km          (alt_km) float64 60.0 60.6 61.2 61.8 ... 953.4 957.9 962.4
  * wavelength      (wavelength) <U21 '3371' '4278' '5200' ... '1493' '1304'
  * state           (state) <U6 'O+(2P)' 'O+(2D)' 'O+(4S)' ... 'O(1S)' 'O(1D)'
  * energy          (energy) float64 0.2 0.8 1.2 1.8 ... 457.3 480.7 505.4 531.3
  * angle           (angle) float64 0.0 0.005323 0.01065 ... 0.5163 0.5217 0.527
    lat             (angle) float64 42.65 42.88 43.12 ... 60.15 60.25 60.34
    lon             (angle) float64 -71.32 -71.05 -70.78 ... -31.7 -31.12 -30.53
Data variables: (12/21)
    Tn              (angle, alt_km) float64 237.0 236.0 235.0 ... 815.0 815.0
    O               (angle, alt_km) float64 0.0 0.0 0.0 ... 1.2e+03 1.11e+03
    N2              (angle, alt_km) float64 4.49e+15 4.17e+15 ... 0.0102 0.00893
    O2              (angle, alt_km) float64 1.2e+15 1.12e+15 ... 1.9e-05
    NO              (angle, alt_km) float64 7.81e+07 7.81e+07 ... 5.92e-08
    NeIn            (angle, alt_km) float64 100.0 100.0 ... 2.35e+04 2.34e+04
    ...              ...
    Ti              (angle, alt_km) float64 236.9 235.9 ... 2.715e+03 2.726e+03
    ver             (angle, alt_km, wavelength) float64 0.0 0.0 0.0 ... 0.0 0.0
    production      (angle, alt_km, state) float64 0.0 nan nan ... 0.0 0.0 0.0
    loss            (angle, alt_km, state) float64 nan nan nan ... 0.0 1.1 0.01
    precip          (angle, energy) float64 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
    excitedDensity  (angle, alt_km, state) float64 nan nan nan ... 0.0 0.0 0.01
...
Attributes:
    geomag_params:                       Ap     Kp   f107 resolution       f1...
    time:           2022-02-15T11:00:00+00:00
    glatlon:        (42.64981361744372, -71.31681056737486)
```

All angles are in radians, and distances in km. Due to the nature of the coordinate transformation, local coordinate outputs do not contain any `NaN` values.

            

Raw data

            {
    "_id": null,
    "home_page": "https://sunipkm.github.io/glow2d",
    "name": "glow2d",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "thermosphere,ionosphere",
    "author": "Sunip K. Mukherjee",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/12/89/5c9aae7eaff81620196acfa2cf0589cb11d13c93b4d37128c6395ece0d08/glow2d-3.3.0.tar.gz",
    "platform": null,
    "description": "# GLOW2D\n\nThis package builds off of the GLobal airglOW model. The GLOW model is evaluated on an altitude grid at a location. For non-zenith observation geometries, the model requires evaluation at multiple points along the line of sight. The `glow2d` library wraps the `ncarglow.no_precipitation()` function to generate the output on a 2D grid in a geocentric (GEO) coordinate system and in a local (ZA, R) coordinate system.\n\n## Installation\nDirectly using `pip`:\n```sh\n$ pip install glow2d\n```\n\nIndirectly by `git clone`:\n```sh\n$ git clone https://github.com/sunipkm/glow2d && cd glow2d\n$ pip install .\n```\n\n## Dependencies\nThe following non-trivial dependencies are present:\n- [ncarglow](https://github.com/sunipkm/ncar-glow)\n- [geomagdata](https://pypi.org/projects/geomagdata)\n- [geopy](https://pypi.org/project/geopy/)\n- [haversine](https://pypi.org/project/haversine/)\n- [xarray](https://pypi.org/project/xarray/)\n\nThis code uses [glowpython](https://pypi.org/project/glowpython/) package to run the GLOW model.\n[geomagdata](https://pypi.org/project/geomagdata/) is used to get the $F_{10.7}$ and $A_p$ indices from the [new data source](https://www.gfz-potsdam.de/en/kp-index/).\n\n## Usage\nFor example:\n\n```py\nfrom datetime import datetime\nfrom glow2d import glow2d_polar as grc\n\ntime = datetime(2022, 2, 15, 20, 0, 0).astimezone('UTC') # 20:00 hours local in UTC\nlat, lon = 42.64981361744372, -71.31681056737486 # location of observation\nbearing = 40 # 40 deg northeast, refer to geopy.GreatCircleDistance().destination() for more info.\n\niono_loc, iono_geo = grc.polar_model(time, lat, lon, bearing, full_output=True) # generate output in local and GEO coordinates\n```\n\nThe `iono_loc` dataset is:\n\n```\n<xarray.Dataset>\nDimensions:     (za: 200, r: 500, wavelength: 15, energy: 100)\nCoordinates:\n  * za          (za) float64 1.571 1.563 1.555 1.547 ... 0.01579 0.007893 0.0\n  * r           (r) float64 0.0 7.391 14.78 ... 3.673e+03 3.681e+03 3.688e+03\n  * wavelength  (wavelength) <U21 '3371' '4278' '5200' ... '1356' '1493' '1304'\n  * energy      (energy) float64 0.2 0.8 1.2 1.8 2.2 ... 457.3 480.7 505.4 531.3\nData variables: (12/18)\n    Tn          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n    O           (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n    N2          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n    O2          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n    NO          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n    NeIn        (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n    ...          ...\n    pederson    (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n    hall        (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n    Te          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n    Ti          (za, r) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n    ver         (za, r, wavelength) float64 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0\n    precip      (r, energy) float64 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\nAttributes:\n    geomag_params:                       Ap     Kp   f107 resolution       f1...\n    time:           2022-02-15T11:00:00+00:00\n    glatlon:        (42.64981361744372, -71.31681056737486)\n```\n\nThe `iono_geo` dataset is:\n```\n<xarray.Dataset>\nDimensions:         (angle: 100, alt_km: 250, wavelength: 15, state: 12,\n                     energy: 100)\nCoordinates:\n  * alt_km          (alt_km) float64 60.0 60.6 61.2 61.8 ... 953.4 957.9 962.4\n  * wavelength      (wavelength) <U21 '3371' '4278' '5200' ... '1493' '1304'\n  * state           (state) <U6 'O+(2P)' 'O+(2D)' 'O+(4S)' ... 'O(1S)' 'O(1D)'\n  * energy          (energy) float64 0.2 0.8 1.2 1.8 ... 457.3 480.7 505.4 531.3\n  * angle           (angle) float64 0.0 0.005323 0.01065 ... 0.5163 0.5217 0.527\n    lat             (angle) float64 42.65 42.88 43.12 ... 60.15 60.25 60.34\n    lon             (angle) float64 -71.32 -71.05 -70.78 ... -31.7 -31.12 -30.53\nData variables: (12/21)\n    Tn              (angle, alt_km) float64 237.0 236.0 235.0 ... 815.0 815.0\n    O               (angle, alt_km) float64 0.0 0.0 0.0 ... 1.2e+03 1.11e+03\n    N2              (angle, alt_km) float64 4.49e+15 4.17e+15 ... 0.0102 0.00893\n    O2              (angle, alt_km) float64 1.2e+15 1.12e+15 ... 1.9e-05\n    NO              (angle, alt_km) float64 7.81e+07 7.81e+07 ... 5.92e-08\n    NeIn            (angle, alt_km) float64 100.0 100.0 ... 2.35e+04 2.34e+04\n    ...              ...\n    Ti              (angle, alt_km) float64 236.9 235.9 ... 2.715e+03 2.726e+03\n    ver             (angle, alt_km, wavelength) float64 0.0 0.0 0.0 ... 0.0 0.0\n    production      (angle, alt_km, state) float64 0.0 nan nan ... 0.0 0.0 0.0\n    loss            (angle, alt_km, state) float64 nan nan nan ... 0.0 1.1 0.01\n    precip          (angle, energy) float64 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0\n    excitedDensity  (angle, alt_km, state) float64 nan nan nan ... 0.0 0.0 0.01\n...\nAttributes:\n    geomag_params:                       Ap     Kp   f107 resolution       f1...\n    time:           2022-02-15T11:00:00+00:00\n    glatlon:        (42.64981361744372, -71.31681056737486)\n```\n\nAll angles are in radians, and distances in km. Due to the nature of the coordinate transformation, local coordinate outputs do not contain any `NaN` values.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "NCAR GLOW model for 2D observation geometry",
    "version": "3.3.0",
    "project_urls": {
        "Homepage": "https://sunipkm.github.io/glow2d"
    },
    "split_keywords": [
        "thermosphere",
        "ionosphere"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12895c9aae7eaff81620196acfa2cf0589cb11d13c93b4d37128c6395ece0d08",
                "md5": "a847b6156c8c7fc2f3e46f708da24fd6",
                "sha256": "3e8e2856e395b7df1223c5801a84ca59a9cb6734f5c959234e8806b644f7313c"
            },
            "downloads": -1,
            "filename": "glow2d-3.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a847b6156c8c7fc2f3e46f708da24fd6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 27402,
            "upload_time": "2024-03-14T05:03:38",
            "upload_time_iso_8601": "2024-03-14T05:03:38.422454Z",
            "url": "https://files.pythonhosted.org/packages/12/89/5c9aae7eaff81620196acfa2cf0589cb11d13c93b4d37128c6395ece0d08/glow2d-3.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-14 05:03:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "glow2d"
}
        
Elapsed time: 0.25433s