Granular biomass technology for providing drinking water: microbial versatility and nitrate performance in response to carbon source

The aerobic granular biomass technology was optimized for treating nitrate-polluted groundwater based on the biological denitrification processes in order to provide drinking water. Reactors inoculated with granular biomass were operated at progressively lower C/N rate using acetate and methanol to encourage heterotrophic denitrification, in order to meet the recommended requirements described by European Drinking Water Framework Directive. The granulation and long-term stability of granular biomass under low C/N were successful for all stages, demonstrated compactness of granules and absence of filamentous microorganisms. The nitrate removal was similar in methanol- and acetate-fed reactors, occurring in both cases nitrate removal ratios > 80%, and fact allows the selection of one of both depending groundwater polluted case. Also, feeding reactors with 2 C/N ratio showed nitrate removal values of ≥ 95%, treating highly polluted groundwater (100 mg·L−1). The microbial diversity was higher in the methanol-fed reactor with representative phylotypes as Flavobacterium, Cytophagaceae, NS9 marine group, while species richness was higher in the acetate-fed reactor, which was mainly represented by Flavobacterium genus. Statistical analyses revealed the higher resilience of bacterial population on granules fed with acetate, showing more resistance under drop C/N ratio. Oscillating pollution in groundwater during seasonal periods should be treated using acetate as carbon source for denitrification carried out by granular biomass, while stable pollution concentrations over time allow the use of methanol as a carbon source since the greater microbial diversity allows the elimination of other contaminants present in groundwater.


Introduction
Water is one of the vital elements necessary for the sustainable development of life. Out of the various pollutants entering into the water aquifers, nitrate is causing the most major environmental issue throughout the world (Asadi et al. 2017). In recent times, the contamination of groundwater resources by different point and non-point sources has been assumed as a critical issue. The extensive use of nitrogenrich fertilizers is considered to be a main non-point source of the nitrate that enhances the leaching of this compounds and further increases the nitrate level in groundwater reservoirs (Agarwal et al. 2019). Nitrogen is an essential nutrient for the sustainability of agriculture, but mostly, fertilizers requirement for agricultural land is much less than the load added. Thus, this excess is usually lixiviated to the aquifer. Hence, the changes produced for the development of agricultural sector altered the dynamic of nitrogen cycle, because it is unbalanced the nitrate load present in the ground and, consequently, the deterioration of groundwater quality is produced due to nitrate pollution, fact that supposes global concern, and it implies serious questions about the safety of drinking water. However, not only agricultural sector is involved on the damage of groundwater quality, also nitrate pollution could be perceived to aquifers from eutrophicated surface runoff waters, septic tanks, improper use of animal manure or precipitations.
Several researchers have evaluated the human health risk of several groundwater pollutants to establish legal meets, which contributes to safeguarding of human health (Orellana-Macías and Perles Roselló 2022). In the European Union, Malta, Germany and Spain had been postulated the first three countries with the highest percentage of groundwater stations with values above 50 mg NO 3 · L −1 ; in fact Directive 91/676/EEC from the Council of European Commission establishes 50 mg NO 3 ·L −1 as maximum for drinking water (CEC 1991). Actually, the recommended values must not exceed 25 mg NO 3 ·L −1 in order to avoid human health such as methemoglobinemia in children or stomach cancer (Ashok and Hait 2015;Muñoz-Palazon et al. 2021a).
In addition to the environmental damage caused by the pollutions of aquifers, the majority of worldwide population uses groundwater as the main source of drinking water. Overall, rural regions and developing countries are the target population sustained by low-quality groundwater, usually located where there is more surface with intensive agriculture and lower economic resources (De Stefano et al. 2015;Ravenscroft et al. 2017).
Then, the expensive physical and chemical procedures for improving the quality of drinking water are not able to available for the implementation and exploitation due to scarcity of economic budgets. A good alternative is the biological treatment based on denitrification process carried out by denitrifying bacteria. Nowadays, the most popular technology for nitrate removal is biofilter with several configurations, which required a small carbon source dosage, but in general the high hydraulic retention (Rezvani et al. 2019;Karakurt-Fischer et al. 2020). Scientific community is doing huge efforts to solve this problem in several and specific areas developing new biological treatment in an economic and ecofriendly way. For instance, Fseha et al., (2022) described the nitrate removal from groundwater using date pal biochar for providing drinking water. Di Capua et al., (2017) reported the success implementation of a fluidizedbed reactor even at low temperature for carrying out the denitrification.
The increasing needs to provide safe and quality water to populations are motivating this area of research to create new technologies that are environmentally sustainable and economically profitable. The promising aerobic granular (AG) technology had been seasoned for treating nitrate-polluted groundwater (Hurtado-Martinez et al. 2021;Muñoz-Palazon et al. 2021a). Aerobic granular biomass is a technology extremely resistant and homeostatic against adverse conditions because the biofilm comprises a tridimensional matrix that together with extracellular polymeric substances conformed dense and compact granules, promoting the interrelations among cells under stress conditions (Nancharaiah and Kiran Kumar Reddy 2018). The granular biomass is explained by the "magic bead" concept, where microorganisms are co-immobilized and embedded in a matrix, which promote the mass transfer limitation behavior of oxygen and nutrients from the external to internal layer (Dos Santos et al. 1996;Nancharaiah and Kiran Kumar Reddy 2018). The diversification of niches (aerobic, anoxic, and anaerobic) encourages the diversity of denitrifying microorganisms able to reduce nitrate, using diverse metabolic pathways (Sun et al. 2017;Hurtado-Martinez et al. 2021).
The effect of the carbon sources and the C/N ratio has been study for this aerobic granular technology treating wastewater and for biofilter technology treating nitrate-polluted groundwater, but not AG biomass treating influent with scarce nutrients and organic matter (He et al. 2016;Xu et al. 2020). In groundwater, the carbon concentration is negligible, and thence, it is mandatory the dosage of organic carbon to carry out the heterotrophic denitrifying metabolisms. The source and dosage of carbon play essential role in the implementation of AG biomass for treating groundwater for an economics perspective and also microbial perspective (Muñoz-Palazon et al. 2021a).
This research was based on the progression of AG biomass technology for the treatment of groundwater polluted with nitrate, optimizing the environmental and economic resources directed to low-cost exploitation with the aim to be able to be implemented in rural areas and developing countries, impacting over the transformation of a biological system for treating high-load polluted water in to a system to treat oligotrophic water with an excessive and human concentration of nitrate using negligible carbon dosages for supplying safe drinking water. The AG biomass technology was used for treatment of nitrate-polluted groundwater given the advantages of these systems against changes in the influent. For the acclimatization of granular biomass, inoculum was taken from AGS amended with N2 gas (Muñoz-Palazon et al. 2021a). The origin of the inoculum promotes the anoxic and anaerobic conditions for encouraging the denitrification process under low-absence of oxygen (Muñoz-Palazon et al. 2021a), but the great disadvantage Page 3 of 17 165 was the expensive cost derived by employment of N2 gas. Similarly to the study of (Muñoz-Palazon et al. 2021a), it was essential to supplement the groundwater with a carbon source to induce the denitrification metabolisms driven by heterotrophic denitrifiers. Thus, two carbon sources, acetate and methanol, at two C/N rate, were used to describe which should be used depending of characterization of polluted groundwater.

Design of amplified experiment device-Setup and operational conditions of the bioreactor
The seed biomass proceed from an aerobic granular (AG) system at laboratory-scale bioreactor treating nitrate-polluted groundwater in a sequential batch operation amended with N 2 gas for promoting the circular and continuous motion (Muñoz-Palazon et al. 2021a). The granules used as inoculum were taken in operational phase with organic loading rate (OLR) of 2.56 g· day −1 and nitrogen loading rate of 1.05 g· day −1 (Muñoz-Palazon et al. 2021a). For the inoculation of two bioreactors, an approximate volume of 750 mL granular biomass previously mentioned was used in order to achieve a MLSS concentration of 2500 mg·L −1 for each. The design of laboratory-scale bioreactors was based on a methacrylate cylindrical column with effective volume of 3 L, 100 cm in height and 7 cm in inner diameter ( Figure S1). The laboratory-scale reactors were sequentially supplied from the top by peristaltic pump (Watson Marlow, UK). From the bottom, the air was introduced by fine bubble aeration in order to provide strong hydraulic shear force, with an air flow of 2.5 L·min −1 . Temperature in bioreactor was controlled in the range of 14-18 °C at room temperature. The dissolved oxygen and pH were monitored and kept in the range of 4.1 ± 0.6 mg O 2 ·L −1 and 7.8 ± 0.2, respectively, using Crison probes. The hydraulic retention time (HRT) was 5 h, the exchange volume was 50% of total volume, and the cycle consisted of: 120 min of aeration, 3 min of settling, 3 min of effluent discard, 10 min of fill and 14 min in steady for promoting denitrification. The sludge retention time tended to infinity by the end of start-up, ignoring the filament microorganisms discarded during the effluent discharge process, given that no excess biomass was produced. The experiments were carried out for 150 days, and the SBR operations could be divided into three phases, i.e., stage of start-up (day 1-24), C/N 2:1 Stage I (day 25-75) and C/N 1:1 Stage II (day 76-150). One bioreactor was fed with acetate as carbon source (AcBR-Acetate BioReactor), and the other bioreactor was fed with methanol as carbon source (MeBR-Methanol BioReactor). The start-up of the system was to stabilize the microorganisms to the new bioreactor, while the Stage I and Stage II were used for the evaluation of capability of the granular biomass to denitrifying in aerobic conditions to optimize the needs of carbon for achieving a process of complete denitrification and avoiding the organic matter dumping. Thus, the carbon concentration was extremely low in both stages.
The influent was a synthetic chemical composition simulating groundwater contaminated with nitrate and amended with carbon source to encourage the heterotrophic denitrification. The medium was composed by mineral salts and distilled water comprised 0.05 g ·L −1 MgSO 4 ·7H 2 O, 0.045 g·L −1 K 2 HPO 4 , 0.02 g·L −1 KCl and 0.015 g ·L −1 KH 2 PO 4 . Different C/N (carbon to nitrogen) ratios were tested using acetate or methanol as carbon source, with the aim of establishing the relationship most suitable for the granulation process and the nitrate removal capacity. The bioreactor in the start-up stage was fed with 200 mg O 2 ·L −1 of COD for feeding acetate and methanol reactor, in the Stage I was employed 200 mg of sodium acetate and 150 mg of methanol (791.4 kg·m 3 ) per liter and 75 mg NO 3 ·L −1 (added as NO 3 Na) to obtain ratio C/N 2:1. Finally, in Stage II, the C/N ratio was 1:1 and was obtained using 100 mg L −1 sodium acetate and 77.5 mg L −1 of methanol with 75 mg of NO 3 .

Physical determinations
The stability and evolution of the granular biomass were analyzed in order to describe the mean size and the decantation time. Granular size was measured using a scalimeter scale observed by stereoscopic microscope using representative number of samples (n = 35 ± 5 pieces) taken during the aeration period . The settling velocity of the granules was measured using the protocol described by Hurtado-Martinez (2021) for granular biomass, utilizing a 50 cm glass column with a manual chronometer. Biomass concentration (MLSS) measurements in bioreactors were determined according to Standard Methods for the Examination of Water and Wastewater (Muñoz-Palazon et al. 2022).

Chemical determinations
The chemical oxygen demand (COD) and biological oxygen demand at day 5 (BOD 5 ) were determined by duplicate in the influent and effluent following the protocol described by APHA(2012). Influent and effluent samples were taken from AcBR and MeBR reactors for the determination of nitrogen anions concentration (NO 3 − and NO 2 − ) (APHA 2012). This determination was conducted by ion chromatography (Metrohm) with a Metrosep-A Supp 4-250 anion column using carbonate-bicarbonate solutions as the eluent.

Nitrogen and carbon mass balance approach
The average mass flow of each reactor in both Stage I and Stage II was calculated for aqueous phase concentration following the equations described by Rodriguez-Sanchez et al. (2020): where Q in and Q out are the influent and effluent flow; COD in and COD out are the influent and effluent COD concentrations; CO 2 is the concentration of carbon dioxide; COD nb is the concentration of non-biodegradable COD; and CO 2 BOD 5 and CO 2 COD nb are the CO 2 concentration portions caused by the mineralization of BOD 5 and COD nb , respectively.
For the mass balance over nitrogen, it was taken that all total nitrogen of influent groundwater was nitrate and into the bioreactors was kept as nitrate or/and converted either into nitrite and nitrogenous gases. The equations employed were: where NO x -N is the sum of the NO 2 − and NO 3 − concentrations and N ous gas is the sum of NO, N 2 O and N 2 gases concentrations.

Samples collection and acid nucleic extraction
Granular biomass was collected at different operational days over start-up, Stage I and Stage II for nucleic acids extractions. 100 mL tube was submerged in the cylinder column during aeration period in order to take representative granules samples during the aeration period, from the bottom to the top, and the procedure was done twice. The biological samples were submerged in sterile saline solutions (0.9% of NaCl) and were centrifuged at 5000 r.p.m. for 30 min. The supernatants were discarded, and the pellet was kept at -80ºC, until finishing the experiment. Then, nucleic acids of pellets of granular biomass Q in COD in = Q out COD out + CO 2 Q in BOD 5in + COD nb in = Q out BOD 5out + COD nb out + CO 2 BOD 5 + CO 2 COD nb Q in TN in = Q out TN out + N ous gas Q in NO x − N in = Q out NO x − N out + N ous gas were extracted using the Fast Prep and the FastDNA Kit for Soil (MP Biomedical, USA) following the instructions given by the manufacturer.

Identification of microbial community by next-generation sequencing
The DNA was employed to carry out the next-generation sequencing (

Bioinformatics pipeline
For treating raw data obtained from NGS, Illumina MiSeq was used mothur v 1.47.0 software (Schloss et al. 2009). Firstly, paired-ends reads were merge into a contigs using deltaq = 0 to avoid errors based on the Edgar's approach implemented in VSEARCH (Edgar 2010). Then, a quality trimming was done for removing sequencing artifacts not meeting the following criteria: more than eight homopolymers and any ambiguous bases. Moreover, the remaining sequences were aligned against SiLVA SEED 138 database using Needleman conditions in order to select reads with start or end in the right primer set position. Next, chimerical artifacts were detected employing the VSEARCH algorithm with self-reference (Edgar 2010). The remaining contigs were classified using a distance kmer search method based on the k-nearest neighbor algorithm by default size of 8 bp. The classification was done using the SiLVA nr v138 database. The sequences were clustered within the OTU groups based on abundance-based greedy clustering (agc) with 97% of cutoff. Then, taxonomic consensus for OTUs was calculated.

Statistical analyses for comparison carbon sources and rates
The similarity percentages analysis (SIMPER) was calculated to observe the contribution of dominant OTUs (> 0.5% of relative abundance) to dissimilarity between pairs of samples. The OTU table for bacteria was used for calculation of SIMPER through Bray-Curtis similarity using PAST software v3.4.
Non-metric multidimensional scaling (nMDS) analysis was calculated by the values of OTU corrected to avoid zerocount through zCompositions package implemented in R and centered log-ratio transformation using CoDaPack software of the OTU tables by generation of 128 Monte Carlo Dirichlet simulations. Transformed OTU tables were represented through nMDS through Bray-Curtis algorithm using PAST software v3.4. Also, for a quantification of similarity in terms of OTUs abundance between bioreactor, OTU maps of were corrected for zero values and transformed through a centered log ratio by generation of 128 Monte Carlo Dirichlet simulations, which was then used for the computation of effect size differences, utilizing ALDEx2 package implemented in R.
The multivariate redundancy analysis (RDA) was calculated to link the performance parameter and the dominant OTUs of AcBR and MeBR by calculation of 499 unconstrained Monte Carlo simulations under a full permutation model using CANOCO 4.5 Prior to calculation, all parameters were transformed to the LOG(X + 1).

Chemical analysis
Thus, two different carbon sources, acetate and methanol (which are the most frequently used in denitrifying systems), were tested, AcBR and MeBR, respectively, with the aim to find the optimal carbon source in order to add the lowest carbon concentration (to avoid cost). Each bioreactor was started-up using one carbon source with a ratio 200:75 COD/ NO 3 , which supposes a slightly higher ratio than C/N 2:1. This strategy was carried out in order to provide faster acclimatization of the microbial communities, which were previously adapted to anaerobic conditions and stored for 15 days at 4 °C. During the first days of stage start-up (stage SU), nitrate removal ratio was much higher for AcBR (> 60%) Fig. 1 Results of a nitrogen, COD and BOD 5 removal performance during all stages of experimentation than for MeBR (~ 50%) (Fig. 1). The trend was inverted from operational day 15, when MeBR reached values in the range of 88 to 100% of nitrate removal. Meanwhile, AcBR had a tendency remarked by oscillations without a clear pattern (69 to 77% of NO 3 removal). Considering 25 days for granular adaption, AcBR and MeBR were subjected to changes on the C/N ratio in the influent with a value 2:1 (Stage I). Nitrate removal in AcBR and MeBR increased rapidly under C/N 2:1, reaching higher than 93.00% of nitrate removal ratio. The rapid increase could be attributed to the denitrifying adaptation and diversification of the niches in terms of acceptors donor as well as the bacterial growth during the Stage SU. In this stage, after 5 days of operation, the removal rates achieved using both carbon sources were excellent, and therefore, bioreactors were operated for 50 days in order to demonstrate the stability of the technology under low ratio C/N 2:1.
Next, the Stage II was checked in order to provide a reliable biological system for nitrate removal under C/N ratio 1:1. These conditions are adverse for denitrification due to lack of carbon. In this stage, the nitrate removal ratio in MeBR was not affected with respect to previous stage due to the values ranging from 93 to 98%. In this way, an interesting trend was observed after changing the C/N from 2 to 1, with the system remaining robust in terms of nitrate removal (> 97%), showing flexibility and resistance against changes in the influent. After this, a tiny decrease was observed from operational day 110, when MeBR had been operating for 35 days under the lowest C/N conditions investigated, registered removal ratios between 91 and 96%. The C/N 1:1 ratio affected more notably the AcBR, with registered rates between 84 and 91%. Moreover, the trend described in MeBR after changing C/N from 2 to 1 showed stronger homeostatic behavior than AcBR. Most studies described the necessity of C/N ratios from 3 to 5 to support the metabolism of heterotrophic denitrification (He et al. 2016), while How et al. (2021) reported that biological denitrification requires theoretically 1.5 g of carbon to remove 1 g of NO 3 − − N·L −1 . However, novel investigations reported successful denitrification under 2:1 C/N rate, but not good results were obtained operating at 1:1 C/N, revealing that when the C/N ratio decreased to < 2, the nitrate removal rate is lower and coupled to nitrite accumulation (Xu et al. 2021). A novel biofilter technology was used for treating groundwater polluted with nitrate (42.75-58.29 mg NO 3 − − N·L −1 ) amended with glucose (COD = 64.07-113.78 mgO 2 ·L −1 ), and nitrate reduction was close to 80% (Xu et al. 2020). Thus, this biofilter technology accounted for lower nitrate removal performance than the aerobic granular biomass technology described in this research, due to superior nitrate removal performance: Nitrate input was 75 mg NO 3 − − N·L −1 , amended with acetate and methanol (COD = 72-140 mg O 2 ·L −1 ) and the obtained nitrate removal ranging 84-98%. Therefore, minimal C/N rates for successful nitrate removal were 1.4987 for biofilter. The C/N (expressed as COD/N) given by Xu et al., (2021) was demonstrated in a research carried out by Dabah & Lee (1988) many years ago, and these authors described that COD removal performance is optimum under C/N 1.45 ratio using acetic acid. Zhang et al.  reported that a moving bed biofilm bioreactor achieves a 24.83% of nitrate removal with C/N ratio lower than 1. Thus, the results described on bibliography corroborate that the application of this technology to nitrate-polluted groundwater could be postulated as more efficient than other existing technologies, because their optimal ratio is 1:1 C/N using methanol as carbon source. Depending on influent nitrate concentration, the needs of aerobic granular biomass technology could be modified in order to achieve the "optimal ratio" to obtain high quality and safe drinking water (Rezvani et al. 2019). Furthermore, a remarkable aspect of heterotrophic denitrification processes is that there are many operational parameters linked with metabolic pathways in biological treatment that contribute to achieve to the maximum performance in terms of nitrate removal (Gu et al. 2022).
The nitrite accumulation in MeBR and AcBR was negligible during the Stages I and II, where values were lower than 0.5, as shown in the supplementary material ( Figure  S2). The range of nitrite concentrations observed for this technology becomes very important for safe drinking water, as nitrite undergoes carcinogenic reactions with amines generating nitrosamines, which causes serious health problems in animals and humans (Vitoria et al. 2015).
During the stage of start-up, both reactors operated with methanol (MeBR) and acetate (AcBR) reflected a similar increasing trend in organic matter removal, which operated at 200 mg O 2 ·L −1 (COD). Therefore, AcBR achieved 79.51% and 80.50%, while MeBR achieved 76.23% and 77.50% of COD and BOD 5 removal ratio, respectively. These slight differences favoring acetate as organic matter source could be caused by the origin of granules, which were previously adapted to consume acetate as carbon source (Muñoz-Palazon et al. 2021a). In addition, this tendency could be highlighted because acetate is uptaken much faster than methanol by microorganisms (Marang et al. 2014). In the Stage I, the values of COD and BOD 5 removal had not significant difference (ρ > 0.05) driven by the selection of high-rate growth of specific microorganisms for each carbon source. During this stage, the drop of C/N ratio had detrimental consequences from day 25-31 for MeBR and from days 25 to 36 for AcBR, possibly due to the competition and decay of denitrifying heterotrophic microorganisms adapted to the previous C/N conditions. After the drop episode, the COD and BOD 5 trends were rapidly recovered with values of 93.67% and 100% for AcBR, and 90.98% and 94.16% for MeBR, respectively.
The Stage II, operating under C/N ratio 1:1, was characterized by a trend of MeBR showing higher capacity to remove organic matter than AcBR. Actually, the AcBR suffered negatives effects from drop of C/N ratio, as it was observed from operational day 85 to 100 in the BOD 5 and COD analysis. On the contrary, the COD removal in MeBR increased until reach values higher than 97% and BOD 5 close to 100%.
In this sense, making an evaluation of different stages, C/N of 2:1 used with acetate as carbon source could promote an excellent nitrate removal, while that C/N 1:1 using methanol improved the performance. Hence, the carbon source chosen for nitrate removal from groundwater depending on: changes-oscillations that could be induced in the influent composition, economical cost of carbon source and the performance required for the effluent quality. However, the consumption of acetate by microorganisms is faster, methanol is described as a carbon source that promotes a complete full denitrification (Le et al. 2019). Despite low concentration of carbon, many microorganisms of this biological systems possess glycoside hydrolases allow it obtain energy from other external sources such as complex carbohydrate structures as reported Miyazak (2023).

Carbon and nitrogen mass balance
Carbon mass balance revealed that C effluent load was slightly higher in AcBR than in MeBR during Stages I and II except at some operational days, but the opposite tendency was observed during the stage of start-up (Table 1). The carbon dioxide production was in concordance with the results previously described referred to COD total and COD nb . Meanwhile, different profiles of degradation were also observed under both carbon source and C/N. At the outset, nitrate load in both reactors was high (178-156 mg NO 3 -N·L −1 ) because systems were not able to remove nitrate due to recent start-up, but after one month of operation the N effluent load notably decreased (11.78-48.77 NO 3 -N·L −1 ). Moreover, the effluent nitrate loads were improved during the experimentation with values load < 30 mg NO 3 -N·L −1 . Undoubtedly, there were detected differences for carbon sources because during all stages of operation the reactors fed with methanol obtained better results than acetate. Besides, the results pointed out that there was less degradation of nitrate under the lowest C/N ratios. In conclusion, the most optimal results were obtained for reactors fed with methanol at C/N 2:1, while the worst scenario was the reactor fed with acetate at C/N 1:1. All scenarios, after the stage of start-up, reached optimal values of N for high quality of drinking water (< 50 mg NO 3 ·L −1 ) (CEC 1991).
The nitrogen mass balance reflected a higher nitrite production in systems fed with acetate, especially during the start-up and Stage II (C/N-1:1), when the maximum loads were reached (24.50 to 3.799 mg NO 2 -N·L −1 ). These results did not suppose a critical point to discard this carbon source due to negligible concentration as shown in supplementary material ( Figure S2), which accomplished the recommended values for drinking water (0.05 mg·L −1 ). Although this was not relevant for the quality of treated water, the results corroborated that AcBR promoted full nitrification less than MeBR (Le et al. 2019).
Next, the final cumulative amount transferred at the end of one day evidenced that nitrogen gas emissions were higher when denitrification was carried out by microorganism growing using methanol than acetate. The results could be corroborated with research that affirms that methanol used as carbon source promoted full denitrification process. The N ous gas average values in MeBR during the whole experiment described a mass load of N gas of 175.06 mg-N·d −1 , with values in the Stages I and II ranging from 187.89 to 200.62 mg N·L −1 , whereas in AcBR that was appreciably less, because the average value was 150.70 mg N·L −1 , with values in the Stages I and II ranging from 132.82 to 195.84 mg N·L −1 .

Physical properties
In general terms, the average values of mean size were decreased during the experimentation for both reactors. This trend could be driven by the drop the C/N over operational time. In this sense, some authors have reported a reduction of the granule size caused by longer famine period that changes the cell surface charge, encouraging hydrophobic nature of biofilm, which results in an increasing of compactness (Du et al. 2020). Compact and denser granules had several advantages in the denitrification process, because it reinforces the mass transfer behavior from external layer to internal layer and improves the settling velocity, allowing smaller reactor volume (Nancharaiah and Kiran Kumar Reddy 2018;Rosa-Masegosa et al. 2021). The granules used as inoculum, originated from AG biomass systems amended with N 2 gas operated at 0.25 g ·L −1 sodium acetate (COD ~ 175 mg O 2 ·L −1 ), were average values of granule diameter 4.29 ± 1.35 mm (Muñoz-Palazon et al. 2021a). Although granules came from a similar C/N ratio, the aeration generated by N 2 gas caused serious damage to the granular structure as well as the period of storage, giving it a fluffier conformation. Hence, once granular biomass was aerated with air, the structure became more compact. In this sense, granules fed with acetate were larger for Stages I and II with diameters of 3.48 ± 0.83 and 3.04 ± 0.93 mm, respectively, than granules fed with methanol (3.32 ± 1.21 for Stage I and 2.79 ± 0.9 mm for Stage II). Unlike for the research amended with nitrogen, the integrity of the granular biomass was not affected at any stage (Muñoz-Palazon et al. 2021a). An interesting result was that granules fed with methanol had more heterogeneous diameters than granules fed with acetate (Fig. 2). The settling velocity had an inverse relationship with granular diameter, as settleability is linked with the density and compactness of granules and not as size as could be expect (Derlon et al. 2016;Du et al. 2020;. For both reactors, settle velocity was around 80 m·h −1 in Stage I, but when C/N was reduced the settleability increased surpassing 80 m·h −1 . The biomass concentration (MLSS) was measured in key operational days to monitor the effects of declining C/N ratio, but the results showed a strong resistance against changes occurring in the influent composition ( Figure S3). Exclusively, it could be noted the decreased from 2500 to 1500 mg·L −1 during the stage of start-up in MeBR. These results corroborated that microorganisms need more time for the acclimatization and the consumption of methanol than acetate.

Quantification of targeting genes
The quantification of target genes present in the granular biomass revealed patterns extremely diverse related to carbon source, even opposite in some microorganism groups, as well as genes subjected to C/N rate. The total bacterial gene was quantified using 16S rRNA gene, whose number of copies during stage of start-up increased for AcBR, while that remained stable for MeBR (Fig. 3). The drop of C/N ratio in Stage I had a negative effect in AcBR, but values were recovered from operational day 75 until the end of operation, reflecting resistance to change. MeBR flowed an opposite tendency because it showed high homeostasis during the first 100 days of operation, but then the number of bacterial members sharply decreased in 1-2 magnitude order, showing a weak resistance against changes on the influent conditions, in this case due to the reduction of carbon concentration with similar values of nitrate. The lower carbon concentration availability promoted a starvation phase. This could encourage the death of the less competent bacterial cells, which were previously well-adapted to feast periods (Himeoka and Mitarai 2020). Then, the robustness of the microbial community versus changes in C/N rate depended on the microbial community that proliferated on granules related to the carbon source.
The copies of archaeal 16S rRNA gene followed a similar pattern for both bioreactor, but undoubtedly the trend was much more accused than for bacterial 16S rRNA gene. The reduction of archaeal copies number in mature granular biomass over operational time possibly caused by competitive disadvantages against others microorganisms has been previously reported . However, the anoxic conditions given in the previous SBR promoted by the aeration with N 2 gas could encourage some competitive advantages of archaea against bacteria or fungi, for instance, the adaptation described by methanogens with their catabolic pathways mainly in anoxic environments (Valentine 2007).
The fungal 18S rRNA gene showed a remarkable pattern, because in AcBR that had a positive tendency increasing their presence, while in MeBR that had a negative trend, following a complete opposite pattern. These results pointed out that fungi could consume better acetate than methanol. The presence of fungi is essential because they constitute the structural core of the granules and act as union bridge between cells (Nancharaiah and Kiran Kumar Reddy 2018;. Although glucose is the ideal carbon source for fungal growth, nonfermentable sources such as acetate could be assimilated through gluconeogenesis or β-oxidation (Lok et al. 2021), while it has been reported that methanol could slightly inhibit fungal growth (Zhao et al. 2013). Thus, the depletion obtained in MeBR and the increase on AcBR could be corroborated with the previous studies (Zhao et al. 2013). It is important to mention the key role that fungi play, because the complete loss of fungal populations would lead to instability of the technology caused by breakage of granular biomass. Also, it is possible to elucidate that the fungi community in the granular biomass could increase their competitiveness for nutrient acquisition, consuming alternative carbon sources originated from exopolysaccharides segregation of bacteria, as well, but the available carbon load would be much lower. In spite of this, main fungal strategy defense lies in the production of toxins to avoid the growth of competitors (Künzler 2018). In this way, this hypothesis allows to explain the decrease of total Fig. 3 Absolute quantification of target genes expressed as LOG of genes copies·gram of granule −1 bacterial genes (day 125 and day 150) at the same time that the progressive decrease in the fungi occurs, generating a negative feedback loop between the acquisition of carbon by bacteria and the defense of fungi by toxins production to act against scarce carbon resource.
Denitrifying bacteria were quantified by norB gene and nosZ gene. The norB gene was regarded as functional gene for N 2 O production and responsible for conversion of NO into N 2 O, and nosZ gene had functional action for N 2 production (Cui et al. 2019). For AcBR, the positive and negative oscillations of norB gene, up to four orders of magnitude, made it difficult to elucidate what changes triggered the nitric oxide converting populations. Although changes in the composition of the influent (C/N ratio) seemed to provide a recovery of these genes, which then seemed to be strongly affected. On the contrary, the reactor supplemented with methanol showed a progressive and declining trend for norB gene, which could be linked with the proliferation of others denitrifying microorganisms or the competence previously described against fungi. Related to the proliferation of other denitrifiers, it could be corroborated with fact that methanol promotes full denitrifiers (Le et al. 2019). In this way, the qPCR results based on the quantification of nosZ genes regarded lower magnitude order (from one to five) than norB gene, as occurred in other biotechnological application (Cui et al. 2019). nosZ gene remained stable in reactor MeBR in stage of start-up and Stage I, while a strong decline was observed for the reduction of C/N ratio (from 10 7 to 10 5 nosZ copies·gram −1 ). On the other hand, oscillations were detected in AcBR during the first two stages that later resulted in stable values (10 7 nosZ copies·gram −1 ). The importance of these results lies in the fact that although the absolute abundance of denitrifying genes was higher in the acetate-fed reactor, the functionality seemed more effective in the methanol-fed reactor, considering the results of nitrate removal.

α and β diversity analysis
The results of α-diversity were evaluated to understand the species richness, diversity and evenness (Table S2). The species richness was higher in acetate-fed bioreactor than in methanol-fed bioreactor. On the contrary, the evenness over operational time was higher in MeBR, possibly caused by the proliferation and competition between bacterial population able to consume methanol, while for acetate welladapted bacteria to acetate would take it up faster and would not allow other phylotypes to proliferate. Likewise, this pattern was repeated for the diversity. In conclusion, the species richness was higher in AcBR, but the diversity and evenness were higher in MeBR. The results obtained were opposite to the obtained by Sun et al. (2016) in a research based on feeding denitrifying bacteria of a biofilm. This divergence could be driven by the hydraulic stress that granules support in the reactor, which makes a high selective pressure for the microbial populations.
The β-diversity estimates based on Whittaker reported the highest dissimilarities between inoculum and the granular biomass ( Figure S4). Notable dissimilarities were found during the stage start-up and Stage I in both reactors. The dissimilarities were decreasing over operational time (day 125 and day 150) for both bioreactors. The differences between populations were clarified by the results provided by identification of bacterial communities by NGS.

Distribution and dynamics of bacterial population related to carbon source
The microbial community of granular biofilm samples fed by acetate and methanol was evaluated to elucidate the most abundant bacterial groups able to carry out the denitrification process under anaerobic (core) and aerobic (external layers) niches. Changes in the bacterial community at order levels are shown in Figure S5. In inoculum samples, the most abundant order was Flavobacteriales, which are highly specialized in the degradation of complex organic compound. For AcBR, Flavobacteriales order played the main role in the population, although Cythopagales order got a small representation (3.35-5.24% of total relative abundance). In the MeBR, the most representative orders were similar, but the proliferation of Cythopagales order was more protuberant than in the previously described case, especially noteworthy, in the Stage I with C/N ratio of 2:1. This suggested Cythopagales order might slightly displace Flavobacteriales order by overcompetition over substrate. The drop of C/N ratio in Stage II had negative effects for Cythopagales order, since it seemed to be at a disadvantage in methanol scarcity conditions. More in depth, bacterial dynamics at the genus level were studied, showing how diversity within the Flavobacteriales order promoted the growth of diverse OTUs, which were more closely linked to carbon sources employed (Fig. 4). In a recent research, authors had discussed for first time the diverse vertical pattern that Flavobacteriales played (Yeh and Fuhrman 2022). This fact indicated that the abundance of great number of OTUs belonged to Flavobacteriales could be promoted by the gradient from internal to outer layer of granules. The inoculum had high diversity represented by a great number of OTUs, although the most dominant belonged to Flavobacterium and NS9 marine group (70% and > 13.00% of relative abundance, respectively). An representative OTU affiliated taxonomically with Flavobacterium constituted a high abundance percent (~ 10%). NS9 marine group is a phylotype linked with oligotrophic environment with high ability to resist in adverse niches, which could explain their ubiquitous during the whole experiment, but it had been also reported in biological water systems (Cai et al. 2023). The metabolic adaptation of NS9 marine group to adverse conditions allows to habit in freelife or biofilm connect with several phylotypes as described by Nguyen et al. (2022). Before explaining the dynamics at genus levels, it is crucial to understand how phylotypes belonging to the same genera could compete between them for nutrients, capturing or assimilating faster the carbon and nitrogen sources used in this investigation. The metabolic versatility of Flavobacteriaceae family is widely known, but little is known about genomic characterization that justifies its ubiquity (Gavriilidou et al. 2020). A notable scenario was observed at operational day 25 in both reactors, because OTU091, which was the most representative taxon in the inoculum, completely disappeared after 25 days of operation. To understand this decline, it is essential to take into account the origin of granular inoculum, because the new conditions (presence of aerobic niche) within SBR could compromise the stability of OTU091 against anoxic conditions generated by N 2 gas. The versatility of Flavobacterium genus is extremely high because this genus had been postulated as potential aerobic denitrifiers in granular reactors (Pishgar et al. 2019), while other authors reported their reduced activity in reducing atmosphere (Kim et al. 2012;Pishgar et al. 2019).
Acetate-fed reactor encourages the relative abundance of OTU002, reaching a 64% of relative abundance in the Stage I. During this stage, OTU006 affiliated to Flavobacterium acquired an 18.00% of abundance as well as other members of Flavobacteriaceae family (OTU005, OTU13 and OTU032). In Stage II, AcBR displayed OTU002 as the most dominant bacteria, but this scenario could be encouraged by the homeostatic character of granular biomass, as occurred with OTU006. However, bacterial population was modified after 50 days operating under C/N ratio 1:1, because OTU001 and OTU003 belonged to NS9 marine The carbon source supposed a big change for bacterial population as is shown in the heat map of MeBR. Firstly, 3 OTUs belonged to NS9 marine group proliferated with high representation in terms of relative abundance. In addition, during the Stage I, OTUs taxonomically affiliated to Cytophagaceae and Flavobacteriaceae families reached more than 8% an 10% of total relative abundance, respectively. Cytophagaceae is an effective denitrifier, which has been described in denitrification systems under anoxic and aerobic conditions (Long et al. 2017). In Stage II, the selection pressure exerted by methanol allowed an adaptive response under dropped C/N. An interesting fact discovered was the observation of lower resistance to the change of C/N ratio by bacteria that consumed methanol during denitrification corroborated by the decrease in two magnitude order on the absolute quantification of 16S rRNA genes (p value < 0.05).
Finally, a critical point to establish the viability of this system was that bacterial populations revealed the absence of pathogens; to our knowledge the dominant families NS9 marine group and Flavobacteriaceae had not been described as human pathogen (Saingam et al. 2020). Although the treated groundwater is later subjected to sand filter and chlorination, the quality and safety of drinking water must be observed in every step, to avoid causing health concerns for end users.

Statistical analysis
The Bray-Curtis non-metric multidimensional scaling (nMDS) plot presented in Figure S6 demonstrated a clear difference between bacterial communities associated with assimilation of methanol and acetate. Also, the eclipse volume reflexed larger distances between samples of AcBR linked with major dispersion of dominant OTUs. The samples of first days of operation (day 25 and day 50) followed opposite trends for both bioreactors, results that clarify that carbon source determines the bacterial community in denitrification processes under low-carbon loads (Sun et al. 2016).
The expected effect size (EES) was calculated to estimate how OTUs belonging to specific populations had a significant difference over other cluster of samples. For AcBR and MeBR differences over operational days, some OTUs seemed to contribute to differences between stage of start-up, Stage I and Stage II followed the same pattern for both carbon sources ( Figure S7a, b). However, the biggest significant differences were found during the Stage I C/N 2:1 of AcBR versus MeBR ( Figure S7c). On the contrary, the number of OTUs with significant differences during the Stage II was very low; this could be caused by the adaptation of inoculum microorganisms to scarce carbon amounts ( Figure S7d).
The similarity percent analysis was calculated in order to analyze the OTUs which contributed to dissimilarities between aerobic granular biomass technology fed with acetate versus methanol during the whole experimentation, in Stage I and in Stage II (Fig. 5). In all studied cases, the OTU001 and OTU002, affiliated to NS9 marine group, contributed to dissimilarities in samples with an abundance of approximately 25.00%. The OTU006 contributed to great differences between bioreactors in the Stage I, which belonged to Flavobacterium had high dominance in the acetate-fed bioreactor. Also, this genus was quite resilient against drop of C/N, but Contribution to dissimilarities (%) by dominant OTUs between (left) AcBR and MeBR reactors, (center) AcBR and MeBR reactors during Stage I C/N ratio 2, and (right) AcBR and MeBR reactors during Stage II C/N ratio 1 the decline was sharply accused during operational days 125 and 150. Thus, this OTU did not contribute to differences between AcBR and MeBR in Stage II. Other clear tendency was observed related to OTU003, OTU004 and OTU005, which were dominant phylotypes in MeBR in Stages I and II, contributing to dissimilarities between AcBR and MeBR in general and more specifically in Stage I (~ 15.00%), while in Stage II the divergence diminished (5.00%). This decreased trend could be stabilized by the proliferation of OTU003 in operational day 125 and day 150.
The multivariate redundancy (RDA) analysis exposed the linkage between dominant OTUs (0.5% of relative abundance) and the removal of NO 3 , BOD 5 , COD removal as well as granular biomass properties (settling velocity, diameter size and MLSS) calculated in LOG(X + 1) for AcBR (Fig. 6A) and MeBR (Fig. 6B).
The RDA calculated for AcBR showed a strong positive correlation between operational day 0 with the MLSS and granular size, due to granules originating from a reactor treating groundwater with enriched carbon concentration, while a negative relationship was found with the rest of biological samples over operational time (Fig. 6A). Also, OTU005 affiliated to Flavobacteriaceae family was positively correlated with high performance in terms of nitrogen and organic matter, as well as with higher settleability. The positive linkage of chemical performance was observed for OTU002 and OTU080 belonged to NS9 marine group and Leadbetterella group, respectively. Leadbetterella play an important role in the granular stability in systems fed with acetate, as it was corroborated by Muñoz-Palazon et al., (Muñoz-Palazon et al. 2022). In fact, this genus has been reported in aerobic granular sludge technology operating with COD/N ratio of 1, although in some research it was also believed that proliferation of Leadbetterella, together with other genera, contributed to granular stability (Luo et al. 2014;Cao et al. 2021), while on the contrary, the results of this experiment pointed out an improvement of granular properties. The improvement of settleability in this research could be caused by the function of polysaccharide secretion, which contents hydrophilic negatively charges, and plays a role in the adhesion cells (Cao et al. 2021). In other way, the biological samples of day 25, 50, 75, 100, 125 and 150 had not correlation with physicochemical parameters, but were linked with the most dominant bacteria OTUs in each stage. The RDA allowed to corroborate the homeostatic behavior of AcBR described in the bacterial dynamics (Sect. "Distribution and dynamics of bacterial population related to carbon source"), demonstrating the resilience of the bacterial population versus changes on C/N ratio for samples of day 75 (Stage I) and day 100 (Stage II). These results confirmed how aerobic granular biomass could mitigate the groundwater treatment challenge as consequence of high tolerance (Xue et al. 2017).
The multivariate redundancy analysis calculated for MeBR with dominant bacterial phylotypes and physicochemical performance is shown in Fig. 6B. The analysis showed a positive correlation of settleability with OTU002, OTU007 and OTU008, taxonomically belonged to NS9 marine group, Cytophagaceae and OPB56 families, Fig. 6 Multivariate redundancy (RDA) analysis performed using physicochemical performance ratio, dominant OTUs and biological samples for AcBR (a) and MeBR (b) respectively. Cytophagaceae family is associated with the hydrolysis of proteins and polysaccharides, although it is also well known for their metabolic versatility involved in nitrogen cycle in biological water treatment (Paulo et al. 2021;Muñoz-Palazon et al. 2022). Remarkable tendency confirmed the negative and strong correlation between granular size and settling velocity of granular biomass, as was shown in the RDA calculated for AcBR. The nitrate removal was linked strongly with OTU001 and OTU003, affiliated to NS9 marine group, as well as with the degradation of organic matter. These results suggested that NS9 marine group was a good competitor for nitrate and methanol. Divergence in terms of resilience was found in comparison with AcBR, because rapid-growing population changes were noticed when reactor operated under C/N ratio 1, as verified. The opposite directions were followed by samples of day 50 and 75 versus days 100, 125 and 150. Truthfully, the most negative and opposite trend was identified between sample day 75 (C/N ratio 2) versus sample 100 (C/N ratio 1).

Conclusions
The results obtained revealed that granular aerobic technology was a successful, low-cost and high nitrate removal system to be implemented to provide safe drinking water when using groundwater resources. In this way, the denitrification process reached the maximum performance under C/N ratio of 2, but this one was also very efficient under C/N ratio of 1. No nitrite accumulation was detected in any systems, although aerobic conditions took place full denitrification. The granular structure of biomass remained stable, but with lower C/N ratio the diameter size decreased, and contrary the settleability increased. The bacterial population NGS demonstrated the absence of pathogen microorganisms. Moreover, statistical analysis based on NGS allowed to elucidate how bacterial population is worst-adapted to compete for methanol than acetate, because the bacterial diversity and evenness were higher caused by low bacterial substrate specificity, as well as the resistance against influent changes. Fungi microorganisms had negative effects, as it corroborates the qPCR, in denitrification process using methanol as carbon source. Quantification analysis exposed that the number of denitrifying genes (norB and nosZ) was more abundant in reactor fed with acetate; however, the nitrogen mass balance demonstrated that not all denitrifying microorganisms could be active because the calculation showed higher nitrous gases for reactor fed with methanol.
To conclude, on the one hand, depending on the nitrate concentration in groundwater would be necessary applied C/N ratio of 2 when influent exceed 100 mg·L −1 , while for values close to 70 mg·L −1 would allow operated with C/N ratio of 1, conclusions advantageous in economic terms. On the other hand, if the source of pollution keeps stable, values of nitrate should be used methanol as carbon source due to the high efficacy to remove, while that acetate should be used for groundwater with oscillations on nitrate pollution due to the homeostatic behavior of the bacterial population.