pysteps.utils.conversion.to_raindepth

Contents

pysteps.utils.conversion.to_raindepth#

pysteps.utils.conversion.to_raindepth(R, metadata, zr_a=None, zr_b=None)#

Convert to rain depth [mm].

Parameters:
  • R (array-like) – Array of any shape to be (back-)transformed.

  • metadata (dict) –

    Metadata dictionary containing the accutime, transform, unit, threshold and zerovalue attributes as described in the documentation of pysteps.io.importers.

    Additionally, in case of conversion to/from reflectivity units, the zr_a and zr_b attributes are also required, but only if zr_a = zr_b = None. If missing, it defaults to Marshall–Palmer relation, that is, zr_a = 200.0 and zr_b = 1.6.

  • zr_a (float, optional) – The a and b coefficients of the Z-R relationship (Z = a*R^b).

  • zr_b (float, optional) – The a and b coefficients of the Z-R relationship (Z = a*R^b).

Returns:

  • R (array-like) – Array of any shape containing the converted units.

  • metadata (dict) – The metadata with updated attributes.