radarx.fundamentals.reflectivity.hitschfeld_bordan_correction#

radarx.fundamentals.reflectivity.hitschfeld_bordan_correction(dbz, range_m=None, *, a, b, max_correction_db=10.0, range_dim='range', axis=-1, return_pia=False, n_threads=None, engine='auto', use_compiled=None)[source]#

Correct reflectivity for attenuation along the ray (Hitschfeld-Bordan).

The specific attenuation is the power law k = a Z**b [dB km-1] of the unattenuated reflectivity Z [mm^6 m^-3]. The measured reflectivity is Zm = Z 10**(-0.2 A) with A the one-way integral of k along the ray (a two-way attenuation of 2 A dB). Hitschfeld and Bordan [1] solved this for Z from Zm alone,

Z = Zm (1 - c S)**(-1/b), c = 0.2 b ln(10), S(r) = integral from 0 to r of a Zm**b ds (s in km),

so that the correction in dB is the path-integrated attenuation PIA = -(10 / b) log10(1 - c S), added to the measured dBZ. The closed form above is derived here from the power law and the definition of Zm; it has not been compared with the text of [1], and the form agrees with a forward model of the attenuation in the tests.

S is evaluated at the centre of each gate (the gates before it in full, half of the gate itself) with the gate length from the spacing of range_m. Attenuation before the first gate is not included. A gate without a value (NaN) adds nothing to S and stays NaN.

The solution is unstable: 1 - c S goes to zero for strong attenuation and any error in a or b grows with range [1]. The correction is therefore capped at max_correction_db (default 10 dB, a radarx choice) where 1 - c S would fall below 10**(-b max_correction_db / 10). The caller must treat capped gates as unreliable. The method needs a and b for the radar band, the temperature and the drop size distribution; radarx does not provide them. It replaces dbz_attenuation_correction(), which used only the local value of the reflectivity.

The calculation runs in a compiled multithreaded kernel with a NumPy fallback of the same results (engine="numpy" selects it).

Parameters:
  • dbz (xarray.DataArray or array-like) – Measured (attenuated) reflectivity [dBZ], with the range along range_dim (DataArray) or axis (array). A dask-backed DataArray stays lazy; the range dimension is then made a single chunk.

  • range_m (array-like, optional) – Range of the gates [m], increasing. Taken from the coordinate range_dim of a DataArray if not given; required for arrays.

  • a (float) – Coefficient of k = a Z**b [dB km^-1 (mm^6 m^-3)^-b].

  • b (float) – Exponent of k = a Z**b, positive.

  • max_correction_db (float, optional) – Upper limit of the correction [dB], positive and finite.

  • range_dim (str, optional) – Name of the range dimension of a DataArray.

  • axis (int, optional) – Range axis of an array.

  • return_pia (bool, optional) – Also return the correction PIA [dB] (two-way).

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

  • engine ({"auto", "compiled", "numpy"}, optional) – Kernel implementation. "auto" uses the compiled kernel if it was built.

  • use_compiled (bool, optional) – Deprecated. False is engine="numpy".

Returns:

xarray.DataArray or numpy.ndarray – Corrected reflectivity [dBZ] of the shape of dbz (a DataArray keeps its coords and attrs); with return_pia a tuple of the corrected reflectivity and the correction [dB].

References