# Water Level Simulation in River Network by Data Assimilation Using Ensemble Kalman Filter
## 2 One-Dimensional Hydrodynamic Model of a River  
Saint-Venant equations are often used to describe one-dimensional flow, as follows. The continuous equation:  
\[\frac{\partial A}{\partial t}+\frac{\partial Q}{\partial x}=q_{L} \tag{1}\]  
The momentum equation:  
\[\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{2}\]  
where \(A\) is the cross-section area; \(t\) is time; \(Q\) is the average flow of the cross-section; \(x\) is 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 the section; \(K\) is the flow modulus, \(K=AR^{2/3}/n\), where \(R\) is the hydraulic radius of the river and \(n\) is the Manning coefficient; and \(v_{x}\) is the velocity component of the lateral stream flow along the water flow, usually taken as \(v_{x}=0\). Saint-Venant equations are hyperbolic partial differential equations for which analytical solutions are not yet available. The finite difference method is an effective numerical discretization method for solving the Saint-Venant equations and is divided into two schemes: the explicit difference scheme and the implicit difference scheme. Although the explicit difference scheme does not require the joint solution of equations, the time step and space step are limited by strict adherence to the \"Courant condition\" in order to maintain stability, whereas the implicit difference scheme is more flexible in the selection of the time and space step and is therefore popularly used. In this study, the Preissmann four-point implicit difference scheme were adopted to discretize the equations, and the space-time discretization schemes of the continuous and momentum equations were obtained as follows:  
Difference form for the continuous equations:  
\[\frac{\theta(\Delta B_{i+1}+\Delta B_{i})+(B_{i}^{\dagger}+B_{i+1}^{\dagger} )}{2}\cdot\frac{\Delta Z_{i+1}+\Delta Z_{i}}{2\Delta t} +(\theta\frac{\Delta Q_{i+1}-\Delta Q_{i}}{\Delta x}+\frac{Q_{i+1 }^{\dagger}-Q_{i}^{\dagger}}{\Delta x})}{=\frac{\theta(\Delta Q_{i+1}+\Delta Q _{i+1})+(\frac{Q_{i+1}^{\dagger}-Q_{i}^{\dagger}}{\Delta t})}{\theta(\Delta Q_ {i+1}+\Delta Q_{i+1})} \tag{3}\]Difference form for the momentum equations:  
\[ \begin{array}{l}\frac{\Delta\Omega_{i+1}+\Delta Q_{i}}{2\Delta t}+\frac{\theta} {\Delta x}\frac{\left(\frac{Q_{i+1}^{\prime}+\Delta Q_{i+1}}{A_{i+1}^{\prime}+ \Delta A_{i+1}}-\frac{\left(Q_{i}^{\prime}+\Delta Q_{i}\right)^{2}}{A_{i}^{ \prime}+\Delta A_{i}}\right)}{\left(\frac{Q_{i+1}^{\prime}}{A_{i+1}^{\prime}} -\frac{\left(Q_{i}^{\prime}\right)^{2}}{A_{i}^{\prime}}\right)}+\\ \left[\frac{\theta}{\Delta x}(\Delta A_{i+1}+\Delta A_{i})+\frac{\theta}{\Delta x }(A_{i+1}^{\prime}+A_{i+1}^{\prime})\right]\left(\frac{\theta}{\Delta x}( \Delta Z_{i+1}-\Delta Z_{i})+\frac{1}{\Delta x}(Z_{i+1}^{\prime}-Z_{i}^{ \prime})\right]+\\ \frac{\theta}{2}[\frac{\left(A_{i+1}^{\prime}+\Delta A_{i+1}\right)\left(Q_{i +1}^{\prime}+\Delta Q_{i+1}\right)\left[Q_{i+1}^{\prime}+\Delta Q_{i+1}\right] }{\left(\frac{Q_{i+1}^{\prime}+\Delta A_{i}}{A_{i+1}^{\prime}}\right)^{2}}+ \frac{\left(A_{i}^{\prime}+\Delta A_{i}\right)\left(Q_{i}^{\prime}+\Delta Q_{i }\right)\left[Q_{i}^{\prime}+\Delta Q_{i}\right]}{\left(\frac{Q_{i+1}^{\prime} +\Delta A_{i}}{A_{i}^{\prime}}\right)^{2}}]+\\ \frac{\theta(1-\theta)}{2}[\frac{A_{i+1}^{\prime}Q_{i+1}^{\prime}\left|Q_{i+1} ^{\prime}\right|}{\left(\frac{Q_{i+1}^{\prime}}{A_{i+1}^{\prime}}\right)^{2}}+ \frac{A_{i}^{\prime}Q_{i}^{\prime}\left|Q_{i}^{\prime}\right|}{\left(\frac{Q_{ i}^{\prime}}{A_{i+1}^{\prime}}\right)^{2}}]=0\end{array}  \tag{4}\]  
where \(\theta\) is the Preissmann weighting factor; superscripts \(t\) and \(t+1\) and subscripts i and \(i+1\) represent the time and one-dimensional spatial layers, respectively; and \(B\) is the river width.