Driving Factors of Geosmin Appearance in a Mediterranean River Basin: The Ter River Case

In recent decades, human activity coupled with climate change has led to a deterioration in the quality of surface freshwater. This has been related to an increase in the appearance of algal blooms, which can produce organic compounds that can be toxic or can affect the organoleptic characteristics of the water, such as its taste and odor. Among these latter compounds is geosmin, a metabolite produced by certain cyanobacteria that confers an earthy taste to water and which can be detected by humans at very low concentrations (nanogram per liter). The difficulty and cost of both monitoring the presence of this compound and its treatment is a problem for drinking water treatment companies, as the appearance of geosmin affects consumer confidence in the quality of the drinking water they supply. In this field study, the evaluation of four sampling sites with different physicochemical conditions located in the upper part of the Ter River basin, a Mediterranean river located in Catalonia (NE Spain), has been carried out, with the aim of identifying the main triggers of geosmin episodes. The results, obtained from 1 year of sampling, have made it possible to find out that: (i) land uses with a higher percentage of agricultural and industrial activity are related to high nutrient conditions in river water, (ii) these higher nutrient concentrations favor the development of benthic cyanobacteria, (iii) in late winter–early spring, when these cyanobacteria are subjected to both an imbalance of the dissolved inorganic nitrogen and soluble reactive phosphorus ratio, guided by a phosphorus concentration increase, and to cold–mild temperatures close to 10°C, they produce and release geosmin, and (iv) 1–2 weeks after cyanobacteria reach a high relative presence in the whole biofilm, an increase in geosmin concentration in water is observed, probably associated with the cyanobacteria detachment from cobbles and consequent cell lysis. These results could serve as a guide for drinking water treatment companies, indicating under what conditions they can expect the appearance of geosmin episodes and implement the appropriate treatment before it reaches consumers’ tap.

In recent decades, human activity coupled with climate change has led to a deterioration in the quality of surface freshwater. This has been related to an increase in the appearance of algal blooms, which can produce organic compounds that can be toxic or can affect the organoleptic characteristics of the water, such as its taste and odor. Among these latter compounds is geosmin, a metabolite produced by certain cyanobacteria that confers an earthy taste to water and which can be detected by humans at very low concentrations (nanogram per liter). The difficulty and cost of both monitoring the presence of this compound and its treatment is a problem for drinking water treatment companies, as the appearance of geosmin affects consumer confidence in the quality of the drinking water they supply. In this field study, the evaluation of four sampling sites with different physicochemical conditions located in the upper part of the Ter River basin, a Mediterranean river located in Catalonia (NE Spain), has been carried out, with the aim of identifying the main triggers of geosmin episodes.

INTRODUCTION
In the last decades, increasing pressures generated by human activities conjointly with global change trend led to worsened water quality in freshwater ecosystems, giving rise to several ecological issues. One of these problems, mainly caused by eutrophication and temperature rise, is the uncontrolled and unpredictable growth of algal blooms, frequently associated with organic compounds production, which can be toxic or can alter the water organoleptic characteristics, such as the taste and odor compounds (T&Os) (Clercin and Druschel, 2019). The presence of natural toxins in water often leads to bathing or consumption prohibition, whereas T&Os are a problem for drinking water treatment plants (DWTPs) due to the negative impact they have on the user's perception of the drinking water quality (Ding et al., 2014).
Regarding human activities, their huge increase in the last century significantly affected rivers' basin morphology and water quality (Rubio-Gracia et al., 2017). Particularly, basins' land uses generally shifted from forestry-dominated to agricultural, livestock, and industrial. The increase of intensive agricultural activities in the catchments has been associated with higher nutrients and pesticides concentrations in river waters, which also receive a wide range of organic and inorganic chemical stressors, such as heavy metals, from industrial and urban areas (Drury et al., 2013;Argudo et al., 2020). The effects on water quality induced by the shift of land uses are acting conjointly with the alterations associated with climate change. Climatic conditions have changed in recent decades, being observed specifically in the Mediterranean regions, a clear decrease of the average rainfall, which is becoming much more sporadic and intense, and a relevant increase of the mean air temperature (Intergovernmental Panel on Climate Change [IPCC], 2019). These consequences of climate change take a greater relevance in rivers affected by water scarcity, such as those of the Mediterranean area, where there can be prolonged periods with a very low river flow, which can lead to a higher nutrients concentration, among other parameters (e.g., salts, heavy metals, and pesticides), due to the decreased dilution capacity of the system (Karaouzas et al., 2018). These conditions can trigger the appearance of algal blooms, with a large number of cases described worldwide (Clercin and Druschel, 2019;Ho et al., 2019), and that can finally lead to the appearance of T&O compounds (Watson et al., 2016).
Among the T&O compounds produced by microorganisms, geosmin has been described as the most common in freshwater ecosystems. This metabolite is mainly produced by certain cyanobacteria and actinomycetes, being the firsts associated with geosmin episodes in freshwaters, while actinomycetes usually have a terrestrial origen (Lukassen et al., 2019). Some of the main geosmin-producing cyanobacteria identified are Oscillatoria sp., Dolichospermum sp., Lynghya sp., and Symploca sp. . For a long time, due to the methodology of routine sampling, only the odorous potential of pelagic cyanobacterial taxa has been considered. However, recent studies suggested that most of the geosmin producers are benthic instead of pelagic cyanobacteria taxa (Jähnichen et al., 2011).
Most of the studies on drivers of geosmin appearance in the field have been carried out in reservoirs and lakes (Dzialowski et al., 2009;Harris et al., 2016), whereas only a few studies have investigated geosmin appearance in rivers and streams (Vilalta, 2004). Two of the main important factors associated with geosmin episodes in reservoirs have been described to be the excess of nutrient loads and alterations in its stoichiometric balance. In particular, it has been suggested that increasing nutrient concentrations and lower nitrogen to phosphorus ratio (TN:TP) can promote cyanobacteria growth and dominance in freshwater ecosystems (Olsen et al., 2016;Espinosa et al., 2021), giving rise to the appearance of geosmin episodes. Harris et al. (2016) found out that low TN:TP ratio conditions (<30:1 by mass) favor geosmin episodes in reservoirs, which could be related to an increase in cyanobacterial biovolumes at lower TN:TP ratios. In the Llobregat River (Catalonia, NE Spain), Vilalta (2004) found similar results, being geosmin concentration higher at TN:TP values close to 10:1, comparing with TN:TP = 94:1, when no geosmin was detected. From experiments carried out mainly under laboratory conditions, the appearance of geosmin has also been related to other factors such as light availability and temperature. Depending on the geosmin producers, the value of these factors differed, but in general, it has been described that low light availability together with low water temperatures favored intracellular geosmin formation (Zhang et al., 2009;Wang and Li, 2015;Alghanmi et al., 2018). Water flow also influence microbial production of geosmin, being its presence is higher under low water flow conditions (Jüttner and Watson, 2007;Espinosa et al., 2020).
As comment before, although there are studies on drivers of geosmin in reservoirs and lakes, very few have approached this topic in rivers. Geosmin occurrence can be a problem for the companies that exploit rivers to provide drinking water to the surrounding populations, as they do not know under which conditions is produced, and thus, they are unable to predict geosmin episodes. Small companies (water treated ≈ 1,500 L/day, drinking water users ≈ 22,000) cannot incorporate regular monitoring of geosmin concentrations in collected river waters, as analyses are complex and time-consuming, and they need specific equipment often not available in their labs. Moreover, the cost of the analytics can be high and make it difficult for the concerned companies to contract the geosmin analysis in external laboratories as a routine. The low capacity to predict geosmin presence in water leads to the reception of consumer complaints and economic losses associated with the decrease in water consumption supplied by the DWTPs. In that sense, there is a growing need to investigate and understand the drivers associated with the production of geosmin in rivers, helping DWTPs to be prepared for possible geosmin episodes and avoiding the possible costs associated with geosmin analysis per se.
In the Osona region (Catalonia, NE Spain), most of DWTPs collect water from the upper section of the Ter River to supply the nearby cities and villages (around 150.00 inhabitants). In recent years, they have suffered several geosmin episodes that have led to customers' complaints due to the inability to applicate the required treatment on time. This situation has generated the need for a better understanding of the environmental factors associated with geosmin appearance. The main objective of this study was to determine the main triggers of geosmin episodes in the Ter River. To this aim, a 1-year field monitoring (2019) was carried out, analyzing a wide set of physicochemical and biological parameters at four sampling sites distributed along the upper part of the Ter River basin.

Study Site
The Ter River is located in the NE of Catalonia (Spain) (Figure 1). It is characterized by Pyrenean, pre-Pyrenean, and humid continental Mediterranean climate in the upper regions of its catchment (El Ripollès and Osona) and precoastal Mediterranean and coastal Mediterranean climates in the lower regions (Meteocat, 2019). The Ter River is affected by environmental fluctuations typical of the Mediterranean climate, with a higher probability of precipitation during spring and autumn and dry and warm summers. In the Ter River basin (208 km-long and 3,010 km 2 of catchment area), several anthropogenic activities drastically affect water flow and quality. The most relevant impacts are: (i) the presence of small and frequent hydropower weirs, which significantly reduce river flow, (ii) livestock farming and intensive agriculture, leading to an increase of nutrients concentration in fields and in surface and groundwater, and (iii) a large reservoirs system, which supplies energy and raw water for drinking, agriculture, and industrial purposes to Barcelona city and Costa Brava area, which is dramatically affecting the river connectivity, and clearly dividing the catchment in two different areas: upstream and downstream reservoirs system. In this work, the upper part of the Ter River basin (upstream of the large reservoirs system) has been studied (Figure 1).
The river basin area evaluated in this study is included in the regions of El Ripollès and Osona, which cover a surface of around 2,000 km 2 . El Ripollès region is located at the head of the Ter River basin, starting in the Pyrenees, and it is characterized by coniferous forest, natural grasslands, broad-leaved forest, and moors and heathlands (CORINE Land Cover System, 2018). Located downstream, the Osona region is affected by strong anthropogenic pressures, being the main land uses related to non-irrigated arable fields, industrial and commercial units, and continuous and discontinuous urban fabrics (CORINE Land Cover System, 2018).
Four sampling sites (Figure 1) were chosen to perform a 1year field study to identify the driving factors triggering geosmin episodes in the upper part of the Ter River basin. The most upstream sampling site (T1) was located 10.8 km downstream from the source of the Ter River in the Pyrenees, at Vilallonga de Ter municipality. T1 was considered as a reference sampling site, with the best water quality. The next sampling site was located along the Ter River, downstream the municipality of Ripoll (T2) (41 km downstream from the source). At this site, the Ter River has already received the input of the Freser tributary and some WWTPs effluents. The third sampling site was located at the Colonia de Borgonyà, few kilometers upstream of Torelló municipality (T3) and 66.3 km downstream from the source. This site was selected because it is one of the collection points of the drinking water company "Aigües d'Osona S.A., " which supplies drinking water to Torelló municipality and surroundings. The last sampling site along the Ter River (T4) was located in Gurb municipality, 100 m upstream to the collection point of "Aigües de Vic S.A., " the drinking water company that supplies the city of Vic and surroundings, and 81.8 km downstream Ter River source.

Sampling Procedure and Physicochemical and Biological Analysis
During winter (January-March) and spring (April-June) seasons, weekly or biweekly field samplings were carried out, whereas from July to November (summer and autumn), monthly sampling campaigns were done. The higher sampling intensity during winter and spring was chosen because of the higher probability of geosmin occurrence during these seasons (Vilalta, 2004; Personal communication from drinking water companies). The nomenclature used in this study to identify the different sampling days includes the letter of the season (W = winter, Sp = spring, Su = summer, and A = autumn) followed by the number of the sampling day in this season, being, for example, W6, the name given to the sixth day of sampling in winter.

Water Samples
The following physicochemical parameters were measured in situ with specific probes: temperature, dissolved oxygen concentration, and oxygen saturation (YSI professional plus, YSI Incorporated, United States), pH (XS pH7+ DHS), and electrical conductivity (XS COND 7+). Water samples were taken and filtered through 0.2-µm nylon membranes filters (Merck Millipore) before the analysis of soluble reactive phosphorus (SRP), N-NH 4 + , N-NO 2 − , and N-NO 3 − . The volume filtered for SRP and N-NH 4 + was 10 ml and for N-NO 2 − and N-NO 3 − was 50 ml, and the analyses were performed following the protocols established by Murphy and Riley (1962); Reardon et al. (1966), and Rand et al. (1976), respectively. The dissolved inorganic nitrogen (DIN):SRP ratio was calculated and determined as DIN divided by SRP in molar quantities. DIN concentration was determined as the sum of ammonium (N-NH 4 + ), nitrite (N-NO 2 − ), and nitrate (N-NO 3 − ) concentrations. Furthermore, 1 L of water was taken for the analysis of turbidity, suspended solids, and organic matter. Water turbidity was measured using a turbidimeter (HI 98713, HANNA Instruments). The organic matter present in water samples was estimated from the absorbance values measured at 254 nm using a spectrophotometer (NanoPhotometer TM P-360, INTEM), and the suspended solids were obtained following APHA (2005) and using a Forced air oven, MEMMERT IFE500. All samples were stored at -20 • C until analysis.
A 1-L opaque glass bottle was used to collect the water sample for geosmin quantification. Bottles were stored at 4 • C in dark conditions until analysis, which was performed within 48 h after collection to avoid degradation and volatilization. The protocol followed for geosmin analysis in water was described in Espinosa et al. (2021). Briefly, to analyze geosmin concentration, 50 ml of each water sample and 10 g of NaCl were added to a 100-ml opaque reaction vial and heated at 60 • C for 25 min in agitation to favor geosmin volatilization. To extract the geosmin, a 65µm polydimethylsiloxane/divinylbenzene fiber was used, and the separation and analysis of the extracted volatile compound were performed in a gas chromatography-mass spectrometry instrument (ISQ-TRACE GC ULTRA). The analytical detection limit was 2.5 ng/L, the analytical quantification limit was 8 ng/L, and the precision of the method was evaluated with the relative standard deviation (RSD ≤ 20%).

Biofilm Samples
Each sampling day, three cobbles were randomly taken from each sampling site to evaluate in situ the biofilm photosynthetic efficiency and the phototrophic community composition. The community photosynthetic efficiency (Yeff ) and the minimum fluorescence yield (F 0 ) (that can be used as an estimation of algal biomass) were measured with an amplitude modulated fluorimetry (Mini-PAM fluorometer Walz, Effeltrich, Germany), and the phototrophic community composition was evaluated with a BenthoTorch (bbe Moldaenke, Schwentinenta, DK). After that, each cobble was scrapped in 60 ml of water from the same sampling site to obtain a biofilm suspension. Aliquots of this suspension were used to analyze chlorophyll-a (Chla), performed as described by Jeffrey and Humphrey (1975), and ash-free dry mass as described in Espinosa et al. (2020). The Margalef index was also calculated as the quotient between the carotenoid/Chl-a ratio, being values obtained from the spectrophotometric reading of the sample at 430 nm (carotenoids and accessory pigments concentration) and 665 nm (Chl-a concentration), to obtain information about the maturity of the populations (Elosegui and Sabater, 2009). These samples were stored at -20 • C until analysis.

Data Treatment
The Kolmogorov-Smirnov test was performed to verify that the variables fulfilled the conditions of normal distribution, and if they did not, they were logarithmically transformed. Physicochemical and biological data were analyzed using an analysis of variance (ANOVA) using the "aov" function ("devtools" package) in RStudio software (version 3.6.0) being the sampling site, the season, and its interaction the factors evaluated. Significant results were tested post hoc with a Bonferroni test. Pearson correlation coefficient tests were carried out to explore the relationship between variables. Statistical significance was set at p < 0.05 for all tests performed. A redundancy discriminant analysis (RDA) was carried out to explore the potential relationship between the independent variables or potential drivers and the response variables ("vegan" and "tidyr" R packages). They were considered as potential drivers for all the water analytics except for geosmin concentration, which was considered as a response variable together with all the biofilm analytics. Forecasting models to predict the geosmin appearance according to the physicochemical data collected were generated by means of multiple regression analysis (MLR) and random forest (RF) models. The primary purpose of using a linear model was to provide a baseline against which to compare the non-linear RF model, an ensemble machine learning method that constructs a non-linear function based on an ensemble of simpler decision tree models (Kehoe et al., 2015). These models were tested for their ability to predict geosmin at different time delays, not just current conditions, to understand at what time scale geosmin can be predicted and which are the important predictors at each time lag. Models were calibrated for 11 different forecasting time lags ranging from the current level (i.e., no time lag, t = 0) up to 10 weeks in advance-in a 1-week increment. Linear (regression) and non-linear models (RF) were calibrated and validated (70-30%) on randomized subsets of the total dataset. The R function "lm" was used for the MLR, whereas RF models were developed with the "randomForest" package. The performance of the models was assessed by the multiple determination coefficient or R 2 adjusted. The relative importance of the different predictors at different time lags was evaluated by using the "importance" function ("randomForest" package).

Geosmin Concentration
The presence and concentration of geosmin in water varied throughout the year (2019), in which the present study was carried out (Figure 2). Statistically, geosmin presence in water was significantly affected by the sampling site (ANOVA, F = 10.378, p < 0.001), the season (F = 9.007, p < 0.001), and the interaction between site and season (F = 2.243, p < 0.05). Sampling site T4 was statistically different from the others (Bonferroni test: p < 0.001), being the one with the highest geosmin concentration, especially in spring (249 ± 33 ng/L) compared with the other seasons (p < 0.01).

Physicochemical Parameters
Some of the evaluated physicochemical variables (Table 1) significantly changed depending on the sampling site, the season, and its interaction. The lowest values reported for most of the parameters evaluated were found at sampling site T1, mainly highlighting pH, electrical conductivity, temperature, and nutrient concentrations (ANOVA, p < 0.05). In contrast, sampling site T4 showed opposite results to T1, with very high values, especially for the nitrogen forms, whose concentration increased up to four times compared with T1, on average.
Seasonality also had an effect in some of the physicochemical parameters evaluated, being in autumn when lower pH values and dissolved oxygen were recorded, together with higher nitrites concentration (Bonferroni test, p < 0.01 in all cases). Phosphate concentration and turbidity presented the highest values in spring (p < 0.001), when, in contrast, the DIN:SRP ratio showed lower results compared with summer and autumn (p < 0.01).
Geosmin concentration for all sampling sites and seasons was positively correlated with pH, electrical conductivity, turbidity, and phosphate concentration (Pearson's correlation, p < 0.01 all cases) and negatively correlated with the DIN:SRP ratio (Pearson's correlation, p < 0.05).
Considering that the geosmin peak was measured at T4, a specific analysis was carried on the sub-dataset regarding this sampling site. The analysis of correlations revealed that geosmin concentration was positively correlated with phosphorus concentration (Pearson's correlation: r = 0.789, p < 0.01) and had a negative correlation with the DIN:SRP ratio (r = -0.868, p < 0.01). During spring, when the highest geosmin peak was detected, the DIN:SRP ratio was significantly lower (47:1 ± 16:1) compared with the other seasons. On the contrary, autumn was the season showing the highest DIN:SRP ratio (221:1 ± 34:1), due to the important decrease of phosphorus concentration (19 ± 11 µg P-PO 4 3− µg/L).

Biological Parameters
Biological parameters data showed significant differences depending on the sampling site, the season, and the interaction between both factors ( Table 2). Sampling site T4 showed the highest values of Chl-a concentration and cyanobacteria presence, being significantly different from the rest of the sampling sites (Bonferroni test, p < 0.01). Seasonality also affected the biological parameters evaluated. Phototrophic community presented higher biomass values (estimated as microgram Chl-a per square centimeters) in summer (p < 0.01), whereas the F 0 value was higher in autumn (p < 0.05), and Chl-a concentration and diatoms relative abundance had higher values in winter (p < 0.01). Correlation analysis revealed that diatom abundance was negatively correlated with geosmin concentration (r = -0.28, p < 0.05), but no significant correlation was found between geosmin and cyanobacteria presence.

Geosmin Drivers
An RDA was performed with the objective to identify the relationship between the potential drivers (all the physicochemical variables except geosmin) and the response variables (all the biological variables together with geosmin) measured at the different sampling sites (Figure 3). The independent variables in the first two RDA dimensions (RDA1 and RDA2) explained 89% of the total variance in the distribution of the response parameters.
This ordination clearly separates upstream (T1 and T2) from the downstream sites (T3 and T4) along the first axis, which explains the 68.8% of variability, and is mainly driven by increasing nutrient concentrations along the Ter River gradient. The DIN:SRP relationship also influences the distribution of the sampling sites, with T1 being the site with the lowest mean values. Geosmin concentration was mainly affected by the concentration of phosphates and nitrites, the turbidity, pH, and DIN:SRP ratio values, being in agreement with the Pearson correlations found (all of them positively correlated with geosmin concentration except DIN:SRP ratio). The presence of cyanobacteria was favored by lower values of DIN:SRP, in contrast to diatoms, which presented higher values under high nitrate concentration conditions. This last situation also favored high Chl-a values and biofilms with higher photosynthetic efficiency (Yeff ).
An MLR and an RF model between the physicochemical variables (drivers) and geosmin concentration was performed at different time lags (weeks) to identify which factors are the best predictors of geosmin concentration.
Both RF and MLR modeling techniques led to good model fits, but the RF was the better of the two at each time lag (based on R 2 adjusted) ( Table 3). At t = 0 weeks (w), the R 2 adj. provided by the RF is 0.70, increasing up to 0.81 at t = 2w, and decreasing below 0.5 at 8 weeks. A similar pattern is found for the MLR, but in this case, the higher predictive accuracy is 0.62 (t = 2w) and decreases below 0.5 at 6 weeks. The analysis of relative predictor importance revealed patterns associated with the time lag of   Figure 1). Before lag 4 weeks (t = 5-t = 10w), nitrates concentration and temperature are the parameters with higher relative importance within the RF model (≈10-20%). From that moment on, the phosphorus concentration, the DIN:SRP ratio, and the turbidity value begin to gain relevance, being at t = 2w when the phosphorus concentration reaches its maximum (28.3%). At this time, there is also a decrease in the relative importance of nitrate concentration, which coincides with an increase in the weight of the DIN:SRP ratio within the model, which is one of the main predictors of geosmin concentration among time-lags 0-2w (22.4-15.2%). At t = 0 and t = 1 week, turbidity is the parameter with the higher relative importance (26.1 and 23.8%, respectively).

DISCUSSION
This study, carried out in the upper part of the Ter River basin, suggested the physicochemical parameters that could trigger geosmin appearance in a river where benthic cyanobacteria are the main geosmin producers.

Geosmin Episodes in the Upper Ter River Basin
During the study, geosmin concentration varied depending on the sampling site and the season (Figure 2). Sampling sites differed mainly in the nutrient's concentration, being higher in T3 and T4, located downstream. The nutrient concentration pattern measured along the upper river Ter could be explained by nearby land uses, which in the Osona region (where T3 and T4 are located) are predominantly related to agriculture (35% of the total area) and urban and industrial development (CORINE Land Cover System, 2018), whereas El Ripollès region, where T1 and T2 sampling sites were located, was characterized by a high percentage of forest and pastures (between 31.2 and 42.5%). The lower levels of point and non-point pollution sources, related to dominant land-use together with the river continuum concept, could help to explain the lower nutrient concentrations found at these sampling sites (Table 1). Furthermore, forests and pastures are environments that can contribute to reducing surface erosion and soil sediment runoff, which are among the main diffuse sources of phosphorus to freshwater rivers. Ongley et al. (2010) reported that agriculture contributes >50% of the total nutrient load, and the fraction of this total load is highly dependent on the proportion of agriculture in the watershed (Shi et al., 2017). Furthermore, agricultural activities are used to have a marked seasonality, with spring being the season that, due to a greater number of rains and higher temperatures, favors better growth and development of crops. This agrees with what is observed in the agricultural activity of Osona, where most of the crops are cereals (53.7%) and forages (43.1%), whose sowing time is in late winter and spring (mainly in March) (Departament d'Agricultura, Generalitat de Catalunya). This makes agricultural land uses have a greater impact on water quality in winter and spring, when planting occurs and crops are fertilized. Moreover, in spring, a larger amount of rainfall could cause fertilizer used in the crops to overflow into the river leaches, directly or through the contribution of groundwater, thereby leading to the deterioration of river water quality. Specifically, ammonium and phosphorus can be easily absorbed by soil particles, then being transported to streams and rivers in events of soil erosion and runoff (Withers and Jarvie, 2008). In the opposite way, nitrate is highly soluble and mobile, and when there is an excess of nitrates, it is leached to groundwater and reaches the rivers through underground flows (Grizzetti et al., 2011). The difference in the mobilization dynamic of nitrogen and phosphorus from the surface can give rise to changes in the DIN:SRP ratio. Both the concentration of nutrients and the DIN:SRP ratio are factors related to the development of certain cyanobacteria, being described that high nutrient concentrations favor the appearance of cyanobacterial blooms (Dodds and Smith, 2016;Lee et al., 2017), in many cases related to geosmin production (Ding et al., 2014). Similar results were observed in this field study, where higher nutrient concentration may have generated favorable conditions for the cyanobacterial development within biofilm communities (0.91 ± 0.58 µg/cm 2 in T4 compared with 0.33 ± 0.44 µg/cm 2 in T1, mean annual value). Some studies have described that a high nitrogen concentration is necessary for cyanobacteria blooms to occur (>0.8 mgTN/L, Xu et al., 2015; ≈0.1 mgN-NH 4 + /L, ≈1.1 mgN-NO 3 − /L, Espinosa et al., 2021). Perkins et al. (2019) pointed out that the ammonium concentration was key for stimulating cyanobacteria development and production of T&O compounds, specifically revealing that metabolites were associated with high ammonium relative to nitrate. In the opposite way, a study performed by Harris et al. (2016) suggested that relatively low NO 3 :NH 3 ratios provide conditions that favor the production of cyanobacterial metabolites. A previous study by Jankowiak et al. (2019) described that phosphorus availability excess may stimulate cyanobacteria blooms, and some studies have pointed out that total phosphorus (TP, both organic and inorganic forms) concentration had to be between 20 and 100 µg TP/L to control the growth of cyanobacteria (Sharma et al., 2011;Li et al., 2018). Moreover, Graham et al. (2004) identified the dominance of cyanobacteria often greatest when the total nitrogen (TN):TP ratio was low (<29:1 by mass), similar to the results found by Harris et al. (2016) in a study carried out in four North American reservoirs. Vilalta et al. (2003), in a study performed in the Llobregat River (Catalonia, NE Spain), suggested that an unbalanced proportion between nitrogen and phosphorus had an effect on benthic geosmin production, being its appearance favored under low TN:TP ratios (TN:TP = 10:1). The study carried out under laboratory conditions by Espinosa et al. (2021) showed that high nutrient concentration, together with a low DIN:SRP ratio (DIN:SRP = 4:1), triggered the production and release of geosmin by the Oscillatoria cyanobacterium present in the biofilm. This difference in the results could be due to factors related to the study system, such as stratification, redox potential, and resuspension of nutrients in reservoirs. However, it could be pointed out that a minimum of nitrogen should be necessary to favor cyanobacteria development. Nevertheless, to trigger geosmin production, an increase in the phosphorus concentration must occur, leading to an imbalance in the DIN:SRP ratio or TN:TP ratio. A similar situation has been observed in this study, as both cyanobacteria abundance and geosmin concentration was favored by high nutrient concentrations and lower DIN:SRP ratio, led by an increase of phosphorus concentration. The effect was clearly observed at T4, the sampling site with higher nutrient concentrations, where in late winter-early spring, there was a pronounced decrease of the DIN:SRP ratio value (Figure 4), associated with an important episode of geosmin. The interaction between DIN:SRP ratio and nutrient concentration seems to be an important driver favoring the production and release of this metabolite from benthic cyanobacteria in the Ter River.

Mismatch Between Cyanobacteria Abundance and Geosmin Concentration
Although cyanobacteria presence and geosmin production seem to be favored by the same physicochemical factors, in this field study, no significant correlation was found between both parameters. This is somehow surprising, as these microorganisms are described as the main geosmin producers in freshwater ecosystems. One reason could be that an identification of the biofilm community at the genus level was not carried out in this study, and, as previously discussed, not all cyanobacteria are geosmin producers. On the other hand, it could be explained by the relative dynamics of geosmin production and release associated with the cyanobacteria life cycle. In fact, it has been described under controlled conditions that geosmin production mainly occurs during the growth phase, and its release to water is the direct consequence of biomass decomposition and/or cell lysis (Kim et al., 2018).
Although no biofilm community identification was carried out throughout the study, biofilm samples were taken from the T4 sampling site in late March for a parallel study carried out under laboratory conditions. These samples were characterized, and the cyanobacterium Oscillatoria sp. was identified as the main geosmin producer (Espinosa et al., 2021). Furthermore, a visual difference detected in situ was the presence of floating cyanobacterial mats coming from the biofilm in winter, whereas in summer, these mats were not observed (personal observation).
Regarding the mismatch found between cyanobacteria and geosmin in late winter-early spring, it could be explained by the cyanobacterial life cycle itself. Different studies performed by Hu et al. (2001Hu et al. ( , 2003 evaluating different cyanobacterial species explained that intracellular geosmin concentration increased in proportion to biomass. In addition to intracellular accumulation, it was observed that the concentration of geosmin in water began to increase. Once these cyanobacteria reached the stationary phase, there was a rapid decrease in intracellular concentration with a corresponding rapid increase of geosmin release, indicating that cell lysis and decomposition of geosmin producers may result in large spikes of these compounds in water supplies. Similar results were observed by Cai et al. (2017); Alghanmi et al. (2018), and Espinosa et al. (2021), supporting the idea that the majority of geosmin is normally retained with cyanobacterial cells during their growth, and release to the medium occur as a consequence of lysis and cellular decomposition. Different studies have pointed out that, depending on the cyanobacterial strain, the growth phase differs. Kruskopf and Du Plessis (2006) observed that Oscillatoria simplicissima reached the fast growth phase after 8 days, whereas Espinosa et al. (2021) found out the maximum Oscillatoria sp. presence at 16 days, and Jindal et al. (2011) described that Oscillatoria formosa could grow exponentially for 24 days before starting the stationary phase. In this field study, the relative abundance of cyanobacteria reached its peak after 1-2 weeks of gradual increase and 1 week later started to decrease, whereas geosmin in the water started reaching its peak 1 week later. This would confirm what was observed in several studies reporting geosmin release to water as a consequence of cyanobacterial biomass decomposition and/or cell lysis.
Despite the lack of correlation between cyanobacteria abundance and the geosmin concentration, the trends that have been observed, such as the ones shown in Figure 6, can help make a hypothesis about the geosmin drivers in the upper river Ter. This figure shows a notable increase in the cyanobacteria abundance during the first months of the year, reaching almost 50% of the biofilm community at the beginning of March and decreasing strongly 15 days later, coinciding with the geosmin peak ( Figure 6A). Similar behavior was observed at the end of April. Nevertheless, this trend only occurs in winter and spring. In summer, cyanobacteria presence was also high, but geosmin was not detected, indicating that the factors favoring its production are not stable throughout the year and that a set of specific conditions have to co-occur to trigger geosmin production by benthic cyanobacteria. Some of the factors that differ between these two moments were the DIN:SRP ratio and the temperature, which presented significantly lower values in winter-spring than in summer ( Figure 6B). The study performed by Alghanmi et al. (2018) pointed out that many cyanobacteria grow better under 25 • C conditions, but this does not imply higher geosmin production. In fact, some studies have found higher geosmin concentration and production yield at 10 • C compared with higher temperatures (25 and 35 • C), indicating that lower temperatures could stimulate geosmin production and favor the accumulation of geosmin in cells (Zhang et al., 2009;Wang and Li, 2015). This would agree with our study, where higher geosmin concentration was observed at lower temperatures (close to 10 • C), whereas at higher temperatures (20-25 • C), geosmin levels were below the detection limit ( Figure 6B). Moreover, considering that low light conditions have been described to favor intracellular geosmin production in river biofilms , the increased light availability occurring in summer may be an additional limiting factor for microbial geosmin production in the Ter River, as higher light incidence prevents gaseous vacuoles formation and geosmin production (Li et al., 2012). In fact, different studies have shown that at temperatures ≈20-25 • C, higher light intensity hinders the production of geosmin by cyanobacteria (Oh et al., 2017;Alghanmi et al., 2018).

Change in the Relative Predictor Importance
The change in the physicochemical conditions at the different sampling sites and seasons could explain the change in the relative importance of the parameters included in the models developed at different time lags. As shown in Figure 5, nitrate concentration and temperature are more relevant in predicting geosmin between lags 5 and 10 (1-2 and a half months in advance), which could indicate the need for high basal nitrate conditions (Xu et al., 2015;Espinosa et al., 2021). However, for a geosmin episode to occur, it seems that a gradual increase in the phosphorus concentration, whose maximum importance as a geosmin driver within the model is reached in lag 2-w, is needed to generate conditions that would favor the development of cyanobacteria biomass. The increase in phosphorus concentration generates an imbalance in the DIN:SRP ratio, whose values decrease as its relative importance in the model increases, up to its maximum at t = 0w (22.4%), indicating that this ratio must be kept low throughout the geosmin episode. These results agree with what was demonstrated by Espinosa et al. (2021) in a study performed under controlled conditions with biofilm communities collected from Ter River, in which cyanobacterial development (Oscillatoria sp.) and geosmin production were favored by higher nutrient concentration (both nitrogen and phosphorus) together with lower DIN:SRP ratio (4:1 compared with 64:1). Another parameter that has presented relatively high importance in the models is turbidity. This could have different explanations: the first one is that the lower incidence of light generated by greater turbidity promotes the development of low-light organisms, such as geosmin-producing cyanobacteria . In fact, other studies evaluating the light incidence with the Secchi Disk method have found a negative relationship between light penetration and geosmin concentration, supporting the idea that low light availability conditions may favor the development of geosmin-producing cyanobacteria (Dzialowski et al., 2009;Parr, 2014). Another explanation is that turbidity has been shown to be correlated with phosphorus concentration, mainly associated with the runoff process (Schilling et al., 2017), which has also been observed in this study. Finally, when the benthic geosmin-cyanobacteria producers are detached from the substrata, which coincide with the cells lysis and consequent geosmin release to the water column, it also releases different material, which can generate an increase in the turbidity value (i.e., solids trapped within thick biofilms in slow flow waters). This last point could explain why turbidity is the principal predictor at times 0 and 1.
The models developed with the database generated in the Ter River in 2019 have made it possible to know with a precision of 0.70-0.81 (considering 1 as the maximum possible value) the geosmin concentration up to a month-month and a half in advance. In addition, the results generated by the models indicate that the RF algorithm offers a great option for the evaluation of long-term ecological data sets. This model has also made it possible to identify the related parameters in each lag and the necessary changes of physicochemical parameters that should occur to increase the possibility of a geosmin episode being triggered. Knowing the relative importance of geosmin drivers, as evidenced by this study, drinking water treatment companies have the possibility of advancing to geosmin episodes based on the monitoring of easier and cheaper variables. In this way, they can have enough time to implement the required treatment and prevent geosmin from reaching the consumer's tap, avoiding complaints from users by being able to offer quality drinking water continuously.

CONCLUSION
Overall, this field study showed that factors directly and indirectly related to both global change and anthropogenic factors could be potential drivers of geosmin occurrence in Mediterranean rivers.
River stretches, which land uses of the surrounding areas favoring higher nutrient concentrations, are more susceptible to be affected by cyanobacterial blooms and geosmin episodes. For example, industrial and agricultural watersheds could lead to higher nutrient concentrations in river waters, which can favor certain cyanobacteria development (such as Oscillatoria sp.). Furthermore, agricultural watersheds are used to experience an increase of phosphorous concentration associated with planting and fertilization periods that may generate a DIN:SRP ratio decrease especially during late winter-early spring. This situation can favor that certain cyanobacterium would start to produce geosmin, which would be released into the water between 7 and 15 days after the cyanobacteria peak in biofilms, associated with the organism degradation or cell lysis.
These results could help to drinking water companies in the forecasting and management of geosmin episodes, being able to understand which ecological conditions are more prompt to favor the appearance of geosmin in the water collected from surface waters and thus allowing them to implement more targeted treatment regimens before geosmin reach the consumer's tap.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.