Solution (source code)

= Solution

For positive depth put $c=\sqrt{gh}$. The equations become
$$
u_t+uu_x+2cc_x=0,\qquad c_t+uc_x+\frac c2u_x=0.
$$
Adding or subtracting twice the second equation to the first gives
$$
\boxed{(\partial_t+(u\pm c)\partial_x)(u\pm2c)=0.}
$$
Thus the two <characteristic speeds> are $\boxed{dx/dt=u\pm c}$ and the corresponding conserved <Riemann invariants> are $\boxed{Q_\pm=u\pm2c}$. At a dry front $c=0$ the two speeds coincide; the positive-depth formulas are applied up to that limit.