import copy
import warnings


def get_list_values_larger_than_ref(list_val, ref_val):
    """
    Returns list of values in list_val, which are larger than ref_val

    Parameters
    ----------
    list_val : list (of floats)
        Value list
    ref_val : float
        Reference value, which defines lower bound for search

    Returns
    -------
    list_larger : list (of floats)
        List holding all values of list_val, which are larger than or equal to
        ref_value
    """

    list_larger = copy.copy(list_val)

    for val in list_val:
        if val < ref_val:
            list_larger.remove(val)

    if list_larger == []:
        msg = 'list_larger is empty list. Thus, going to use largest values' \
              ' of original list list_val.'
        warnings.warn(msg)
        list_larger.append(max(list_val))

    return list_larger