wradlib.zr.z_to_r_enhanced¶

wradlib.zr.
z_to_r_enhanced
(z, polar=True, shower=True)¶ Calculates rainrates from radar reflectivities using the enhanced threepart ZRrelationship used by the DWD (as of 2009)
To be used with polar representations so that one dimension is cyclical. i.e. z should be of shape (nazimuths, nbins) –> the first dimension is the cyclical one. For DWD DXData z’s shape is (360,128).
Neighborhoodmeans are taken only for available data via fast convolution sums. Refer to the RADOLAN final report or the RADOLAN System handbook for details on the calculations. Basically, for low reflectivities an index called the shower index is calculated as the mean of the differences along both axis in a neighborhood of 3x3 pixels. This means:
xdirection –>y  +—+—+—+    1  2  3  d v +—+—+—+ i  4  5  6  r +—+—+—+ e  7  8  9  c +—+—+—+ t i if 5 is the pixel in question, its shower index is calculated as o ( 12 + 23 + 45 + 56 + 78 + 89 + n + 14 + 47 + 25 + 58 + 36 + 69 ) / 12.
then, the upper line of the sum would be diffx (DIFFerences in Xdirection), the lower line would be diffy (DIFFerences in Ydirection) in the code below.Parameters: Returns:  r (
numpy.ndarray
) – r  array of shape z.shape  calculated rain rates  si (
numpy.ndarray
) – si  array of shape z.shape  calculated shower index for control purposes. May be omitted in later versions
 r (