Introduction

Increasing population and changes in land-use accelerated the pressure on natural resources. Water, being a precious resource, is under increasing threat from in terms of both quality and quantity. Climate change effects further increase the stress on water resources. Changing precipitation patterns and characteristics due to climate change put many basins under greater stress, especially when the amount of water used for industrial and agricultural activities is at risk. Integrated water resources management is now receiving more attention than ever before by governments and local authorities as urgent measures are needed to protect our limited water resources against this growing threat. One of the most important steps for the decision-makers to take the necessary measures, meet the infrastructure requirements and determine legal regulations is to reveal the current conditions of the existing water resources in the basin.

As known, the Water Framework Directive (WFD), which was also adopted by the Turkish authorities, recommends that all water bodies (inland surface waters, transitional waters, coastal waters, and ground waters) be provided with good qualitative and quantitative status of by 2015 (European Commission 2000). Although there are many studies on the problems encountered in the management of water resources in Turkey, the sources of these problems, the administrative construction and adaptation activities of WFD, and its effects on water policy, there are still some issues that need to be resolved. The WFD includes details on water management regulations, quality and quantity monitoring, and remedial actions. The WFD first emphasizes the need for coordination of administrative arrangements in river districts. According to WFD, these districts should be designated by geographical boundaries rather than administrative or political boundaries. Therefore, the WFD recommends that governments define each river basin with some basic order according to the size and transboundary characteristics of the river. If the river basin is not large enough, it can be combined with larger neighboring basins or combined with smaller neighboring basins to form an individual river basin. Coastal waters and groundwaters will be identified and assigned to the nearest and appropriate river basin district (European Commission 2000).

Watershed management is a broad concept that includes plans, policies, and activities in a watershed to control water and related resources and processes (USNRC 1999). Therefore, it can be said that it is a complex subject due to its inherited sophisticated structure. There are many factors that need to be taken into account such as agriculture, livestock, industry, social activities, and recreation. Any decision taken without extensive research and in-depth analysis would produce inevitable conflict and complicated consequences. As known, there is a delicate balance between the environment and economic activities. Therefore, the decisions taken by the decision-makers should be built on a scientific basis and should be evaluated without any prejudice, so that the decisions do not cause any confusion. For example, if the decision-makers evaluate the catchment from an environmental perspective and take radical steps and impose some limitations/restrictions on agricultural and industrial activities on the catchment, it is likely that the companies and farmers will be affected negatively by it. Consequently, hundreds or maybe thousands of employees/farmers will be out of their occupations. On the other hand, if the decision-makers have the opposite point of view and will not take any precautions on watersheds from the point of water resources, the adverse effects on water resources will continue to increase. The examples given above present extreme situations, but some environmental disasters happened in the past have shown that adverse effects are encountered if necessary actions are not taken.

The Geographic Information System (GIS) has been developing for the last 40 years. The first known paper was written by Roger Tomlinson in 1968 (ESRI 2012). It is known that GIS is a very useful tool for watershed management in this century. It is also known that GIS has stable performance on well-defined single or double-step tasks, but watershed management has many sub-tasks and some of these tasks are neither well-defined nor single-step. In such cases, GIS is not capable of solving the problem and providing solutions for decision-makers. As a substitute, Decision Support Systems (DSS) were developed and applied to complex systems to explore their structure and to use the information obtained in the system, and to reach improved decisions (Sugumaran and Degroote 2010). Decision Support Systems (DSS) also provide a framework for integrating key tools and capabilities such as analytical and spatial modeling, management techniques for spatial and non-spatial data, domain knowledge, spatial visualization, and reporting.

Although the development of decision support systems dates back to the 1960s, watershed information system applications only started in the first half of the 1990s. In the last decades, studies on the development of decision support systems for watershed management have gained increasing importance (Power 2007). As a result of these studies carried out in recent years, different systems have been established. These studies serve different purposes for the basin in which they are established.

SPIN (Stream Power Index for Networks) is an ArcGIS toolbox written in Python that examines urban river stability (Ghunowa et al. 2021). Pi-VAT (Prioritization, Interactive Visualization, and Analysis Tool) is a web-based tool for visualizing complex water quality model outputs prepared with the R programming language and the Shiny web application framework (Deval et al. 2022). Another online user interface developed for the WEPP (Water Erosion Prediction Project) model was named as WEPPcloud (Lew et al. 2022; Dobre et al. 2022). CAST (Chesapeake Assessment Scenario Tool) is a web-based nutrient and sediment load calculator that can also perform cost analysis (Chesapeake Bay Program 2019; Kaufman et al. 2021). For the analysis of flood risk effects and to deliver mitigation strategies, MiDAS (Mitigation and Damage Assessment System) was developed as a web-based system by Alabbad et al. (2022). DSS-WMRJ is also a web-based decision support system prototype for quasi-real-time simulations (Zhang et al. 2015). Finally, Gan et al. (2020) designed a web-based hydrological modeling service that includes a database called HydroDS and a data sharing platform called HydroShare (Gan et al. 2020; Gichamo et al. 2020; Heard et al. 2014).

For nearly two decades, Turkey has taken serious steps regarding the legal regulations on environmental issues for the EU harmonization process. The former Ministry of Forestry and Water Affairs, its predecessor the Ministry of Agriculture and Forestry, the Ministry of Environment and Urbanisation, and their General Directorates (the General Directorate of Meteorology, the General Directorate of State Hydraulic Works, the General Directorate of Water Management, etc.) put into force several legal regulations, including action plans for vulnerable watersheds. During this period, several national web-based systems were produced.

The former Geodata system (geodata.ormansu.gov.tr) of the former Ministry of Forestry and Water Affairs is a web-based geographical information system that contains spatial data of 6 General Directorates of the Ministry. It was designed to share information on these data with its users. General users of this portal can access the general information such as data availability and coordinates of the local stations, but the rest of the data is not accessible, and therefore, the data visualization ability of the portal is limited. Geodata system has been replaced by the Data Portal with the change of the Ministry of Forest and Water Affairs to the Ministry of Agriculture and Forestry. The data portal of the Ministry of Agriculture and Forestry (very.tarimorman.gov.tr) contains data on land cover, protected areas, and water. However, these data consist of digital maps of the regional boundaries in related subjects. There is no data related to water except these maps, in the system.

When the aforementioned systems and their capabilities are evaluated, it is seen that there is a need to establish such a system in Turkey in order to collect efficient and reliable data. The Ergene Watershed Information System (EWIS), which is constructed during this study (conducted at Yildiz Technical University, started at the beginning of 2017), is a pioneering system in terms of handling the basin as a holistic hydrologic unit, including all the water-related data and the model results.

The main objectives of establishing EWIS are (i) to collect all historical and modeling data under one roof, (ii) to visualize the available data effectively, (iii) to easily transfer the data to external stakeholders when necessary, and (iv) to alert decision makers in case of extraordinary situations that may occur.

In this study, an infrastructure is presented in which the data collected from different institutions and organizations can be stored efficiently under a single roof. Auxiliary tools were developed to easily integrate external data that can be into the system, and visual tools were also introduced so that users can effectively track this data in different ways. A warning system was also developed to support decision makers.

Materials and methods

Study site: Ergene basin

Ergene basin, one of the 25 basins in Turkey, has become a sub-region of Istanbul due to its proximity to Istanbul and rapid industrialization. This development increased the pressure on the water resources of the region and led to the emergence of many environmental problems. Due to the uncontrolled discharge of wastewater particularly the industrial activities, Ergene River and Corlu Creek are severely polluted. The water demand in the basin is largely met by groundwater, which has caused the groundwater level in the basin to fall to 100 m in some areas. Apart from that, the agricultural and industrial activities, which use groundwater for irrigation purposes or process water, cause water pollution due to unconscious consumption of fertilizers and pesticides, and illegal discharges of wastewater. The former Ministry of Forestry and Water Affairs, General Directorate of Water Management, listed the Ergene Basin among the priority basins, developed various action plans, and initiated activities aiming to recover the important water resources in the basin. Figure 1 shows the location of the Ergene catchment which has a total catchment area of 11.020 km2 (Ministry of Environment and Forestry 2010; Celen et. al. 2022, Ata and Yıldız Töre 2019).

Fig. 1
figure 1

Location of the Ergene basin

As the Ergene Basin is listed as one of the basins where priority should be given, a database developed with existing data was created to allow the management of the Ergene Basin in a holistic manner. A web-based system, that would reveal the current water quality and amount of water in light of the gathered data and evaluate all these components at the basin scale, was established.

The EWIS aims to support decision-makers in addition to providing information about the basin. For this reason, model results were added to the system to give information about the future situation besides the historical data. Future data were obtained from the modeling studies carried out. Brief information on modeling studies is provided in the following section prior to the structure of the established system.

Modeling studies and future data

The structure of hydrological modeling is divided into two as; (i) deterministic modeling and (ii) data-based modeling studies.

Deterministic models, also known as white box models, produce results by taking into consideration all the possible effects in hydrological processes and calculating changes by employing physical equations. The rainfall-flow relationship in the basin has a complex structure as it is established depending on sub-processes such as infiltration, evaporation, and so on. To express these sub-processes accurately, a series of equations need to be used.

Modeling software such as SWAT, HEC-HMS, MOD-FLOW was used in these studies.

The second part of the modeling studies consisted of data-based models, or black-box models, using previously measured variables rather than physical processes and equations (Adamowski and Sun 2010). These are the methods that try to establish the mapping of inputs-outputs based on the cause–effect relationship of the system, under the conditions based on environment, climate, geographical location, topography, etc.

In these studies, Artificial Neural Networks, Wavelet Transform, Wavelet Artificial Neural Networks, Linear Kalman Filter, and Ensemble Kalman Filter methods were used (Engin et al. 2017; Boyraz and Engin 2018; Ozdogan et al. 2019).

In the hydrological modeling of the basin, different simulations were introduced by using different physical and climatic scenarios besides different modeling methods and software.

Structure of the system

The EWIS (ergenehbs.com) was developed using ASP.NET (Reilly 2002) with MVC (Model-View-Controller) (Reenskaug 1979) architecture. ASP.NET is a web design framework developed by Microsoft which is used to develop dynamic web applications. Within the scope of the working logic of the MVC (Model-View-Controller) architecture, the Model represents the database in the system background where the data belonging to the system are located, the View represents the web interface that the user observes, and the Controller represents all the operations performed between the database and the interface. In such systems, a transaction that the user wants to do is transmitted to the database by the Controller. The data taken from the database (Model) are processed by the Controller and visualized in the interface (View) (Pop and Altar 2014). Figure 2 shows the schematic view of the MVC architecture (Modified from source: Karunakaran 2020). In addition to the MVC architecture, two more layers were added to this project, while the EWIS was being built. These are the entity data layer and the core layer where general operations are performed.

Fig. 2
figure 2

Schematic view of MVC

In the design of the EWIS, Visual Studio environment and C# coding language were used for back-end coding, and JQuery, Javascript, HTML5, Bootstrap, and Ajax technologies were used in the end-user interface (front-end) designs. Angular JS Framework (Green and Seshadri 2013) is used in the management panel interface.

The data layer created to run the data in the database created on SQL Server using the Microsoft SQL Server environment in the application was prepared using the Entity Framework ORM (Object Relational Mapping) tool.

Stored Procedure Object is used in MS SQL Server so that the graphics in the front-end section can work more efficiently. There is RESTFUL Web Service prepared with REST architecture to use the application by other applications or third-party software when requested. This Web Service is built on Microsoft's ASP.Net Web API technology. It is included in the application as a service layer. It is fed from the same database in the web service such as the end-user interface and the management panel.

Results and discussion

Ergene watershed information system

Ergene Basin, as mentioned in the previous sections, is one of the main basins that must be carefully managed due to industrial and agricultural water use and wastewater discharge.

Efficient use of water can only be achieved by developing the right management strategies. Although watershed management may seem like a business of assessing the quantity and quality of water, and investing in flood prevention and drinking water, it is a strategic development effort in which water and water users can benefit jointly. The EWIS aims to facilitate the management of water resources and to use the decision support mechanism effectively by evaluating scenario analyses revealed through visual and graphical data with the help of the data stored in the system. In light of historical and future data obtained from different model simulations and scenarios in the system, the future development and changes in water resources can easily be monitored.

One of the main goals taken into consideration while developing the EWIS is to configure the system with a constantly updated infrastructure. The developed system was tried to be formed in such a way that the data can easily be integrated manually or automatically.

The EWIS consists of 4 components: Database, Map Tool, Data Analysis Module, and Warning System, considering the general functions and content features briefly listed in the following sections.

Data integration and management

One of the most important reasons for the development of the EWIS is the need to collect different types of data under the same roof. Considering the data obtained from many studies carried out in the basin, there is a need for a database that stores big data and facilitates the management of this data. The database structure has been created in a way that does not allow data duplication, and therefore, data integrity is maintained.

Two different data transfer modules have been added to the system so that external data can easily be transferred to the system and that the data can reliably be added to the appropriate fields in the database. These modules are the "Analysis data transfer" module to transfer the results of any parameter observed in the basin and the "Model Data transfer" module to transfer modeling results to the system.

Analysis data transfer

The “analysis data transfer” module has been created to quickly transfer the meteorological, hydrometric, and water quality data collected in the basin as a result of offline monitoring studies by different institutions. The module has a simple interface as seen in Figure 3. Before the file is uploaded, basic information about the data to be transferred is selected. In this module, the data to be transferred to the system must be defined as an excel file as time series. In this excel file, in order to automatically define “the data type and date” and write them into the database, the first row was defined as the information row, the first column name was defined as "Date" and the entire column was arranged so that the dates can be observed easily. In the columns following the date information, the measured values can be listed by entering the short names of the transferred data parameter into the database. With the help of this module, data transfer of many different parameters can be performed in the same excel file.

Fig. 3
figure 3

Analysis Data Transfer Module

After selecting the Excel file from a local drive, the data set tried to be loaded is controlled by the system by selecting the "Read" button. At this point, if there is an error in the data, the system shows a warning message stating the error in the data with an explanation. This error may be a number entered as text, or it may be values outside the reasonable value range defined in the database. In this way, a negative precipitation or flow rate value or a pH value entered higher than 14 are prevented from being recorded in the system. If there is no error message after the reading process, the data can be saved to the system by selecting the "save" button.

Model data transfer

Although the basic concept in the model data transfer module is similar to the Analysis Data transfer module, this module has a more complex structure than the previous one. This is because the analysis data depends only on the station ID, date, and parameter, while the model data depend on the model type, physical change, and emission scenarios. Therefore, more metadata needs to be entered during data transfer, as can be seen in Figure 4.

Fig. 4
figure 4

Model Data Transfer Module

When uploading the model result to the database, the user should first select the type of model. Then, the user should specify whether the uploaded data contain surface or groundwater data. After these selections, the user can select the station from the "station list."

The time period (daily, monthly, hourly or instantaneous) should also be specified when entering the data into the system. In the last step, the type of model (physical change or climate change) and the relevant scenario should be selected. Modeling studies involve a physical change in the watershed or climate change scenarios. After selecting the scenario, the user should upload the excel file containing the model result data to the EWIS.

After making the necessary selections and uploading appropriate excel file, the steps to be followed are similar to the Analysis data transfer module. First, the data in the file are checked, and then, the data integration is completed, if there is no error in the data.

Map tool

The map component, which can be easily accessed from the visual on the slider on the homepage of the EWIS, has been prepared using the Google Maps API (Application Programming Interface). Interactive map interfaces that are widely used in the world such as Yandex Maps, Open Street, Esri Maps were compared, and Google Maps API was selected due to document richness, easy access to source codes, widely usage and reliability.

Google Maps API is a constantly updated map interface component developed by Google that can be easily integrated into web pages for developers to create interactive maps that can be developed with the help of JavaScript or different software.

After adding Google Maps API into the EWIS as an html object, two layers were added to the map. These two layers are the hydrological border frame and the river network of Ergene Watershed, which were created by the delineation of the watershed using ArcGIS software. These two shape files were converted to GeoJSON (Geographical – JavaScript Object Notation) file format, designed to encode various geographic data structures. The border frame object of the watershed is used to filter the area outside the basin boundaries, and the river network object is used for the visualization of Ergene River and its branches. After the addition of these 2 objects, a function has been added for the adjustment of the zoom ratio and to set the map focal point as the midpoint of the basin boundaries. This function allows the entire basin to be displayed in the map area when the map tool is opened.

After drawing these two layers, five different station types (Meteorology, Water Quality, Hydrometric Observation, Parametric Model Result and Data-Driven Model Result) are marked with different colored flags.

These five different types of stations were brought from the database to the JavaScript interface by an Ajax post (operation) call and drawn on the map. There are two select boxes that are located at the top of the map tool, help to select the station type or station desired to view (Fig. 5). When the coordinates of a new station are entered into the form and the station type is selected, the newly added station starts to appear on the map at a relevant geographic location with the marker (flag) of the appropriate station type. Moreover, the marker (flag) provides access to information about the station in that location. A modal window that contains basic information such as station name, coordinates, opening date, data availability opens in the middle of the screen when the marker of a station is clicked.

Fig. 5
figure 5

General View of the Map Tool of EWIS

The modal window contains three types of information about stations. These are:

  • General Information: This tab contains information such as station number, station type, city and district the station is located, opening date, closing date, the reason for the closure, and coordinates.

  • Data Status (Availability): This tab shows the available data by year for the selected parameters.

  • Data Charts: This tab helps to form annual charts for selected years and parameters.

The general view of the Map Component can be seen in Fig. 5.

Data analysis

The analysis component is the interface within the EWIS that allows different types of data to be examined depending on the parameters and time. In this component, data belonging to meteorology stations, hydrometric stations, and water quality stations with different parameters can easily be visualized, as well as comparative analysis can be made on the same parameter values of different stations. In addition, the effects of possible scenarios on the hydrological structure can be visualized by drawing comparative graphs of the results obtained as a result of the modeling studies carried out within the scope of research projects. With the help of warning levels defined in the system, the water quality or quantity changes in the basin can be instantly informed. These components are explained in the following sections.

Meteorological data analysis

Meteorological parameters play an important role on hydrology. Therefore, while analyzing data about water resources in the basin, the analysis of meteorological parameters is crucial. Therefore, the data of all meteorology stations in the Ergene basin and its surroundings were obtained from the General Directorate of Meteorology and integrated into the EWIS.

In order to visualize these data integrated into the database, two different methods are offered to the users through the EWIS. Users can visualize all the meteorological data at a selected station for the selected year or compare different stations by choosing stations, parameters and year. When the user wants to visualize all meteorological data of a single station, after the station selection, the system makes a database query and presents the observed years of the station to the user. This application makes it easier for the user to select the station-year. When the user wants to compare the data of two different stations, the system lists the appropriate selections by querying the database for each of the station type, parameter, stations and year selections. In this way, the stations with the data for the desired parameter are listed and the common observation years for two different stations can be easily found.

Hydrometric data analysis

Hydrometric data collected by the State Hydraulic Works of Turkey can be visualized by selecting the station and year from the system. In addition, users can visualize the data in these stations comparatively as in meteorological stations.

Water quality data analysis

Water quality data are visualized in two different ways in the system. While the data of the observations carried out within the scope of the study are presented in the form of visualization of the data of all parameters by year with the station selection, all the data related to water quality (including the data collected by the General Directorate of State Hydraulic Works and the project) can also be visualized comparatively.

Analysis of the model results

Since the Ergene basin is included in the “priority basins list” of the Ministry, many scientific research and modeling studies have been carried out. These modeling studies made by different researchers are presented to limited environments and cannot go beyond the nature of a project report and scientific publications. However, announcing and disseminating these studies is of great importance. Within the scope of the study in which the study was supported, different modeling studies were carried out by considering different possible scenarios. These studies are generally divided into two main groups as parametric models and data-driven models. Most of the results of these modeling studies are raster data, and some are location-dependent time series. In order to present the results of these different modeling studies in a standard way, 64 observation points were created at critical points on the river tributaries and time series results were obtained at these points in models with raster data and these data were integrated into the system.

The data of these stations, which are added to the system like observation points, consist of different models, different physical change scenarios and different climatic emission scenarios. The database has been given a structure that includes these different scenarios and models so that all these data can be properly filtered and properly visualized. As can be seen in Figure 6, the user can visualize the data and even compare two different models or scenarios after selecting the station, model type, scenarios, year range and parameter they want to see, and even compare two different models or scenarios.

Fig. 6
figure 6

a Comparative Model Result Graphic b Comparative Model Result Graphic

Warning system

One of the most important features of the EWIS is the warning mechanisms. Due to the established warning mechanism, the system detects an abnormal situation in the basin and notifies the users by sending an automatic e-mail. However, especially if the system is constantly fed with instant data, these warning mechanisms will work efficiently. Since there is no online monitoring station in the Ergene basin at the moment, this alert mechanism can only control the data manually entered into the system.

During database configuration, upper and lower alarm levels are defined for each parameter. The system is configured to send automatic messages to users when these limit values are exceeded or under. In addition, this feature can be paired with GSM operators and informed via SMS or a mobile application can be developed for the EWIS and these alarms can be delivered to users as push notifications.

Conclusion

Water security is one of the most important issues in the twenty-first century and perhaps the most important among environmental problems. Factors such as global climate change, population growth, and uncontrolled industrialization increase the importance of protecting water resources in countries experiencing water stress. Therefore, it is important to improve the basins, which are vulnerable due to industrial, agricultural, and domestic activities. It should be also noted that efficient watershed management can only be possible with the cooperation of all the stakeholders, including users and managers.

The EWIS aims to achieve this in the Ergene basin with its current features. In addition to sharing data and information, the system, which offers news and developments related to the basin to users, can appeal to all stakeholders of the Ergene basin. Through EWIS, water managers can evaluate different possible scenarios in a comparative manner. Modeling results uploaded to the system by the users can be visualized according to the scenarios determined and even two different scenarios can be compared over different parameters. As a result of these evaluations, decision-makers will be able to predict the consequences of some of the decisions they will take. It should be noted that the system can operate more efficiently by the addition of online monitoring stations, as continuous data entry will be enabled. It is believed that with these additions, the EWIS will become an environment where common information and data can be shared for the Ergene basin, and with the efficient operation of the warning systems, extraordinary situations in the basin will be noticed in a short time and necessary measures can be taken quickly.

In addition to these capabilities, EWIS has an infrastructure where all basins in the country can be managed individually with simple adjustments and real-time data inputs.