Skip to main content

Provides simple APIs to calculate neutral density values using the NOAA Whole Atmosphere Model-Ionosphere Plasmasphere Electrodynamics (WAM-IPE) model

Project description

Project Overview

This software package is a collaboration between the National Oceanic and Atmospheric Administration Space Weather Prediction Center (NOAA SWPC) and App Dev Club LLC at the University of Maryland. Using outputs from the Whole Atmosphere Model-Ionosphere Plasmasphere Electrodynamics (WAM-IPE) model, it allows users to input date, time, and satellite location (longitude + latitude) and output the neutral density value near the satellite at that date and time.

Prerequisites

Installation of latest package versions of netCDF4, numpy, scipy, and requests.

Usage

To install the package, open the terminal of a code editor and run the following command.
Update this command after each package version change to keep documentation up to date.

pip install swpc-wamipe

To print a density value run the following code:

from wam_api import WAMInterpolator
from datetime import datetime
foo = WAMInterpolator()
dt = datetime(2024, 5, 11, 18, 12, 22)
lat, lon, alt = -33.4, -153.24, 550.68  # degrees north, degrees east, km
my_density = foo.get_density(dt, lat, lon, alt)
print(my_density)

To get densities for an array of datetimes, run the following code:

from wam_api import WAMInterpolator
from datetime import datetime, timedelta
foo = WAMInterpolator()
dt = datetime(2024, 5, 11, 18, 12, 22)
lat, lon, alt = -33.4, -153.24, 550.68  # degrees north, degrees east, km
dt_array = [dt + timedelta(minutes=10*i) for i in range(10)]
my_densities = foo.get_density_batch(dt_array, [lat] * 10, [lon] * 10, [alt] * 10)
print(my_densities)

Updating the package version

To update the package version on PyPI from local with any changes you have made to the project, first change the version number in pyproject.toml.

Next, run the following commands in order:

python -m build
python -m twine upload dist/*

To update the local version, run:

pip install swpc-wamipe --upgrade

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

swpc_wamipe-0.0.3.tar.gz (988.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swpc_wamipe-0.0.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file swpc_wamipe-0.0.3.tar.gz.

File metadata

  • Download URL: swpc_wamipe-0.0.3.tar.gz
  • Upload date:
  • Size: 988.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for swpc_wamipe-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a63398f34a6f8d7ae1d7bc88d4587f7cc9e2db5dc4eb783aafc1b782079e5a57
MD5 0ab3f92c479fae03282dd635b66e3e48
BLAKE2b-256 3a697466a7b053f8d81029e07d2aeff0f47702743be84f32c8fb58234561564f

See more details on using hashes here.

File details

Details for the file swpc_wamipe-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: swpc_wamipe-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for swpc_wamipe-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a55e050b80ed04ae3554a075294ff4f00c0eea2e9c3b773c0944bc699269378d
MD5 d7308e6df9aff155aa7d440d0369f6d2
BLAKE2b-256 29994c63890a188e2e60a56a9602502ecc698b9b44efee5891804d7146d6fa89

See more details on using hashes here.

Supported by

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