function analyze_this(info, dirs)

fh = figure;

load('carriergreenspan.mat');
cg_t 	= 32*cg_t;
cg_x    = 139+40.1818*cg_x;
cg_eta  = 5+1.6073*cg_eta;
cg_v    = 3.9708*cg_v;

subplot(211); plot(cg_x',cg_eta', '-k','linewidth',2); hold on;
subplot(212); plot(cg_x(:,2:end)',cg_v(:,2:end)', '-k','linewidth',2); hold on;

% read dimensions
d       = xb_read_dims;
j       = ceil(d.globaly/2);
x       = squeeze(d.x(:,j));

% read output
xbo     = xs_peel(xb_read_output(pwd, 'vars', {'zs' 'zb' 'u'}));

% plot output
subplot(211);

% prevent still or very thin water layers to be plotted
xbo.zs(xbo.u==0)            = nan;
xbo.u(xbo.zs-xbo.zb<.01)    = nan;

plot(x,squeeze(xbo.zs(:,j,:)),'-r','LineWidth',1.5);
plot(x,squeeze(xbo.zb(:,j,:)),'-k','linewidth',1.5);

xlabel('cross-shore distance [m]');
ylabel('water level [m]');
title('Water level variation in time');
axis([50 150 4.75 5.25]);

subplot(212);

plot(x,squeeze(xbo.u(:,j,:)),'-b','LineWidth',1.5);

xlabel('cross-shore distance [m]');
ylabel('flow velocity [m/s]');
title('Water velocity variation in time');
axis([50 150 -1.25 1.25]);

xb_write_plot(fh, dirs.output, 'fig1');

max_zs = [max(cg_eta(:))  max(xbo.zs(:))];
min_zs = [min(cg_eta(:))  min(xbo.zs(:))];

max_u = [max(cg_v(:))  max(xbo.u(:))];
min_z = [min(cg_v(:))  min(xbo.u(:))];

matrix2latex([max_zs' min_zs' max_u' min_z'], 'filename', 'table.tex', ...
    'caption',  sprintf('The maximum and minimum surface elevation and velocities in the runup.'), ...
    'rowlabel', {'XBeach','Analytical solution'}, ...
	'rowjustification','p{1cm}',...
    'collabel', {'max($\eta$) [m]','min($\eta$) [m]', 'max($u$) [m/s]','min($u$) [m/s]'}, ...
    'format',	{'%d', '%4.2f', '%4.2f','%4.2f', '%4.2f'});

end