def exclude_higher_botelev(pfafs, pfaf_res, seg_topo): 
    """ Exclude segments that have higher BottomElev than reservoir BotElev
    input: pfafs: list with all segments
            pfaf_res: reservoir pfaf code
            seg_topo: (geo)pandas dataframe with BotElev and PFAF per segment
    output: pfaf_belowres: list with pfafs where higher botelev are excluded. 
    """
    botelev_res = seg_topo.loc[seg_topo['PFAF']==pfaf_res,'BotElev'].values[0]
    pfaf_belowres = seg_topo.loc[seg_topo.PFAF.isin(pfafs) & (seg_topo.BotElev < botelev_res), 'PFAF']
    
    return pfaf_belowres