A package to estimate the atmosphere parameters
Project description
Welcome to ATMOS
This package is an archive of scientific routines that implements the estimation of atmospheric properties for various atmosphere models, such as Exponential, COESA76, and NRLMSISE-00. The package mainly estimates density, temperature, pressure and other parameters of air at a set of specific altitudes. For atmosphere below 86 kilometers, it also calculates the speed of sound, viscosity, and thermal conductivity.
How to install
On Linux, macOS and Windows architectures, the binary wheels can be installed using pip by executing one of the following commands:
pip install pyatmos
pip install pyatmos --upgrade # to upgrade a pre-existing installation
How to use
Exponential
>>> from ATMOS.pyatmos import expo
>>> rhos_geom = expo([0,20,40,60,80]) # geometric altitudes by default
>>> print(rhos_geom) # [kg/m^3]
>>> rhos_geop = expo([0,20,40,60,80],'geopotential') # geopotential altitudes
>>> print(rhos_geop)
[1.22500000e+00 7.76098911e-02 3.97200000e-03 3.20600000e-04
1.90500000e-05]
[1.22500000e+00 7.69385063e-02 3.84131212e-03 2.97747719e-04
1.59847603e-05]
COESA 1976
>>> from ATMOS.pyatmos import coesa76
>>> rhos_geom,Ts_geom,Ps_geom = coesa76([0,20,40,60,80])
>>> print(rhos_geom) # [kg/m^3]
>>> rhos_geop,Ts_geop,Ps_geop = coesa76([0,20,40,60,80],'geopotential')
>>> print(rhos_geop) # [kg/m^3]
>>> rhos_geom,Ts_geom,Ps_geom = coesa76([100,300,500,700,900])
>>> print(rhos_geom) # [kg/m^3]
[1.22499916e+00 8.89079563e-02 3.99535051e-03 3.09628985e-04
1.84514759e-05]
[1.22499916e+00 8.80348036e-02 3.85100688e-03 2.88320680e-04
1.57005388e-05]
[5.60184300e-07 1.91512264e-11 5.21285933e-13 3.06944380e-14
5.75807856e-15]
NRLMSISE-00
Before using NRLMSISE-00, the space weather data needs to be prepared in advance.
>>> from ATMOS.pyatmos import download_sw,read_sw
>>> # Download or update the space weather file from www.celestrak.com
>>> swfile = download_sw()
>>> # Read the space weather data
>>> swdata = read_sw(swfile)
Calculate the temperature, density at [25N, 102E, 20km] at 03:00:00 UTC on October 5, 2015 with anomalous oxygen and 3h-geomagnetic index.
>>> from ATMOS.pyatmos import nrlmsise00
>>> # Set a specific time and location
>>> t = '2015-10-05 03:00:00' # time(UTC)
>>> lat,lon,alt = 25,102,600 # latitude, longitude in [degree], and altitude in [km]
>>> params,rho,T,nd = nrlmsise00(t,(lat,lon,alt),swdata) # aphmode=True
>>> print(params)
>>> print(rho)
>>> print(T)
>>> print(nd)
{'Year': 2015, 'DOY': 278, 'SOD': 10800.0, 'Lat': 25, 'Lon': 102, 'Alt': 600, 'LST': 9.8, 'f107A': 104.4, 'f107D': 82.6, 'ApD': 18, 'Ap3H': array([18. , 22. , 22. , 22. , 7. , 15.25 , 9.375])}
6.416602651204796e-14
(853.466244160143, 853.4647165799171)
{'He': 2388916051039.6826, 'O': 1758109067905.8027, 'N2': 2866987110.5606275, 'O2': 22411077.605527952, 'Ar': 4351.013995142538, 'H': 155026672753.3203, 'N': 46719306249.863495, 'ANM O': 4920851253.780525}
Note: The range of longitude is [0,360] by default, and the west longitude can also be expressed as a negative number.
Change log
- 1.2.0 — Jan 22, 2021
- Added Exponential Atmosphere up to 1000km
- Added Committee on Extension to the Standard Atmosphere(COESA) up to 1000km
- Completed part of the help documentation for NRLMSISE-00
- Improved the code structure to make it easier to read
- 1.1.2 — Jul 26, 2020
- Added colored-progress bar for downloading data
- 1.1.0 — Mar 29, 2020
- Added the International Standard Atmosphere(ISA) Model up to 86kms
Next release
- Complete the help documentation for NRLMSISE-00
- Add other atmospheric models, such as the Earth Global Reference Atmospheric Model(Earth-GRAM) 2016, and the Jacchia-Bowman 2008 Empirical Thermospheric Density Model(JB2008)
Reference
-
U.S. Standard Atmosphere, 1976, U.S. Government Printing Office, Washington, D.C.
-
NRLMSISE-00 empirical model of the atmosphere: Statistical comparisons and scientific issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file pyatmos-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: pyatmos-1.2.0-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a28557f7fc609b98970e634b48fee15c24d070ce64e651600fbae7a9e3728aa4 |
|
MD5 | fce2e30e278dae5e3b1dabb4a6afdd31 |
|
BLAKE2b-256 | e6cb1621ecf823758180bfc0ac9b476f41f661fe9835969dc58449d6afa8b908 |