def import_fmi_geotiff(filename, **kwargs):
    """
    Import a reflectivity field (dBZ) from an FMI GeoTIFF file.

    Parameters
    ----------
    filename: str
        Name of the file to import.

    {extra_kwargs_doc}

    Returns
    -------
    out: tuple
        A three-element tuple containing the precipitation field,
        the associated quality field and metadata.
        The quality field is currently set to None.
    """
    if not GDAL_IMPORTED:
        raise MissingOptionalDependency(
            "gdal package is required to import "
            "FMI's radar reflectivity composite in GeoTIFF format "
            "but it is not installed"
        )

    f = gdal.Open(filename, gdalconst.GA_ReadOnly)

    rb = f.GetRasterBand(1)
    precip = rb.ReadAsArray().astype(float)
    mask = precip == 255
    precip = (precip - 64.0) / 2.0
    precip[mask] = np.nan

    sr = osr.SpatialReference()
    pr = f.GetProjection()
    sr.ImportFromWkt(pr)

    projdef = sr.ExportToProj4()

    gt = f.GetGeoTransform()

    metadata = {}

    metadata["projection"] = projdef
    metadata["x1"] = gt[0]
    metadata["y1"] = gt[3] + gt[5] * f.RasterYSize
    metadata["x2"] = metadata["x1"] + gt[1] * f.RasterXSize
    metadata["y2"] = gt[3]
    metadata["xpixelsize"] = abs(gt[1])
    metadata["ypixelsize"] = abs(gt[5])
    if gt[5] < 0:
        metadata["yorigin"] = "upper"
    else:
        metadata["yorigin"] = "lower"
    metadata["institution"] = "Finnish Meteorological Institute"
    metadata["unit"] = "dBZ"
    metadata["transform"] = "dB"
    metadata["accutime"] = 5.0
    metadata["threshold"] = _get_threshold_value(precip)
    metadata["zerovalue"] = np.nanmin(precip)
    metadata["cartesian_unit"] = "m"
    metadata["zr_a"] = 223.0
    metadata["zr_b"] = 1.53

    return precip, None, metadata
Import a reflectivity field (dBZ) from an FMI GeoTIFF file.

Parameters
----------
filename: str
Name of the file to import.

{extra_kwargs_doc}

Returns
-------
out: tuple
A three-element tuple containing the precipitation field,
the associated quality field and metadata.
The quality field is currently set to None.
pysteps/io/importers.py