kkpy.cm

Colormaps for my research

wind

kkpy.cm.refl([levels, snow])

KNU reflectivity colors.

kkpy.cm.doppler([levels])

KNU Doppler velocity colors.

kkpy.cm.zdr([levels])

KNU differential reflectivity colors.

kkpy.cm.kdp([levels])

KNU specific differential phase colors.

kkpy.cm.rhohv([levels])

KNU cross correlation coefficient colors.

kkpy.cm.precip([levels, coarse_ticks])

KNU Precipitation colors.

kkpy.cm.precip_kma([levels, coarse_ticks])

KMA Radar Precipitation colors.

kkpy.cm.precip_kma_aws([levels, coarse_ticks])

KMA AWS Precipitation colors.

kkpy.cm.wind([levels])

Wind direction colors (cyclic).

kkpy.cm.refl(levels=None, snow=False)[source]

KNU reflectivity colors.

Examples

>>> cmap = kkpy.cm.refl()
>>> pm = ax.pcolormesh(lon2d, lat2d, ref2d.T, cmap=cmap['cmap'], norm=cmap['norm'])
>>> plt.colorbar(pm, ticks=cmap['ticks'])
Parameters
  • levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.

  • snow (boolean, optional) – Return broader tick levels suitable for snow. Default is False.

Returns

dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar

Return type

dictionary

kkpy.cm.doppler(levels=None)[source]

KNU Doppler velocity colors.

Examples

>>> cmap = kkpy.cm.doppler()
>>> pm = ax.pcolormesh(lon2d, lat2d, VD2d.T, cmap=cmap['cmap'], norm=cmap['norm'])
>>> plt.colorbar(pm, ticks=cmap['ticks'])
Parameters

levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.

Returns

dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar

Return type

dictionary

kkpy.cm.zdr(levels=None)[source]

KNU differential reflectivity colors.

Examples

>>> cmap = kkpy.cm.zdr()
>>> pm = ax.pcolormesh(lon2d, lat2d, zdr2d.T, cmap=cmap['cmap'], norm=cmap['norm'])
>>> plt.colorbar(pm, ticks=cmap['ticks'])
Parameters

levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.

Returns

dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar

Return type

dictionary

kkpy.cm.kdp(levels=None)[source]

KNU specific differential phase colors.

Examples

>>> cmap = kkpy.cm.kdp()
>>> pm = ax.pcolormesh(lon2d, lat2d, kdp2d.T, cmap=cmap['cmap'], norm=cmap['norm'])
>>> plt.colorbar(pm, ticks=cmap['ticks'])
Parameters

levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.

Returns

dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar

Return type

dictionary

kkpy.cm.rhohv(levels=None)[source]

KNU cross correlation coefficient colors.

Examples

>>> cmap = kkpy.cm.rhohv()
>>> pm = ax.pcolormesh(lon2d, lat2d, rhohv2d.T, cmap=cmap['cmap'], norm=cmap['norm'])
>>> plt.colorbar(pm, ticks=cmap['ticks'])
Parameters

levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.

Returns

dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar

Return type

dictionary

kkpy.cm.precip(levels=None, coarse_ticks=False)[source]

KNU Precipitation colors.

Examples

>>> cmap = kkpy.cm.precip()
>>> pm = ax.pcolormesh(lon2d, lat2d, prec2d.T, cmap=cmap['cmap'], norm=cmap['norm'])
>>> plt.colorbar(pm, ticks=cmap['ticks'])
Parameters
  • levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.

  • coarse_ticks (boolean, optional) – True if colorbar levels are too dense.

Returns

dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar

Return type

dictionary

kkpy.cm.precip_kma(levels=None, coarse_ticks=False)[source]

KMA Radar Precipitation colors.

Examples

>>> cmap = kkpy.cm.precip_kma()
>>> pm = ax.pcolormesh(lon2d, lat2d, prec2d.T, cmap=cmap['cmap'], norm=cmap['norm'])
>>> plt.colorbar(pm, ticks=cmap['ticks'])
Parameters
  • levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.

  • coarse_ticks (boolean, optional) – True if colorbar levels are too dense.

Returns

dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar

Return type

dictionary

kkpy.cm.precip_kma_aws(levels=None, coarse_ticks=False)[source]

KMA AWS Precipitation colors.

Examples

>>> cmap = kkpy.cm.precip_kma_aws()
>>> pm = ax.pcolormesh(lon2d, lat2d, prec2d.T, cmap=cmap['cmap'], norm=cmap['norm'])
>>> plt.colorbar(pm, ticks=cmap['ticks'])
Parameters
  • levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.

  • coarse_ticks (boolean, optional) – True if colorbar levels are too dense.

Returns

dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar

Return type

dictionary

kkpy.cm.wind(levels=None)[source]

Wind direction colors (cyclic).

Examples

>>> cmap = kkpy.cm.wind()
>>> pm = ax.pcolormesh(lon2d, lat2d, winddir.T, cmap=cmap['cmap'], norm=cmap['norm'])
>>> cb = plt.colorbar(pm, ticks=cmap['ticks'])
>>> cb.set_ticklabels(['N', 'E', 'S', 'W', 'N'])
Parameters

levels (array_like, optional) – Array containing user-defined color tick levels. It should have lower and upper bounds.

Returns

dict_cmap – ‘cmap’: matplotlib colormap ‘norm’: color tick levels for plot ‘ticks’: color tick levels for colorbar

Return type

dictionary