Skip to main content

pymeteo

Lightweight meteorological diagnostic functions for Python 3.10+.

This is a breaking rewrite of the old single-file pyMeteo.py. The import name is now lowercase pymeteo. Public functions take explicit string unit parameters (no Pint, no Sounding/Wind object facade). Runtime dependency: NumPy only.

Full documentation is in Chinese: README_zh.md

Install

pip install pymeteo-kit

The PyPI project name is pymeteo-kit because pymeteo was already taken and py-meteo was rejected as too similar. The import is still import pymeteo.

For local development:

pip install -e .
pip install -e ".[dev]"   # pytest, ruff

Quick start

import pymeteo as pm

dewpoint = pm.dewpoint_from_relative_humidity(
    18.0, 46.5, temperature_unit="C", humidity_unit="%"
)
si = pm.showalter_index(16.6, 0.6, -15.9, temperature_unit="C")
km = pm.earth_distance(39.9, 116.4, 31.2, 121.5, output_distance_unit="km")

Default units: temperature C, pressure hPa, wind m/s, relative humidity %, mixing ratio kg/kg, distance km (thickness defaults to m), angles in degrees. Aliases such as K/kelvin, hPa/mb, kt, fraction, g/kg, m/nmi are documented in README_zh.md.

v2.2.0 adds pointwise thermodynamic, stability, kinematic and NWS comfort algorithms (potential/equivalent potential temperature, LCL, wet-bulb, lifted index, Coriolis, hypsometric thickness, ω↔w, heat index, wind chill) plus NCL name shims. See the “新增” section in README_zh.md. No MetPy, NCL, Pint, or extra runtime dependencies — NumPy only, string unit kwargs.

v2.2.1 adds NCL official-documentation example regression tests (tests/test_ncl_official_examples.py).

v2.2.2 attempted to publish as py-meteo (pymeteo was taken); PyPI rejected that name as too similar to existing pymeteo.

v2.2.3 publishes the package on PyPI as pymeteo-kit. The import remains import pymeteo.

The old names (showalter, E_WATER, SWEAT_calculate, …) are gone from the top-level modern API—no compatibility aliases there.

NCL names (pymeteo.ncl)

Optional thin wrappers with NCL builtin names and fixed NCL units (K, Pa/hPa, %, kg/kg). They only translate arguments and call the modern functions. These names are not re-exported from top-level pymeteo.

import pymeteo as pm
from pymeteo.ncl import dewtemp_trh, relhum_ttd, mixhum_ptrh, wind_speed

td_k = dewtemp_trh(18.0 + 273.15, 46.5)   # tk in K, rh in % → dewpoint K
td_k = pm.ncl.dewtemp_trh(18.0 + 273.15, 46.5)
rh = pm.ncl.relhum_ttd(291.15, 279.45, 0)  # opt=0 → %, opt=1 → fraction

Full mapping (NCL name → modern function and units) is in README_zh.md.

License

GPL-3.0. See LICENSE.

Metadata

Release files for pymeteo-kit 2.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymeteo-kit 2.2.3
File Size Uploaded Provenance Actions
pymeteo_kit-2.2.3.tar.gz 71.2 kB Without provenance Details for pymeteo_kit-2.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pymeteo-kit 2.2.3
File Interpreter ABI Platform Actions
pymeteo_kit-2.2.3-py3-none-any.whl Python 3 none any Details for pymeteo_kit-2.2.3-py3-none-any.whl

Total release size: 129.6 kB

Release files / pymeteo_kit-2.2.3.tar.gz

Download URL pymeteo_kit-2.2.3.tar.gz
Size 71.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7970db6e4df282c518874dbf2284eca9b1fbeee15f543b69d91e4ce24e59e516
BLAKE2b-256 checksum
How to use checksums
b29b7ec71f0423e4aaab1d48ef3db1a9f563feb0e5301998f2509297b6838d08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / pymeteo_kit-2.2.3-py3-none-any.whl

Download URL pymeteo_kit-2.2.3-py3-none-any.whl
Size 58.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24d161729c7f2cf79e26eae033abde1559ed178d47a7eb2e04c6c1e79d5d9d0f
BLAKE2b-256 checksum
How to use checksums
2d566db0c4cb1f81340aaf3b5b6e749d6c321e2c77d646a1f1c19fb09b403d9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for pymeteo-kit 2.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.2.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page