towerpy.qpe.qpe_algs#

Towerpy: an open-source toolbox for processing polarimetric radar data.

Classes#

RadarQPE

A class to calculate rain rates from radar variables.

Module Contents#

class towerpy.qpe.qpe_algs.RadarQPE(radobj=None)[source]#

A class to calculate rain rates from radar variables.

Attributes#

elev_anglefloat

Elevation angle at which the scan was taken, in deg.

file_namestr

Name of the file containing radar data.

scandatetimedatetime

Date and time of scan.

site_namestr

Name of the radar site.

elev_angle = None[source]#
file_name = None[source]#
scandatetime = None[source]#
site_name = None[source]#
adp_to_r(adp, rband='C', temp=20.0, a=None, b=None, mlyr=None, beam_height=None)[source]#

Compute rain rates using the \(R(A_{DP})\) estimator [Eq.1].

Parameters#

adpfloat or array

Floats that corresponds to the differential attenuation, in dB/km.

rband: str

Frequency band according to the wavelength of the radar. The string has to be one of ‘S’, ‘C’ or ‘X’. The default is ‘C’.

temp: float

Temperature, in \(^{\circ}C\), used to derive the coefficients a, b according to [1]_. The default is 20.

a, bfloats

Override the computed coefficients of the \(R(A_{DP})\) relationship. The default are None.

mlyrMeltingLayer Class, optional

Melting layer class containing the top of the melting layer, (i.e., the melting level) and its thickness. Only gates below the melting layer bottom (i.e. the rain region below the melting layer) are included in the computation; ml_top and ml_thickness can be either a single value (float, int), or an array (or list) of values corresponding to each azimuth angle of the scan. If None, the rainfall estimator is applied to the whole PPI scan.

beam_heightarray, optional

Height of the centre of the radar beam, in km.

Returns#

Rdict

Computed rain rates, in mm/h.

Math#

[Eq.1]
\[R = aA_{DP}^b\]

where R in mm/h, ADP in dB/km

Notes#

Standard values according to [1]_.

References#

ah_to_r(ah, rband='C', temp=20.0, a=None, b=None, mlyr=None, beam_height=None)[source]#

Compute rain rates using the \(R(A_{H})\) estimator [Eq.1].

Parameters#

ahfloat or array

Floats that corresponds to the specific attenuation, in dB/km.

rband: str

Frequency band according to the wavelength of the radar. The string has to be one of ‘S’, ‘C’ or ‘X’. The default is ‘C’.

temp: float

Temperature, in \(^{\circ}C\), used to derive the coefficients a, b according to [1]_. The default is 20.

a, bfloats

Override the computed coefficients of the \(R(A_{H})\) relationship. The default are None.

mlyrMeltingLayer Class, optional

Melting layer class containing the top of the melting layer, (i.e., the melting level) and its thickness. Only gates below the melting layer bottom (i.e. the rain region below the melting layer) are included in the computation; ml_top and ml_thickness can be either a single value (float, int), or an array (or list) of values corresponding to each azimuth angle of the scan. If None, the rainfall estimator is applied to the whole PPI scan.

beam_heightarray, optional

Height of the centre of the radar beam, in km.

Returns#

Rdict

Computed rain rates, in mm/h.

Math#

[Eq.1]
\[R = aA_H^b\]

where R in mm/h, AH in dB/km

Notes#

Standard values according to [1]_.

References#

kdp_to_r(kdp, a=24.68, b=0.81, beam_height=None, mlyr=None)[source]#

Compute rain rates using the \(R(K_{DP})\) estimator [Eq.1].

Parameters#

kdpfloat or array

Floats that corresponds to specific differential phase, in deg/km.

a, bfloats

Parameters of the \(R(K_{DP})\) relationship

beam_heightarray, optional

Height of the centre of the radar beam, in km.

mlyrMeltingLayer Class, optional

Melting layer class containing the top of the melting layer, (i.e., the melting level) and its thickness. Only gates below the melting layer bottom (i.e. the rain region below the melting layer) are included in the computation; ml_top and ml_thickness can be either a single value (float, int), or an array (or list) of values corresponding to each azimuth angle of the scan. If None, the rainfall estimator is applied to the whole PPI scan.

Returns#

Rdict

Computed rain rates, in mm/h.

Math#

[Eq.1]
\[R(K_{DP}) = aK_{DP}^b\]

where R in mm/h and \(K_{DP}\) in deg/km.

Notes#

Standard values according to [1]_.

References#

kdp_zdr_to_r(kdp, zdr, a=37.9, b=0.89, c=-0.72, beam_height=None, mlyr=None)[source]#

Compute rain rates using the \(R(K_{DP}, Z_{dr})\) estimator [Eq.1].

Parameters#

kdpfloat or array

Floats that corresponds to specific differential phase, in deg/km.

zdrfloat or array

Floats that corresponds to differential reflectivity, in dB.

a, b, cfloats

Parameters of the \(R(K_{DP}, Z_{dr})\) relationship

beam_heightarray, optional

Height of the centre of the radar beam, in km.

mlyrMeltingLayer Class, optional

Melting layer class containing the top of the melting layer, (i.e., the melting level) and its thickness. Only gates below the melting layer bottom (i.e. the rain region below the melting layer) are included in the computation; ml_top and ml_thickness can be either a single value (float, int), or an array (or list) of values corresponding to each azimuth angle of the scan. If None, the rainfall estimator is applied to the whole PPI scan.

Returns#

Rdict

Computed rain rates, in mm/h.

Math#

[Eq.1]
\[R = aK_{DP}^b Z_{dr}^c\]

where R in mm/h, \(K_{DP}\) in deg/km, \(Z_{dr} = 10^{0.1*Z_{DR}}\) and \(Z_{DR}\) in dB.

Notes#

Standard values according to [1]_

References#

z_to_r(zh, a=200, b=1.6, beam_height=None, mlyr=None)[source]#

Compute rain rates using the \(R(Z_h)\) estimator [Eq.1].

Parameters#

zhfloat or array

Floats that corresponds to reflectivity, in dBZ.

a, bfloat

Parameters of the \(R(Z_h)\) relationship.

beam_heightarray, optional

Height of the centre of the radar beam, in km, corresponding to each azimuth angle of the scan.

mlyrMeltingLayer Class, optional

Melting layer class containing the top of the melting layer, (i.e., the melting level) and its thickness. Only gates below the melting layer bottom (i.e. the rain region below the melting layer) are included in the computation; ml_top and ml_thickness can be either a single value (float, int), or an array (or list) of values corresponding to each azimuth angle of the scan. If None, the rainfall estimator is applied to the whole PPI scan.

Returns#

r_zdict

Computed rain rates, in mm/h.

Math#

[Eq.1]
\[Z_h = aR^b\]

where R in mm/h, \(Z_h = 10^{0.1*Z_H}\), \(Z_h\) in \(mm^6 \cdot m^{-3}\)

Notes#

Standard values according to [1]_.

References#

z_zdr_to_r(zh, zdr, a=0.0058, b=0.91, c=-2.09, beam_height=None, mlyr=None)[source]#

Compute rain rates using the \(R(Z_h, Z_{dr})\) estimator [Eq.1].

Parameters#

zhfloat or array

Floats that corresponds to reflectivity, in dBZ.

zdrfloat or array

Floats that corresponds to differential reflectivity, in dB.

a, b, cfloats

Parameters of the \(R(Z_h, Z_{dr})\) relationship.

beam_heightarray, optional

Height of the centre of the radar beam, in km.

mlyrMeltingLayer Class, optional

Melting layer class containing the top of the melting layer, (i.e., the melting level) and its thickness. Only gates below the melting layer bottom (i.e. the rain region below the melting layer) are included in the computation; ml_top and ml_thickness can be either a single value (float, int), or an array (or list) of values corresponding to each azimuth angle of the scan. If None, the rainfall estimator is applied to the whole PPI scan.

Returns#

r_z_zdrdict

Computed rain rates, in mm/h.

Math#

[Eq.1]
\[R(Z_h, Z_{dr}) = aZ_h^b Z_{dr}^c\]

where R in mm/h, \(Z_h = 10^{0.1*Z_H}\), \(Z_H\) in dBZ, \(Z_h\) in \(mm^6 m^{-3}\), \(Z_{dr} = 10^{0.1*Z_{DR}}\) and \(Z_{DR}\) in dB.

Notes#

Standard values according to [1]_.

References#

z_ah_to_r(zh, ah, rz_a=200, rz_b=1.6, rah_a=None, rah_b=None, rband='C', temp=20.0, z_thld=40, beam_height=None, mlyr=None)[source]#

Compute rain rates using an hybrid estimator that combines \(R(Z_h)\) [Eq.1] and \(R(A_H)\) [Eq.2] for a given threshold in \(Z_H\).

Parameters#

zhfloat or array

Floats that corresponds to reflectivity, in dBZ.

ahfloat or array

Floats that corresponds to specific attenuation, in dB/km.

rz_a, rz_bfloat

Parameters of the \(R(Z_h)\) relationship.

rah_a, rah_bfloats

Override the computed coefficients of the \(R(A_{H})\) relationship. The default are None.

rband: str

Frequency band according to the wavelength of the radar. The string has to be one of ‘S’, ‘C’ or ‘X’. The default is ‘C’.

temp: float

Temperature, in \(^{\circ}C\), used to derive the coefficients rah_a, rah_b according to [1]_. The default is 20.

z_thldfloat, optional

\(Z_H\) threshold used for the transition to \(R(A_{H})\). The default is 40 dBZ.

beam_heightarray, optional

Height of the centre of the radar beam, in km.

mlyrMeltingLayer Class, optional

Melting layer class containing the top of the melting layer, (i.e., the melting level) and its thickness. Only gates below the melting layer bottom (i.e. the rain region below the melting layer) are included in the computation; ml_top and ml_thickness can be either a single value (float, int), or an array (or list) of values corresponding to each azimuth angle of the scan. If None, the rainfall estimator is applied to the whole PPI scan.

Returns#

Rdict

Computed rain rates, in mm/h.

Math#

[Eq.1]
\[Z_H < 40 dBZ \rightarrow Z_h = aR^b\]
[Eq.2]
\[Z_H \geq 40 dBZ \rightarrow R = aA_{H}^b\]

where R in mm/h, \(Z_h = 10^{0.1*Z_H}\), \(Z_h\) in \(mm^6 \cdot m^{-3}\), \(A_H\) in dB/km

Notes#

Standard values according to [1]_ and [2]_.

References#

z_kdp_to_r(zh, kdp, rz_a=200, rz_b=1.6, rkdp_a=24.68, rkdp_b=0.81, z_thld=40, beam_height=None, mlyr=None)[source]#

Compute rain rates using an hybrid estimator that combines \(R(Z_h)\) [Eq.1] and \(R(K_{DP})\) [Eq.2] for a given threshold in \(Z_H\).

Parameters#

zhfloat or array

Floats that corresponds to reflectivity, in dBZ.

kdpfloat or array

Floats that corresponds to specific differential phase, in deg/km.

rz_a, rz_abfloat

Parameters of the \(R(Z_h)\) relationship.

rkdp_a, rkdp_bfloats

Parameters of the \(R(K_{DP})\) relationship.

z_thldfloat, optional

\(Z_H\) threshold used for the transition to \(R(K_{DP})\). The default is 40 dBZ.

beam_heightarray, optional

Height of the centre of the radar beam, in km.

mlyrMeltingLayer Class, optional

Melting layer class containing the top of the melting layer, (i.e., the melting level) and its thickness. Only gates below the melting layer bottom (i.e. the rain region below the melting layer) are included in the computation; ml_top and ml_thickness can be either a single value (float, int), or an array (or list) of values corresponding to each azimuth angle of the scan. If None, the rainfall estimator is applied to the whole PPI scan.

Returns#

Rdict

Computed rain rates, in mm/h.

Math#

[Eq.1]
\[Z_H < 40 dBZ \rightarrow Z_h = aR^b\]
[Eq.2]
\[Z_H \geq 40 dBZ \rightarrow R = aK_{DP}^b\]

where R in mm/h, \(Z_h = 10^{0.1*Z_H}\), \(Z_h\) in \(mm^6 \cdot m^{-3}\), \(K_{DP}\) in deg/km

Notes#

Standard values according to [1]_ and [2]_.

References#

ah_kdp_to_r(zh, ah, kdp, rah_a=None, rah_b=None, rkdp_a=24.68, rkdp_b=0.81, rband='C', temp=20.0, z_thld=40, beam_height=None, mlyr=None)[source]#

Compute rain rates using an hybrid estimator that combines \(R(A_H)\) [Eq.1] and \(R(K_{DP})\) [Eq.2] for a given threshold in \(Z_H\).

Parameters#

zhfloat or array

Floats that corresponds to reflectivity, in dBZ.

ahfloat or array

Floats that corresponds to specific attenuation, in dB/km.

kdpfloat or array

Floats that corresponds to specific differential phase, in deg/km.

rah_a, rah_bfloats

Override the computed coefficients of the \(R(A_{H})\) relationship. The default are None.

rkdp_a, rkdp_bfloats

Parameters of the \(R(K_{DP})\) relationship.

rband: str

Frequency band according to the wavelength of the radar. The string has to be one of ‘S’, ‘C’ or ‘X’. The default is ‘C’.

temp: float

Temperature, in \(^{\circ}C\), used to derive the coefficients rah_a, rah_b according to [1]_. The default is 20.

z_thldfloat, optional

\(Z_H\) threshold used for the transition from \(R(A_{H})\) to \(R(K_{DP})\). The default is 40 dBZ.

beam_heightarray, optional

Height of the centre of the radar beam, in km.

mlyrMeltingLayer Class, optional

Melting layer class containing the top of the melting layer, (i.e., the melting level) and its thickness. Only gates below the melting layer bottom (i.e. the rain region below the melting layer) are included in the computation; ml_top and ml_thickness can be either a single value (float, int), or an array (or list) of values corresponding to each azimuth angle of the scan. If None, the rainfall estimator is applied to the whole PPI scan.

Returns#

Rdict

Computed rain rates, in mm/h.

Math#

[Eq.1]
\[Z_H < 40 dBZ \rightarrow R = aA_{H}^b\]
[Eq.2]
\[Z_H \geq 40 dBZ \rightarrow R = aK_{DP}^b\]

where R in mm/h, \(Z_H\) in dBZ, \(A_H\) in dB/km, \(K_{DP}\) in deg/km

Notes#

Standard values according to [1]_ and [2]_.

References#