pysteps.visualization.precipfields.get_colormap#
- pysteps.visualization.precipfields.get_colormap(ptype, units='mm/h', colorscale='pysteps')#
Function to generate a colormap (cmap) and norm.
- Parameters:
ptype ({'intensity', 'depth', 'prob'}, optional) – Type of the map to plot: ‘intensity’ = precipitation intensity field, ‘depth’ = precipitation depth (accumulation) field, ‘prob’ = exceedance probability field.
units ({'mm/h', 'mm', 'dBZ'}, optional) – Units of the input array. If ptype is ‘prob’, this specifies the unit of the intensity threshold.
colorscale ({'pysteps', 'STEPS-BE', 'STEPS-NL', 'BOM-RF3'}, optional) – Which colorscale to use. Applicable if units is ‘mm/h’, ‘mm’ or ‘dBZ’.
- Returns:
cmap (Colormap instance) – colormap
norm (colors.Normalize object) – Colors norm
clevs (list(float)) – List of precipitation values defining the color limits.
clevs_str (list(str)) – List of precipitation values defining the color limits (with correct number of decimals).