function analyze_this(info, dirs)

t       = [1 2 4 8];
d       = xb_read_dims;
[mn i]  = closest(1+t*3600, d.t);

% read measurements
m       = struct();
f       = dir(fullfile(dirs.data, '*.asc'));
for j = 1:length(f)
    var     = f(j).name(1:end-4);
    m.(var) = load(fullfile(dirs.data, f(j).name));
end

m.VOL(:,2) = -m.VOL(:,2);

% read output
xbo1    = xb_read_output(pwd, 'vars', {'zb'}, 'index', i-1);
xbo2    = xb_read_output(pwd, 'vars', {'zb_mean' 'zs_mean' 'H_mean' 'u_mean' 'hh_var'});
xbo3    = xb_read_output(pwd, 'vars', {'zb'});

% analyze output
xbw     = xb_get_hydro(xbo2, 'Trep', 5);
xbb     = xb_get_morpho(xbo3, 'level', 4.6);

% plot output
xb_plot_profile(xbo1, ...
    'measured', m.bot2e(:,[1 1+[2 3 5 9]])      );

set(gca,'XLim',[100 200]);

xb_write_plot(gcf, dirs.output, 'profiles');

xb_plot_hydro(xbw, ...
    'zs',       m.ETA,      ...
    'Hrms_lf',  m.HRMS_L_O, ...
    'Hrms_hf',  m.HRMS_H_I, ...
    'urms_lf',  m.URMS_L_O, ...
    'urms_t',   m.URMS                          );

set(gca,'XLim',[0 190]);

xb_write_plot(gcf, dirs.output, 'hydro');

xb_plot_morpho(xbb, ...
    'dz',       m.SEDERO,   ...
    'ero',      m.VOL,      ...
    'R',        m.R                             );

set(gca,'XLim',[0 8]);

pause(1); % this should be here because of a bug in Matlab (see service request 1-F227KF)

xb_write_plot(gcf, dirs.output, 'morpho');

% write skill table
xb_write_skilltable(                                        ...
    xs_join(xbw, xbb),                                      ...
    {m.HRMS_H_I m.HRMS_L_O m.URMS m.SEDERO m.VOL m.R},      ...
    'vars', {'Hrms_hf' 'Hrms_lf' 'urms_t' 'dz' 'ero' 'R'},  ...
    'file', fullfile(dirs.output, 'skills.tex')                 );
    
% remove all but the first and last outputs
for iv = 2:length(xbo1.data)
    if length(size(xbo1.data(iv).value)) == 3
        xbo1.data(iv).value = xbo1.data(iv).value([1 end],:,:);
    end
end

xb_plot_profile(xbo1,'measured', m.bot2e(:,[1 10]))
title(['profiles ' info.test ' ' info.run], 'interpreter', 'none')
xb_write_plot(gcf, dirs.output, 'final_profiles')