def get_mip_at_res(vol, resolution):
    """Find the mip that is at least a given resolution

    Args:
        vol (cloudvolume.CloudVoluem): CloudVolume object for desired precomputed volume
        resolution (int): Desired resolution in nanometers

    Returns:
        tuple: mip and resolution at that mip
    """
    tmp_mip = 0
    tmp_res = 0
    for i, scale in enumerate(vol.scales):
        if (scale["resolution"] <= resolution).all():
            tmp_mip = i
            tmp_res = scale["resolution"]
        elif i == 0:
            tmp_res = scale["resolution"]
            return tmp_mip, tmp_res

    return tmp_mip, tmp_res