High-resolution monitoring of groundwater quality in unconsolidated aquifers using UV-Vis spectrometry

In many countries, groundwater quality is routinely monitored in yearly or quarterly intervals. Such frequencies, however, may not be sufficient for investigations into the temporal dynamics of water quality, due to seasonal variability or responses to extreme events. One approach to overcome this limitation is the use of in-situ sensors, such as UV-Vis spectrometers. With a focus on nitrate as an abundant groundwater contaminant, we explored the suitability of these sensors for high-resolution groundwater monitoring in shallow unconsolidated oxic aquifers. In-situ nitrate measurements in four selected wells compared well with values from lab analyses determined in pumped groundwater samples. Most importantly, our results revealed distinct seasonal patterns and, at two sites, pronounced short-term fluctuations in nitrate concentrations concomitant to patterns observed in precipitation, hydraulic head and groundwater temperature. Such dynamics in water quality, and thus the causal relationship with hydrological events and land use, will unfortunately be overlooked when following conventional sampling schemes with the risk of non-representative time series if routine sampling is timed unfavorably. Finally, we provide practical advice for deployment of the sensor.


Introduction
Groundwater is routinely sampled and monitored for various reasons, for example in the framework of long-term water quality assessment schemes or for monitoring contaminated sites. In agricultural areas, excessive use of fertilizers and pesticides can cause groundwater contamination. Nitrate is one major agricultural contaminant that is frequently found in concentrations close to or above the legal limit and thus often forms part of monitoring programs. In the majority of cases, this involves collecting water samples at observation wells and subsequent analysis in the laboratory. In consequence, extended time series for key parameters exist at many locations. However, these time series tend to have fairly large observation intervals, as sampling is often done on a yearly, half yearly or quarterly basis. Thus, many aspects in the temporal dynamics of groundwater quality might be missed. Moreover, manual sampling and lab analysis take considerable time and manpower. Thus there are, among others, economic incentives to keep the sampling frequency low.
A possible solution to these limitations is to complement low-frequency sampling with the application of field sensors and data loggers, such as submersible UV-visible (UV-Vis) spectrometers, for recording selected parameters (e.g. nitrate, dissolved organic carbon, turbidity, temperature) in high-resolution. These optical sensors infer solute concentrations from recorded absorption spectra from light passing through the in-situ water column. They have so far mostly been used in industrial applications, i.e. integrated into the infrastructure of drinking water or waste water plants (Langergraber et al. 2002Mihajlović et al. 2014;Shi et al. 2020), or applied in surface waters (Koehler et al. 2009;Coleman et al. 2013;Hoffmeister et al. 2020). To date there have been only a few applications in groundwater, but with data from multiple wells with fixed pumps and a piping system towards a central, flow-cell sampler (Saraceno et al. 2018;Burbery et al. 2021) and in karst waters (Pu et al. 2011;Opsahl et al. 2017). To our knowledge, only one study reports the use of UV-Vis sensors in unconsolidated aquifers (MacDonald et al. 2017). In general, MacDonald et al. (2017) found their sensors performed well, and they stressed the benefits of producing high-resolution data. However, they noted the need for further comparison to pumped samples. The aim of our study was to further assess the suitability of UV-Vis spectrometers for high-resolution water quality monitoring in unconsolidated aquifers. To this end, we have operated four field sensors, positioned in four observation wells situated in oxic alluvial aquifers, running at up to hourly measurement intervals, unsupervised and around the clock.
Since nitrate is a pollutant of major concern related to groundwater quality, it is the primary parameter discussed herein. The objectives are particularly to assess if the insitu high-resolution monitoring provides concentration data that compares favorably with values obtained from standard sampling procedures. We also investigate the dynamics of nitrate concentrations that go beyond the information obtained from yearly or quarterly sampling. Finally, this paper also provides a short introduction to the working principle of the device, a description of its implementation at the field sites, and our lessons learned from the deployment and use of these novel devices.

Spectrolyser device
In our studies we used four spectro::lyser (s::can GmbH, Vienna, Austria) UV-Vis spectrometer systems (in the following simply termed spectrolyser) to acquire high-resolution time series of nitrate and temperature. The spectrolyser is a compact (44 × 473 mm) spectrometer probe, recording absorption spectra in the UV or UV-Vis range from 200 to 750 nm. The probe can be installed submersed in liquid media (in-situ) or in by-pass solutions (flow cells). It emits light and after the light passes through the measuring cell (from hereon called optical path) the intensity, over the whole wavelength range, is measured by a detector. To compensate aging of the light source the spectrolyser also measures the intensity via an internal beam making the measurement reliable over years. See Fig. 1 for a schematic drawing of the device.
Individual solutes and particles contained in the water absorb light at certain and known wavelengths while it passes through the optical path, decreasing its intensity. The absorption is related to the solute's concentration. The sensor uses matrix-dependent chemometrical algorithms based on absorbance readings at different wavelengths from the measured UV/VIS spectrum to calculate parameter values such as the concentration of nitrate. Moreover, the spectrolyser can also compensate the effects of turbidity on dissolved substances in the spectrum with internal algorithms (Huber and Frost 1998;Langergraber et al. 2003; Fig. 1 Image of the the spectro::lyser (stainless steel device), shown with the ruck::sack brushing device (black device on top of the spectro::lyser) and stainless steel cable attached. Each yellow or white section of the folding rule is 10 cm long. Schematics of the measuring principle are superimposed on the device Abb. 1 Fotografie des spectro::lyser (Edelstahlgerät) mit aufgesetztem ruck::sack Reinigungsgerät (schwarzes Gerät auf dem spectro::lyser) und Edelstahlseilen. Jedes gelbe oder weiße Segment des Meterstabes ist 10 cm lang. Das Messprinzip ist schematisch über dem Gerät beschrieben on the optical windows, the manufacturer recommends use of an automatized cleaning system (compressed air or rotary brush) that avoids these effects that can deteriorate the measurement readings.
One recording cycle of a full absorption spectra including the on-device calculation of the concentration of various selected parameters (e.g. nitrate, dissolved organic carbon, turbidity) only takes a few seconds. In consequence, measurements at short time intervals (down to 15 s) are possible. The spectrolyser can work online, i.e. in (industrial) process control systems but also in groundwater wells with a solar power supply and a mobile network connection, reporting on significant and unforeseen changes of water quality. Alternatively, the system is run offline, saving data to its internal 8 GB storage with information retrieved as needed. In a typical measurement scenario storing spectral and parameter information at a measurement interval of 15 min, the storage capacity will be reached after approximately 15 years, by far exceeding the typical deployment time. Its memory can be read out with any portable device (e.g. laptop, tablet, smartphone) that has a WIFI connection and a browser (s::can GmbH 2020).

Investigation sites
We placed spectrolysers in observation wells at four different locations (Unteres Murtal [UM], Leibnitzer Feld [LF], Grazer Feld [GF], and Aichfeld [AF]), which cover a wide range of hydrogeological settings and land use impacts on groundwater within the alluvial valley of the river Mur, Styria, Austria (Table 1). All wells are installed in unconfined aquifers, mostly made up of sands and gravels deposited during the last ice age. Reported hydraulic conductivities range from 6.7 · 10 -4 to 1.6 · 10 -2 m/s, with mean values in the range from 5 · 10 -3 to 6 · 10 -3 m/s (Fabiani 1971;Arbeiter et al. 1980;Fank et al. 1993).
Well UM is a shallow well (end depth: 5.92 m below ground level (m bgl), average water level: 2.62 m bgl; see Table 1 for further details) located in the aquifer of the lower Mur valley, in the alpine foreland, at a distance of approximately 20 m from the river Mur, which is a gaining river in this area. It is situated in a small clearing within floodplain forest, but close to agricultural land. Well LF is a shallow Table 1 Metadata for the four wells equipped with spectrolysers. Note that the spectrolyser in well AF has been placed at a depth approx. 7 m for the first few months of operation. Depth and levels are given in meters below ground level (m bgl). The inflow distance gives the shortest plausible distance for effluent Mur water to reach the well (based on water table contour lines of average groundwater levels, based on a triangulation of level data of government wells), highlighting the difference between hydraulic connection and spatial position of a well Tab. 1 Metadaten der vier mit spectrolysern ausgestatteten Pegeln. Zu beachten ist, dass der spectrolyser im Pegel AF in den ersten Monaten auf einer Teufe von 7 m eingehängt war. Teufen sind in Meter unter Geländeoberkante (m bgl) angegeben. Die Mur-Zuflussdistanz ist die kürzeste, plausible Strecke auf der exfiltriertes Murwasser den Pegel erreichen kann (basierend auf einem Grundwassergleichenplan des durchschnittlichen Grundwasserspiegels, erstellt anhand einer Triangulation der Grundwasserstände des behördlichen Messnetzes well (end depth: 7 m bgl, average water level: 3.6 m bgl), situated in the Leibnitzerfeld aquifer, next to agricultural land comprising various crops, such as corn, pumpkin and mustard, and close to a major motorway (4 lane A9, linking Austria with Slovenia). Well GF is deeper (end depth: 22.8 m bgl, average water level: 6.62 m bgl), situated in the Grazer Feld aquifer, within an industrial area in the south of the city of Graz and approximately 175 m from the river Mur. The river in this section is impounded because of a new hydropower plant, built shortly before the start of our sampling campaign, so we presume that flow conditions have changed from flow parallel to the river to inflowing conditions during the impounding phase and static conditions now. Well AF is also a deeper well (end depth: 19.5 m bgl, average water level: 3.71 m bgl), situated in agricultural land (grassland, corn, potatoes) in the alpine Aichfeld basin, located in a bend of the river Mur, thus we presume throughflow of river water.

Spectrolyser setup
The spectrolysers have been placed at the upper end of the screened section and below the lowest recorded water level of the wells, i.e. at depths of 4.0 m (well UM), 4.5 m (well LF), 7.2 m (well GF) and 10.5 m (well AF). We installed the spectrolysers in spring 2021 (autumn 2021 in well GF due to technical issues), thus yielding time series of approximately 15 months (7 months for well GF). In comparison to most standard downhole loggers, the spectrolyser is somewhat larger. However, with its diameter of 4.4 cm without a brushing system and 9 cm with a brushing system, it still fits in 4-inch wells. Since it needs an additional attachment (see also below and Fig. 1) a 2-inch well will be a very tight fit. As it has no on-board battery, an external power supply is needed as well as a connector or connect box, when using it with a brushing system, which can be kept rather compact (Fig. 2). When using it at a three-hourly recording interval without the rotary brush system, a comparatively small battery (10.5 Ah) was sufficient. Equipped with the cleaning system, the power consumption increased considerably. We thus initially decreased our sampling interval to 6 h. Later, a 40 Ah and a 55 Ah battery was used, which enabled hourly sampling. Finally, we implemented a new protocol for the brushing system which decreased power consumption, allowing us to use smaller batteries at hourly sampling. Thus, our data shows varying sampling intervals throughout the observation period. Even with the large batteries, the overall setup was still compact enough to be permanently placed at the well site (see Fig. 2a,c). Unlike most downhole loggers, the spectrolyser must not be removed by its cable, as pulling on the cable might damage the device. Therefore, the device must be attached to the well using an additional rope or cable (3 mm stainless steel cable in our case). As we did not have control over the access to the well and thus could not inform all persons accessing the well beforehand, the sites were equipped Removal instructions placed into the well head; c Inside of the battery box, attached to well head; pictured is a large, 40 Ah battery with a connection box for the brushing system and additional space in the box for cables or an even larger 55 Ah battery. The Battery box is approx. 45 × 30 × 28 cm in size; d Removal instructions taped to the wall of the well hut, with red and green "do not pull!"/"pull here" markers on the cables; e "pull here" marker and a green carabiner needed to attach the spectrolyser to a non-standard attachment point inside a well head Abb. 2 Aufbau des Spectrolysers an den Pegeln; a Pegel mit Batteriekiste; b Ausbauanweisungen in der Pegelkappe; c Inneres der Batteriekiste, befestigt am Pegel. Gezeigt ist eine große, 40-Ah-Batterie zusammen mit der Verbindungsbox für das Reinigungssystem, sowie freier Platz in der Kiste für Kabel oder eine noch größere, 55-Ah-Batterie. Die Batteriekiste ist ca. 45 × 30 × 28 cm groß; d In die Pegelhütte geklebte Ausbauanleitung, zusammen mit roten und grünen "Nicht Ziehen!"/"Hier Ziehen"-Schildern auf den Kabeln bzw. dem Stahlseil; e "Hier Ziehen"-Schild und grüner Karabiner, mit dem der Spectrolyser an einem nicht standardisierten Aufhängepunkt in einem Pegelrohr eingehängt ist with laminated instruction sheets and a cellphone number for questions. To indicate where to pull when removal is needed, red and green bilingual markers were added to the cables (see Fig. 2b,d,e).
The internal algorithm of the spectrolyser at standard setting is designed to compensate the possible effects of turbidity (see section Spectrolyser device). Thus, in expectation that the groundwater at the selected sites would show a low turbidity, we initially opted to deploy the spectrolysers without the cleaning system. However, in response to irregular turbidity events, we later equipped one sensor (well LF) with the rotating brush system to evaluate overall effects of the sedimentation of particles to the surface of the optical sensor window.

Calibration and conventional sampling
The spectrolysers were initially operated using the default algorithm to transform the readings into nitrate concentrations. As the spectrolyser readings exhibited unexpectedly high turbidity (see section Spectrolyser setup), an improved custom algorithm accounting for these conditions was developed by the manufacturer and applied to the previously recorded data, including the full spectral information, in retrospect. In order to compare the spectrolyser values to independent measurements and to enable calibration of the spectrolysers, we conducted irregular sampling campaigns, sampling groundwater by means of a submersible pump (Grundfos MP1, EijkelkampSoil & Water, Giesbeek, Netherlands) at all locations, collecting 27 samples in total (8 well UM, 7 well LF, 4 well GF, 8 well AF). After removing the spectrolyser, the well was purged by removing approximately two well volumes until the recorded field parameters from a flow cell (pH, dissolved oxygen, conductivity, water temperature) remained stable. During pumping, we monitored the water level in the well, aiming to keep the drawdown as small as possible and stable. Groundwater was filled in clean Schott glass bottles, kept cold and dark until further analysis. Nitrate concentrations were determined photometrically and with the Indophenol blue method (see also Retter et al. 2021).
In order to obtain spectrolyser readings directly comparable to the data from the lab analyses, we placed the spectrolyser in the flow cell during pumping of groundwater and triggered a manual reading, right at the point in time when the flow cell was disconnected from the pump in order to fill the sample flask. Based on the data from the four sites, a calibration curve was developed that converts the spectrolyser nitrate readings to calibrated nitrate concentrations using a cubic equation (see O'Haver 2021). As each of the sites only covered a very narrow range in nitrate concentrations during the conventional sampling and the spectrolyser data indicated that concentrations beyond these ranges would be encountered, we used all 27 pairs of lab and spectrolyser samples for one calibration curve, applied to all four locations. This calibration curve mainly accounts for potential effects of the overall groundwater chemical composition. In contrast, the use of standard solutions for calibration is not recommended by the manufacturer.

Spectrolyser vs lab data
Comparing the spectrolyser values obtained from the default and custom algorithms with the concentrations obtained from the lab analyses (see Fig. 3a), the spectrolyser already delivered quite robust values close to those from the lab (Root Mean Square Error = 5.25 mg/l, Mean Absolute Error = 4.48 mg/l, default algorithm; RMSE = 3.19 mg/l, MAE = 2.42 mg/l, custom algorithm). Yet, for many purposes, more accurate measurements are desired, and thus, calibration is necessary. Figure 3b compares the nitrate concentrations measured in the lab to those from the spectrolyser after calibration. Calibration further improved accuracy by a considerable amount, particularly for the readings obtained from the custom algorithm and for low nitrate concentrations recorded with the default algorithm (RMSE = 3.27 mg/l, MAE = 2.40 mg/l, calibrated default algorithm; RMSE = 1.78 mg/l, MAE 1.36 mg/l, calibrated custom algorithm).
The calibration of the spectrolysers was based on pumped water samples. The intended application of the device, however, is the in-situ measurement under ambient conditions. To assess if and how spectrolyser readings within the well deviate from those in pumped water, Fig. 3c compares the last downhole readings before pumping to the spectrolyser readings in the flow cell. Likewise, Fig. 3d compares the first readings obtained after re-installation of the device in the well to the values obtained from readings in the flow cell. Generally, the readings obtained in the unpumped well both before pumping (RMSE = 3.28 mg/l, MAE = 2.25 mg/l, calibrated default algorithm; RMSE = 0.95 mg/l, MAE = 0.53 mg/l, calibrated custom algorithm) and after pumping (RMSE = 7.78 mg/l, MAE = 4.38 mg/l, calibrated default algorithm; RMSE = 0.93 mg/l, MAE = 0.51 mg/l, calibrated custom algorithm) agree well with those obtained from the pumped water. However, Fig. 3c,d show that several values obtained from the default algorithm in the well were lower than those measured in the flow cell, which is also reflected in the RMSE and MAE for the default algorithm. This is attributed to the effects of sediment accumulation in wells LF and UM, which likely resulted in sediment accumulated on the device before sampling (particularly well UM in Fig. 3c) and mobilization of turbidity due to pumping afterwards (wells UM and LF in Fig. 3d). As demonstrated by Fig. 3c,d and in the improved RMSE and MAE, the custom algorithm successfully compensates these effects. This suggests that the in-situ measurement provides a good representation of aquifer conditions, as long as the possible effects of sediment or turbidity are taken into account. Fortunately, groundwater at all four sites was also oxic, with values of dissolved oxygen (DO) in the range of 3.5 to 10 mg/l, since in case of anoxic groundwater, differences in DO and consequently nitrate concentrations in well water and pumped groundwater cannot be excluded.

Temporal dynamics
The deep wells GF and AF show low and almost static nitrate levels between 6.4 and 9 mg/l (see Table 2 and supplemental fig. 1). Since well AF is situated in an agricultural area, higher nitrate inputs would have been expected. In contrast, well GF is situated in an industrial area, suggesting low nitrate input. Given their short distance to the river Mur (Table 1) and hydraulic head data suggesting flow from the river to the aquifer, we assume these wells are strongly influenced by river water, which has low nitrate concentration (1.84 to 5.05 mg/l; see Table 2). Well AF also shows low temperatures with a yearly fluctuation of approx. 0.5°C around a mean of 8°C, as well as some very minor temperature events in late spring to summer 2021 (see Table 3 and supplemental fig. 1). Well GF shows a clear, yearly temperature signal, ranging from a maximum of 13.7°C to a minimum of 11.1°C during the (shorter) observation period, also with some minor events in temperature data (see Table 3 and supplemental fig. 1).
The shallow well UM is also situated very close to the river Mur, which has nitrate concentrations between 5.5 and 8.7 mg/l in this river stretch (see Table 2). Unlike the previous two wells, well UM shows nitrate values of up to an order of magnitude higher than the values recorded in the river. As the Mur in this stretch is a gaining river (effluent groundwater conditions) it does not dilute the nitrate concentration in the aquifer. Thus, the groundwater chemical composition is affected by regional groundwater recharge and the local impacts from agricultural land use. The average nitrate levels of approx. 40 mg/l exhibit seasonal fluctuations within a range of approximately 15 mg/l. The seasonal dynamics in nitrate concentrations appears to be inverse to those in groundwater levels and groundwater temperatures which fluctuate between approx. 243.7 to 244.2 m asl and 8.5 to 11.8°C, respectively, the latter with a clear seasonal signal (see Fig. 4 and supplemental fig. 1). In addition, changes in nitrate concentration and temperature are observed at time scales from hours to days. These also appear to be associated with changes in groundwater levels, groundwater temperature and precipitation events, suggesting responses of the water quality parameters to recharge events. The shallow well LF is situated outside of the direct influence of the river Mur, in an agricultural area. Thus, high nitrate values mostly between 30 and 40 mg/l are observed.
As with well UM, a seasonal pattern in nitrate concentration somewhat similar to groundwater temperature and groundwater level emerges. Groundwater level ranges from approx. 296.6 to 270.2 m asl and groundwater temperature shows a very clear yearly signal between 8.5 and 14.1°C (see Fig. 4 and supplemental fig. 1). While the seasonal pattern in nitrate is less pronounced than in well UM, shortterm changes in nitrate concentration and water temperature are an even more striking feature of well LF as compared to well UM. The time series shows sharp decreases or increases in nitrate of up to 26 mg/l, followed by a quick recovery, in a sub-daily timeframe. Looking at one such event in detail (see Fig. 5), it is noticeable that these events can show very fast changes in nitrate (> 4 mg/l/h), which are accompanied by changes in groundwater level following a precipitation event as well as notable increases in groundwater temperature, directly followed by a similar decrease (up to 0.81°C in 6h, followed by a 0.44°C decrease within 6 h).

Spectrolyser use and adaptation
When maintained without a brushing system, a 10.5 Ah battery was sufficient to operate a spectrolyser for 1.5 months at moderate to warm temperatures and for 1 month and a week during freezing conditions, when running at a threehourly sampling interval and with the power saving "automatic sleep" mode active. Additionally equipped with the cleaning system, runtimes with the 10.5 Ah battery were initially reduced to between 10 (cold conditions) and 14 days (warm conditions), even at a reduced sampling (6 hourly) and cleaning (12 hourly) interval. Upgrading to a large, 40 Ah or 55 Ah battery more than compensated for the increased power consumption, enabling us to switch to hourly sampling. Recently we have received a new operating protocol for the brushing system, which significantly reduced power consumption, and thus enabled the use of smaller batteries again.
As we have equipped the spectrolysers with the large batteries only recently, we do not yet have runtimes under very cold, freezing conditions and we have not yet emptied the battery before a scheduled site visit. Given our experience so far, we deem a minimum of 3 months (55 Ah) or over 2 months (40 Ah) as being realistic, even at freezing conditions.

Temporal dynamics and sampling frequencies
As shown by Figs. 4 and 5 water at some sites. Except for two cases where we see a strong temporal increase in nitrate, all other short-term fluctuations show a temporal decrease in nitrate. The shortterm fluctuations in nitrate are associated with precipitation events and increases in groundwater levels. Additionally, this is supported by groundwater temperature data, which shows a fast and notable increase in summer, immediately followed by a similar decrease. Oxic conditions in the aquifers exclude biological nitrate reduction as a reason for the observed dynamics. We thus deem surface influence, i.e. recharge from warm summer precipitation or precipitation warmed up on its passage through the warmed soil, as the likely cause of the short-term variability in nitrate concentrations. Preferential flow through the unsaturated zone provides another possible explanation for these observations. The nitrate concentrations, however, recover soon and approach pre-event values after several days. This suggests that the assumed rapid recharge is localized and subsequently mixes with the surrounding pre-event groundwater such that it causes only temporary dilution. Identifying the nature of the proposed local, rapid recharge process requires further investigation, in particular, to rule out effects of the well construction and artificial recharge e.g. by the nearby mo- While well LF does show most of these short-term events, the three events in September and October 2021 (see Fig. 5) are especially notable, as well UM and LF (separated by approx. 12 km but in different hydrogeological environments) show very similar dynamics. Here, groundwater levels behave in a similar way, matching precipitation events, indicating a connection with large-scale precipitation. Additionally, short term events in nitrate occur at both wells at similar times, also matching changes in water level at the respective well.
The short-term nitrate dynamics observed in well LF and also, though less pronounced, in well UM, do not appear to have significant impact on the long-term nitrate concentrations. Nevertheless, this phenomenon deserves attention at least for two reasons. Firstly, the short-term hydrochemical responses to recharge events can potentially be used to infer information about aquifer properties or recharge processes. Secondly, both the seasonal and the event-based variability needs to be considered in the design and implementation of groundwater monitoring strategies. The example of well UM shows that a yearly sampling campaign may yield very different nitrate concentrations depending on the sampling time. In this case, sampling in autumn would show much lower nitrate levels around 30 mg/l, as compared to values above or close to the EU limit of 50 mg/l in spring. If the sampling coincides with the short-term decrease in nitrate concentration following recharge events, as most evident in well LF, the observed nitrate concentration will be not representative at all.
In order to further investigate this point, we have cut our spectrolyser time series to working hours, i.e. by removing any data on weekends, and on weekdays before 07:00 and after 21:00. We then took 20 random samples from these time series, assuming each single sample to be a single, yearly observation. When comparing the resampled data set to the average of the spectrolyser data, this resulted in a minimum difference of 0.4 mg/l for well LF. However, the median difference was 4.4 mg/l and the maximum at 5.9 mg/l. For well UM, the minimum was 0.01 mg/l and the median 3.4 mg/l, whereas the maximum was at 11.1 mg/l. This shows that a single, yearly sample has a good chance to be "good enough" or to even accurately reflect the high-resolution mean value. On the other hand, there is also a nonnegligible chance that the single sample will not represent the yearly mean value. When setting 5 mg/l as the acceptable error, 10% of samples in this example were above this acceptable error. When taking 4 values and averaging them, the difference between the sample mean and the high-resolution mean becomes smaller, but one can still find 4 samples that will produce a mean value that is 5 mg/l off. As a consequence, the probability to miss an exceedance of the legal threshold in a standard monitoring scheme can be high if the threshold value is only temporarily exceeded throughout the year.
Thus, the challenge facing traditional sampling campaigns is twofold: when taking a single (or a few) values as the representative mean value for a full year, it will likely be representative for the mean conditions, but it is not known whether it really is. Additionally, when this sample indicates that a threshold is not exceeded, there still can be a considerable period in time where this threshold is in fact exceeded.

Spectrolyser data quality
Our results also provide insights into some potential issues with turbidity, causing sensor drift and misreadings. Since "turbidity is an inherent issue for [...] UV-VIS sensors as it fundamentally interferes with light passage and detection," it causes a linear increase of readings with an increase in turbidity (Ruhala and Zarnetske 2017). The manufacturer recommends using a pressurized air or brush cleaning system for use in mediums other than drinking water. However, literature indicated that there would likely be no fouling and no sensor drift to be expected (MacDonald et al. 2017) or possibly some minor sedimentation or fouling that should be within what an UV-Vis sensor can handle or compensate for, if regular manual cleaning was applied (Opsahl et al. 2017;Burbery et al. 2021). Nevertheless, Fig. 3c,d indicate that sedimentation on the optical sensor or turbidity caused by pumping reduced the accuracy of the measurements in two of the four wells considered here when the default algorithm was used. Using the improved custom algorithm solved this issue, which demonstrates that the inbuilt compensation methods can deal with turbidity, as previously found by Shi et al. (2020).
To identify or exclude effects of turbidity that the custom algorithm possibly could not compensate for, we implemented a brushing system (s::can ruck::sack) in well LF, which appeared to be most affected by turbidity (see Fig. 3d) and which showed the most distinct short-term variability in nitrate concentrations (Fig. 4). Using this system, almost no turbidity was recorded, indicating that the spikes in turbidity were not caused by turbid water, but rather by accumulation of particles on the sensor lens, which were completely removed by the brushing system. However, the spikes in nitrate remained, indicating that observed temporal dynamics were not an artifact or misreading caused by turbidity or sedimentation (see supplemental fig. 2).
As discussed previously, the spectrolyser delivers values close to lab values in its default configuration. However, in most applications, more accuracy and thus calibration is necessary (see also Lepot et al. 2016 for a general overview on UV-Vis calibration). For such a calibration, a wide range of nitrate concentrations is needed. To obtain such a range, we combined all 27 samples from the four test sites for one single calibration curve, used at all sites. This was found to be suitable here (Fig. 3b), presumably because the background hydrochemistry of the groundwater in the river valley is sufficiently similar. In cases where the composition of groundwater differs between sites, the observed concentration range is too narrow or where a calibration curve for every site is desired for other reasons, a range of higher concentrations can be obtained by spiking the original groundwater sample with increasing amounts of nitrate.
Thus, we find the spectrolyser produces acceptable results, especially when using the custom algorithm, combined with regular, manual cleaning and calibration. In the observation wells considered here, these measures proved sufficient to account for effects of turbidity. In general, however, sediment accumulation might cause uncertainty in the nitrate readings that are difficult to quantify. These uncertainties can be avoided or reduced by using brushing systems.

Spectrolyser handling
As opposed to applications in drinking water supply, waste water treatment or industrial plants, or applications with an expensive solar power supply and an internet connection, our non-connected systems with a small battery power supply required some effort to operate reliably and continuously. Nevertheless, we found the spectrolysers to work well in unconsolidated aquifers with their power supply exposed to temperatures ranging from freezing winter temperatures to summer heat. While not as compact as a purposebuilt level logger, we could fit the spectrolysers and their power infrastructure to a variety of well heads, enabling the use of existing monitoring well infrastructure. As the spectrolyser must not be removed by its cable, an additional steel cable was needed and clear instructions were attached to the well head and cables to avoid damage by others accessing the well.
The addition of a steel cable for installation of the device bears the risk of fouling by cathodic corrosion. Tait et al. (2015) faced severe corrosion issues in a salt marsh environment, which they solved by adding a sacrificial zinc anode. They suggest that other means of fouling prevention will probably work better in less corrosive environments, but they suggest adding such an anode to spectrolysers as standard practice. We did not encounter corrosion within our observation period. Thus, we did not equip our spectrolyser with a sacrificial anode, but this might be needed for long-term use or in more corrosive environments. Alternatively, using the titanium version of the spectrolyser could be considered.
As there was no experience with the power supply and the spectrolysers power saving mode, the batteries were empty before the scheduled visits at the beginning of the sampling campaign, creating some periods with missing data. Furthermore, our non-standard power supplies produced voltage fluctuations which shortened the spectrolyser runtime and caused additional gaps in the data. As a consequence, the firmware of the spectrolysers has been updated to make the devices more tolerant of non-standard power supplies; since this update, the runtime was increased and found to be sufficient with adequate measurement intervals as described in the Results section.

Conclusions
The high-resolution data obtained from in-situ measurements in the four wells revealed very low seasonal dynamics in nitrate in the two deep wells and notable dynamics in temperature in only one of the two deep wells. The two shallow wells showed considerable seasonal and also eventbased dynamics in nitrate concentration and groundwater temperature. Yearly or even quarterly sampling campaigns thus might under-or over-report the nitrate concentration depending on the selected sampling times. High-resolution monitoring campaigns using UV-Vis sensors thus might be useful for the development of efficient sampling strategies in unconsolidated aquifers.
Very fast, short-term responses of nitrate concentrations to recharge events (evidenced by measured precipitation and groundwater levels), as observed in the two shallow wells investigated here, to our knowledge have not been reported from unconsolidated aquifers so far. Similar dynamics were apparent in groundwater temperature, underlining the occurrence of rapid recharge, possibly related to preferential flow paths in the unsaturated zone. The recovery of the high nitrate concentrations within several days and an even quicker recovery of groundwater temperature hints at local recharge which soon mixes with the older preevent groundwater. It is important to note that this study only targeted oxic groundwater bodies, and as such deliberately avoided effects of biological nitrate transformation processes. Yet, understanding the mechanisms governing the observed dynamics requires further and more detailed investigation.
We show that UV-Vis sensors, specifically the spectrolyser, can be used to obtain high-resolution groundwater quality data in unconsolidated aquifers. The general performance of the spectrolyser was found to be reliable while running unsupervised using only a battery power supply. While an estimated runtime could be calculated from the spectrolysers data sheet, very low temperatures at the beginning and subsequent changes in the setup, such as the addition of a brushing system, required a trial-and-error procedure to identify the maximum runtime for a given sampling interval under the site-specific conditions. However, we have recently implemented a new protocol for the brushing system, which considerably reduced power consumption. Such issues can be easier handled by using a setup that allows online access to the device.
The default algorithm converting the spectrolyser readings to concentration values was found to provide reasonable initial estimates of nitrate concentrations at our sites. However, site-specific calibration is mandatory to obtain reliable and accurate measurements. Turbidity and sedimentation may strongly affect the measurements in wells where these occur. An improved custom algorithm was found to account for such effects. Alternatively, or additionally, a brushing device can be used if sediment accumulation on the optical lens is found to affect the spectrolyser readings.

Supplementary Information
The online version of this article (https:// doi.org/10.1007/s00767-022-00540-3) contains supplementary material, which is available to authorized users. the financial support by the University of Graz and the University of Vienna.
We are grateful to Barbara Stromberger from the Steiermärkische Landesregierung for her support in identifying suitable wells and for providing us with preliminary data. We thank Gernot Klammler of JR-AquaConSol GmbH who shared his long-term experience with the spectrolyser with us.
Funding Open access funding provided by University of Graz.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4. 0/.