function xb_hydro_analyse(globalx, zs_mean,zs_var,H_mean, zb, obs)

% --- short wave height
Hrms = squeeze( mean(H_mean,1));

% --- IG wave
zs_var(zs_var<0)    = 0;
Hm0_LF              = 4 * sqrt(squeeze( mean(zs_var,1) ));

% --- setup
eta = squeeze( mean(zs_mean,1));

eta((eta(1)+0.2)<eta) = NaN;

figure;
subplot('position',[0.1 0.6 0.6 0.3]);
plot(globalx, Hrms*sqrt(2),'r-','linewidth',2)
hold on
plot(globalx, Hm0_LF,'b-','linewidth',2)
plot(globalx, eta,'g-','linewidth',2)
plot(obs.xhrms, obs.Hrms_hf*sqrt(2),'ko')
plot(obs.xhrms, obs.Hrms_lf*sqrt(2),'k<')
plot(obs.xsetup, obs.setup,'ks')
grid on
xlabel('Distance [m]');ylabel('Height [m]'); title('Wave heights and water levels')
legend({'Computed H_{m0,HF}','Computed H_{m0,LF}','Observed \eta','Observed H_{m0,HF}','Observed H_{m0,LF}','Observed \eta', },'Location',[.75 .6 .2 .3])

subplot('position',[0.1 0.1 0.6 0.3]);
plot(globalx, zb(:,1),'k--','linewidth',2)
hold on
plot(globalx, zb(:,end),'k-','linewidth',2)

grid on
xlabel('z [m]');ylabel('Distance [m]');
legend({'Initial profile','Final profile'},'Location',[.75 .1 .2 .3])

end