Estimation of discharge and its distribution in compound channels