The management of weir irrigation systems without any upstream dam usually shows poor performance efficiency. Because the prediction of inflow discharge in the river from the upstream watershed to the weir is very difficult managed, it is impossible to control the amount of water into irrigation canals and water lines through the gate mouths with full potential. Some part of river flow through the weir must be drained to the downstream area in order to maintain water ecosystem particularly during the dry season. This research was conducted in the upstream watershed of the Mae Yom Irrigation Project whereas located in the Upper Yom River Basin in Phrae province, Thailand. The Yom Basin, one of large sub-basins of the Great Chao Phraya River Basin , comprises of many tributary streams to produce inflow to downstream almost for rice cultivation and irrigation areas. The managing of flood in the Great Chao Phraya River Basin is very difficult to perform and leads to large flood loss such as in 1995  and 2011. In 2011, Thailand suffered its worst flood in more than half a century. Caused by excessive and continuous rainfall from successive, powerful monsoons and subsequent, numerous dam breaches, the floods inundated more than six million hectares of land . The Yom River Basin is the 8th basin out of 25 basins of Thailand as shown in Figure 1. Its catchment area is 5.8 million acres covering 10 provinces or 4.6% of the country area. Yom River, 459 miles long, serves as the main river of the basin.
Figure 1. Map of the Yom River Basin and existing water resource projects including a Yom weir headwork.
A part of the Yom River, 175 miles long, flows through Phrae Province and helps supply surface water of 778.8 million∙m3 (MCM) per year. So far Phrae Province has not had a large reservoir to serve as a water supply yet. The Yom River Basin Development was started in 1947 to construct the large weir in the upper part of the Yom. In 1947, the Royal Irrigation Department (RID) constructed an ogee-type concrete weir, 350 m long and 7.50 m high, in the Yom Riverat Song district in Phrae Province. It serves an irrigated area approximate 358,40 ha via irrigated channels with total length of 338 km since 1962. The most common troublesome in this area is flood during heavy rainfall because of without large dam as for flood control in the upstream yet. Moreover, lack of water supply to the weir occurs during the drought period and dry season. These problems affected poor water management and it has difficulties in predicting inflow to the weir. Therefore, this study applied the Soil and Water Assessment Tool (SWAT) model as for the simulation of the hydrological system for predicting the inflow discharge to the upstream river at any point in the study area.
The soil and water assessment tool (SWAT) model through the platform using Quantum Geographic Information System (QGIS) was applied for the simulation of the hydrological system as for predicting the inflow discharge to the upstream river at any point in the study area.
The Soil and Water Assessment Tool (SWAT) model  has proven to be an effective tool for assessing water resource and nonpoint-source pollution problems for a wide range of scales and environmental conditions across the globe. It can be applied a wide range of other water use and water quality applications. It can be run under either stand alone or any geographic information system (GIS) based program such as ArcGIS, MapWindows, QGIS, etc.
The QGIS is a cross-platform free and open-source desktop geographic information system (GIS) application that provides data viewing, editing, and analysis, similarly to other software GIS systems, QGIS allows users to create maps with many layers using different map projections. Maps can be assembled in different formats and for different uses. It allows maps to be composed of raster or vector layers. Typical for this kind of software, the vector data is stored as point, line, or polygon-feature. Different kinds of raster images are supported and the software can be georeference images. It integrates with other open-source GIS packages, including PostGIS, GRASS, and MapServer to give users extensive functionality. The free open source software GIS can be free download at QGIS official website with currently version 2.14 . Plugins written in Python or C++ extend QGIS's capabilities including SWAT but calling QSWAT and developed by joined agencies. The plug in of QSWAT can be downloaded at SWAT’s official website and run under QGIS version 2.6 .
The Nash and Sutcliffe efficiency (NSE) model and the root mean square error (RSME) were used to test the model sensitivity while compared to the observed data particular with daily river flow discharge.
The Nash-Sutcliffe efficiency (NSE) is a normalized statistic that determines the relative magnitude of the residual variance (“noise”) compared to the measured data variance (“information”). NSE indicates how well the plot of observed versus simulated data fits the 1:1 line.NSE is computed as shown in (1) :
where Yiobs is the ith observation for the constituent being evaluated, Yisim is the ith simulated value for the constituent being evaluated, Ymean is the mean of observed data for the constituent being evaluated, and n is the total number of observations. NSE ranges between −∞ and 1.0 (1 inclusive), with NSE = 1 being the optimal value. Values between 0.0 and 1.0 are generally viewed as acceptable levels of performance, whereas values <0.0 indicates that the mean observed value is a better predictor than the simulated value, which indicates unacceptable performance.
The root mean square error (RSME) is computed as shown in (2):
RSME incorporates the benefits of error between simulated result and observed data.
This study applied QSWAT as to delineate upstream watershed of the Yom weir with continuously gauged measurement in the basis of daily river flow (Y20) as sub-basin no. 17 shown in SWAT model. It located in the upper part of the Yom with commanded area of 544942 ha. shown in Figure 1 and Figure 2. The digital elevation model (DEM) including existing landuse and soil data as well as weather data was obtained from SWAT website . The hydrological response units (HRU) based on topography, landuse data, soil data, and slope was applied to divide smaller sub-basins with each HRU.
3. Results and Discussion
The results of the QGIS and SWAT when applied global DEM to be delineation the watershed showed the topographic upstream of existing weir site were divided into 17 sub-basins as shown in Figure 2 and full HRU as shown in Figure 3, respectively. The simulation results of river discharge at sub-basin no. 17 were tested with 10 years recorded (2004-2013) and fitted with observed data as shown in Figure 4. The authors also compared the simulation resulted during large flood events in wet season 2006 (1 Jul?31 Oct) and 2011 (1 May?31 Oct) at weir site (Y20) and found fit to the observed data with Nash and Sutcliffe efficiency (NSE) of -0.65, correlation coefficient (R2) of 0.16, root mean square error (RSME) of 228.0, and mean inflow discharge of 173.3 cubic meters per second, as shown in Figure 5 respectively. The result of R2 was fair due to less number of gauged records using by aerial precipitation than 6 rain-gauges from ground observation. However, the result of R2 would be increased in case of using ground based rainfall and/or longer time step simulation such basis of monthly. The monthly simulation resulted were compared to observation data in wet season 2006 and 2011, and found better relationship with NSE of -0.53, R2 of 0.67 (Figure 6), RSME of 171.7,and mean inflow discharge of 411.9 million cubic meters (MCM) per month.
Figure 2. Map of 17 sub-basins, altitudes (DEM), and stream layouts devided by SWAT.
Figure 3. Simulated result of mean daily river flow and HRU for each sub-basin during wet season 2011.
Figure 4. Comparison daily simulated results by SWAT and observed of 10 years river flow in 2004-2013.
Figure 5. Comparison daily simulated results by SWAT and observed of river flow during wet season 2006, 2011.
Figure 6. Simulated result of mean daily river flow and HRU during wet season 2011.
The QSWAT can be applied to any either gauged or ungauged catchments with complex topography, many kinds of land use, various soil type, and slope changes. It can be synthesized the river flow hydrograph, particularly during large flood events in the upstream of the weir or diversion dam. Therefore, the dam manager could efficiently manage the diversion water and have better water management in the irrigation systems.
The authors wish to thank Naresuan University, the Royal Irrigation Department (RID), QGIS, and SWAT for all contribution to this study.
 Hungspreug, S., Khao-uppatum, W. and Thanopanuwat, S. (2000) Operational Flood Forecasting for Chao Phraya river Basin. Pro-ceedings of the International Conference on The Chao Phraya Delta: Historical Development, Dynamics and Challenges of Thailand’s Rice Bowl, Kasetsart University, Bangkok, 12-15 December 2000.
 Japan International Cooperation Agency (1999) The Study on Integrated Plan for Flood Mitigation in Chao Phraya River Basin. Summary and Main Report, Royal Irrigation Department Kingdom of Thailand.
 The World Bank (2012) Thai Flood 2011: Overview Rapid Assessment for Resilient Recovery and Reconstruction Planning. http://www-wds.worldbank.org/external/default/WDSContentServer/WDSP/IB/2012/06/12/000356161_20120612014615/Rendered/PDF/698220WP0v10P106011020120Box370022B.pdf
 Nash, J.E. and Sutcliffe, J.V. (1970) River Flow Forecasting through Conceptual Models: Part 1. A Dis-cussion of Principles. J. Hydrology, 10, 282-290. http://dx.doi.org/10.1016/0022-1694(70)90255-6