meteorology-conversion
The meteorology-conversion Python package provides robust utilities for meteorological and atmospheric science calculations, including temperature conversions, humidity, air density, and pressure estimations.
Gregory H. Halverson (they/them)
gregory.h.halverson@jpl.nasa.gov
NASA Jet Propulsion Laboratory 329G
Installation
This package is available on PyPI as meteorology-conversion.
pip install meteorology-conversion
Usage
Import this package as meteorology_conversion:
import meteorology_conversion
1. kelvin_to_celsius(T_K)
- Description: Converts temperature from Kelvin (K) to Celsius (°C).
- Parameters:
T_K(numpy array or Raster): Temperature in Kelvin. - Returns: Temperature in Celsius.
- Reference: Wallace, J. M., & Hobbs, P. V. (2006). Atmospheric Science: An Introductory Survey (2nd ed.). Academic Press.
2. celcius_to_kelvin(T_C)
- Description: Converts temperature from Celsius (°C) to Kelvin (K).
- Parameters:
T_C(numpy array or Raster): Temperature in Celsius. - Returns: Temperature in Kelvin.
- Reference: Wallace, J. M., & Hobbs, P. V. (2006).
3. calculate_specific_humidity(Ea_Pa, Ps_Pa)
- Description: Calculates the specific humidity (kg water vapor / kg moist air) from actual vapor pressure and surface pressure.
- Parameters:
Ea_Pa(numpy array or Raster): Actual water vapor pressure in Pascal.Ps_Pa(numpy array or Raster): Surface pressure in Pascal.
- Returns: Specific humidity (kg/kg).
- References:
- Rogers, R. R., & Yau, M. K. (1989). A Short Course in Cloud Physics (3rd ed.). Pergamon Press.
- Stull, R. B. (2017). Practical Meteorology.
4. calculate_specific_heat(specific_humidity)
- Description: Calculates the specific heat capacity at constant pressure (Cp) for moist air.
- Parameters:
specific_humidity(numpy array or Raster): Specific humidity (kg/kg). - Returns: Specific heat capacity (J/kg/K).
- References:
- Wallace, J. M., & Hobbs, P. V. (2006).
- Stull, R. B. (2017).
5. calculate_air_density(surface_pressure_Pa, Ta_K, specific_humidity)
- Description: Calculates the density of moist air (kg/m³) using the ideal gas law, accounting for water vapor.
- Parameters:
surface_pressure_Pa(numpy array or Raster): Surface pressure in Pascal.Ta_K(numpy array or Raster): Air temperature in Kelvin.specific_humidity(numpy array or Raster): Specific humidity (kg/kg).
- Returns: Air density (kg/m³).
- References:
- Wallace, J. M., & Hobbs, P. V. (2006).
- Stull, R. B. (2017).
6. SVP_kPa_from_Ta_C(Ta_C)
- Description: Calculates the saturation vapor pressure (SVP) in kPa from air temperature in Celsius using the Magnus-Tetens approximation.
- Parameters:
Ta_C(numpy array or Raster): Air temperature in Celsius. - Returns: Saturation vapor pressure in kPa.
- References:
- Alduchov, O. A., & Eskridge, R. E. (1996). Improved Magnus Form Approximation of Saturation Vapor Pressure. Journal of Applied Meteorology, 35(4), 601–609.
- Bolton, D. (1980). The computation of equivalent potential temperature. Monthly Weather Review, 108(7), 1046–1053.
7. SVP_Pa_from_Ta_C(Ta_C)
- Description: Calculates the saturation vapor pressure in Pascal (Pa) from air temperature in Celsius.
- Parameters:
Ta_C(numpy array or Raster): Air temperature in Celsius. - Returns: Saturation vapor pressure in Pascal (Pa).
- Reference: Alduchov & Eskridge (1996).
8. calculate_surface_pressure(elevation_m, Ta_C)
- Description: Estimates surface pressure (Pa) at a given elevation and temperature using the barometric formula.
- Parameters:
elevation_m(numpy array or Raster): Elevation in meters.Ta_C(numpy array or Raster): Air temperature in Celsius.
- Returns: Surface pressure in Pascal (Pa).
- References:
- Wallace, J. M., & Hobbs, P. V. (2006).
- Stull, R. B. (2017).
References
- Alduchov, O. A., & Eskridge, R. E. (1996). Improved Magnus Form Approximation of Saturation Vapor Pressure. Journal of Applied Meteorology, 35(4), 601–609.
- Bolton, D. (1980). The computation of equivalent potential temperature. Monthly Weather Review, 108(7), 1046–1053.
- Rogers, R. R., & Yau, M. K. (1989). A Short Course in Cloud Physics (3rd ed.). Pergamon Press.
- Stull, R. B. (2017). Practical Meteorology: An Algebra-based Survey of Atmospheric Science. University of British Columbia.
- Wallace, J. M., & Hobbs, P. V. (2006). Atmospheric Science: An Introductory Survey (2nd ed.). Academic Press.
Metadata
Release files for meteorology-conversion 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| meteorology_conversion-1.0.3.tar.gz | 12.4 kB | Without provenance | Details for meteorology_conversion-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| meteorology_conversion-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for meteorology_conversion-1.0.3-py3-none-any.whl |
Total release size: 22.3 kB
Release files / meteorology_conversion-1.0.3.tar.gz
| Download URL | meteorology_conversion-1.0.3.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e69b92626dad5ccefc10deec6e280b02947a43924019360043fd5ca3c848eef1
|
|
BLAKE2b-256 checksum How to use checksums |
34c7cc63008d32ead4548dc3f57bd6279c7ab95c5144930d1b5630019b647338
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|
Release files / meteorology_conversion-1.0.3-py3-none-any.whl
| Download URL | meteorology_conversion-1.0.3-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6811c603b575f0da576cd407ec2582bdd8e7654c1e551f17b14a29e20f86afe9
|
|
BLAKE2b-256 checksum How to use checksums |
ad7efd1f6ecabd3681064a2ed4cc861f3f30c0d68751da52691619bed3c51588
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|
Security for meteorology-conversion 1.0.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.