pyrad.prod.generate_centroids_products#

pyrad.prod.generate_centroids_products(dataset, prdcfg)[source]#
Generates centroids products. Accepted product types:
‘HISTOGRAM’: Plots the histogram of one of the variables used for

centroids computation. User defined parameters:

voltypestr

The name of the variable to plot. Can be dBZ, ZDR, KDP, RhoHV, H_ISO0 and its standardized form (e.g. dBZ_std)

write_dataBool

If true writes the histogram in a .csv file. Default True

stepfloat

bin size. Default 0.1

‘HISTOGRAM2D’: Plots the 2D- histogram of two of the variables used

for centroids computation. User defined parameters:

voltype_x, voltype_ystr

The name of the variables to plot. Can be dBZ, ZDR, KDP, RhoHV, H_ISO0 and its standardized form (e.g. dBZ_std)

step_x, step_yfloat

bin size. Default 0.1

‘HISTOGRAM_LABELED’: Plots the histogram of one of the variables used

for centroids computation. Only plots labeled data. User defined parameters:

voltypestr

The name of the variable to plot. Can be dBZ, ZDR, KDP, RhoHV, H_ISO0 and its standardized form (e.g. dBZ_std)

write_dataBool

If true writes the histogram in a .csv file. Default True

stepfloat

bin size. Default 0.1

‘HISTOGRAM_CENTROIDS’: Plots the histogram of one of the variables

used for centroids computation corresponding to a particular hydrometeor type, the intermediate centroids and the final centroid User defined parameters:

voltypestr

The name of the variable to plot. Can be dBZ, ZDR, KDP, RhoHV, H_ISO0 and its standardized form (e.g. dBZ_std)

hydro_typestr

The name of the hydrometeor type.

write_dataBool

If true writes the histogram in a .csv file. Default True

stepfloat

bin size. Default 0.1

‘HISTOGRAM2D_CENTROIDS’: Plots the 2D- histogram of two of the

variables used for centroids computatio ncorresponding to a particular hydrometeor type, the intermediate centroids and the final centroid User defined parameters:

voltype_x, voltype_ystr

The name of the variables to plot. Can be dBZ, ZDR, KDP, RhoHV, H_ISO0 and its standardized form (e.g. dBZ_std)

hydro_typestr

The name of the hydrometeor type.

step_x, step_yfloat

bin size. Default 0.1

‘WRITE_CENTROIDS’: Writes the final centroids in a .csv file. ‘SAVE_DATA’: Saves the data used to compute the centroids in an .npz

file

‘SAVE_LABELED_DATA’: Saves the labeled data, the intermediate

centroids and the final centroids in an .npz file

Parameters:
  • dataset (dict) – dictionary containing the radar object and a keyword stating the status of the processing

  • prdcfg (dictionary of dictionaries) – product configuration dictionary of dictionaries

Returns:

filename (str) – the name of the file created. None otherwise