def nrfa_to_db(session, method='create', autocommit=False, incl_pot=True):
    """
    Retrieves all gauged catchments (incl. catchment descriptors and annual maximum flow data) from the National River
    Flow Archive and saves it to a (sqlite) database.

    :param session: database session to use, typically `floodestimation.db.Session()`
    :type session: :class:`sqlalchemy.orm.session.Session`
    :param method: - ``create``: only new catchments will be loaded, it must not already exist in the database.
                   - ``update``: any existing catchment in the database will be updated. Otherwise it will be created.
    :type method: str
    :param autocommit: Whether to commit the database session immediately. Default: ``False``.
    :type autocommit: bool
    :param incl_pot: Whether to load the POT (peaks-over-threshold) data. Default: ``True``.
    :type incl_pot: bool
    """

    fehdata.clear_cache()
    fehdata.download_data()
    fehdata.unzip_data()
    folder_to_db(fehdata.CACHE_FOLDER, session, method=method, autocommit=autocommit, incl_pot=incl_pot)
def nrfa_to_db ( session , method = 'create' , autocommit = False , incl_pot = True ) : fehdata . clear_cache ( ) fehdata . download_data ( ) fehdata . unzip_data ( ) folder_to_db ( fehdata . CACHE_FOLDER , session , method = method , autocommit = autocommit , incl_pot = incl_pot )
Retrieves all gauged catchments (incl. catchment descriptors and annual maximum flow data) from the National River
    Flow Archive and saves it to a (sqlite) database.

    :param session: database session to use, typically `floodestimation.db.Session()`
    :type session: :class:`sqlalchemy.orm.session.Session`
    :param method: - ``create``: only new catchments will be loaded, it must not already exist in the database.
                   - ``update``: any existing catchment in the database will be updated. Otherwise it will be created.
    :type method: str
    :param autocommit: Whether to commit the database session immediately. Default: ``False``.
    :type autocommit: bool
    :param incl_pot: Whether to load the POT (peaks-over-threshold) data. Default: ``True``.
    :type incl_pot: bool