Introduction

Water in Mediterranean rivers in North Africa (also known as “oueds”) is a scarce resource. Algeria is one of the region’s poorest countries in terms of water potential, and its water management is complex (Touati 2010; Souza et al. 2016). The competition between agriculture, industry, and drinking water supply for access to water, together with the droughts that have hit the country in the past few decades, demonstrate just how necessary it is to pay greater attention to water resources management (Remini 2005). Against this backdrop, several dams were built to ensure sufficient resources for the supply of drinking water to all the cities in the region. These dams also meant that approximately 12,500 km2 of irrigated land could be developed (Algerian Ministry of Water Resources 2012; Bouzid-Lagha and Djelita 2012; Hamiche et al. 2015).

In the Tafna region (north-west Algeria), the water resource is mostly consumed by cities and more locally by farmers. Intensive farming and industrial activities increase the risk of surface water and groundwater pollution (Bemmoussat et al. 2014; Benabdelkader et al. 2018; Haddou et al. 2018). Nitrate contamination of the water has been observed in intensive agricultural areas in the Mediterranean (Abdesselam et al. 2012) and can also be related to proximity to large reservoirs (Aguilera et al. 2015). In recent decades, the population explosion and development of agriculture and industry in Algeria have altered the biogeochemical cycle of nitrogen and increased the input of nitrates into catchments (Taleb et al. 2004). A slow but inexorable rise without primer stabilisation of the nitrate content in water has been observed in some regions. This increase has often been linked to dam construction and to the development of farms, as well as excessive fertilisation of agricultural areas by mineral and organic fertilisers such as manure and sewage sludge, leading to the oxidation of organic nitrogen and ammonia nitrate (Boualla et al. 2011; Aguilera et al. 2015).

Elevated nitrogen (N) loads in coastal estuaries can also enhance the eutrophication of marine areas. Eutrophication is one of the world’s most serious water quality problems (Guoqing et al. 2012; Gold et al. 2016). The control of nitrate pollution was one of the first issues addressed in an attempt to deal more effectively with agricultural pressures on water quality. However, it is not easy to manage the direct interaction between land use, agricultural management practices, and water nitrate pollution (Ferrant 2009; Ferrant et al. 2013). The dynamics of nitrogen in a landscape are highly variable depending on the hydroclimatic and soil conditions (Vagstad et al. 2004). Furthermore, the natural internal processes of the nitrogen cycle can be more dominant than external changes, such as agricultural nitrogen inputs (Walling and Webb 1985). The high concentration of nitrates in water can be a health issue due to the associated risk of diseases such as methaemoglobinaemia or blue-baby syndrome in infants and gastrointestinal cancer in adults, when it is used as drinking water, as is the case in semi-arid areas (Merrington et al. 2002; Pavoni 2003; Wolfe and Patz 2002; Libutti and Monteleone 2017).

When coupled with a geographic information system (GIS), hydrological models would appear to be interesting tools for meeting several objectives. Such models allow the spatialisation and quantification of the processes that lead to pollutant transfer and also provide an understanding of the keys processes and the “hot spots” and “hot moments”. They also enable the fluxes between each compartment in the catchment (rivers, soils, aquifers and reservoir lakes) to be quantified. Finally, they allow different agroenvironmental scenarios (e.g. land use changes such as urbanisation etc.) to be tested and the impact of these changes on the quantities of pollutants reaching the aquatic systems to be measured (Daniel et al. 2011).

Several conceptual models combining both agronomic and hydrological processes have been developed to simulate the fate of diffuse pollution, e.g. the areal non-point source watershed environment response simulation (ANSWERS, Beasley et al. 1980), the integrated nitrogen model for multiple source assessment in catchments (INCA, Whitehead et al. 1998), the soil and water integrated mode (SWIM, Krysanova et al. 1998), the topography-based nitrogen transfer and transformation model (TNT2, Beaujouan et al. 2002), the watershed assessment model (WAMView, Bottcher et al. 2002), and the soil and water assessment tool (SWAT, Arnold et al. 1998). The SWAT model has been used widely in various catchments to evaluate hydrology, identify pollution sources (Holvoet et al. 2008), assess the efficiency of the best management operations, including mitigation of the nitrate pollution of streams and groundwater (Özcan et al. 2017), and assess the impact of climate change (Singh and Gosain 2011; Meaurio et al. 2017). Several authors have applied SWAT in semiarid catchments, such as Baker and Miller (2013) in the Njoro River in south-east Africa and Hallouz et al. (2017) in north-west Algeria. SWAT has been applied in the Mediterranean climate by several authors such as Bouraoui et al. (2005) in Tunisia, Briak et al. (2016, 2019) and Markhi et al. (2019) in Morocco, Zettam et al. (2017) and Zettam (2018) in north-west Algeria, and Sellami et al. (2016) in both Tunisia and southern France. Some authors have specifically focused on nitrate fate (Bouraoui et al. 2005; Akhavan et al. 2010; Sharma et al. 2012). In Algeria, there is often a lack of data about nitrates loads from river watersheds (Ounissi et al. 2014), and SWAT’s ability to model nitrate fate at catchment scale is not well known.

Hence, using the example of the 7200 km2 Tafna River basin, the objectives of this study were (1) to evaluate the contribution of the Tafna catchment to the nitrate load entering the Mediterranean Sea, (2) to quantify the impact of agriculture on nitrate concentration in water, (3) to evaluate the nitrate loads entering groundwater, and (4) to quantify the role of reservoirs in nitrate retention, by applying the SWAT model on a monthly scale.

Materials and methods

Study site

The Tafna catchment (7200 km2) is located in north-west Africa, between 34° 19′ 16.4113″–35° 18′ 28.9480″ N and 0° 52′ 27.7805″–2° 13′ 45.4217″ W, and thus covers two countries (23% in Morocco and 73% in Algeria). The elevation in the Tafna basin ranges from 0 to 1800 m a.s.l. The river rises in the Atlas Mountains and flows into the Mediterranean Sea after a 170-km course (Fig. 1) (Zettam et al. 2017). The geological formations consist of limestone and dolomite in the upstream sector where the river runs in a canyon through Jurassic rocks, and in a tertiary basin, characterised by marls covered by recent alluvium in the downstream sector (Guardia 1975). Soils in the Tafna basin are dominated by Calcisols (Barbut and Durand 1952). Land use in the Tafna basin is predominantly Mediterranean forest and agriculture, horticulture (horticulture represents 70% of the total agricultural surface) and arboriculture (Algerian Ministry of Agriculture 2012). The main crop is wheat. Approximately 1.5 million people live in the basin. The most densely populated areas are the cities of Oujda in Morocco (555,000 inhabitants) and Tlemcen in Algeria (140,000 inhabitants) (Zettam et al. 2017).

Fig. 1
figure 1

Location of the Tafna catchment (T: gauging stations located along the main course. A: gauging stations in the tributaries)

The climate is Mediterranean semiarid. From 1963 to 2003, average annual rainfall ranged from 240 to 688 mm. The annual mean temperature was 15.6 °C, with a mean maximum of 28 °C in the summer and a mean minimum of 11 °C in the winter (Taleb et al. 2008; ANRH 2003). The Tafna River is an intermittent river: the daily discharge at outlet station ranges from 0 to 108 m3 s−1 (ANRH 2012). There are five tributaries in the catchment. The largest is the Mouilah wadi in the west, which drains the main industrial centre of Maghnia city. To the east of the basin, the Isser wadi drains the largest agricultural area (Taleb et al. 2004; Taleb et al. 2008; Benabdelkader et al. 2018). In response to the great demand for water in north-west Algeria, which can be considered one of the most water-stressed regions in the world (Terink et al. 2013; Hamiche et al. 2015), five dams were built between 1952 and 2005: Beni Bahdel (65.5 Mm3), Meffrouche (15 Mm3), Sidi Abdeli (110 Mm3), Hammam Boughrara (177 Mm3) and Sikkak (30 Mm3).

Hydrological and water quality observation

Discharge monitoring

The Tafna River’s daily discharge for hydrometric stations (Fig. 1) was monitored between 2003 and 2011 by the National Agency of Hydrologic Resources (ANRH). River discharge (Q, m3 s−1) was obtained from water levels continuously measured by a limnimetric ladder and float water level recorder, and from a rating curve (http://www.anrh.dz/). The average monthly discharge value was used in this study for flow calibration.

Nitrate monitoring

Nitrate flux data sampled by ANRH in four sampling stations was used in this study (Fig. 1). The sampling period was from 2003 to 2011. Surface water samples were taken 5 cm below the water surface at each sampling station to analyse nitrate concentration. The water samples were immediately transferred to the ANRH laboratory for analysis. The agency analysed nitrate concentration by colorimetric methods using a spectrophotometer.

The monthly nitrate flux in the stream was calculated using the following equation:

$$ F={\sum}_{i=1}^n\left({Q}_d.{C}_d\right) $$
(1)

where F is the monthly nitrate flux in the stream (kg N), Qd is the flow on day i (m3 s−1), Cd is the nitrate concentration in the stream on day i (mg l−1), and n is the number of days in the month.

Modelling approach

The SWAT model

SWAT is a physically based and semidistributed model that suits continuous, catchment-scale simulations (Arnold et al. 1998). The model estimates flows of nutrients, pesticides, pathogens and sediments in the soil, groundwater and surface water, as well as river flows (Neitsch et al. 2005). The model divides the simulation area into subwatersheds linked in a cascade structure following the river network; each of them is further divided into hydrological response units (HRUs), which represent unique combinations of soil type, land use type and slope class (Abouabdillah et al. 2014). SWAT possesses components that make it a robust tool for simulating in-stream water quality dynamics (Daniel et al. 2011). It is an open source model and sets the standard in terms of the availability and comprehensiveness of supporting tools and documentation, as well as access to the source code and executables which have been widely applied worldwide (Fu et al. 2018).

The hydrological component in SWAT

On hill slopes, the model includes the processes of precipitation, evapotranspiration, infiltration, surface runoff, lateral flow in the soil profile and percolation from shallow soil horizons to deeper soil horizons (Neitsch et al. 2005). In this study, the Hargreaves method was used to calculate the potentiation evapotranspiration because this has previously been found to be the most accurate method to calculate potential evapotranspiration in semiarid regions (Aouissi et al. 2016). The model uses a modification of the SCS curve number method (USDA Soil Conservation Service 1972) to compute surface runoff (Neitsch et al. 2005). SWAT calculates the peak runoff rate with a modified rational method (Chow et al. 1988). The lateral subsurface flow in the soil profile (0–2 m) is calculated simultaneously with percolation. Groundwater flow contribution to total streamflow depends on the shallow aquifer storage. Percolation from the bottom of the root zone is considered as a recharge to the shallow aquifer (Rostamian et al. 2008). In the channel, flow is routed using a variable storage coefficient method (Williams 1969).

The nitrogen component in SWAT

SWAT monitors five different pools of nitrogen in the soil (Fig. 2). Two pools are inorganic forms of nitrogen (NH4+ and NO3), while the remaining three pools are organic forms (Neitsch et al. 2005). Fresh organic N is associated with crop residue and microbial biomass, while the active and stable organic pools are associated with the soil humus. The organic nitrogen associated with humus is portioned into two pools to account for the variation in availability of humic substances to mineralisation (Neitsch et al. 2005).

Fig. 2
figure 2

Nitrogen pools and transformations simulated with SWAT (Laurent and Ruelland 2011, adapted from Neitsch et al. 2005)

Nitrogen applications can be parameterised in the form of inorganic fertiliser and/or manure inputs (Neitsch et al. 2005). SWAT calculates the transformation and movement of nitrogen within an HRU. Loss of N from the soil system occurs through crop uptake, surface runoff, lateral flow, percolation and soil erosion (Neitsch et al. 2005). The in-stream water quality module in SWAT incorporates constituent interactions (nutrient cycles, algae production and benthic oxygen demand) used in the enhanced water quality model (Brown and Barnwell Jr. 1987). A comprehensive description of the model is given by Neitsch et al. (2005). When calculating nutrient transformations in a water body, SWAT assumes that the system is completely mixed. In a completely mixed system, nutrients are instantaneously distributed throughout the volume when they enter the water body (Neitsch et al. 2005).

The initial amount of nitrogen in a water body on a given day is calculated by the following equation:

$$ {M}_{\mathrm{initial}}={M}_{\mathrm{stored}}+{M}_{\mathrm{flowin}} $$
(2)

where Minitial is the initial mass of nutrient in the water body for the given day (kg), Mstored is the mass of nutrient in the water body at the end of the previous day (kg) and Mflowin is the mass of nutrient added to the water body on the given day (kg) (Neitsch et al. 2005).

SWAT data inputs and model set-up

The data required are summarised in Tables 1 and 2 and Fig. 3. For this study, Arcgis 10.1 and ArcSWAT 2012 were used to set up the model. The catchment was discretised into 107 subbasins with a minimum area of 7020 km2 and 1067 HRUs.

Table 1 Input data for the SWAT model used in this study
Table 2 Average spreading dates and amounts of nitrogen fertilisers on crops across the Tafna catchment, together with average planting dates and harvest dates (Fertial 2010; Zettam 2018)
Fig. 3
figure 3

a Main land uses, b main soils, c SWAT DEM delineated sub-basins of the Tafna catchment, location of the weather stations (Zettam et al. 2017)

Model calibration

The calibration process was conducted with the SWAT-CUP program (Abbaspour 2007), using the SUFI2 (Sequential Uncertainty Fitting, ver. 2) algorithm. The SWAT-CUP user can select the parameter sets for calibration and the time series to be observed to which the simulation output is fitted by automatic parameter manipulation (Abbaspour 2007; Lotz et al. 2017).

The present study was based on a previous calibration of stream flow (Zettam et al. 2017). Briefly, 16 parameters involved in hydrological processes (Table 3) and two parameters involved in the nitrogen cycle were calibrated (Table 4). Monthly stream flow and nitrate loads were calibrated from January 2003 to August 2011 (excluding a 3-year warm-up from 2000 to 2003). The model was run 150 times with SWAT-CUP for each gauging station, and the flow was calibrated at nine gauging stations (Zettam et al. 2017). Four of the nine gauging stations were used in the present study to calibrate nitrate loads (see Fig. 4 for monthly flow and Fig. 5 for monthly nitrate loads).

Table 3 SWAT discharge parameter calibration values used (rank 1 = most sensitive) according to Zettam et al. (2017)
Table 4 SWAT nitrate parameter calibration values used (rank 1 = most sensitive)
Fig. 4
figure 4

Monthly cumulated rainfall (mm) and monthly simulated and observed discharge (m3 s−1) at the four gauging stations in the Tafna River basin where nitrates were also measured (simulation period: January 2003–August 2011) (Zettam et al. 2017)

Fig. 5
figure 5

Simulated and observed monthly nitrate loads at the four sampling stations in the Tafna River basin (simulation period: January 2003–August 2011 except T3, which was from January 2007 to August 2011)

A primary sensitivity analysis resulted in the choice of discharge and nitrate parameters, which are presented in Table 3 and Table 4. Calibration parameters were classified according to a sensitivity gradient by using t-Stats (higher values are more sensitive) and p values (the smaller the value, the more significant it is). For more information on this, see Abbaspour (2007). To assess the impact of reservoir lakes on nitrate retention, two SWAT projects were built, one with dams and one without dams. The model was calibrated first with dams and then calibration parameters were applied to the model without dams. The comparison between nitrate flux values at the outlet of each dam in the two SWAT projects allowed the nitrate retention in each Tafna reservoir lake to be calculated. The data on management of the dams were provided by the National Agency for Dams and Transfers (ANBT) in Ain Youcef, Tlemcen, Algeria (Table 1).

Model evaluation

The Nash-Sutcliffe efficiency (NSE) index (Nash and Sutcliffe 1970), the coefficient of determination (R2) and the percentage of bias (PBIAS) were used to evaluate the performance of the model when simulating monthly discharge and monthly nitrates fluxes as follows:

$$ \mathrm{NSE}=1-\frac{\sum_{i=1}^n\ {\left({O}_i-{S}_i\right)}^2}{\sum_{i=1}^n\ {\left({O}_i-\overline{O}\right)}^2} $$
(3)
$$ {R}^2=\left\{\frac{\sum_{i=1}^n\left({O}_i-\overline{\mathrm{O}}\right)\left({S}_i-\overline{S}\right)}{{\left[{\sum}_{i=1}^n\ {\left({O}_i-\overline{O}\right)}^2\right]}^{0.5}{\left[{\sum}_{i=1}^n\ {\left({S}_i-\overline{S}\right)}^2\right]}^{0.5}}\right\} $$
(4)
$$ \mathrm{PBIAS}\ \left(\%\right)=\frac{\sum_{i=1}^n\left({O}_i-{S}_i\right)\ }{\sum_{i=1}^n\left({O}_i\right)}\ast 100 $$
(5)

where Oi and Si are the observed and simulated values, n is the total number of paired values, \( \overline{O} \) is the mean observed value and \( \overline{S} \) is the mean simulated value. In this study, monthly NSE was deemed to be satisfactory when NSE > 0.5, monthly R2 was satisfactory when R2 > 0.5, and PBIAS was satisfactory at ± 25% for streamflow and ± 70% for nitrate (Moriasi et al. 2007).

Results

Discharge and nitrates calibration

Monthly discharge (Table 3; Fig. 4) and monthly nitrate load (Table 4; Fig. 5) were simulated during the calibration period (January 2003 to August 2011). Simulated nitrate fluxes satisfactorily matched observations in view of the model’s indicators of performance at the T3 and A1 nitrate sampling stations (Fig. 5). For the other two sampling stations, the simulation of nitrate loads was unsatisfactory, but nevertheless the simulated values were within the range of observed values. SWAT underestimated the cumulative N-NO3 flux during the 2003–2011 period (Fig. 6).

Fig. 6
figure 6

Monthly cumulative nitrate loads (t N), observed and simulated by the SWAT model at the outlet of the Tafna River basin (T8 sampling station)

Temporal and spatial variability of nitrate load

The model simulated the seasonal variability of the nitrates (Fig. 7). The mean monthly nitrate flux decreased during the dry season from April to August (6–0.6 t N). The N–NO3 loads increased significantly during the wet season from September to March (10–27 t N). Large amounts of nitrate in surface runoff were found upstream of the dams (0.25–1.57 kg N ha−1 year−1; Fig. 8a). The average nitrate load transported to the Mediterranean Sea ranged between 37 and 85 t N year −1 (Fig. 8b). The nitrate concentration in the Tafna River varied between 3 and 163 mg L−1 (Fig. 8c). The highest concentrations were located upstream of Mouilah wadi and downstream of Tlemcen city. The nitrate concentration only exceeded 50 mg L−1 (the maximum contaminant concentration of nitrate for drinking water according to the World Health Organization (WHO) in a few regions, mostly in the headwaters (Fig. 8c).

Fig. 7
figure 7

Interannual average of monthly nitrate loads (t N) at the outlet of the Tafna catchment (sampling station T8) for the period 2003–2011

Fig. 8
figure 8

Nitrate in the Tafna catchment between 2003 and 2011: a simulated inter-annual average nitrate yields in surface runoff from each sub-catchment (kg N ha−1 year−1), b simulated interannual average nitrate loads transported with water in each reach (t N year −1) and c spatial variability of the annual average nitrate concentration (mg L −1)

Nitrogen balance of the Tafna basin

Considering the nitrogen balance of the Tafna catchment (Fig. 9), fertilisation was the main N input (107.652 kg ha−1 year−1), and the main N output was plant uptake (272.763 kg ha−1 year−1). Nitrate leaching to groundwater was calculated to be 10.066 kg ha−1 year−1.

Fig. 9
figure 9

Simulated annual average nitrogen balance (kg ha−1 year−1) of the Tafna catchment (2003–2011)

Impact of dams on nitrate loads

Simulation showed that the Tafna reservoir lakes contained large amounts of nitrates ranging from 80 to 486 t year−1, i.e. on average 62% of the total amount of nitrates transported annually by the river during the 2003–2011 simulation period (Fig. 10a). The Hammame Boughrara reservoir lake contained the largest amount (32% of the total amount of nitrates retained by Tafna reservoir lakes) (Fig. 10b).

Fig. 10
figure 10

a Cumulative annual nitrates loads (t N) at the outlet of the Tafna catchment, with and without implementing dams in the model, between 2003 and 2011, b percentage of nitrate retention by each Tafna reservoir lake

Discussion

The model adequately predicted watershed hydrology during the period from January 2003 to August 2011. The discharge results obtained in this project had the same intervals as those of the ANRH with regard to surface runoff (the modelled value was 26.16 mm year−1 whereas the ANRH value was 10–100 mm year−1) and potential evapotranspiration (the modelled value was 1301.4 mm year−1 whereas the ANRH value was 900–1400 mm year−1 (ANRH 2003a, b, Zettam et al. 2017). According to Zettam et al. (2017), the Nash-Sutcliffe efficiencies in the three gauging stations (A1, T3, T8) ranged from 0.51 to 0.75, the coefficient of determination (R2) ranged from 0.53 to 0.84, and the percentage of bias was satisfactory in two stations (A1 = 3.68, T8 = 15.62) and unsatisfactory in the other two stations (T3 = 39.42, A4 = 27.11). Gauging station A4 had a lower index performance (NSE = 0.42; R2 = 0.25; PBIAS = 27.11) due to anthropic waste from Oujda city in Morocco. It was very difficult to obtain observed data for Oujda because it is in Morocco, and there is no cooperation on data exchange between Algeria and Morocco (Zettam et al. 2017; Zettam 2018). The Tafna hydrology exhibits a semi-arid Mediterranean climate characterised by precipitation maximums from December to February and a long drought from June to October, particularly in the downstream part of the basin (Haddou et al. 2018). A large proportion of surface water in the Tafna River came from surface runoff (59%) and lateral flow (40%), while the contribution of groundwater was insignificant (1%) (National Agency of Hydrologic Resources (ANRH) 2003c; Zettam et al. 2017; Zettam 2018). Khaldi (2005) has confirmed that the groundwater in the Tafna River is disconnected from the superficial course.

The results of the present study showed that the simulated nitrate loads correlated satisfactorily with observations in the two upstream (A1 and T3) sampling stations, with NSE between 0.48 and 0.65 and R2 between 0.63 and 0.68. The PBIAS index was satisfactory in all nitrate sampling stations (− 36.30; 10.42). In the downstream sampling stations (A4 and T8) the nitrate calibration was unsatisfactory: NSE varied between − 0.26 and 0.21 and R2 varied between 0.02 and 0.25. It should be noted that the sampling stations where N simulation quality was lowest (A4, T8) were also the gauging stations where the discharge simulation was the least satisfactory. The T8 sampling station was under the influence of the Tafna dams and Tlemcen city (Algeria). The lowest values of the performance index in simulating nitrate flux were due to the uncertainty related to management data on the Tafna dams (daily discharge outflow). Furthermore, it was not possible to obtain information about irrigation. However, it should be noted that the simulated values were in the same range as the observed values, which was also the case in the study of Bouraoui et al. (2005), indicating that the model worked correctly in view of the considerable uncertainties concerning input data and dam management. The sensitivity of several parameters was tested, but the best calibration was obtained with two parameters. This was the same observation as that in the studies of Lam et al. (2010) and Danvi et al. (2017).

Despite overestimating the simulated flow in the dry season, the model predicted nitrate load values similar to those observed during the hottest months of the year. The difference between observed and simulated values may partly be due to the observed data, since there were limited observations on nitrate concentrations (the sampling frequency is not same in all sampling stations), especially during flood periods (Boithias et al. 2014; Lefrancq et al. 2017). However, the difference between observed and simulated values may also be due to the processes actually described in the model and its calibration (e.g., Ligaray et al. 2017) and the uncertainties in data on agriculture management, waste water outflows from the cities and daily dam discharge outflow. The weakness of the model when simulating nitrate flux was due to (i) the improper runoff simulation, (ii) the nature and accuracy of the measured nitrate and flow data, and (iii) the uncertainty of model inputs (point-source nutrient input, average land use, and associated management practice inputs and dam management), which may not accurately reflect local land use and management practices (these can also evolve during the modelled period, depending on agricultural policy trends) (Boithias et al. 2014). Furthermore, it was not possible to validate the model (see the “Discharge and nitrates calibration” section). A validation period was not used in this study because of the nature and accuracy of the measured nitrate and flow data and because the data were limited. For these reasons, calibration for the entire period was preferable.

The results of the simulation between 2003 and 2011 showed total annual nitrate yields reaching 1.57 kg N ha−1 year−1 from some subcatchments. The highest amounts were found to be exported from the headwaters (Fig. 8a), especially Sebdou and Isser subcatchments (Fig. 1) where the exported amounts ranged from 37 to 162 t N year−1. This is in accordance with Taleb et al. (2004), who found that the nitrate increase in the Tafna River is mostly due to the contribution of the Isser. The Isser actually collects water from the Al-Izdahar reservoir, effluents from Tlemcen city through a tributary, and irrigation water from cultivated soils. Therefore, it collects high amounts of excess NO3 fertiliser. The higher nitrate amounts that are simulated upstream are also related to the higher water yields predicted in these areas (Zettam et al. 2017), associated with higher precipitation (ANRH 2003). Indeed, in-stream nitrate concentrations and N exportation rates are mainly controlled by hydrological conditions and river discharge, with annual nitrate export and annual water yield often well correlated (Probst 1985; Petry et al. 2002; Oeurng et al. 2010; Boithias et al. 2014). High exportations of nitrate are also due to agriculture, which is known to be a major source of nitrate in rivers (Carpenter et al. 1998). The area upstream of the Tafna basin currently has the largest expanse of agricultural land in the area (Algerian Ministry of Agriculture 2012. The annual average nitrate load transported to the Mediterranean Sea ranges between 37 and 85 t N year−1. These values are in accordance with Ounissi et al. (2014), who recorded values between 22.7 and 117.5 t N year−1 in the Seybouse (6471 km2) estuary and between 16 and 52 t N year−1 in the estuary of the Mafragh river (2252 km2), both of which are located on the north-east coast of Algeria.

The comparison between observed and simulated cumulative nitrate fluxes at the outlet showed that the model underestimated total annual N during the simulation period. Overall, the comparison between the observed and simulated monthly and cumulative nitrate losses showed that the model performed quite well, although it tended to slightly under-predict cumulative losses. This could be due to the flow underestimation by the model. The modelling exercises contained a number of inherent uncertainties due to a poor representation of processes related to extremes in the chosen model. For example, an underestimation in flow intensity may contribute to less nutrients being transported by water (Mehdi et al. 2015). Furthermore, the uncertainty about fertiliser spreading dates and amounts of nitrogen fertilisers applied on crops may contribute to the model’s inaccuracy.

The model also represented well the seasonal variability in nitrate flux at the outlet of the Tafna catchment. The high nitrate flux observed during specific periods of the year (January and October) can be linked to nutrient availability through fertiliser application (Oeurng et al. 2010). The quantities of nitrates decrease in the rivers during the dry season (between May and August) because there is a disconnection between the river and the upper soil horizons (Oeurng et al. 2010; Bracken et al. 2013). Nitrate seasonal variation is also correlated to the magnitude of the denitrification in soil (Ferrant et al. 2013) and in the hyporheic zone of the stream (Taleb et al. 2008; Sauvage et al. 2018). Denitrification is heavily influenced by temperature, and the rate of denitrification is greatly reduced by lower temperatures during autumn and winter, while spring and summer are more favourable for microbial activity (Malagó et al. 2017).

As shown in this study, there are several advantages to predicting nutrient loads. It provides information that can be directly used in the definition of the risk assessment for aquatic ecosystems (Malagó et al. 2017). The spatial distribution of the annual average nitrate concentration in this basin varied between 3 and 163 mg L−1 (Fig. 8c). The concentration did not exceed 50 mg L−1, i.e. the maximum concentration of nitrate for drinking water according to the WHO, along the entire watercourse, except in a few places. The highest concentrations were found upstream of the Mouilah River and downstream of Tlemcen City. This can be explained by domestic waste entering the river in this area. A relationship between land use type and nitrate concentrations in river reaches could also be inferred. Fertilisation was the main N input, whereas the main N output was plant uptake (Fig. 9). Numerous studies have shown that plant uptake plays an important role in reducing nitrate concentration in the landscape (Curie et al. 2011). The results of the SWAT simulation showed that a large amount leached into groundwater (10 kg ha−1 year−1). This is in accordance with Taleb et al. (2008) and Haddou et al. (2018) who found that the Tafna basin groundwater is very polluted by nitrate. The high concentration of nitrates in groundwater can be a health issue due to the associated risk of diseases (Merrington et al. 2002; Pavoni 2003; Wolfe and Patz 2002; Libutti and Monteleone 2017). Groundwater is very important to the supply of water to North African communities and protection measures must be taken to preserve this vital resource from nitrate pollution (Boufekane and Saighi 2013; Demdoum et al. 2014).

The results also showed that reservoir lakes play an important role in the retention of nitrates. Simulation revealed that reservoirs in the Tafna basin contained a large quantity of nitrates transported by the river (62%), between 80 and 486 t year−1 during the period 2003–2013. The Algerian reservoir lakes are known to trap 42 to 93% of nutrients transported by rivers annually (Ounissi and Bouchareb 2013). The Tafna reservoir lakes retain a high quantity of nitrates that may initiate eutrophication in the water of the reservoir lakes. The Boughrara reservoir lake retains the largest amount (32%) (Fig. 10b). Indeed, the Hammam Boughrara reservoir is at the hypereutrophic stage (Bouzid-Lagha and Djelita 2012).

Conclusions

In this study, the agrohydrological model SWAT was applied to the Tafna River basin, which has a semiarid Mediterranean climate, for the period 2003–2011. The model was quite successful at reproducing monthly nitrate flux in all gauging stations, despite the scarcity of input calibration data and the accuracy of information, which is crucial for modelling nutrient dynamics. The application of the model showed that Tafna headwaters exported large amounts of nitrates into the Mediterranean Sea (37 to 85.5 t N year−1) and agricultural fertilisation was the main N input; however, the main N output was plant uptake in the nitrogen balance. Furthermore, this study demonstrated that 10 kg ha−1 year−1 of nitrogen was leached to the groundwater, which could be a health issue because Tafna groundwater is used as drinking water. This study demonstrated a considerable increase in the dissolved inorganic nitrogen composition of the surface water and groundwater in the Tafna River following construction of the dams. It should also be noted that the Tafna reservoir lakes have a considerable influence on the retention of nitrates. Between 80 and 486 t year−1 of nitrates are stocked in dams, which represent 62% of the total amount exported by the river. Furthermore, there is a need to manage the damns more effectively and improve crop practices, such as implementing a fertiliser input strategy, to avoid pollution of water bodies such as eutrophication, including in the Mediterranean Sea. Further research is recommended, however, to observe the effects of potential future management combined with climate change and land use scenarios. This study therefore offers promising evidence of the usefulness of SWAT applications to protect water resources in North Africa.