def _get_default_settings(settings):
    """adds the default settings to a dictinary with settings. If settings
    is None all the settings are default. If there are already settings given
    only the non-existing settings are added with their default value.

    The default settings are:
    fill_missing_obs = True
        nan values in time series are filled with nearby time series.
    interval = 'daily'
        desired time interval for observations. Can be 'daily' or 'hourly'.
        'hourly' is only for precipitation ('RH') data from meteo stations.
    inseason = False
        flag to obtain inseason data. Not implemented very well yet.
    use_precipitation_stn = True
        Both meteostations and precipitation stations are used to obtain
        precipitation data.
    use_api : bool, optional
        if True the api is used to obtain the data, API documentation is here:
            https://www.knmi.nl/kennis-en-datacentrum/achtergrond/data-ophalen-vanuit-een-script
        if False a text file is downloaded into a temporary folder and the data is read from there.
        Default is True since the api is back online (July 2021).
    raise_exceptions : bool, optional
        if True you get errors when no data is returned. The default is False.

    Parameters
    ----------
    settings : dict or None
        settings dictionary without default values.

    Returns
    -------
    settings : dict
        settings dictionary with default values of no values was given in
        the input dictionary.
    """

    default_settings = {'fill_missing_obs': True,
                        'interval': 'daily',
                        'inseason': False,
                        'use_api': True,
                        'raise_exceptions': True,
                        'use_precipitation_stn': True,
                        'normalize_index': True}

    if settings is None:
        settings = {}

    for key, value in default_settings.items():
        if key not in settings.keys():
            settings[key] = value

    return settings