swirlspy.utils package


class swirlspy.utils.FrameType(value)

Bases: enum.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.

  • 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.


Locate the CUDA driver on the system


  • True (nvidia driver found in the system)

  • False (nvidia driver not found in the system)

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

Fill the missing attribute of data frames.


frames (xarray.DataArray) – Data frames data.

Other Parameters
  • 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.