Python library for atmospheric thermodynamic calculations
Project description
atmoslib
Python library for atmospheric thermodynamics and microwave attenuation calculations. This library is used in CloudnetPy and related projects with focus on good performance and minimal dependencies.
Installation
pip install atmoslib
Usage
import numpy as np
import atmoslib
t = np.array([293.15, 283.15, 273.15]) # temperature (K)
p = np.array([101325.0, 95000.0, 90000.0]) # pressure (Pa)
q = np.array([0.010, 0.005, 0.001]) # specific humidity (kg/kg)
tw = atmoslib.wet_bulb_temperature(t, p, q)
All inputs accept scalars or NumPy arrays of any shape (broadcasting follows NumPy rules).
Available functions
| Function | Description |
|---|---|
wet_bulb_temperature(t, p, q) |
Wet-bulb temperature (K) |
vapor_pressure(p, q) |
Vapor pressure of water (Pa) |
saturation_vapor_pressure(t) |
Saturation vapor pressure (Pa, Goff-Gratch, liquid/ice/mixed) |
relative_humidity(t, p, q) |
Relative humidity (1, liquid/ice/mixed) |
specific_humidity(t, p, rh) |
Specific humidity (kg/kg, liquid/ice/mixed) |
absolute_humidity(t, vp) |
Absolute humidity (kg/m³) |
dew_point_temperature(t, rh) |
Dew-point temperature (K, Magnus) |
mixing_ratio(vp, p) |
Mixing ratio (kg/kg) |
latent_heat_of_vaporization(t) |
Temperature-dependent latent heat of vaporization (J/kg) |
virtual_temperature(t, q) |
Virtual temperature (K) |
potential_temperature(t, p) |
Potential temperature (K) |
equivalent_potential_temperature(t, p, q) |
Equivalent potential temperature (K, Bolton 1980) |
air_density(t, p, mr) |
Moist-air density (kg/m³) |
adiabatic_lwc_gradient(t, p) |
Adiabatic vertical gradient of LWC at cloud base (kg/m³/m) |
hydrostatic_pressure(t, q, z, p_sfc) |
Pressure profile from surface value via hypsometric equation (Pa) |
geometric_height(gph) |
Geopotential height to geometric height (m, ECMWF) |
isa_altitude(t, p) |
Altitude from pressure and temperature (gpm, ISA) |
isa_pressure(gph) |
Pressure from geopotential height (Pa, ISA) |
c2k(t) / k2c(t) |
Celsius ↔ Kelvin conversion |
liquid_water_specific_attenuation(t, f) |
Cloud liquid water specific attenuation ((dB km⁻¹)/(g m⁻³), ITU-R P.840) |
gas_specific_attenuation(t, p, e, f) |
Dry-air + water-vapor specific attenuation (dB km⁻¹, ITU-R P.676) |
See the docstrings for argument details and references.
License
MIT
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atmoslib-2.2.0.tar.gz.
File metadata
- Download URL: atmoslib-2.2.0.tar.gz
- Upload date:
- Size: 594.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
979014de957b3e1e86d0dc8756b4d81cb52d4e76becc9d2227e291e6492c08d2
|
|
| MD5 |
e92642a6e81ff52870fa748b6deec3f7
|
|
| BLAKE2b-256 |
1bbb9fe27100dd15df792e31becd52d0988423fb981805bb6e20d157d0c83ab7
|
Provenance
The following attestation bundles were made for atmoslib-2.2.0.tar.gz:
Publisher:
publish.yml on actris-cloudnet/atmoslib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atmoslib-2.2.0.tar.gz -
Subject digest:
979014de957b3e1e86d0dc8756b4d81cb52d4e76becc9d2227e291e6492c08d2 - Sigstore transparency entry: 1428015738
- Sigstore integration time:
-
Permalink:
actris-cloudnet/atmoslib@39786a9def3c110bb724461479417ea6f716c56b -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/actris-cloudnet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@39786a9def3c110bb724461479417ea6f716c56b -
Trigger Event:
push
-
Statement type:
File details
Details for the file atmoslib-2.2.0-py3-none-any.whl.
File metadata
- Download URL: atmoslib-2.2.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeabc7b356fc5504541e66d329325867bc2c980257372b339bc332ae94f25a42
|
|
| MD5 |
4ff45283f10c06b2a1f42920e877457e
|
|
| BLAKE2b-256 |
e88572df81b19d19ade2e9b9b0f1576d08a22e8ad8cd20a00ee7d036e99aa547
|
Provenance
The following attestation bundles were made for atmoslib-2.2.0-py3-none-any.whl:
Publisher:
publish.yml on actris-cloudnet/atmoslib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atmoslib-2.2.0-py3-none-any.whl -
Subject digest:
aeabc7b356fc5504541e66d329325867bc2c980257372b339bc332ae94f25a42 - Sigstore transparency entry: 1428015814
- Sigstore integration time:
-
Permalink:
actris-cloudnet/atmoslib@39786a9def3c110bb724461479417ea6f716c56b -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/actris-cloudnet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@39786a9def3c110bb724461479417ea6f716c56b -
Trigger Event:
push
-
Statement type: