radarx.retrieve.cloud_attenuation.gas_specific_attenuation#

radarx.retrieve.cloud_attenuation.gas_specific_attenuation(frequency, pressure, temperature, vapor_pressure=None, *, vapor_density=None, n_threads=None, engine='auto')[source]#

Specific attenuation of oxygen and water vapour at a radar frequency.

The line-by-line model of Rec. ITU-R P.676-13, Annex 1 (see radarx.retrieve.cloud_attenuation): the one-way attenuation of the dry air (oxygen, pressure-induced nitrogen and the non-resonant Debye spectrum) and of water vapour at the frequency, for the air pressure, temperature and water vapour of every point. The inputs are broadcast against each other, so a frequency axis gives a spectrum and a sounding gives a profile.

Parameters:
  • frequency (float or xarray.DataArray) – Frequency in GHz (1 to 1000), for example 35.5 or 94.

  • pressure (float or xarray.DataArray) – Total air pressure in hPa (dry air plus water vapour).

  • temperature (float or xarray.DataArray) – Air temperature in K.

  • vapor_pressure (float or xarray.DataArray, optional) – Partial pressure of water vapour in hPa.

  • vapor_density (float or xarray.DataArray, optional) – Water vapour density in g m-3, instead of vapor_pressure; they are related by e = rho T / 216.7 (Rec. ITU-R P.676-13, Eq. 4). Give one of the two.

  • n_threads (int, optional) – Threads of the compiled kernel. Default: all cores.

  • engine ({"auto", "compiled", "numpy"}, optional) – Implementation. "auto" (default) prefers the compiled kernel.

Returns:

xarray.Dataset – A_OXYGEN (dry air), A_WATER_VAPOR and A_GAS (their sum), the one-way specific attenuation in dB km-1, on the broadcast dimensions of the inputs. Gates with a non-positive or missing input are NaN.

Raises:
  • ValueError – If neither or both of vapor_pressure and vapor_density are given, or for an unknown engine.

  • ImportError – If engine="compiled" and the kernel is not available.

References

Rec. ITU-R P.676-13, 2022: Attenuation by atmospheric gases and related effects. International Telecommunication Union, Geneva, https://www.itu.int/rec/R-REC-P.676 (recommendation, no DOI).

Examples

>>> gas = gas_specific_attenuation(94.0, 1013.25, 288.15, vapor_density=7.5)
>>> round(float(gas.A_GAS), 2)
0.41