This element is treated in subroutine reservoir.f. In forward mode the value of hup can be negative or positive. If it is
negative no frontwater curve was calculated and a backwater curve has to be
determined (hdo is set to -1). If it is positive a backwater curve was calculated and hdo is
calculated as the height after a jump using subroutine hns.f.
The further calculation depends on the value of hdo:
- If
hdo exceeds the depth of the reservoir hr the backwater curve leads to a fall
in the reservoir or a jump in the reservoir and the downstream depth is set to
hr.
- If hdo is less than or equal to hr the critical hk and normal depth he are
calculated. If hk
he a backwater curve is calculated starting at hk in
ndo (nstack is incremented and istack(1,nstack) is set to nelem and
istack(2,istack) is set to ndo). If hk
he a backwater curve is not plausible and no solution is
found.