pyrtlib.utils#

This module contains the utils functions.

Functions

atmospheric_tickness(p, t[, mr])

Calculate the thickness of a layer via the hypsometric equation.

constants([name])

This routine will provide values and units for all the universal constants necessary to pyrtlib.

dewpoint2rh(td, t[, ice, method])

Calculate relative humidity from temperature and dewpoint.

dilec12(f, t)

Computes the complex dielectric constant for liquid water, with a negative imaginary part representing dissipation.

e2mr(p, e)

Compute \(H_2O\) mass mixing ratio (g/kg) given pressure (mbar) and \(H_2O\) partial pressure (mbar)

esice_goffgratch(t)

Compute water vapor saturation pressure over ice using Goff-Gratch formulation.

eswat_goffgratch(t)

Compute water vapor saturation pressure over water using Goff-Gratch formulation.

gas_mass(gasid)

Returns the mass of the HITRAN gas ID

get_frequencies([instrument])

Get frequencies list from main ground instrument.

get_frequencies_sat(instrument)

Get frequencies list from main satellite sensors.

height_to_pressure(height)

Convert height data to pressures using the U.S.

import_lineshape(name)

Import a named object from a module in the context of this function.

kgkg_to_kgm3(q, p, t)

Utils function to convert from \(kg/kg\) to \(kg/m^3\).

mr2e(p, mr)

Compute \(H_2O\) partial pressure (mbar) given pressure (mbar) and \(H_2O\) mass mixing ratio (g/kg)

mr2rh(p, t, w[, Tconvert])

Determine relative humidity (rh) given reference pressure (mbar), temperature (K), and water vapor mass mixing ratio (g/kg)

mr2rho(mr, t, p)

Determine water vapor density (\(g/m^3\)) given reference pressure (mbar), temperature (K), and water vapor mass mixing ratio (g/kg)

ppmv2gkg(ppmv, gasid)

Convert volume mixing ratio in ppmv to mass mixing ratio in g/kg.

ppmv_to_moleculesm3(mr, p, t)

For any gas, this function converts mixing ratio (in ppmv) to number density (\(molecules/m^3\)).

pressure_to_height(pressure)

Convert pressure data to height using the U.S.

rho2mr(rho, t, p)

Determine water vapor mass mixing ratio (g/kg) given reference pressure (mbar), temperature (t,K), and water vapor density (\(g/m^3\)).

rho2rh(rho, t, p)

Convert water vapor density to relative humidity.

satmix(p, t[, Tconvert])

Compute saturation mixing ratio (g/kg) given reference pressure, p (mbar]) and temperature, T (K).

satvap(t[, Tconvert])

Compute saturation vapor pressure (mbar) given temperature, T (K).

tk2b_mod(hvk, t)

Get modified Planck function (Planck function without the constants \(\frac{2h\nu^3}{c^2}\)) by T and hvk (Planck constant * frequency) / Boltzmann constant, (equation (4) from [Schroeder-Westwater-1991])

to_celsius(t)

Convert T from Kelvin to Celsius

to_kelvin(t)

Convert T from Celsius to Kelvin

virtual_temperature(t, mr)

Calculate virtual temperature.