swirlspy.utils package

Utilities

class swirlspy.utils.FrameType(value)

Bases: IntFlag

Data frame value type.

Z = 1

Reflectivity, Z

dBR = 10

Decibel relative to rainfall rate, dBmm/h

dBZ = 9

Decibel relative to reflectivity, dBZ

mm = 4

Accumulated rainfall depth, mm

mmph = 2

Rainfall rate, mm/h

swirlspy.utils.add_latlon_ticks(fig, ax, fontsize, frequency)

Adds ticks to projection.

Parameters
  • fig (matplotlib.Figure) – The Figure instance in which the plot is drawn.

  • ax (matplotlib.axes) – The axes on which the plot is drawn.

  • fontsize (int) – The fontsize desired.

  • frequency (float) – The degree intervals.

swirlspy.utils.locate_cuda()

Locate the CUDA driver on the system

Returns

  • True (nvidia driver found in the system)

  • False (nvidia driver not found in the system)

swirlspy.utils.standardize_attr(frames: DataArray, **kwargs) DataArray

Fill the missing attribute of data frames.

Parameters
  • frames (xarray.DataArray) – Data frames data.

  • zero_value (float or numpy.nan, optional) – the value assigned to the no rain pixels with the same unit, transformation and accutime of the data. Default : numpy.nan

  • frame_type (swirlspy.utils.FrameType, optional) – the value indicated frames’ value type.

Subpackages