function analyze_this(info, dirs)


Bmeas   = load(fullfile(dirs.data, 'B.txt'));

% read dimensions
d       = xb_read_dims;

% output times
t       = find(ismember(d.t/60, [0 6 23 60]));

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

figure;
set(gcf,'color','w');

% compute gap width
Bt = [];
for i = 1:d.globaltime
    Bt(i)   = min(d.y(squeeze(xbo.zb(i,:,:))>3.29&abs(d.x)<20&d.y>=0)) - ...
                max(d.y(squeeze(xbo.zb(i,:,:))>3.29&abs(d.x)<20&d.y<=0));
end

for i = 1:length(t)
    
    switch i
        case 1
            s1 = subplot('position',[0 .7 .5 .3]);
            s2 = subplot('position',[.1 .6 .3 .05]);
        case 2
            s1 = subplot('position',[.5 .7 .5 .3]);
            s2 = subplot('position',[.6 .6 .3 .05]);
        case 3
            s1 = subplot('position',[0 .2 .5 .3]);
            s2 = subplot('position',[.1 .1 .3 .05]);
        case 4
            s1 = subplot('position',[.5 .2 .5 .3]);
            s2 = subplot('position',[.6 .1 .3 .05]);
    end
    
    subplot(s1);

    b       = surf(d.x(17:85,40:110),d.y(17:85,40:110),squeeze(xbo.zb(t(i),17:85,40:110))); material dull; hold on;
    s       = surf(d.x(17:85,40:110),d.y(17:85,40:110),squeeze(xbo.zs(t(i),17:85,40:110))); shading interp;
    
    axis([-50 100 -50 50 -3 4]);
    daspect([10 10 1]);

    set(gca,'linewidth',2');
    set(b,'facecolor',[1 .8 0]);
    set(s,'facecolor','b','facealpha',0.3);

    material shiny;
    daspect([10 10 1]); caxis([-5 5]);

    camorbit(80,0);
    camlight;
    lighting phong;

    subplot(s2); hold on;
    
    plot(Bmeas(:,1),Bmeas(:,2),'ok');
    plot(   d.t(1:t(i))/60,Bt(1:t(i)),'-', ...
            d.t(t(i))/60,Bt(t(i)),'o',     ...
            'linewidth',2);
    
    axis([0 70 0 70]);
    xlabel('t (min)');
    ylabel('Width (m)');
    
    set(gca,'linewidth',2');
end

% write figure
xb_write_plot(gcf, dirs.output, 'fig2');

% read measurements
a       = load(fullfile(dirs.data, 'Fig1', 'ms2.xyz'));
t2      = a(:,1)/1000;
w2      = a(:,2)/10000;

a       = load(fullfile(dirs.data, 'Fig1', 'ms4.xyz'));
t4      = a(:,1)/1000;
w4      = a(:,2)/10000;
            
figure;

subplot(311);

plot(   t2,w2,'k.',                             ...
        d.t/60,squeeze(xbo.zs(:,d.ny/2+1,35)),'k-',  ...
        t4,w4,'r.',                             ...
        d.t/60,squeeze(xbo.zs(:,d.ny/2+1,103)),'r-', ...
        'linewidth',2)
    
xlabel('time (min.');
ylabel('water level (m)')
legend('MS2 obs','MS2 comp','MS4 obs','MS4 comp','location','southeast')

axis([0 70 0 3]);

a       = load(fullfile(dirs.data, 'Fig2', 'ms4.xyz'));
t4      = a(:,1)/1000;
v4      = a(:,2)/10000;

subplot(312);

plot(   t4,v4,'r.',         ...
        d.t/60,squeeze(xbo.u(:,d.ny/2+1,103)),'r-',   ...
        'linewidth',2)
    
meas(:,1)   = t4;
meas(:,2)   = v4;
comp(:,1)   = d.t/60;
comp(:,2)   = xbo.u(:,d.ny/2+1,103);

[r2,sci,relbias,bss]    = xb_skill(meas,comp);

xlabel('time (min.');
ylabel('velocity (m/s)')
legend('MS4 obs','MS4 comp','location','northeast')

axis([0 70 0 6]);

subplot(313);

plot(   Bmeas(:,1),Bmeas(:,2),'.k', ...
        d.t/60,Bt,'k-',                  ...
        'linewidth',2)
    
comp(:,1)=d.t/60;
comp(:,2)=Bt;

[r2,sci,relbias,bss]    = xb_skill(Bmeas,comp);

xlabel('time (min.');
ylabel('breach width (m)')
legend('B obs','B comp','location','southeast')

axis([0 70 0 60]);

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