radarx.retrieve.cloud_attenuation.rain_path_attenuation#
- radarx.retrieve.cloud_attenuation.rain_path_attenuation(obj, frequency=None, *, dbz=None, temperature=10.0, a=None, b=None, mask=None, melting=None, height=None, radar_height=None, max_pia=10.0, n_threads=None, engine='auto')[source]#
Two-way rain attenuation along the beam by the Hitschfeld and Bordan solution.
With the relation
k = a Z**bofrain_attenuation_relation()the solution of Hitschfeld and Bordan (1954),radarx.fundamentals.reflectivity.hitschfeld_bordan_correction(), gives the path-integrated attenuation at every gate from the measured reflectivity alone. Only gates of rain count: gates that are not inmaskor are at or abovemeltingadd nothing, and gates behind the rain carry the attenuation of the whole rain path (the attenuation does not decrease).- Parameters:
obj (
xarray.DataArray,xarray.Datasetorxarray.DataTree) – The measured (attenuated) reflectivity in dBZ on arangedimension, a dataset with it, or a volume. Correct the gas attenuation first if it matters.frequency (
float, optional) – Frequency in GHz. Default: theradar_frequencyof the data.dbz (
strorxarray.DataArray, optional) – The reflectivity. Default:objitself for a DataArray, else the first ofDBZH,DBZ,reflectivity,Z,Zh.temperature (
float, optional) – Temperature of the rain in degrees Celsius for the relation. Default 10.a, b (
float, optional) – Coefficients ofk = a Z**bto use instead of the fit.mask (
strorxarray.DataArray, optional) – True for the gates that can hold rain.melting (
float, optional) – Height in m above sea level of the melting level; gates at or above it do not count. Needs the gate heights (seeheight).height (
strorxarray.DataArray, optional) – Height of the gates in m above sea level, as forgas_path_attenuation().radar_height (
float, optional) – Radar altitude in m above sea level for the 4/3 Earth model.max_pia (
float, optional) – Largest two-way attenuation in dB that the solution may reach (it is unstable beyond). Default 10.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.DataArrayorxarray.DataTree–PIA_RAIN(dB, two-way) on the gates of the reflectivity; 0 before the first rain gate. A volume gives a DataTree with the root of the input and one node per sweep.- Raises:
ValueError – For a frequency outside 1 to 1000 GHz, an unknown
engineormeltingwithout gate heights.KeyError – If no reflectivity is found.
References
Hitschfeld, W., and J. Bordan, 1954: Errors inherent in the radar measurement of rainfall at attenuating wavelengths. J. Meteor., 11 (1), 58-67, https://doi.org/10.1175/1520-0469(1954)011<0058:EIITRM>2.0.CO;2
Examples
>>> pia = rain_path_attenuation(sweep, 35.0, melting=3000.0) >>> dbz_corrected = sweep.DBZ + pia