pyrad.proc.process_hydroclass#
- pyrad.proc.process_hydroclass(procstatus, dscfg, radar_list=None)[source]#
Classifies precipitation echoes
- Parameters:
procstatus (int) – Processing status: 0 initializing, 1 processing volume, 2 post-processing
dscfg (dictionary of dictionaries) –
data set configuration. Accepted Configuration Keywords:
datatype : list of string. Dataset keyword The input data types, must contain "dBZ" or "dBZc", and, "ZDR" or "ZDRc", and, "RhoHV", or "uRhoHV", or "RhoHVc", and, "KDP", or "KDPc", and, "TEMP" or "H_ISO0" (optional) HYDRO_METHOD : string. Dataset keyword The hydrometeor classification method. One of the following: SEMISUPERVISED, UKMO centroids_file : string or None. Dataset keyword Used with HYDRO_METHOD SEMISUPERVISED. The name of the .csv file that stores the centroids. The path is given by [configpath]/centroids_hydroclass/ If None is provided default centroids are going to be used compute_entropy : bool. Dataset keyword Used with HYDRO_METHOD SEMISUPERVISED. If true the entropy is computed and the field hydroclass_entropy is output output_distances : bool. Dataset keyword Used with HYDRO_METHOD SEMISUPERVISED. If true the de-mixing algorithm based on the distances to the centroids is computed and the field proportions of each hydrometeor in the radar range gate is output vectorize : bool. Dataset keyword Used with HYDRO_METHOD SEMISUPERVISED. If true a vectorized version of the algorithm is used weights : array of floats. Dataset keyword Used with HYDRO_METHOD SEMISUPERVISED. The list of weights given to each variable hydropath : string. Dataset keyword Used with HYDRO_METHOD UKMO. Directory of the UK MetOffice hydrometeor classification code mf_dir : string. Dataset keyword Used with HYDRO_METHOD UKMO. Directory where the UK MetOffice hydrometeor classification membership functions are stored ml_depth: float. Dataset keyword Used with HYDRO_METHOD UKMO. Depth of the melting layer [km]. Default 500. perturb_ml_depth: float. Dataset keyword Used with HYDRO_METHOD UKMO. if specified, the depth of the melting layer can be varied by +/- this value [km], allowing a less-rigidly defined melting layer. Default 0. fzl: float or None. Dataset keyword If desired, a single freezing level height can be specified for the entire PPI domain. This will be used only if no temperature field is available. sounding : str. Dataset keyword The nearest radiosounding WMO code (5 int digits). It will be used to compute the freezing level, if no temperature field name is specified, if the temperature field is not in the radar object or if no fzl is explicitely defined. use_dualpol: Bool. Dataset keyword Used with HYDRO_METHOD UKMO. If false no radar data is used and the classification is performed using temperature information only. Default True use_temperature: Bool. Dataset keyword Used with HYDRO_METHOD UKMO. If false no temperature information is used and the classification is performed using radar data only. Default True use_interpolation: Bool. Dataset keyword Used with HYDRO_METHOD UKMO. If True gaps in the classification are filled using a nearest-neighbour interpolation. Default False map_to_semisupervised: Bool. Dataset keyword Used with HYDRO_METHOD UKMO. If True the output is map to the same categories as the semi-supervised classification. Default True append_all_fields: Bool. Dataset keyword Used with HYDRO_METHOD UKMO. If True auxiliary fields such as confidence and probability for each class are going to be added to the output
radar_list (list of Radar objects) – Optional. list of radar objects
- Returns:
new_dataset (dict) – dictionary containing the output fields “hydro”, “entropy” (if compute_entropy is 1), and “propAG”, “propCR”, “propLR”, “propRP”, “propRN”, “propVI”, “propWS”, “propMH”, “propIH” (if output_distances is 1)
ind_rad (int) – radar index