pyrtlib.absorption_model.H2OAbsModel.h2o_absorption#

H2OAbsModel.h2o_absorption(pdrykpa: ndarray, vx: ndarray, ekpa: ndarray, frq: ndarray, amu: Optional[dict] = None) Optional[Tuple[ndarray, ndarray]]#

Compute absorption coefficients in atmosphere due to water vapor for all models.

Parameters:
Returns:

WV line and continuum absorption terms (ppm)

Return type:

Union[ Tuple[numpy.ndarray, numpy.ndarray], None]

References

Example

import numpy as np
from pyrtlib.rt_equation import RTEquation
from pyrtlib.absorption_model import H2OAbsModel, AbsModel
from pyrtlib.climatology import AtmosphericProfiles as atmp
from pyrtlib.utils import ppmv2gkg, mr2rh, import_lineshape

z, p, d, tk, md = atmp.gl_atm(atmp.TROPICAL)
frq = np.arange(20, 201, 1)
ice = 0
gkg = ppmv2gkg(md[:, atmp.H2O], atmp.H2O)
rh = mr2rh(p, tk, gkg)[0] / 100

e, rho = RTEquation.vapor(tk, rh, ice)

AbsModel.model = 'R16'
H2OAbsModel.h2oll = import_lineshape('h2oll')
for i in range(0, len(z)):
    v = 300.0 / tk[i]
    ekpa = e[i] / 10.0
    pdrykpa = p[i] / 10.0 - ekpa
    for j in range(0, len(frq)):
        _, _ = H2OAbsModel().h2o_absorption(pdrykpa, v, ekpa, frq[j])