function time_index = UR_time_index(day,hour,minute)
% UR_time_index - create index for given date and time
% On input:
%     day (date data structure): date from Matlab 'date' function
%     hour (float): 4th element from Matlab 'clock' function
%     minute (float): 5th element from Matlab 'clock' function
% On output:
%     time_index (int): unique index for date
% Call:
%     t_ind = UR_time_index(date,c(4),c(5));
% Author:
%     T. Henderson
%     UU
%     Summer 2019
%

DAY_0 = daysact('1-jan-2019');  % 737426

day_index = daysact(day) - DAY_0;
minute_index = 60*hour + minute;
time_index = day_index*24*60 + minute_index;
time_index = round(time_index);
