function analyze_this(info, dirs)

% initialize variables
x_data 	= struct([]);
zb_data = struct([]);

% obtain required output times (dependant on measurement times)
bathy_files = dir(fullfile([dirs.data '\' info.run '\' '*.tek']));

for il = 1:length(bathy_files)
    bathy = readTekalFile([dirs.data '\' info.run '\' bathy_files(il).name]);
    
    x_data{il} = bathy.data(:,1);
    zb_data{il} = bathy.data(:,2);
end


% interpolate all measurements to a single grid
for in = 1:length(zb_data)
    zb_data{in} = interp1(x_data{in},zb_data{in},x_data{end});
end

% read input
xbi     = xb_read_input(pwd);
ne_layer = xs_get(xbi, 'ne_layer.ne_layer');
ne_layer(ne_layer>10) = NaN;
ne  = [xs_get(xbi, 'xfile.xfile')',xs_get(xbi, 'depfile.depfile')'-ne_layer'];
ne  = ne(~isnan(ne(:,2)),:);

% read output
xbo = xb_read_output(pwd,'vars',{'globalx', 'globaly', 'globaltime', 'zs', 'zb', 'H'});

xb_plot_profile(xbo,'measured',[x_data{end} zb_data{:}], 'nonerodible', ne)
title(['profiles ' info.test ' ' info.run])
xb_write_plot(gcf, dirs.output, 'profiles')

% remove all but the first and last outputs
for iv = 2:length(xbo.data)
    if length(size(xbo.data(iv).value)) == 3
        xbo.data(iv).value = xbo.data(iv).value([1 end],:,:);
    end
end

xb_plot_profile(xbo,'measured',[x_data{end} zb_data{end}], 'nonerodible', ne)
title(['profiles ' info.test ' ' info.run], 'interpreter', 'none')
xb_write_plot(gcf, dirs.output, 'final_profiles')

clear bathy x_data zb_data
end     %end of function