towerpy.ml.mlyr#

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

Classes#

MeltingLayer

A class to determine the melting layer using weather radar data.

Module Contents#

class towerpy.ml.mlyr.MeltingLayer(radobj=None)[source]#

A class to determine the melting layer using weather radar data.

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.

ml_topfloat

Top of the detected melting layer, in km.

ml_bottomfloat

Bottom of the detected melting layer, in km.

ml_thicknessfloat

Thickness of the detected melting layer, in km.

elev_angle = None[source]#
file_name = None[source]#
scandatetime = None[source]#
site_name = None[source]#
ml_source = 'user-defined'[source]#
profs_type = 'user-defined'[source]#
findpeaksboundaries(profile_h, param_k=None)[source]#

Find peaks inside a profile using signal processing.

Parameters#

profilearray

Radar profile built from high elevation scans.

pheightarray

Heights correspondig to the radar profiles, in km.

Returns#

peaks_idxdict

Index values of the peaks found within the profiles.

ml_detection(pol_profs, min_h=0.0, max_h=5.0, zhnorm_min=5.0, zhnorm_max=60.0, rhvnorm_min=0.85, rhvnorm_max=1.0, upplim_thr=0.75, param_k=0.05, param_w=0.75, comb_id=None, phidp_peak='left', gradv_peak='left', plot_method=False)[source]#

Detect melting layer signatures within polarimetric VPs/QVPs.

Parameters#

pol_profsdict

Polarimetric profiles of radar variables.

min_hfloat, optional

Minimum height of usable data within the polarimetric profiles. The default is 0.

max_hfloat, optional

Maximum height to search for the bright band peak. The default is 5.

zhnorm_minfloat, optional

Min value of \(Z_{H}\) to use for the min-max normalisation. The default is 5.

zhnorm_maxfloat, optional

Max value of \(Z_{H}\) to use for the min-max normalisation. The default is 60.

rhvnorm_minfloat, optional

Min value of \(\rho_{HV}\) to use for the min-max normalisation. The default is 0.85.

rhvnorm_maxfloat, optional

Max value of \(\rho_{HV}\) to use for the min-max normalisation. The default is 1.

phidp_peakstr, optional

Direction of the peak in \(\Phi_{DP}\) related to the ML. The method described in [1] assumes that the peak points to the left, (see Figure 3 in the paper) but this can be changed using this argument.

gradv_peakstr, optional

Direction of the peak in \(gradV\) related to the ML. The method described in [1] assumes that the peak points to the left, (see Figure 3 in the paper) but this can be changed using this argument.

param_kfloat, optional

Threshold related to the magnitude of the peak used to detect the ML. The default is 0.05.

param_wfloat, optional

Weighting factor used to sharpen the peak within the profile. The default is 0.75.

comb_idint, optional

Identifier of the combination selected for the ML detection. If None, the method provides all the possible combinations of polarimetric variables for VPs/QVPs. The default is None.

plot_methodbool, optional

Plot the ML detection method. The default is False.

Notes#

  1. Based on the methodology described in [1]

References#

ml_ppidelimitation(rad_georef, rad_params, beam_cone='centre', classid=None, plot_method=False)[source]#

Create a PPI depicting the limits of the melting layer.

Parameters#

rad_georefdict

Georeferenced data containing descriptors of the azimuth, gates and beam height, amongst others.

rad_paramsdict

Radar technical details.

beam_cone{‘centre’, ‘top’, ‘bottom’, ‘all’}, optional

Beam‑height descriptor to use for ML gating. ‘centre’ uses beam_height [km] (default), ‘top’ uses beamtop_height [km], ‘bottom’ uses beambottom_height [km], ‘all’ returns results for all three.

classiddict, optional

Modifies the key/values of the melting layer delimitation (regionID). The default are the same as in regionID.

plot_methodbool, optional

Plot the results of the ML delimitation. The default is False.

Attributes#

regionIDdict
Key/values of the rain limits:

‘rain’ = 1

‘mlyr’ = 2

‘solid_pcp’ = 3