function AnalyseXBeachOutput_Hydro(info,dirs)
    test_name = info.run;
     
    fname = [dirs.output];
    
    x      = nc_varget([fname filesep 'xboutput.nc'],'globalx');
    y      = nc_varget([fname filesep 'xboutput.nc'],'globaly');
    time      = nc_varget([fname filesep 'xboutput.nc'],'globaltime');
    meantime     = nc_varget([fname filesep 'xboutput.nc'],'meantime');
    zb      = nc_varget([fname filesep 'xboutput.nc'],'zb');
    
    zb0    = squeeze(zb(1,:,:));
    zbend  = squeeze(zb(end,:,:));

    pointtime     = nc_varget([fname filesep 'xboutput.nc'],'pointtime');
    zs_point =  nc_varget([fname filesep  'xboutput.nc'],'point_zs');
    zb_point = nc_varget([fname filesep 'xboutput.nc'],'point_zb');
    H_point =  nc_varget([fname filesep 'xboutput.nc'],'point_H');
    hh_var =  nc_varget([fname filesep 'xboutput.nc'],'zs1_var');
    pointindx      = nc_varget([fname filesep 'xboutput.nc'],'xpointindex');
    pointindy     = nc_varget([fname filesep 'xboutput.nc'],'ypointindex');
    
    for kk=1:numel(pointindx)
        for par=1:3
            for ii = 1:numel(meantime)
                ts = time-1200;
                ts = ts(1):1800:ts(end);
                try
                    min_wl(1,ii) = min(zs_point(ts(ii)*10:ts(ii+1)*10,kk));
                    mean_wl(1,ii) = mean(zs_point(ts(ii)*10:ts(ii+1)*10,kk));
                    mean_zb(1,ii) = mean(zb_point(ts(ii)*10:ts(ii+1)*10,kk));
                    Hrms_hf(1,ii) = mean(H_point(ts(ii)*10:ts(ii+1)*10,kk));

                    y_IG = zs_point(ts(ii)*10:ts(ii+1)*10,kk);
                    [freqS,PwrS] = spectrumsimple(0.1,y_IG,'fresolution', 0.001,'figures',0);
                    ind = freqS>=0.005 & freqS<=0.05;
                    Hrms_IG(1,ii)      = spec2hrms(freqS(ind),PwrS(ind));
                    Hm0_IG(1,ii)      = spec2hs(freqS(ind),PwrS(ind));
                catch
                    Hrms_lf(1,ii)= NaN;
                    Hrms_hf(1,ii) = NaN;
                    mean_wl(1,ii) = NaN;
                    Hrms_IG(1,ii) = NaN;
                    Hm0_IG(1,ii) = NaN;
                end
            end
            
            tmp_mean_wl = mean_wl(1,:);
            tmp_min_wl = min_wl(1,:);
            tmp_mean_zb = mean_zb(1,:);
            tmp_Hrms_Hf = Hrms_hf(1,:);
        
            tmp_depth = tmp_min_wl - tmp_mean_zb; %tmp_mean_wl - tmp_mean_zb;
            tmp_index = find(tmp_depth <= eps);

            tmp_mean_wl(tmp_index) = NaN; mean_wl(1,:) = tmp_mean_wl;
            tmp_Hrms_Hf(tmp_index) = NaN; Hrms_hf(1,:) = tmp_Hrms_Hf;
           
            figure(kk);
            sp = subplot(3,1,par);
            hold on
            if par == 1
                YY = mean_wl(1,:);
                processed_xb.wl(kk,:) = YY;
            elseif par == 2
                YY = [Hrms_hf(1,:)].*sqrt(2);
                processed_xb.HF(kk,:) = YY;
            elseif par == 3
                YY = Hm0_IG(1,:);
                YY(tmp_index) = NaN;
                processed_xb.LF(kk,:) = YY;
            end            
            processed_xb.time(kk,:) = (meantime-900)./(24*3600)+datenum(2019,01,08,01,0,0)- datenum(seconds(1200));
            p(par) = plot((meantime-900)./(24*3600)+datenum(2019,01,08,01,0,0)- datenum(seconds(1200)),YY,'LineWidth',1.2);

            xlim([datenum(2019,01,08,00,0,0),datenum(2019,01,10,00,0,0)])        
            clear YY
            datetick('x','keeplimits','keepticks');

            if par == 1
                ylabel('wl [m]');ylim([-0.5 3])
            elseif par == 2
                ylabel('Hm0,SS [m]');ylim([0 2.5])
            elseif par == 3
                ylabel('Hm0,IG [m]');ylim([0 1.5])
            end
    
        end
        set(gca,'FontSize',8)
        xb_write_plot(gcf, dirs.output, ['XB_hydro_' test_name 'point' num2str(kk)])
    end
    save(['xb_' test_name '.mat'],'processed_xb')
end