## 2 Materials and Methods
### Dataset and Statistical Analyses  
The water quality dataset comes from the Cecchi winery, which has a strict internal monitoring procedure to check the performance of the CW WWTP. Grab samples were taken every month from influent and effluent of each CW stage. The water quality data here presented were also implemented with the samples taken by the Regional Authority for discharge control (ARPAT), which collected effluent grab samples with a frequency of 3-4 samples per year. Water quantity was also monitored by the Cecchi winery, recoding the cumulated water volume discharged by the CW WWTP once per month.  
The water quality dataset here presented regards the data collected from almost two and a half years, from January 2017 to June 2019; therefore, the data reports the functioning of the CW WWTP from 8 to 10 and a half years after the upgrade. These data are different from those presented by [PERSON] et al. [5], which corresponded to 13 years of functioning (up to 2014), including the pre-upgrade plant. Analyzed water quality data regards pH, COD, N-NO\({}_{2}\)\({}^{-}\), N-NO\({}_{3}\)\({}^{-}\), TP, and MBAS. The samples taken by Cecchi winery for internal monitoring were analyzed in an internal chemistry laboratory of the Cecchi winery, using a spectrophotometer and following the ISO international standards and methods. External samples from ARPAT were analyzed by a certified laboratory, according to standard methods [20].  
The dataset was used to calculate mean, standard deviation, minimum, and maximum values for each pollutant parameter at different stages of the CW of Cecchi winery: influent (IN); effluent from the 1 st stage FRB beds (OUT FRB); effluent from the 2 nd stage refurbished HF bed (out HF 1); effluent from the 2 nd stage HF beds built during the 2009 upgrade (OUT HF 2); effluent from the 3 rd stage FWS bed (OUT FWS); effluent from the official effluent sampling point, after the optional sand filter (OUT fin). Each monitored pollutant had more than 10 samples; therefore, \(t\)-tests were used to test the significance of differences of mean values. An unpaired \(t\)-test with one-tail distribution was used to check if the effluent concentrations were significantly lower than influent concentrations; this test was separately performed among all the CW WWTP stages. Moreover, an unpaired \(t\)-test with two-tail distribution was used to test if the effluent HF 1 and HF 2 concentrations were significantly different among each other. The statistical analyses were done with Microsoft Excel.  
Since 2017, the Cecchi winery decided to implement the monitoring of the CW WWTP with a COD online sensor (Hach Lange--UVAS plus) based on ultraviolet absorbance. The online sensor was installed to monitor the final effluent (time span of 30 min). The online sensor received ordinary maintenance every year from specialized personnel and it was checked every three months by the Cecchi winery. The internal check procedure consisted of comparing the COD concentration measured by the online sensor with results from grab samples analyzed by an external certified laboratory. In case of a significant difference between the two measures, the COD sensor was re-calibrated. The COD concentration measured by the online sensor is here compared with the water quality dataset for the whole two-and-a-half-year monitored period.