function analyze_this_t02_t04(info, dirs)

% load data
load([dirs.data '\' info.run '\' info.run '.mat'])

% interpolate all measurements to a single grid
zb_data(:,1) = interp1(xz0(:,1),xz0(:,2),xz1(:,1));
zb_data(:,2) = xz1(:,2);

% 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',[xz1(:,1) 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',[xz1(:,1) 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