def close_forecast_files(exporter):
    """
    Close the files associated with a forecast exporter.

    Finish writing forecasts and close the output files opened by a forecast
    exporter.

    Parameters
    ----------
    exporter: dict
        An exporter object created with any initialization method implemented
        in :py:mod:`pysteps.io.exporters`.
    """

    if exporter["method"] == "geotiff":
        pass  # NOTE: There is no explicit "close" method in GDAL.
        # The files are closed when all objects referencing to the GDAL
        # datasets are deleted (i.e. when the exporter object is deleted).
    if exporter["method"] == "kineros":
        pass  # no need to close the file
    else:
        exporter["ncfile"].close()
Close the files associated with a forecast exporter.

Finish writing forecasts and close the output files opened by a forecast
exporter.

Parameters
----------
exporter: dict
An exporter object created with any initialization method implemented
in :py:mod:`pysteps.io.exporters`.
pysteps/io/exporters.py