def get_acc_block_for_time(time_first_sample,list_acc_frontiers):
    """
    Get accumulation block id.
    
    Parameters
    ----------
     time_first_sample : float
         [s].
     list_acc_frontiers : list of floats
         generated with get_list_acc_frontiers().
    
    Returns
    -------
     index_front
         accumulation block id.
     i
         list_acc_frontiers[index_front].
    """
    i=-1
    index_front=-2
    beyond_last=1
    for i in list_acc_frontiers:
        index_front+=1
        if time_first_sample<i:
            #if list_acc_frontiers[index_front]==list_acc_frontiers[-1]:
            #    beyond_last=1
            beyond_last=0
            break
    if beyond_last:
        index_front=-1
        i=-1
    elif index_front<0:
        i=index_front
    else:
        i=list_acc_frontiers[index_front]
    
    if i==list_acc_frontiers[-1]:
        i=-1
    
    return([index_front,i])