radarx.retrieve.ducts.modified_refractivity#

radarx.retrieve.ducts.modified_refractivity(profile, *, earth_radius=6371000.0, form='bean_dutton')[source]#

Modified refractivity of a profile.

Parameters:
  • profile (xarray.Dataset or xarray.DataArray) – Refractivity on a height coordinate (m above sea level): a DataArray in N-units, or a Dataset with refractivity or with pressure (Pa), temperature (K) and one of vapor_pressure, specific_humidity, dewpoint or relative_humidity, as for radarx.retrieve.beam_path(). Any other dimensions are kept.

  • earth_radius (float, optional) – Radius of the Earth (m). Default: the radarx value.

  • form (str, optional) – Formula of the refractivity from the thermodynamic variables (radarx.io.sounding.refractivity()). Default "bean_dutton".

Returns:

xarray.DataArray – \(M = N + 10^6 h / a\) (M-units), on the dimensions of the profile. It decreases with height in trapping layers.

Raises:
  • ValueError – For a missing variable or coordinate, or an earth_radius that is not positive.

  • TypeError – If profile is not an xarray object.

Notes

Bean and Dutton (1966, Table 1.9). The input is not changed.

References

Examples

>>> import numpy as np, xarray as xr
>>> h = np.array([0.0, 1000.0])
>>> n = xr.DataArray([320.0, 281.0], dims="height", coords={"height": h})
>>> modified_refractivity(n).round(1).values.tolist()
[320.0, 437.96]