Evaluation of Tigris River by Water Quality Index Analysis Using C + + Program

In the capital city of Baghdad, The surface water suffering from effect of conservative pollutants. Baghdad city has two rivers, the main river Tigris River and Diyala River in boundary of Baghdad city (Jassir Diyala) eastern of Baghdad as is shown in Figure 1. The present study deals with the evaluation of water quality of Tigris River within Baghdad. In the case of Tigris River the concentrations of TH, TDS, PO4 and SO4 were found to lie outside the acceptable range of WHO standards by using WQI analysis and C++ program.


Introduction
The main rivers of Iraq, the Tigris and the Euphrates which cover an area of 126,900 km 2 and 177,600 km 2 respectively, cross Iraq by their middle and lower reaches, eventually to confluence in the river Shatt Al-Arab, before flowing into the Arabian Gulf.The Tigris provides all the main tributaries within Iraq (Greater Zab, Lesser Zab, Adhaim and Diyala) with no tributaries sourced from the Euphrates.The arid regions along the watershed are characterized by the existence of "wadis" in the upper reached of Iraq.More than 90% of Iraq's water dependent needs are met by surface water and 80% of this water flow comes from its three neighboring countries [1].
The Tigris is 1850 km long, rising in the Taurus Mountains of eastern Turkey about 25 km southeast of the city of Elazig and about 30 km from the headwaters of the Euphrates.The river then flows for 400 km through Turkish territory before becoming the border between Syria and Iraq.This stretch of 44 km is the only part of the river that is located in Syria.The remaining 1418 km are entirely within the Iraqi borders [2].Since 1965, when Horton (1965) proposed the first water quality index (WQI), a great deal of consideration has been given to the development of "water quality index" methods with the intent of providing a tool for simplifying the reporting of water quality data.However, there is no reliable water quality index has been developed in Iraq to assess water suitability of irrigation [3].WQI is a set of standards used to measure changes in water quality in a particular river reach over time and make comparisons from different reaches of a river.A WQI also allows for comparisons to be made between different rivers.This index allows for a general analysis of water quality on many levels that affect a stream's ability to host life [4].WQI is an arithmetical tool used to transform large quantities of water quality data into a single cumulatively derived number.It represents a certain level of water quality while eliminating the subjective assessments of such quality [5][6][7].It is intended as a simple, readily understandable tool for managers and decision makers to convey information on the quality and potential uses of a given water body, based on various criteria [6].Further more it turns complex water quality data into information that is understandable and usable by the public.It gives the public a general idea of the water quality in a particular region.Water Quality Index (WQI) is a very useful and efficient method for assessing the suitability of water quality.It is also a very useful tool for communicating the information on overall quality of water to the concerned citizens and policy makers.It, thus, becomes an important parameter for the assessment and management of water quality (both surface and groundwater).WQI reflects the composite influence of different water quality parameters and is calculated from the point of view of the suitability of (both surface and groundwater) for human consumption [8].Table 1 showing Water Quality Index Ranges is [9,10].  of provincial and federal environmental assessment, risk management, and the application of best available treatment technology, which support the management, protection and enhancement of the surface water resources of the province [11].The main objective of this paper is to develop an index method for assessing water quality to use this method to assess the general water suitability of irrigation for use in agriculture.Monitoring water quality parameters in Tigris River and calculate overall water quality index (WQI) for evaluate Tigris River water in study area by using C++ program for this calculation.

Study Area
Both Tigris and the Euphrates are international rivers originating from Turkey.The Tigris river basin in Iraq has a total area of 253,000 km 2 , or 54% of the total river basin area.For the Tigris, average annual runoff as it enters Iraq is estimated at 21.2 km 3 .All the Tigris tributaries are on its left bank.From upstream to downstream [12]: Turkey shares the waters of the Tigris River with the states of Syria and Iraq.Particularly Iraq relies on the water of the Tigris River and could almost not have any agriculture and water supply of urban centers without the water of Tigris and Euphrates.The fact that the storage capacity of the proposed Ilisu Dam and other dam projects is larger (at least 21 Cubic Kilometers) than the annual water flow of the Tigris (17 Cubic Kilometers) from Turkey to Iraq, explains the high impact of this project [13].The Tigris collects 43% of its flow in Turkey and 57% of its flow within Iraq from left-bank tributaries including the Greater Zab, Lesser Zab, Adhaim and Diyala Rivers.Usage of Tigris water within Iraq includes agricultural irrigation, and municipal water supply; the Tigris also has several water storage facilities for flood control and power generation within Iraq.Between 1928 and 1946, the average stream flow of the Tigris as it entered Iraq was 18 bcm/yr; stream flow in the Tigris increased to 42 bcm/yr (billion cubic meters per year) past its confluence with the Diyala River; discharges south of this point reduced flow in the Tigris to 37 bcm/yr at Kut. Past Kut, the Tigris supplies water for irrigation and public water supply and also discharges to the Central Marsh.Combined, these discharges reduced its flow to 7 bcm/yr at Amarahh and 3 bcm/yr at Qalat Salih during this same time period [14].

Samples Collection
Water samples were collected from selected eight stations in Tigris River from January 2004 to December 2010.The samples were collected from just under water surface for analysis of selected parameters included: pH, biological oxygen demand (BOD 5 ), nitrate (NO 3 ), phosphate (PO 4 ), Total Dissolved Solids (TDS), Total Hardness (TH), Magnesium (Mg), Calcium (Ca), Chlorides (Cl), Sulphates (SO 4 ), Sodium (Na) and electrical con-ductivity (EC).

Introduction
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.C++ is sometimes called a hybrid language.It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features [15].It was developed by Bjarne Stroustrup starting in 1979 at Bell Labs as an enhancement to the C language.Originally named C with Classes, the language was renamed C++ in 1983 [16].C++ is one of the most popular programming languages [17,18] with application domains including systems software, application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games [19].Several groups provide both free and proprietary C++ compiler software.C++ has greatly influenced many other popular programming languages, most notably C# and Java.After years of development, the C++ programming language standard was ratified in 1998 as ISO/IEC 14882:1998.The standard was amended by the 2003 technical corrigendum, ISO/ IEC 14882:2003.The current standard extending C++ with new features was ratified and published by ISO in September 2011 as ISO/IEC 14882:2011 (informally known as C++11) [20,21].

Algorithms and Steps
In my work using language C++ under window to execution, and perform some steps to implementation this program:  Create Project File consist of number of files. Create dialog boxes that perform to dialog with users. Read and input Data to system for all stations from users. Select type of process from menu (Normality Test, Z-Test, t_Test, ANOVA (analysis of variance) Test and Water Quality Index). Execution algorithm and calculate mathematics for all process after enter data. Display Result with high speed (Less than 1 second).
As is shown in Figure 2.

Water Quality Index Calculation
The WQI was calculated using the standards of drinking water quality recommended by the World Health Organization (WHO).The weighted arithmetic index method [10] was used for the calculation of WQI of the surface water.Further, quality rating or sub index (qn) was calculated using the following expression.(Let there be n water quality parameters and quality rating or sub index (qn) corresponding to nth parameter is a number reflecting the relative value of this parameter in the polluted water with respect to its standard, maximum permissible value).qn = Quality rating for the nth water quality parameter.Vn = Estimated value of the nth parameter at a given sampling point.Sn = Standard permissible value of the nth parameter.Vio = Ideal value of nth parameter in pure water (i.e.0 for all other parameters except the parameter pH and Dissolve Oxygen (7.0 and 14.6 mg/L respectively).
Unit weight was calculated by a value inversely proportional to the recommended standard.
value Sn of the corresponding parameter.Wn = K/Sn.Wn unit weight for the nth parameters.Sn = standard value for the nth parameters.K = constant for proportionality.
The overall WQI was calculated by aggregating the quality rating with the unit weight linearly.

Results
Table 2 presents the result of the physical parameters of surface water quality.The result showed that Total Hardness (TH) in very high range and cross WHO limit (344.4 mg/l) and phosphate (PO 4 ) in highest value and cross WHO standard (0.3 mg/l).Also we found the electrical conductivity (EC) in high value (1175.7 mg/l) and that more than WHO standard.WQI for the year of 2004 it was 589.1552 > 100 this means unsuitable for use.
Figure 3 shows all the years (2004, 2005, 2006, 2007, 2008, 2009 & 2010) the result almost same all results of WQI was above 100 and that makes surface water in Tigris River unsuitable for use.

Conclusions
The year of 2004 has three parameters out of WHO standard values, it was TH (344.4 mg/l), PO 4 (0.3 mg/l) and EC (1170.1 mg/l), WQI in total was (589.1552).For the year of 2005, 2008 & 2009 it has five parameters out of WHO standard values and that parameters is TH   From all above result we can see all of WQI > 100 and that's means WQI type is unsuitable for use.

Figure 1 .
Figure 1.Map of Tigris River within Baghdad city.
The Greater Zab, which originates in Turkey and is partly regulated by the Bakhma dam.It generates 13.18 km 3 at its confluence with the Tigris; 62% of the 25,810 km2of river basin is in Iraq; The Al-Adhaim (or Nahr Al Uzaym) which drains about 13,000 km 2 entirely in Iraq.It generates about 0.79 km 3 at its confluence with the Tigris.It is an intermittent stream subject to flash floods;  The Diyala, which originates in Iran and drains about 31,896 km 2 of which 75% in Iraqi territory.It is equipped with the Darbandikhan dam and generates about 5.74 km 3 at its confluence with the Tigris;  The Nahr at Tib, Dewarege (Doveyrich) and Shehabi Rivers, draining together more than 8000 km 2 .They originate in Iran, and bring together in the Tigris about 1 km 3 of highly saline waters;  The Al-Karkha, whose course is mainly in Iran and, from a drainage area of 46,000 km 2 , brings about 6.3 km 3 yearly into Iraq, namely into the Hawr Al Hawiza during the flood season, and into the Tigris River during the dry season.
 The Lesser Zab, which originates in Iran and is equipped with the Dokan dam (6.8 km).The river basin of 21,475 km 2 (of which 74% is in Iraqi territory) generates about 7.17 km, of which 5.07 km 3 of annual safe yield after the Dokan construction; 