**1. Introduction**

The rehabilitation and preservation of ecosystems is an important goal to achieve globally. There are multiple incentives for meeting this goal: preserving biodiversity, mitigating climate change, and assuring future generations can enjoy clean air, land, and water. Water quantity and quality management play an essential part in these conservation efforts. Therefore, environmental agencies usually include in their guidelines the need for stakeholder involvement in the decision-making process [1,2]. A standard tool that can engage stakeholders in decision making is a decision support system (DSS). Specifically, in the case of environmental usage, the tool is often called an environmental decision support system (EDSS). In water-quality-related issues, a water quality model can be used as a kernel in the EDSS that can guide recommendations to stakeholders. The recommendations may include the impacts of changes in flow quantity and water quality, managing the dayto-day operations of hydropower dams (or any water infrastructure) under environmental restrictions, or responding to an unexpected pollution event.

To meet conservation efforts in aquatic environments, agencies often recommend developing EDSSs to guide decision making and engage stakeholders [1]. These EDSSs are part of a holistic system for allocating and managing water to maintain ecosystem functions. Nevertheless, such tools are still not widely adopted in practice. The following factors make an EDSS expensive (in resources and time) to implement: (1) Model assimilation and calibration; (2) Lack of required expertise in the use and interpretation of EDSSs; (3) Software development for the implementation and maintenance of the EDSS; (4) Computer resources needed for the model computation and hosting the EDSS application (the installation of the software on a computer or a server).

This study shows how the last two challenges could be addressed using a low-cost implementation that leverages new open-source technologies in software development

**Citation:** Bornstein, Y.; Dayan, B.; Cahn, A.; Wells, S.; Housh, M. Environmental Decision Support Systems as a Service: Demonstration on CE-QUAL-W2 Model. *Water* **2022**, *14*, 885. https://doi.org/10.3390/ w14060885

Academic Editors: Nigel W.T. Quinn, Ariel Dinar, Iddo Kan and Vamsi Krishna Sridharan

Received: 23 January 2022 Accepted: 7 March 2022 Published: 11 March 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

<sup>1</sup> Department of Natural Resources and Environmental Management, University of Haifa, 2611001 Haifa, Israel; yoavborenst@gmail.com (Y.B.); amir.cahn@gmail.com (A.C.)

(e.g., Docker, Kubernetes, and Helm) and cloud computing. We demonstrate a water quality EDSS that uses the CE-QUAL-W2 model [3] as a kernel to explore the water quality changes resulting from different management decisions.

The choice of using the CE-QUAL-W2 model was based on a simple approach for selecting a water quality model from Mateus [4]. This approach was based on a systematic review of the main available models. The review consisted of the model abilities, dissemination and publications, and the usage experience. In all categories, the CE-QUAL-W2 model was ranked first. CE-QUAL-W2 can simulate the hydrodynamics and water quality of rivers, lakes, reservoirs, and estuaries [3]; thus, when used as a kernel in an EDSS, it allows decision support for multiple types of aquatic environments.

Furthermore, this model is open-source, which means that there is no need to invest money in buying licenses to use the model, and users that are familiar with software programming can add features. Mateus [4] also notes that CE-QUAL-W2 simulations are relatively fast and require low computational power compared to other models. The model input and output are based on text files. The model itself is an executable that can be run without interacting with a graphical user interface (GUI). This model design acts as a simple external application programing interface (API) that allows another software program (e.g., EDSS) to change the inputs, execute the model, and analyze the results. CE-QUAL-W2 was implemented in over 2000 sites in 116 countries [5]. The source code is actively maintained with bug fixes and new features by Portland State University, USA.

As a result, we chose the CE-QUAL-W2 model as the kernel of our EDSS. The main objective of a water quality EDSS is to provide a simple interface for stakeholders to better plan future projects in the wetland or handle the day-to-day operations of the wetland. Using CE-QUAL-W2 for decision making is not new; several attempts have been made over the years to use the model in decision-making contexts.

For example, Eturak [6] used the model as part of an EDSS to understand the impact of the planned "Buyuk Melen" reservoir on its watershed in Turkey. As the reservoir was still in the planning stages, there was no option to calibrate the model. Thus, the model's setup was conducted according to the best knowledge available at the time. Next, a few scenarios with different flow volumes of domestic and industrial wastewater were chosen, and their simulations were executed using the model. Later, the results were compared and graphed for the stakeholders to discuss the implications of different scenarios.

The manual approach of Eturak [6], where a modeler familiar with CE-QUAL-W2 can provide the needed analysis, highlights several drawbacks: (1) Execution of the different scenarios needs continuous involvement of the modeler in the process, including setting up the different inputs, executing model runs, and then comparing the results. Thus, the modeler must be involved in the detailed manual planning of each scenario proposed by the stakeholders. This increases the cost of using the EDSS and makes the discussion/involvement of the stakeholders more difficult; (2) The manual process is timeconsuming. For complex models, the stakeholders will need to wait for a report from the modeler for each of their scenario requests. This does not allow for an active discussion in which scenarios are refined rapidly. In practice, it is hard to define the scenarios in advance. Usually, the scenarios are refined during an active discussion between the stakeholders (partly by seeing how the model reacts). As such, an active discussion is critical, and it could be conducted only if the EDSS can be used in real-time without manually performing time-consuming analyses.

Kumar [7] developed a user-friendly web-based EDSS to interact with an existing calibrated CE-QUAL-W2 model in the Occoquan Reservoir in northern Virginia, USA. The purpose was to enhance stakeholders' interaction with the modeling software. The implementation included a multi-part system controlled by the user from a web server. The web server connects to a bridge module that sends the requests for model execution and mines the results. The final part utilizes other computers and servers on the local network to execute the different model runs in parallel. The results are then returned to the user for analysis.

In the experiment of Kumar [7], the downsides of the manual approach in Erturk [6] were addressed. Thus, the modeler was no longer involved in the process, and the parallel execution on multiple computers facilitated fast computation. Still, the work of Kumar [7] had some other downsides: (1) Not all parts of the EDSS were reusable. Furthermore, the code was written specifically for the subject reservoir. Any other user who wants to use this infrastructure will need to change the source code to match their system; (2) On each computer in the network intended to be used for model execution, a piece of supporting software must be installed. This requires information technology (IT) to set up and maintain the software; (3) Part of the implementation uses ArcGIS, which is a licensed program.

Shaw [8] implemented a very different approach for the Cumberland River system. This study described a method for computing hourly power generation schemes for a hydropower reservoir using high-fidelity models, surrogate modeling techniques, and optimization methods. The predictive power of the high-fidelity hydrodynamic and water quality model CE-QUAL-W2 was emulated by an artificial neural network (ANN) then integrated into a genetic algorithm (GA) optimization approach to maximize the hydropower generation subject to constraints on dam operations and water quality. By using the ANN as a surrogate model, Shaw [8] demonstrated a way to address the drawbacks of both Eturak [6] and Kumar [7]. The surrogate model ran within 2 s versus a 6 min runtime in the CE-QUAL-W2 model of the considered system. This allowed running the EDSS on a single six-core computer in a reasonable time frame.

Nevertheless, the surrogate approach still had some drawbacks: (1) There was still a potential and need to implement and train a surrogate model in addition to the CE-QUAL-W2 model. For the training itself, many CE-QUAL-W2 runs were needed. In this case, 729 runs were made; (2) The solution was implemented using MATLAB and its "Neural Network" and "Optimization" toolboxes, which are licensed software.

Given the examples above, there is still a potential to develop a reusable EDSS solely based on open-source tools without investing in expensive computation hardware. This could be achieved by combining the software as a service (SaaS) paradigm with cloud computing technology. According to market analysts, such as the international data corporation (IDC), cloud computing has become more common and accessible over the last decade. They also show a trend of reduced usage costs for the users. They indicate that these factors have made SaaS usage more popular in the last few years. This conclusion is derived from the immense growth in revenues and market share for SaaS in the public cloud [9]. This can be explained by the benefits of this paradigm for the customers and the service providers. Some of these benefits are: (1) Customers do not need to have any computer infrastructure or install software on computers; (2) The company does not need to pay for computers and servers that are not in use and can adopt a "pay as you use" model; (3) The virtually "infinite" parallelization option for on-demand computer power allows the companies to offer efficient solutions for any number of customers, termed scalability; (4) The company eliminates the need for local IT personnel to maintain the computation infrastructure and server rooms; (5) Updates are deployed quickly to all users. Similar to our paradigm, other studies discussed leveraging cloud computing and SaaS for environmental software development. Swain [10] presented an open-source platform for interacting and developing environmental applications. The platform was designed to simplify modern web-based software development over cloud infrastructure for scientists. The study focused on simplifying the development but did not consider computational aspects, such as parallel execution of the models. Ercan [11] developed a cloud-based SaaS to calibrate the Soil and Water Assessment Tool [12]. The proposed solution is based on a single algorithm that utilizes multiple (up to 256) central processing units (CPU) for parallel executions of the model [11]. Recently, Li [13] implemented a Dockerbased [14] framework for developing EDSS that can be used on cloud infrastructure [13]. Considering the examples above, they all support the need to simplify environmental software development for computationally intensive applications, making EDSS more accessible to environmental scientists, hydrologists, and stakeholders. This study continues

these efforts while focusing on a water quality EDSS that requires intensive computational power. We propose a generic EDSS, which is based on the popular CE-QUAL-W2 model for: (1) Simplifying and reducing the needed amount of software development by requiring only a decision algorithm development instead of a full computational infrastructure; (2) Supporting flexible scaling of computer resources of parallel model runs, which are expected in decision problems that involve water quality simulations. To achieve the above goals, we explore new technologies that simplify and reduce the cost of assimilating a water quality EDSS. Thus, offering a new paradigm of "Water Quality EDSS as a Service", an open-source computationally efficient platform that can support any EDSS algorithm application utilizing the CE-QUAL-W2 model. This paradigm can make these tools more accessible and approachable for use by environmental agencies and organizations, enabling advanced decision making and increasing stakeholder engagement.

The conceptual framework of EDSS as a service is illustrated in Figure 1. The EDSS system disconnects the different levels of complexity between software and algorithm developers and the different end-users. The software developer maintains the computational infrastructure, and, thus, they are responsible for advanced software development (e.g., configuring the computational cluster). In contrast, the algorithm developer interacts only with a higher level of the EDSS using a simple interface; thus, little experience in cloud computing technology is expected from the algorithm developer. Relying on a simple interface, water engineers and/or hydrologists with experience in algorithm development can use the system to distribute heavy computational tasks in the cloud. End-users (e.g., a watershed manager) can define scenarios and initiate runs using a web-based interface without the need to make changes to the EDSS; hence, the arrow shown in Figure 1 does not reach a deep level as in the case of the developers. Lastly, the public stakeholders can view and comment on the published scenarios and results (i.e., they have one-directional arrow in Figure 1).

**Figure 1.** The conceptual framework of EDSS as a service.
