helikite.processing.post.altitude
Functions
|
Calculate dry and wet air density using the ideal gas law. |
|
Calculate the partial pressure of water vapor. |
|
Calculate water saturation vapor pressure for moist air. |
|
Estimate the altitude difference using a barometric formula. |
|
Calculate altitude using a simplified hypsometric equation. |
Calculate altitude from a data row of meteorological measurements. |
Module Contents
- helikite.processing.post.altitude.Air_density(T, P, RH=0)
Calculate dry and wet air density using the ideal gas law.
This function computes the dry air density from the ideal gas law based on a reference state and adjusts for moisture content using the water vapor pressure to yield the wet air density.
- Parameters:
T (float) – Temperature in Kelvin.
P (float) – Pressure in hPa.
RH (float, optional) – Relative humidity in percent (default is 0).
- Returns:
- A tuple containing:
dry air density in kg/m³
wet air density in kg/m³
- Return type:
tuple of float
Notes
The calculation uses standard reference conditions (rho0 = 1.29 kg/m³, P0 = 1013.25 hPa, T0 = 273.15 K) and applies an adjustment based on water vapor pressure.
- helikite.processing.post.altitude.waterpressure(RH, T, P)
Calculate the partial pressure of water vapor.
This function determines the water vapor pressure given the relative humidity, temperature, and pressure. It computes the saturation vapor pressure and then scales it by the relative humidity.
- Parameters:
RH (float) – Relative humidity in percent.
T (float) – Temperature in Kelvin.
P (float) – Pressure in hPa.
- Returns:
Partial pressure of water vapor in hPa.
- Return type:
float
- helikite.processing.post.altitude.Watersatpress(press, temp)
Calculate water saturation vapor pressure for moist air.
This function computes the saturation vapor pressure for water based on the WMO CIMO guide, valid for temperatures between -45°C and 60°C. The temperature is first converted from Kelvin to Celsius before applying the empirical formula.
- Parameters:
press (float) – Pressure in hPa.
temp (float) – Temperature in Kelvin.
- Returns:
Saturation vapor pressure of water (H₂O) in hPa.
- Return type:
float
References
- helikite.processing.post.altitude.EstimateAltitude(P0, Pb, T0)
Estimate the altitude difference using a barometric formula.
This function calculates the altitude based on the reference pressure, the observed barometric pressure, and the reference temperature. A standard relative humidity of 50% is assumed to compute the wet air density used in the calculation.
- Parameters:
P0 (float) – Reference pressure in hPa.
Pb (float) – Observed barometric pressure in hPa.
T0 (float) – Reference temperature in Kelvin.
- Returns:
Estimated altitude in meters.
- Return type:
float
- helikite.processing.post.altitude.calculate_altitude_hypsometric_simple(p0, p, t)
Calculate altitude using a simplified hypsometric equation.
This function estimates altitude based on the hypsometric formula. It uses the reference pressure (p0), observed pressure (p), and temperature in Celsius (t) to compute the altitude.
- Parameters:
p0 (float) – Reference pressure in hPa.
p (float) – Observed pressure in hPa.
t (float) – Temperature in Celsius.
- Returns:
Estimated altitude in meters.
- Return type:
float
- helikite.processing.post.altitude.calculate_altitude_for_row(row)
Calculate altitude from a data row of meteorological measurements.
This function extracts pressure and temperature data from a dictionary-like object and computes the altitude using a simplified hypsometric formula.
- Parameters:
row (dict-like) –
- Data structure containing the following keys:
”Pref”: reference pressure in hPa.
”P_baro”: observed barometric pressure in hPa.
”TEMP1”: temperature in Celsius.
- Returns:
Estimated altitude in meters.
- Return type:
float