def time_interpolation(array0, array1, date0, date, date1):
    """
    Time interpolation at date 'date' of two arrays with dates 
    'date0' (before') and 'date1' (after).
    Returns the interpolated array.
    """
    w = (date-date0)/(date1-date0) #Weights
    array = (1 - w )  * array0 + w * array1
    return array