Design and performance analysis of a renewable pumping system for treated wastewater to reuse in the Moroccan desert

Treated wastewaters are an important alternative water supply for communities in dry climates all over the world. This study investigates using waste stabilization ponds (WSPs) to treat wastewater and the design of a solar photovoltaic pumping system to transfer the water to an Oasis in the Moroccan desert. The Oasis is currently about 5 ha in size and is irrigated with 24 m/day of underground water. The wastewater is subjected to physicochemical and bacteriological analyses, also a monitoring of operation, maintenance and loading rates of the WSPs for 12 months. To build a solar water pumping system, data on the system’s components as well as local climatic data are obtained. The design optimization is done by simulation software PVsyst. WSPs provide reduced rates of BOD and fecal coliforms of 95 and 99%, respectively, with an average effluent concentration of 20 mg/l and 195 CFU. The exploitation of solar energy for pumping 24 m/day requires five panels with a unit nominal power of 440 W for each panel and 2200 W for the entire system. This allows us to save about 1,500 kg of CO2 emissions per year, protect the region’s fragile water resources and ensure the Oasis sustainability.


INTRODUCTION
The world these days is suffering from a shortage of freshwater resources. Water demand all over the world is increasing because of population growth, industry, agriculture, and tourism development. Freshwater resources are considered a cause of war in many regions. To avoid these wars, countries must start searching for ways to optimize available conventional water resources and get the maximum benefit from the unconventional water resources. Morocco is one of the largest countries in Africa in terms of population. So, the biggest challenge is ensuring the conservation of freshwater and other water resources, conventional and non-conventional ( Jasim 2020;Singh et al. 2021).
In many parts of the world, wastewater reclamation and reuse have been an interesting alternative source of water for irrigation, and many researchers have confirmed its benefits (Kouraa et al. 2002;Kaya et al. 2007;Hind et al. 2011;Kim et al. 2019;Araujo Scharnberg et al. 2020;Buaisha et al. 2020). Treated wastewater is exponentially used for irrigating in areas with water scarcity. It is an economical way to decrease pollution of surface waters and provide groundwater recharge for other agricultural fields. The irrigation networks of public gardens in Morocco contain around 33 pump stations. They consumed a huge amount of traditional fuel which led to emissions of CO 2 and caused negative impacts on the environment (Eshra & Salem 2020;Mirra et al. 2020). However, due to an increase in the price of oil in the international market, harmful emissions from burning of it, high maintenance cost, and short lifetime have been forced to find some alternative. Renewable energy has the potential to limit the use of fossil fuels, as researchers are shifting toward a solar-powered water pumping system (Singh et al. 2017;Cardenes et al. 2020;Verma et al. 2020). As solar is available in large amounts and almost everywhere even in remote locations. The solar cell helps in generating clean energy and operating these pumps. This is considered an effective solution to reduce emissions.
Photovoltaic panels (PV) directly convert the sunlight into useful electrical energy which helps in driving the water pump directly or by inverter. For the past several years, scientists are trying to make a more efficient Solar Photo Voltaic Water Pumping System (SPVWPS) (Nisha & Gnana Sheela 2020). It has several advantages over the traditional pumping system (Renu et al. 2017;Santra 2021), as gasoline, diesel engines required expensive fuel for over the years running. As SPVWPS required no additional fuel cost for running and protecting the environment. It has the potential to change the communities, not only by providing water but also by socio and economic development (Hafeez et al. 2021).
This paper introduces a new approach to save an amount of water from the unconventional water resources of treated wastewater from the city of Assa southern Morocco. It differs from previous studies in that it combines waste stabilization ponds (WSPs), which are environmentally friendly and do not require any energy, with a solar pumping system that transports the treated wastewater from the ponds to an Oasis region for irrigation (Yahyaoui et al. 2015;Chawqi 2016;Ghrieb 2016;Saadi 2018;Sharma et al. 2020). The WSPs are monitored for a year and offer crucial information on the water's quality and suitability for reuse. PVsyst software is used to simulate the efficiency of a solar water pumping system, and the calculations allow us to compare the current study to earlier literature or experimental research. This aids in the verification of the simulation result's authenticity.

Study area description
The city of Assa is located in the following coordinates: latitude of 28.611536 and longitude of À9.430905, in the Guelmim Oued Noun region ( Figure 1). In 2014, it had approximately 20,410 inhabitants and 3,472 households, with a total sanitation network of 40 km without any rainwater network and without a pumping station. The volume consumed each year at Assa is 317,772 m 3 , and the volume billed for sanitation is 191,526 m 3 . This volume of wastewater is treated with a natural lagoon station with a capacity of 1,469 m 3 /day.
The study zone can be divided into two large natural areas: sub-Saharan in the North and North East and Saharan in the South and South West. The climate in the area is of the pre-Saharan type, the average annual rainfall is around 100 mm, characterized by intense intra-and interannual variations. The average temperature is 30 + 5°C, as shown in Figure 2. The winds are very frequent and blow during all seasons causing sandy accumulations of different shapes. The urban center of the study area (Assa) is supplied with drinking water from groundwater resources. The rate of access to drinking water in urban areas of the study area is 100%.
The wastewater treatment plant of the city of Assa is located about 5,74 km from the city's center, as shown in Figure 3. The wastewater arrives from an interceptor in the city's main street with unitary transportation. The flow received each day is 1,469 m 3 . The treatment is a gravitational WSP with three anaerobic, three facultative and two maturation ponds.

Methodological steps
The adopted strategy for our study is mentioned as follows: • Selection of the study area and downloading climate data.
• Collecting data and sampling to evaluate the wastewater treatment plant performance. • Dimesionment of the solar energy system for pumping the required volume of water into the Oasis area.

Climate and energetic conditions
Using the Global Solar Atlas and the National Oceanic and Atmospheric Administration (NOAA) surface flux resources, we constate that the city of Assa is located in a Saharian area with an arid climate and water scarcity. The characterized data include:  • Daily global horizontal irradiation (kWh/m 2 /day) and • Photovoltaic power output (kWh/day). Table 1 demonstrate and provide details about digital elevation model solar irradiation and photovoltaic power along Assa drain terrain. The elevations along the drain were significantly different; furthermore, the yearly global horizontal irradiation is 2,204 kWh/m 2 /year, and the photovoltaic power output is 5.241 kWh/day. So, we observe that the  Uncorrected Proof geographic location of the pump station (28°36 0 41″, À09°26 0 12″) has potentially high solar irradiations and thus high photovoltaic power during 8 h/day approximatively, as reported in Table 1.

Figures 4 and 5 and
The climate data exploited from NOAA software surface flux for the year 2020 are treated, as reported in Figure 6. The average values of air temperature, humidity, horizontal wind speed, and vertical wind speed are, respectively, 22.2°C, 7.1 g/kg, 0.2425, and À1.825 m/s. For solar irradiation hours number, we used an insolator and a software model 'PVsyst' to monitor irradiation during 12 h (07h00-19h00). The profile of data is exported in Figure 7.
According to the literature (Chahartaghi & Nikzad 2021;Singh et al. 2021) and our simulation result, we can define the parameters of: • inclination angle for panel: 30°, • direction: to the South and • solar irradiation hour numbers: 8 h.

Control of wastewater quality for irrigation reuse
The purification performance of Assa's plant is obtained regarding the abatement rate. Physicochemical and bacteriological values are determined according to the flow in 24 h. Table 2 specifies the studied parameters and determines methods and norms of analyses.  Pump stations rely on two types of electrical power: generators and grid electrification. Generators run on diesel, which is a very polluting fuel. The grid runs on natural gas, which is less harmful than diesel, but it still produces a significant amount of pollution. Pumping for 8 h/day, the following is a comparison of the two sources.

Operating by traditional fuel (fossil fuel)
The electric power consumed by the pump station was calculated using the global equation for power in two forms: kilowatt (kW) and engineering toolbox: where H is the differential head calculated from suction and expulsion of the pump (m), P is the consumed power in pumps, (kw or Hp), Q is the pump discharge (m 3 /s), η is the pump efficiency (-), and γ is the specific weight of the water (1,000 kg/m 3 ).

Operating by thermal power stations
The amount of fuel needed to generate 1 kWh is estimated at 206.3 g (Cardenes et al. 2020). The estimated amount of CO 2 emitted from the pump station operation depends on the following equation: Emitted value of CO 2 ¼ Quantity of fuel Â Emission factor (2) According to the engineering toolbox, CO 2 emissions from different fuels were found in Table 3.
2.5.3. Quantification of the solar energy required to replace fossil fuel Solar energy could be used to replace fossil fuel or grid electricity. The number of operational hours depends on the average daily sunny hours. Photovoltaic power output (kWh/day) was used to estimate daily solar irradiation hours based on Global Solar Atlas data 2020. The solar power consumed by the pump station was calculated using the following formulas: where g is the gravity of earth (9.81 m/s 2 ), H is the differential head calculated from suction and expulsion of the pump (m), h is the photovoltaic power output (kWh/day), P is the solar consumed power in pumps (kw or Hp), Q is the discharge in the pump (m 3 /day), r is the solar panel yield (kWp/m 2 ), α is the solar system efficiency (-), and γ is the water density (1,000 kg/m 3 ).

Treatment plant's performance
The wastewater treatment facility consists of WSPs, which are divided into two anaerobic and two facultative ponds that run in parallel. The size and abatement rates of two maturation ponds are calculated using GPS X software (Jagals & Lues 1996). The hydraulic retention time for each pond in Table 4 is calculated by simulating the plant. The physicochemical and bacteriological parameters T air , T w , pH, Cond, DO, BOD 5 , COD, and TSS total coliforms were measured in the Assa WSPs for a period of 12 months in 2019. Table 5 shows the rates of abatement for each pond. Table 6 shows the average values of these parameters at the plant's exit.
The observed purification yields exceed 92% in terms of BOD 5 , 84% for COD, 78% for TSS and 99% for total coliforms for the entire treatment plant. The treatment will easily achieve compliance with the Irrigation Limit Values set at 50 mgO 2 /l in  BOD 5 , 120 mgO 2 /l in COD, and 150 mg/l in TSS (Arrété conjoint n°1276-01; Le décret n°2-04-553). Biological data are one of the most important parameters for evaluating the performance of the plant especially if the final effluent is for reuse (Coggins et al. 2020). Municipal wastewater treatment plants are a very efficient process for the removal of all kinds of pathogens (Wang et al. 2017), the results demonstrate a significant reduction in total coliforms by more than 99%, and this high elimination of bacteriological parameters is mainly due to the adding of maturation ponds, the high solar irradiation that destroys the bacteria's ADN, and the long retention time applied to these ponds. The treated wastewater is therefore compatible with irrigation standards for non-consumable vegetation.
The results from Table 7 indicate that the wastewater from Assa's city has a domestic character, has a high organic load, and is biodegradable. The high values of COD/BOD 5 and TSS/BOD 5 indicate the biologically degradable nature of the raw wastewater, which is the most important reason for the high removal of BOD 5 by anaerobic ponds. Moreover, the desludging period of the anaerobic pond was 6 years since commissioning of the plant against the expected period of 5 years which indicates the high biodegradability of the raw wastewater.
Treated wastewater collected at the outlet of the treatment plants represents unconventional renewable water, which could be an attractive and inexpensive source for reuse in public gardens.

Photovoltaic pumping system design
This study reports the application of photovoltaic cell technology. It is reliable and economically efficient for water supply and pumping systems in rural, urban, and remote regions (Sharma et al. 2020;Shepovalova et al. 2020). Additionally, photovoltaic water pumping reduces CO 2 emissions all over its 25 years of life (Chahartaghi & Nikzad 2021).
Because the distance between the epuration station and the city's center, which contains the Oasis area, is 5.74 km, there are two options: either a pressurized pump that pushes water through this distance (this option consumes a lot of energy), or the second option, which is more cost-effective, is to get the treated wastewater from the station exit to a point near where the Oasis area is located as shown in Figures 8 and 9. With heights of 272 and 271 m, the distance between the plant exit and the pumping point is 0.2 km. This advantage enables for gravitational circulation of treated wastewater. A vertical pumping system with a head of 59 m and a storage tank of 120 m 3 is put in situ to match the Oasis area's height of 325 and save a 5 m of inclination, as illustrated in system design in Figure 8. Solar water pump systems can be very beneficial when used in agricultural, irrigation, and industrial settings. This is a clean way to pump water and increase production and efficiency for farms and other agricultural uses. The water storage tank, the pump, the PV panels, and the power conditioning unit make up the photovoltaic pumping system. These components are defined in terms of their configuration requirements.

a. Water storage tank design
The design of the water storage tank depends on the quantity of water stored. This quantity should be sufficient for 5 days worth of needed irrigation's daily flow. The volume of this tank is 120 m 3 , as shown in Figure 10, and the irrigation volume is 24 m 3 /day. For efficient storage, simulated models by PVsyst specify the following dimensions: • Length: 6.7 m  The pump operation conditions for our study are represented in Table 8, the chosen pump depends on three components: The PV module is a generic F440 with a unit nominal power of 440 W, as shown in Figure 11. The number of PV modules is 5 units with a nominal STC of 2200 W. The voltage is 193 V, and the electric power is 11 A.

System results of energy and water quantity required for reuse
Our system consists of five panels, one pump, and a tank. Figure 12 shows a fixed inclination of 30°with respect to the horizontal for the panels. This is the ideal inclination determined by experience for maximum solar irradiation absorption, and the direction is to the south. The simulation computed and validated the amount of water pumped, as well as the energetic power and efficiency, and the results are listed in Table 9.
The prediction of the system is represented in Figure 13. The losses are due to three factors: • Tank full: unused energy when the water level in the tank is at its maximum • Photovoltaic array inversion losses • System losses: wires and conversion Total losses during solar irradiation collection averaged 2.13 kWh/day, with the amount of wasted energy being lower in the winter. Figure 13 shows the normalized productions for each month of the year, as well as PV-array losses, system losses, and produced usable energy. This graph indicates that the highest energy is produced in the months of April-September, while the lowest is generated in the months of December-January (Hobus & Hegemann 2003;Renu et al. 2017;Singh et al. 2017;Najafi et al. 2019;Chahartaghi & Nikzad 2021).  This energy includes the energy generated by the PV panels as well as the energy necessary to pump the desired amount of treated wastewater for reuse in the Assa Oasis, which is anticipated to be 24 m 3 /day. The graph in Figure 14 predicts the total energy of the system. Figure 14 represents the performance index (performance ration), which is defined as PR ¼ yf/yr, where yf is the system's production ratio and yr is the incident reference energy. In other words, it indicates the system's total efficiency as compared to what could be expected based on the installed power, and it can exceed 60% in the finest PV systems. It is between 0.6 and 0.7 in our system. As a result, based on the literature and experience, the system is excellent.
PVSyst was used to test the system since the solar radiation, ambient temperature, and load requirements of the target city can all be manually selected. During the hull year, this program can be used to determine and evaluate installation  Uncorrected Proof components as well as the outcomes for each parameter. It also accounts for different losses associated with components or meteorological factors. As a consequence, it conducts a more in-depth examination of the installation using statistical analysis and produces positive findings. Table 10 summarizes the major results (Burgan & Aksoy 2018;Mohammed et al. 2021). Figure 15 represents the system's total yearly system loss diagram, which highlights the losses of PV system production, such as losses due to field temperature and losses attributed to module quality. We have energy losses when solar energy arrives on the panel with photovoltaic conversion and the panel's efficiency, so production decreases at the exit of the panel. We also have losses due to ohmic losses of the wiring due to field temperature, and we have losses from the inverter, so the energy at the input and at the output are not the same. This loss result can be analyzed further for the improvement of system efficiency. Figure 16 represents the daily input/output diagram of the effective energy of the modules and the global incident daily irradiation. The diagram helps in evaluating the daily performances of solar collectors. The performances of the entire solar systems are evaluated by combining input/output diagrams to day-by-day simulations, which is very helpful for design purposes. All these procedures are based and validated by experiments, measurements, and studies performed over many years. Note that the most important effective energy at the output of the array is an interval of 6-8 kWh/m 2 /day (Li & Yan 2019). This energy is best received by the panels from 9 AM to 17 PM. A good correlation is also noticed between the daily irradiation in the collector plane, which is represented on the x-axis, and the system's production, which is represented on the y-axis with minimum dispersion (Abbas et al. 2006;Coggins et al. 2019Coggins et al. , 2020Hafeez et al. 2021).
The use of software for pre-design development aids in the prediction of probable outcomes for real-time systems. The comprehensive simulation analysis helps in the understanding of software requirements in terms of parameters that are utilized to fill in for system design. PVsyst's result demonstrates great system efficiency and the precision of the design parameters we picked during the design phase. PVsyst's graphical style makes it easier to investigate the effects of various parameters on system performance as well as the interrelations between them.

Environmental advantages
The main cause of global warming is CO 2 emission released from different sources of energy. The amount emitted depends on energy produced and technology used for conversion. The operation of PV technology is CO 2 emissions-free. It is namely used to pump water for irrigation purposes. The CO 2 emission quantity was calculated for a hull year, and it is equivalent to 1,500 kg for our system. In addition, using the diesel water pump can cause other pollutants as cited in

CONCLUSIONS
This study presents simplified design optimization and evaluation approach for the SPVWP system with the help of theoretical computations and simulation software. In the solar pumping system analysis, the theoretical computation approach facilitates in estimating design and performance parameters, and PVsyst simulation approach facilitates to understand the effects of selected parameters on the performance of the system. This paper may help researchers, designers, and engineers to understand the design mechanism of solar water pumping systems with a simplified computational approach. The predesign development of a system using simulation software may assist to understand predictions about possible outcomes for real-time on-field systems, and results can be analyzed further for the improvement of system performance by comparative technical assessment. In this study, the design of a photovoltaic water pumping system was simulated and verified for Assa's city, based on the net water requirement of 5 ha in the Oasis area. According to the results, the following conclusions are as follows: • The assessment of water requirements and available solar resources are the most important design parameters essential to the design of a photovoltaic water pumping system.
• Wastewater is a huge wasted resource that can be used for irrigation purposes, especially in arid climate cities.  • The design system of the SPVWP system was capable of irrigating a 5 ha area during 8 h/day for pumping 24 m 3 and a total dynamic head of 59 m.
• The results of the study indicate that irrigating using PV systems is beneficial and suitable economically for long-term investments as compared to diesel-powered engines.
• The application of a PV water pump instead of a diesel water pump results in an annual reduction of CO 2 emission by 1,500 kg.

DATA AVAILABILITY STATEMENT
All relevant data are included in the paper or its Supplementary Information.