Determination of necessary spillway capacity