Skip to main content

Python library for atmospheric thermodynamic calculations

Project description

atmoslib

Run tests

Python library for atmospheric thermodynamic calculations.

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 over liquid water (1)
absolute_humidity(t, vp) Absolute humidity (kg/m³)
dew_point(t, rh) Dew-point temperature (K, Magnus)
mixing_ratio(vp, p) Mixing ratio (kg/kg)
latent_heat_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(...) Equivalent potential temperature (K, linearized approx.)
air_density(p, t, mr) Moist-air density (kg/m³)
adiabatic_dlwc_dz(t, p) Adiabatic vertical gradient of LWC at cloud base (kg/m³/m)
geometric_height(gph) Geopotential height to geometric height (m, ECMWF)
isa_altitude(t, p) Altitude from pressure and temperature (m, ISA)
c2k(t) / k2c(t) Celsius ↔ Kelvin conversion

See the docstrings for argument details and references.

License

MIT

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

atmoslib-1.0.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

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

atmoslib-1.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file atmoslib-1.0.1.tar.gz.

File metadata

  • Download URL: atmoslib-1.0.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for atmoslib-1.0.1.tar.gz
Algorithm Hash digest
SHA256 70fe153bd82cfb8f6a3607fd0839951f9c4a41d62d1205dd5a220727fc810e22
MD5 c7c6eebec188b87e187d86b708ab8b12
BLAKE2b-256 1204e618c47c824264c9421f7069e10bd821142fbca5fe896bcb1aa630321a20

See more details on using hashes here.

Provenance

The following attestation bundles were made for atmoslib-1.0.1.tar.gz:

Publisher: publish.yml on actris-cloudnet/atmoslib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atmoslib-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: atmoslib-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for atmoslib-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 87c2088f7c79ac20e51ec7bdad18ef648b33fa3a67e4619e7628f3d4e92d6436
MD5 7d2dfb1801e3a597074d66e7922dfb2c
BLAKE2b-256 e4f10c08d4fb3822c414882f3b5f0c95043839d6f3368a12cf044bb26c1a5c4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for atmoslib-1.0.1-py3-none-any.whl:

Publisher: publish.yml on actris-cloudnet/atmoslib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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