def _find_left_index(gridpoints, s):
    """Find the least lowest entry that is larger or equal.

    Parameters
    ----------
    gridpoints:
        Array of path positions.
    s:
        A path position.

    Returns
    -------
    out:
        The desired index.

    """
    for i in range(1, len(gridpoints)):
        if gridpoints[i - 1] <= s < gridpoints[i]:
            return i - 1
    return len(gridpoints) - 2
