def find_closest_raster(return_period,aoi_col='AoI_RP{}y_unique',depth_col='RP{}_max_flood_depth'):
    """
    Find the closest AoI and Flood raster column name for given return period

    Arguments:
        *return_period* (float): Return period of the flood for which to find the nearest inundation raster
        *aoi_col* (str): the format of the column name to find, default can be changed to anything in G.es.attributes
        *depth_col* (str): the format of the column name to find, default can be changed in G.es.attributes

    Returns:
        *aoi_col* (str):  e.g. 'AoI_RP10y_majority'
        *depth_col* (str) : e.g. 'RP500_max_flood_depth'

    """
    assert return_period > 0
    available_rps = [10,20,50,100,200,500]
    nearest = min(available_rps, key=lambda x:abs(x-return_period))

    #note the difference in notation: AoI: 'RP10...', flood: 'RP010...'
    aoi_col = aoi_col.format(nearest)
    if len(str(nearest)) == 2: # e.g. RP10 -> RP010
        depth_col = depth_col.format('0'+str(nearest))
    elif len(str(nearest)) == 3: # e.g. RP200 -> RP200
        depth_col = depth_col.format(nearest)
    else:
        raise ValueError('Does not know how to handle value nearest = {}, valid are e.g. 10, 500'.format(nearest))

    return aoi_col, depth_col