
%% INPUT

%[us,ds_1,ds_2]
C=31; %chezy [m^(1/2)/s]
g=9.81; %gravity [m/s^2]
Q=2000.*[1,2/3,1/3]; %discharge of each branch [m^3/s]
B=[300,200,100]; %width of each branch [m]
s=[1e-4,5e-5,6e-5]; %slope of each branch [-]
L=100000*[1,1,1]; %length of each branch [m]
detab_b_1=0.5; %bed level step from branch ds_1 to branch us

%% CALC

Cf=g/C^2; %non-dimensional friction coefficent [-]
h=(Cf.*(Q./B)./g./s).^(1/3); %normal flow depth [m]

etab_0=-round(h(2:3)*10)/10; %bed level at mouth [m]
etab_b_ds=etab_0+L(2:3).*s(2:3); %bed level at downstream part of bifurcation [m]
etab_b_us=etab_b_ds(1)+detab_b_1; %bed level at upstream part of bifurcation [m]
etab_us=etab_b_us+L(1)*s(1); %bed level at upstream end [m]

