## 2 Model Development  
### Inversion Model of Bed Roughness  
In this paper, an inversion model for estimating riverbed roughness is established that could take into account the observational error and spatial distribution of the roughness in the whole river network. The measurement error of the observational data set \(\mathbf{d}_{obs}\) was assumed to have normal distribution with variance in \(\mathbf{C}_{d}\). The inversion model seeks to minimize an objective function that measures the difference between the observed data and the model simulations. The following objective function, consisting of two terms (a misfit term and a regularization term), was developed:  
\[ \begin{array}{rl}F&=\min.\frac{1}{2}||\mathbf{g}(\mathbf{n})-\mathbf{d}_{obs}||_{Cd}^{2} +\frac{1}{2}||\mathbf{Ln}||_{Ct}^{2}\\ &=\min.\frac{1}{2}[\mathbf{g}(\mathbf{n})-\mathbf{d}_{obs}]^{T}\mathbf{C}_{d}^{-1}[\mathbf{g}(\bm {n})-\mathbf{d}_{obs}]+\\ &\quad\quad\frac{1}{2}\mathbf{n}^{T}\mathbf{L}^{T}\mathbf{C}_{n}^{-1}\mathbf{Ln}\end{array}  \tag{1}\]  
where \(\frac{1}{2}||\mathbf{g}(\mathbf{n})-\mathbf{d}_{obs}||_{Cd}^{2}\) is the misfit term that measures the difference between the observed data and the model simulations, and regularization term \(\frac{1}{2}||\mathbf{Ln}||_{Ct}^{2}\) (also named the smoothing term) constrains the solution to be smooth in order to avoid overfitting or under-fitting. It is introduced to control the trade-off between fitting the data well and achieving smooth roughness distribution. \(\mathbf{C}_{n}^{-1}\) is the weight of the smoothing term. The smaller \(\mathbf{C}_{n}\) is, the greater the weight of the smoothing term, i.e., forcing the spatial distribution of the roughness to be as smooth as possible. \(\mathbf{L}\) is the spatial variance rate of roughness, \(\mathbf{n}\) is the river roughness, and \(\mathbf{g}(\mathbf{n})\) are hydraulic states such as water level that can be obtained by using Saint Venant equations that are often used to describe one-dimensional flow [19]. The continuous equation is written as follows:  
\[\frac{\partial A}{\partial t}+\frac{\partial Q}{\partial x}=q_{L} \tag{2}\]  
The momentum equation is expressed as follows:  
\[\frac{\partial Q}{\partial t}+\frac{\partial}{\partial x}(\frac{\alpha Q^{2}} {A})+gA\frac{\partial Z}{\partial x}+gA\frac{Q|Q|}{K^{2}}=q_{L}v_{x} \tag{3}\]where \(A\) is the cross-sectional area; \(t\) is time; \(Q\) is the average flow of the cross section; \(x\) is the displacement along the water flow; \(q_{L}\) is the lateral streamflow per unit length; \(a\) is the momentum correction coefficient; \(g\) is the acceleration of gravity; \(Z\) is the water level of a section; \(K\) is the flow modulus, \(K=AR^{2/3}/n\), where \(R\) is the hydraulic radius; \(v_{x}\) is the velocity component of the lateral stream flow along the water flow, usually taken as \(v_{x}=0\). A space-time discretization procedure is performed for the water flow in a river system because the Saint Venant equations are nonlinear hyperbolic partial differential and cannot be solved analytically but using the initial conditions [19]. The details of the development of the discrete equations by using the finite difference method can be found in [20]. The spatial variance rate of roughness \(\mathbf{L}\) is used to measure the variation degree of roughness \(\mathbf{n}=[n_{1},n_{2},n_{3},\cdots n_{m}]^{T}\) over the length of a river channel, where \(m\) is the river section number, and each element of the vector corresponds to the local roughness of the corresponding river segment. In this paper, the spatial variance rate of roughness is represented by smoothing matrix \(L_{m\times m}\), which is typically constructed on the basis of the assumption that the bed roughness varies smoothly in space and that nearby locations are more likely to have similar roughness values than distant locations are. The detailed approach to developing the smoothing matrix is as follows.