def nearest_tval(cube, dt):
    """
    Find the value nearest to the given `dt` (`datetime.datetime` obj)
    among points of time coordinate of a given cube
    """
    timevar = cube.coord('time')
    itime = timevar.nearest_neighbour_index(timevar.units.date2num(dt))
    return timevar.units.num2date(timevar.points[itime])