Agricultural Biogas Production—Climate and Environmental Impacts

: Livestock manure is a major source of the greenhouse gases (GHGs) methane (CH 4 ) and nitrous oxide (N 2 O). The emissions can be mitigated by production of biogas through anaerobic digestion (AD) of manure, mostly together with other biowastes, which can substitute fossil energy and thereby reduce CO 2 emissions and postdigestion GHG emissions. This paper presents GHG balances for manure and biowaste management as affected by AD for ﬁve Danish biogas scenarios in which pig and cattle slurry were codigested with one or more of the following biomasses: deep litter, straw, energy crops, slaughterhouse waste, grass–clover green manure, and household waste. The calculated effects of AD on the GHG balance of each scenario included fossil fuel substitution, energy use for transport, leakage of CH 4 from biogas production plants, CH 4 emissions during storage of animal manure and biowaste, N 2 O emissions from stored and ﬁeld applied biomass, N 2 O emissions related to nitrate (NO 3 − ) leaching and ammonia (NH 3 ) losses, N 2 O emissions from cultivation of energy crops, and soil C sequestration. All scenarios caused signiﬁcant reductions in GHG emissions. Most of the reductions resulted from fossil fuel substitution and reduced emissions of CH 4 during storage of codigestates. The total reductions in GHG emissions ranged from 65 to 105 kg CO 2 -eq ton − 1 biomass. This wide range showed the importance of biomass composition. Reductions were highest when straw and grass–clover were used as codigestates, whereas reductions per unit energy produced were highest when deep litter or deep litter plus energy crops were used. Potential effects of iLUC were ignored but may have a negative impact on the GHG balance when using energy crops, and this may potentially exceed the calculated positive climate impacts of biogas production. The ammonia emission potential of digestate applied in the ﬁeld is higher than that from cattle slurry and pig slurry because of the higher pH of the digestate. This effect, and the higher content of TAN in digestate, resulted in increasing ammonia emissions at 0.14 to 0.3 kg NH 3 -N ton − 1 biomass. Nitrate leaching was reduced in all scenarios and ranged from 0.04 to 0.45 kg NO 3 -N ton − 1 biomass. In the scenario in which maize silage was introduced, the maize production increased leaching and almost negated the effect of AD. Methane leakage caused a 7% reduction in the positive climate impact for each percentage point of leakage in a manure-based biogas scenario. (S4) deep litter and organic waste, and (S5) deep litter, organic waste, and organic grass–clover.


Introduction
Emissions of nitrous oxide (N 2 O) and methane (CH 4 ) from livestock manure management contribute around 10% of the total non-CO 2 greenhouse gas (GHG) emissions globally calculated as CO 2 equivalents [1]. N 2 O and CH 4 have global warming potentials for time horizons of 100 years (GWP100) of 298 and 25 times, respectively, higher than This quantification of the climate and environmental effects of biogas production constitutes an important basis for designing and targeting future biogas subsidies to optimize the climate and environmental benefits of production. In this study, assessments are reported for five biomass scenarios in a Danish biogas context with different retention times and biomass compositions. The assessment was based on the best technologies currently used by the Danish biogas sector.

Materials and Methods
The calculated climate and environmental effects of introducing centralized codigestion AD in the livestock sector were compared with typical reference management of slurry and waste biomasses. Environmental impacts of introducing AD in five manure management systems ( Figure 1; Table 1) were calculated with a whole-system calculation approach for each scenario using one ton of dry matter of biomass as the functional unit. The calculations included CH4 and N2O emissions from each scenario (AD and reference farm without AD), the effect on soil C storage, and AD effects on N2O emissions related to NO3 -leaching and NH3 emission. GHG and environmental effects were calculated using the models applied in the Danish national inventory. Global warming potentials for a 100-year time horizon (GWP100) of CH4 and N2O at 25 and 298 CO2-eq kg −1 , respectively, were used [18]. Animal slurry is stored in a slurry tank and then applied by injection or trailing hose. Deep litter is stored in covered stacks/manure piles for five months and applied before sowing spring cereals. This quantification of the climate and environmental effects of biogas production constitutes an important basis for designing and targeting future biogas subsidies to optimize the climate and environmental benefits of production. In this study, assessments are reported for five biomass scenarios in a Danish biogas context with different retention times and biomass compositions. The assessment was based on the best technologies currently used by the Danish biogas sector.

Materials and Methods
The calculated climate and environmental effects of introducing centralized codigestion AD in the livestock sector were compared with typical reference management of slurry and waste biomasses. Environmental impacts of introducing AD in five manure management systems ( Figure 1; Table 1) were calculated with a whole-system calculation approach for each scenario using one ton of dry matter of biomass as the functional unit. The calculations included CH 4 and N 2 O emissions from each scenario (AD and reference farm without AD), the effect on soil C storage, and AD effects on N 2 O emissions related to NO 3 − leaching and NH 3 emission. GHG and environmental effects were calculated using the models applied in the Danish national inventory. Global warming potentials for a 100-year time horizon (GWP100) of CH 4 and N 2 O at 25 and 298 CO 2 -eq kg −1 , respectively, were used [18].

Slurry and Biowaste Management
In this study, the starting point was the collection of excreta and urine in slurry channels. The retention time was set at 20 days for cattle and 19 days for pigs [16], and the average slurry temperature was set at 13.8 • C for cattle and 18.6 • C for pigs. From the channels, slurry was transferred to an outside store and subsequently applied to grassland or arable land between March and August. In the outdoor storage tank, the temperature of untreated slurry was calculated based on monthly mean temperatures [16]. Untreated slurry and digestate must be stored according to national regulations to minimize ammonia emissions [19]. About 80% of untreated slurry was covered by a floating layer of natural crust, straw, or clay pebbles, and 20% was covered by a tent cover. Solid manure was stored for an average of 5 months in heaps covered by a PVC sheet. The deep litter in the reference system was covered with PVC and stored for an average of 5 months. Animal slurry is stored in a slurry tank and then applied by injection or trailing hose. Deep litter is stored in covered stacks/manure piles for five months and applied before sowing spring cereals.
Slurries were applied by injection to bare soil and grassland and by trail hoses to autumn-sown crops such as winter cereals, whereas deep litter had to be incorporated within 4 h after application to soil. In the reference system, slaughterhouse waste was stored together with livestock slurry and then spread on fields in the growing season. Glycerine was used for energy production by incineration, and source-separated household and industrial organic wastes were composted and used as fertilizer. The maize grown for codigestion in S3 was assumed to substitute a cereal crop in the reference system, and the grass-clover grown for codigestion in the organic farming scenario (S5) was assumed to be cut and mulched in the reference system.
In the AD concepts, liquid manure was transferred from livestock buildings to stores on the farm, as in the reference system ( Figure 1). Every 3-30 d, the slurry in the outside store and slurry channels within the building were assumed to be emptied and transferred to stores on the AD plant and covered according to regulations. Deep litter was assumed to be transferred from the farms to biogas plants, where it was stored in covered heaps until used for biogas production. Straw was used for biogas production, and in the organic farm scenario, grass-clover crops were fed to the digester as silage. Organic waste in the form of abattoir waste was fed to the biogas reactors after storage in concrete stores similar to those used for animal slurry, and glycerine was assumed to be stored in containers until use. Source-separated household waste and industrial organic waste were assumed to be stored in covered heaps.
In the five scenarios examined in this study (Table 1), biomass was fed to centralized biogas plants with 45 d hydraulic retention times (HRT) in primary thermophilic reactors (53 • C) and an average retention time of 45 d. In newly built biogas plants in Denmark, HRT tends to be longer, and therefore, the calculations included scenarios with retention times of 60 and 90 days. Digestate was defined to be cooled by heat exchange to 25 • C and then stored at the plant for 20 d in a storage tank with CH 4 gas collection. In all model plants, digestion took place by serial operation in two reactors with the same retention time in each unit, and the biogas was assumed to be upgraded and transferred to the natural gas distribution network by removal of CO 2 in the biogas.
The digestate was transferred from the AD plant to farmer concrete stores, where 50% of the digestate was assumed to be covered with a tent and the rest by a floating cover, straw, or natural surface crust. The digestate was applied by injection to bare soil and grass crops (mandatory in Denmark) and by trail hoses to other growing crops.

Calculations
Greenhouse gases, NH 3 emissions, and leaching of NO 3 − from different farm compartments in the reference and AD biomass management continuum are depicted in Figure 1. An overview of the calculation of biogas production, emissions, leaching, and soil C storage is given in the following. Short reviews about the algorithms used to calculate emissions, transformation, and leaching losses are presented in Supplementary Materials, which also contain tables with parameters for the algorithms and emission factors.

Biogas Production
The CH 4 production from the different biomasses was estimated from our own experiments and other studies (Supplementary Materials, Table S1). The ultimate CH 4 yield in terms of volatile solids (VS) is the yield achieved at a retention time of more than 90 days, and to determine the yield at shorter retention times, the CH 4 produced in the biogas reactor was determined for each biomass through modelling using the Gompertz equation [20]. The gas potential at a given time was calculated as follows: where M is the cumulative CH 4 yield (mL g −1 (VS)), B 0 is the theoretical CH 4 yield (mL g −1 (VS)), k is a first-order kinetic rate constant representing the hydrolysis constant, and t is retention time (days). The biogas production was calculated from this equation and thus determined by the amount and quality of biomasses and the retention time in the biogas reactor.

Energy Production and Consumption
The calculations of CO 2 substitution from energy production were based on the displacement of natural gas, in which CH 4 substituted CO 2 corresponding to 0.057 kg CO 2 -eq MJ −1 [21]. The electricity demand for agitators, pumps, etc. at the plant was assumed to be covered by a mix of the Danish electricity production, which in 2019 was estimated at 0.150 g CO 2 kWh −1 , as calculated using data from [22]. The volume of biomass transported in one truckload to and from the biogas plant varied among the different biomass types, and diesel consumption was given per kilometre driven. The distances were calculated as the average additional transport of biomass compared to the reference scenario without AD and varied from 0.8 kg CO 2 -eq ton −1 for grass and maize silage to 11.6 kg CO 2 -eq ton −1 for glycerol. The effect on GHGs of replacing mineral N fertilizer due to higher N availability in the digestates was estimated by assuming that the long-term N availability equivalent of total N was 5% higher in the treated than in untreated manure [23]. The potential reduction in N fertilizer use was assumed to give a reduction in GHGs of 5.6 kg CO 2 kg −1 N [24], equivalent to 0.28 kg CO 2 kg −1 treated N in the biogas plant.

Methane Emission from Slurry and Digestate
Daily methane emissions from slurry and digestate during storage were estimated from the volumes of readily degradable (VS d , kg kg −1 ) and slowly degradable organic matter (VS nd , kg kg −1 ) as proposed by Sommer et al. [9]: where F t is the methane production rate (g CH 4 kg −1 VS h −1 ), E α is the process activation energy (J mol −1 ), lnA (g CH 4 kg −1 VS h −1 ) represents the methanogenic potential of the substrate, R is the universal gas constant (J K −1 mol −1 ), and T is the temperature (K). Equation (1) assumes that the amount and degradability of biomass organic matter, and storage temperature, are main controlling variables.
E α was set to 81,000 J mol −1 [25]. The parameter lnA was highly variable and depended on slurry origin, treatment, storage conditions, and age [4]. Petersen et al. [26] estimated lnA for slurry collected in pig and cattle barns by measuring CH 4 production rates at the storage temperature and calculating lnA from Equation (1) after rearrangement: The degradability of VS in slurry changes during storage, and no data were available from outside storage tanks. Instead, a different approach was used in which lnA estimates were related to total VS: Note that the parameter value derived from total VS is referred to as lnA to distinguish from the original calculation of lnA with reference to degradable VS. A limited number of studies were identified for which information about storage temperature and VS content were available to allow estimation of lnA in pig and cattle slurry, as well as digestate (Supplementary Materials, Table S4). For the present study, the lnA of pig and cattle slurry in barns reported by Petersen et al. [26] were recalculated to lnA ; Table 2 summarizes the values used. Outside store 27.9 ± 0.4 [28,29] Methane emissions were calculated separately for cattle and pig slurry in barns and for untreated slurry, digestate, and other biomasses assumed to be stored in outside storage tanks. Assumptions regarding retention time, storage temperatures, etc. are given in Supplementary Materials.
After field application, manure environments are predominantly at a redox level at which little, if any, CH 4 is produced. Transient emissions have sometimes been reported; these are probably due to release of dissolved methane produced during storage [30,31].

Methane Emission from Solid Manure
Methane may be emitted from solid manure (deep litter, fibre fraction from separated slurry or digestate) during storage. The emission level is determined by VS degradability, air-and water-filled porosity, and coverage, which in turn determine biological oxygen demand, gas exchange rates, temperature, and anaerobic volume developing during storage. The Danish emission inventory estimates this source with a model proposed in [4]: where EF (kg CH 4 kg −1 (VS)) is the CH 4 emission factor, BMP (m 3 CH 4 kg −1 (VS)) is the biochemical methane production potential, and MCF (%) is a country-specific CH 4 conversion factor. For deep litter, an MCF of 3% is assumed if manure is exported at 1-month intervals or less, and an MCF of 17% is assumed if manure is removed at longer intervals. With a BMP of 0.24 m 3 kg −1 (VS), the overall CH 4 emission from barns and during outside storage were as shown in Table 3. We assumed that half of these emissions would come from outside stores, corresponding to 0.005 and 0.027 kg CH 4 kg −1 (VS) for short-and long-term storage periods, respectively (Table 3). Recent studies have shown that emission of CH 4 from uncovered and uncompacted manure heaps are at a level of 0.027 kg CH 4 kg −1 (VS) [32][33][34], and we therefore assumed that the emission factor was 0.03 kg CH 4 kg −1 (VS) for uncovered manure heaps and half as much for heaps with PVC tent covers (i.e., 0.015 kg CH 4 kg −1 (VS)) ( Table 3) [34].
In organic farming, animal manure is often actively composted by turning the heap. This reduces the development of anaerobic volumes in the heap and contributes to lower CH 4 emission compared to undisturbed heaps. Based on a CH 4 emission from actively composted organic waste corresponding to 3% C [32], and assuming the same C/VS ratio in organic waste and deep litter, CH 4 emissions from deep litter were estimated (Table 3).

Nitrous Oxide Emission
Nitrous oxide may be emitted from slurry and digestate, as well as solid manure, during storage and after field application. Nitrous oxide emissions are associated with nitrification and denitrification, two interdependent processes occurring under aerobic and anaerobic conditions, respectively. Oxic-anoxic gradients occur in slurry storages with surface crusts and in the outer layers of manure heaps.
Nitrous oxide emissions during storage of slurry or digestate depend on the development of a floating crust where populations of nitrifying and denitrifying bacteria live. The IPCC guidelines give a default emission factor for storage tanks with a surface crust of 0.5%, i.e., 0.5% of total N entering the storage tank is converted to N 2 O [4]. Danish pilotscale measurements indicated lower emissions, 0.2-0.4% [35], but the level of emissions is influenced by climatic conditions, especially the water balance (rain and evaporation). The emission factor of 0.5% of N in the total flow of slurry was used here even though only the surface can be a source of N 2 O. Without a surface crust, the emission factor for N 2 O was set to 0 for both untreated slurry and digestate.
For cattle deep litter, IPCC [4] recommends a N 2 O emission factor for barn and storage of 1% regardless of retention time in the barn. Assuming half of these emissions occur during outdoor storage, this effectively corresponded to 0.5% of total N. In a review by Pardo et al. [32], N 2 O-N emissions from compost heaps with organic waste corresponded to 2.2% of total N ( Table 3).
The default emission factor for nitrous oxide emissions from N in field-applied liquid and solid manure is 1% [4]. In soil with organic amendments, be they manure, digestate, or crop residues, the balance between oxygen (O 2 ) demand and O 2 supply is an important control of denitrification and N 2 O emissions [36]. While anaerobic digestion reduces the availability of degradable VS, and hence O 2 demand, the net effect on N 2 O emissions depends on the interaction with specific soil conditions. A review of field studies [37] reported mostly reductions in N 2 O emissions with AD, but increases have also been reported. In the present study, no effect of anaerobic digestion on N 2 O emissions was assumed. Nitrous oxide emissions related to NH 3 emissions and nitrate (NO 3 − ) leaching were accounted for with emission factors of 1% and 0.75%, respectively, in accordance with the national inventory of Denmark [18].

Ammonia Emission
The emissions of NH 3 from slurry storage tanks and solid manure heaps were calculated using emission factors estimated by [38]. These were within the ranges given in the recent review by Kupper et al. [39]. The NH 3 emission factor for composting of source separated organic waste was taken from the review by Pardo et al. [32]. When deposited, the emitted NH 3 contributes to N 2 O emissions [4], and this indirect source of N 2 O was included in the calculations. Ammonia emission factors for applied livestock liquid manure given by [38] were used in this study, while emission factors for each month were calculated with the ALFAM model [40] using average monthly weather conditions and average slurry compositions for Denmark. Based on a review of recent studies, we assumed that NH 3 emission from digestate would be higher than emission from untreated slurry (Supplementary Materials, Table S6).
Data from studies on emissions of NH 3 from deep litter applied to soil were limited in 2008 [38], and only one emission factor for application during different months was given. The evidence about the effects of climatic conditions on emission of NH 3 from solid manure applied to soil is still limited, and emission factors cannot be assessed at a monthly scale [41]. We therefore used the same emission factor for applied deep litter regardless of whether the application took place in the spring or autumn. Deep litter must, in Denmark, be incorporated into the soil within 4 h of application, and it was assumed that within this timespan, 25% of total ammoniacal N (TAN) was emitted as NH 3 .

Crop Production and Nitrate Leaching
AD processing of animal slurry and biowaste affects NO 3 − leaching from crop production in both direct and indirect ways. The direct effects are through the effects of applied N in both the first and following year after application of fertilizer or manure; here, AD affects the quality and quantity of N applied. The indirect effects of AD on NO 3 − leaching occur through AD effects on NH 3 volatilization, which affects the N available for plants through both the N loss and the deposited N.
Nitrate leaching during the first year after fertilizer or manure application was assumed to be proportional to the amount of total N (mineral N + organic N) applied [23,42,43]. Total N application was assumed to be similar before and after AD, in accordance with Danish fertilizer regulations, despite more N being plant available after AD. This means that more N is taken up in the first crop and less organic N is left in the soil from digestates. In the scenario with an energy crop (S3), total N application increased by AD, as the energy crop contributed with extra organic N to the system, and the N derived from the energy crop was assumed to replace only mineral N fertilizers with an efficiency of 40% as in the Danish legislation. In the other scenarios, total N application remained the same before and after digestion.
The effect of AD on NO 3 − leaching over a 10-year period was calculated using a model based on the principles described by Sørensen et al. [23]. It was assumed that about 40% of the organic N input would be mineralized during years 2-10 after application, and that 34% of the mineralized N would be leached as nitrate [23]. Because of the lower N mineralization after AD, NO 3 − leaching was also slightly reduced after digestion. The model uses information on soil and climatic conditions, and it was assumed that 80% of the manures were used on sandy soils with precipitation above average Danish levels [44].
The direct and indirect effects of increased NH 3 volatilization after AD on NO 3 − leaching were calculated separately. It was assumed that increased NH 3 emission caused a net reduction in NO 3 − leaching [8] as estimated with the following assumptions. The empirical NLES5 model estimates an average marginal leaching of 17% during the first Sustainability 2022, 14, 1849 9 of 24 three years after mineral N application in spring under Danish conditions and at N rates near the economic optimum [44]. In Denmark, 80% of livestock manure is applied to sandy soils [45] with higher-than-average marginal leaching, and therefore, 20% of NH 4 + -N in applied manure/digestate was assumed to be lost by leaching over a 3-year time period. Furthermore, NH 4 + -N applied to soil contributes to organic N from plant residues that may give an extra NO 3 − N leaching equivalent to 2% of the N input in years 3-10 after application [8]. The total reduction in NO 3 − N leaching from NH 4 + -N was therefore 22% of the increase in NH 4 + -N volatilization loss over a 10-year period. However, part of the lost NH 3 would be deposited on agricultural land where part of that pool is leached. It was estimated that 10% the NH 4 + -N lost by volatilization was land deposited and leached as nitrate [8]. Thus, the net effect of increased NH 3 loss on reduction in NO 3 − N leaching was set to 22% − 10% =12% of the increase in NH 3 -N loss over a 10-year period. This factor was used to calculate the leaching reduction due to increased ammonia volatilization.

Soil Carbon Storage
The effect of biogas treatment of slurry and other livestock manure on soil C storage is still relatively poorly quantified, but a study based on laboratory incubations measured slightly smaller soil C storage in connection with AD treatment [46]. Based on Thomsen et al. [46], the amount of C digested in the biogas plant was assumed to have contributed to C storage by 25% of the effect achieved when adding C in fresh plant material and straw, i.e., 0.25 × 15% = 3.75% of the C transformed to CO 2 and CH 4 in biogas during the digestion process would alternatively have been stored after a 20-year period, assuming retention in the soil of 15% of the C added in plant material over 20 years [46].

Biogas Production
The largest biogas production was achieved in the scenarios in which slurry was codigested with straw or grass, which were the scenarios with largest energy output. In the energy balances showing reduced CO 2 -eq emissions, it was assumed that the CH 4 produced substituted natural gas ( Figure 2). Power is used in biogas plants for heating, pumping, and mixing, which reduces the net energy production, but most Danish biogas plants limit the energy consumption using heat exchangers, reducing the digestate temperature to 25 • C. Without heat exchange, the digestate would be stored at higher temperatures and be a significant source of CH 4 emissions. In the calculations, the use of heat exchangers reduced the need for process heat and thereby enhanced the CO 2 balance by around 10% (Figure 2). The use of diesel for transport of biomass had little influence on GHG balances (Figures 2 and 3) in the biogas plants and constituted less than 3% of the energy produced. The use of diesel for transport of biomass had little influence on GHG balances (Figures 2 and 3) in the biogas plants and constituted less than 3% of the energy produced. Figure 2. The energy (a) and GHG (b) balances of the energy production at model p exchangers installed. Scenarios were (S1) slurry and deep litter; (S2) slurry and str deep litter, and maize silage; (S4) slurry, deep litter, and organic waste; and (S5) slu organic waste, and organic grass-clover.
The use of diesel for transport of biomass had little influence on G (Figures 2 and 3) in the biogas plants and constituted less than 3% of the ener

Methane Emissions
Whereas experimental data were available for the estimation of daily C from cattle and pig slurry in barns, parameters representing the methanog during storage had to be extracted from published storage experiments. Th (Table 2) indicated that the methanogenic potential in stored digestate wa lower than that in cattle slurry and 90% lower than that in pig slurry accordance with the assumption that anaerobic digestion would remov degradable VS. With these differences in methanogenic potential, the five bio showed reductions in CH4 emissions from barns and subsequent outside varied between 41 and 56% ( Figure 4).

Methane Emissions
Whereas experimental data were available for the estimation of daily CH 4 emissions from cattle and pig slurry in barns, parameters representing the methanogenic potential during storage had to be extracted from published storage experiments. The lnA values (Table 2) indicated that the methanogenic potential in stored digestate was around 70% lower than that in cattle slurry and 90% lower than that in pig slurry. This was in accordance with the assumption that anaerobic digestion would remove 90% of the degradable VS. With these differences in methanogenic potential, the five biogas scenarios showed reductions in CH 4 emissions from barns and subsequent outside storage that varied between 41 and 56% ( Figure 4).  In the model calculations, the relationship between VS degradation and CH production depended on assumptions regarding the proportions of C in VS converted to CH4 and CO2, a ratio that is subject to large uncertainty (cf. Supplementary Materials). In the scenario calculations, the CH4/CO2 ratio was set at 25:75 for untreated slurry and In the model calculations, the relationship between VS degradation and CH 4 production depended on assumptions regarding the proportions of C in VS converted to CH 4 and Sustainability 2022, 14, 1849 11 of 24 CO 2 , a ratio that is subject to large uncertainty (cf. Supplementary Materials). In the scenario calculations, the CH 4 /CO 2 ratio was set at 25:75 for untreated slurry and codigestates stored anaerobically and 10:90 for digestates. The importance of these ratios was evaluated in a sensitivity analysis calculating the effects of reducing by half, or doubling, the share of CH 4 produced in pig and cattle slurry (Table 4). Untreated pig slurry was sensitive to the assumption regarding CH 4 share, with 21% lower CH 4 emissions if the assumed CH 4 share was reduced by half and 17% higher emissions if the assumed CH 4 share was doubled. All other relative changes were negligible. Experimental data on CH 4 emissions from slurry and digestate were the reference for model calculations, and as a consequence, a lower or higher CH 4 /CO 2 ratio would lead to less or more residual VS, respectively, being exported and available as substrate for CH 4 emissions from the outside storage. The limited effect of changing the CH 4 /CO 2 ratio for digested slurry was due to the fact that pretreatment emissions in barns were identical, and the CH 4 emissions following biogas treatment were greatly reduced. Table 4. Sensitivity analysis of the importance of the CH 4 /CO 2 ratio in the gas produced from VS degradation of untreated and digested slurry for the cumulated CH 4 emissions from barn and outside slurry storage (relative differences with scenario results as basis). For each scenario, the CH 4 emissions were calculated using 45, 60, and 90 days of HRT in the reactor, which may affect the predicted CH 4 emissions during subsequent storage of the digestate. This is exemplified in Figure 5b, which shows the sources of CH 4 for scenario S5 (organic biogas) with cattle slurry, deep litter, grass-clover silage, and biowaste, as well as CH 4 emissions without treatment (HRT 0 d) for reference. It was mainly the emission of CH 4 from cattle slurry that was affected by increasing HRT, the emission being 16% less at 90 than at 45 days HRT. The reduction for deep litter was 5-6%, and the changes for grass silage and biowaste were <1%. mainly the emission of CH4 from cattle slurry that was affected by increasing HRT, the emission being 16% less at 90 than at 45 days HRT. The reduction for deep litter was 5-6%, and the changes for grass silage and biowaste were < 1%. The total CH4 emissions for scenarios with HRT at 45, 60, or 90 d, expressed as CO2 equivalents, are shown in Figure 5a. All scenarios showed the same trend, with 2-3% lower GHG emission at 90 than at 45 d HRT.

Untreated Slurry
Overall GHG balances were calculated for biogenic CH4 and N2O emissions from The total CH 4 emissions for scenarios with HRT at 45, 60, or 90 d, expressed as CO 2 equivalents, are shown in Figure 5a. All scenarios showed the same trend, with 2-3% lower GHG emission at 90 than at 45 d HRT.
Overall GHG balances were calculated for biogenic CH 4 and N 2 O emissions from barns and outside storage, and after field application ( Figure 6). While biogas treatment gave a substantial reduction in CH 4 emissions, ranging from 41% to 56%, as described above, no effect on N 2 O emissions was assumed, and N 2 O emissions are therefore directly proportional to the N content of the biomasses used in each scenario, which were identical in reference and biogas scenarios. As a result, the overall GHG balances corresponded to reductions through biogas treatment ranging between 21% and 40%.

Ammonia Emission
The digestion of animal slurry, crops, and biowaste increases emission of NH3 because of the higher emission potential of digestate due to its higher pH and TAN to N ratio. Consequently, AD increased NH3 emission in all five scenarios. The highest increases were in scenarios S3 and S5, in which slurry was codigested with maize silage and grass-clover, which increased the N content in the digestate. This was, in the scenarios with deep litter, to some extent counteracted by reduced emissions from the solid manure management, as emissions were lower from the fraction of digested solid manure than from the solid manure managed in the reference scenarios (Table 5).

Crop Production and Nitrate Leaching
The change in NO3 − leaching by implementing AD was estimated for a mixture of the most common crops in Denmark and calculated with and without the inclusion of NH3 emission after digestion. The increase in NH3 emission reduced NO3 − leaching by only 0.02-0.04 kg NO3 − -N ton −1 (biomass) (data not shown). In the reference scenario, Figure 6. Total biogenic CH 4 and N 2 O emissions, calculated as CO 2 -eq, from stored slurry and other biomasses in the reference (Ref) and biogas scenarios (Biogas). The scenarios were (S1) slurry and deep litter; (S2) slurry and straw; (S3) slurry, deep litter, and maize silage; (S4) slurry, deep litter, and organic waste; and (S5) slurry, deep litter, organic waste, and organic grass-clover.

Ammonia Emission
The digestion of animal slurry, crops, and biowaste increases emission of NH 3 because of the higher emission potential of digestate due to its higher pH and TAN to N ratio. Consequently, AD increased NH 3 emission in all five scenarios. The highest increases were in scenarios S3 and S5, in which slurry was codigested with maize silage and grass-clover, which increased the N content in the digestate. This was, in the scenarios with deep litter, to some extent counteracted by reduced emissions from the solid manure management, as emissions were lower from the fraction of digested solid manure than from the solid manure managed in the reference scenarios (Table 5).

Crop Production and Nitrate Leaching
The change in NO 3 − leaching by implementing AD was estimated for a mixture of the most common crops in Denmark and calculated with and without the inclusion of NH 3 emission after digestion. The increase in NH 3 emission reduced NO 3 − leaching by only 0.02-0.04 kg NO 3 − -N ton −1 (biomass) (data not shown). In the reference scenario, slaughterhouse waste was assumed to be applied to crops as untreated biofertilizer hygienized and mixed with slurry. The source-separated organic household waste would in the reference system be composted and applied to a spring-sown crop as an alternative to digestion. The reduction in NO 3 − leaching by AD was 0.04-0.45 kg NO 3 − -N ton −1 (biomass), with the lowest reduction in the scenario with an energy crop (S3) and the largest in the organic system with digestion of a grass-clover green manure crop that would alternatively be cut and mulched in the field (S5). The reduction in NO 3 − leaching was lowest in S3 because the overall input of N increased in this scenario. We did not include the effect of a crop change to maize in the leaching effect because of the uncertainty of which crop was being replaced by maize, although it was expected to be mainly cereals. Nitrate leaching is higher from maize than from most other crops [44], and if this effect had been accounted for, or if a higher proportion of maize had been applied in S3, then an increase in NO 3 − leaching would be expected by AD [47].

Soil Carbon Storage
For the scenario including straw as a cosubstrate, the alternative was assumed to be incorporation of straw into the soil. For one ton of straw with a dry matter content of 85%, and 45% C in the dry matter, this corresponded to reduced soil C storage of 7.7 kg C, equal to 28.1 kg CO 2 -eq. It was assumed that substituting cereals for silage maize would not affect soil C storage [48] and that changes from mulching grass-clover to a cutting regime with return of the digestate would also have little effect [49].

GHG Emissions
Introducing AD in the five different scenarios reduced the net GHG emissions of livestock farming by 67-111 kg CO 2 -eq ton −1 of biomass at 60 d HRT ( Table 6). The corresponding effect in terms of DM was 479-613 kg CO 2 -eq ton −1 DM. Most of this reduction was ascribed to substitution of fossil energy in energy production and avoided CH 4 emission during storage of biomass. The difference in biogas production in the five scenarios was due to the different amounts of dry matter and biogas potentials in the substrates supplied to the plants.
The biogas plants in scenarios S2 and S5 were supplied with biomasses with high dry matter concentrations, which contributed to a high amount of energy produced per ton of biomass and thus a considerable GHG reduction. If the comparison were to be made independently of these differences in dry matter content, the assessment should be based on the GHG effect per GJ or dry matter input. For example, scenario S2 with straw had a significantly higher GHG effect per ton of biomass than S1 with deep litter. The reason is that considerably more dry matter was supplied in the straw scenario. If the same amount of dry matter had been supplied in the straw scenario as in the deep litter scenario, then the straw scenario would have had a lower GHG effect. This was reflected in the lower GHG effect per GJ of straw than of deep litter. The model plant with the greatest GHG reduction per ton of biomass was the scenario in which 20% straw was added (S2). However, this was also the scenario with the lowest GHG effect in terms of dry matter.

Discussion
The analysis presented here showed that anaerobic codigestion of slurry with biowaste, crop residues, and crops primarily reduced GHG emissions by substituting fossil fuel for power and heat production and reducing CH 4 emission during postdigestion storage. The main environmental benefits from biogas energy systems compared to fossil fuel energy systems occurred in terms of reduced GHG emissions and reduced resource consumption [50]. The impact of utilizing animal manure for biogas production is important in this respect, since avoided emissions from the reference system of conventional manure management could be credited to the biogas system [50], which was not the case for energy crops and straw that would not be sources of GHGs in a non-AD scenario.
In our study, AD was assumed not to affect N 2 O emissions, in contrast to calculations presented in a previous study by Sommer et al. [9], in which the removal of degradable organic matter during AD was assumed to reduce N 2 O emissions from digestate applied to soil by reducing the potential for denitrification. However, experimental results on this aspect have conflicted [37], and recent studies have made it clear that the amount and composition of denitrification products depend on complex interactions between digestate and soil properties. Thus, accounting for the effect of AD on N 2 O emissions would probably require considering the composition of residual VS in digestates, as modified by codigestates and soil gas exchange controlling the exchange of oxygen and denitrification products [51]. The consideration of specific site and weather conditions was beyond the scope of this study, but this should be investigated further.
In our study, the total impact on GHG was 67-111 kg CO 2 -eq ton −1 of biomass at 60 d HRT, which demonstrates that the biomass mix played an important role. In a study by Poeschl et al. [52] the GHG impact was 75 kg CO 2 -eq ton −1 for a small-scale plant and 120 kg CO 2 -eq ton −1 for a large-scale plant. In this study, liquid manure accounted for 55% in the small-scale plant, while in the large-scale plant, only wastes from industry and household were included [53]. Including corn silage had a high positive GHG impact, while grass silage had a negative GHG impact. This was in contrast to our study, in which the scenario with maize had the lowest GHG impact while the scenario with glass-clover had significantly higher impact. However, in a study by Hijazi et al. [50], nonleguminous perennial grass was used. In organic farming, leguminous perennial grass is used as a source for N fertilizer because of its ability to fix atmospheric N [53]. This type of grass might be better than nonleguminous perennial grass in terms of the savings of direct N 2 O emission from N input in the form of mineral or organic fertilizers [53].

Biomass Sources for Biogas
The GHG impacts calculated in our study were based on a Danish territorial perspective; in general, only impacts on Danish national GHG emissions were included. However, the production of commercial N fertilizer was taken into account with a minor climate impact corresponding to 0.28 kg CO 2 -eq per kg biomass N, or about 1.5 kg CO 2 -eq per ton of biomass. The fertilizer replacement value of biomass is increased after digestion. However, Danish legislation with quotas on mineral N fertilizer application does not account for this, and it is uncertain whether farmers take the higher N availability into account. Therefore, this effect is uncertain in practice but has potential to be utilized. Since there is no fertilizer production in Denmark, such emissions are not included in Denmark's national GHG inventory and therefore were not considered. Neither were the possible effects of changed land use elsewhere on the planet (iLUC) considered. This was relevant only for scenario S2, in which the cultivation of maize as an energy crop was set to replace the production of cereals and could, thus, potentially have iLUC impacts. The iLUC impacts are uncertain, but they may potentially exceed the calculated positive climate impacts of biogas production [53]. In the inventory of biofuels under the EU's Renewable Energy Directive (RED), iLUC impacts are included, although they are not included in the EU requirements for compliance with the RED II [54]. For maize for biogas production, the iLUC impact in a RED context was most recently calculated as 21 kg CO 2 -eq MJ −1 [55].
Besides livestock manure, the model plants used different types of biomasses from the agricultural sector. Addition of 20% straw to the slurry (S2) gave the largest GHG reduction per ton, but the smallest reduction in terms of DM. The Danish biogas sector is considered a cornerstone in Danish green energy production, and there is increasing demand for more biomass for codigestion with slurry. While there is plenty of unused straw available as cosubstrate, the amount of straw added in scenario S2 cannot be managed with existing biogas technology because of problems related to pumping and agitating the biomass. However, the Danish biogas industry has projected that future technologies in form of pretreatment, pumps, and agitators will be able to manage this amount of dry matter. The calculations in this report assumed that the alternative to the use of straw for biogas was incorporation in the field. If the alternative had been incineration for combined heat and power, the climate impact would have been considerably lower. On the other hand, biogas from straw has the advantage that plant nutrients and part of the slowly degradable C in the straw is returned to the field.
Substituting some of the deep litter (S1) with maize silage (S3) improved the GHG emission reduction per ton slightly. The high degradability of the organic matter in maize contributes to high biogas production per ton of biomass, and energy production was therefore higher for S3 than for S1. In a study from 2013 [14], the GHG emission by codigestion of slurry and 10% maize was reduced by 72 kg CO 2 -eq ton −1 (wet basis), which was about 10 kg CO 2 -eq ton −1 (wet basis) more than in our study. In the mentioned study [14], the fibre fraction from separation of slurry was included in the calculation, and it was assumed that it had a higher CH 4 emission potential during storage than deep litter.
Glycerol can be used for energy production in power plants and Otto engines [56], and it is also a useful raw material for biogas production. When glycerol is used in conventional heat and power (CHP) production, the CO 2 reduction effect is 690 kg CO 2 ton −1 when it substitutes natural gas, and when producing biogas substituting natural gas, it reduces GHG emissions with an equivalent of 558 kg CO 2 per ton. When compared to incineration in power plants, biogas is considered a high-value energy carrier that can be stored and converted to electricity.
Among the biogas plants, the GHG effect was lowest in the plant with deep litter (S1), since CH 4 emissions during storage increased because of the higher CH 4 emission from digestate than from heaps of deep litter. In S4, with added glycerol, it was assumed that the glycerol would otherwise have been used efficiently for heat and power production. This assumption has not previously been used and is one of the reasons why the GHG reduction potential of an "industrial waste plant" was lower than in the study by Nielsen et al. [57], in which the total GHG effect was a reduction at 90 kg CO 2 -eq ton −1 .
The organic farming biogas plant (S5) had, next to the deep litter and straw model plant (S2), the largest GHG reduction potential per ton (102 CO 2 -eq ton −1 ), which may be attributed to the high biogas yield as a result of the high proportion of grass, deep litter, and biowaste. In a previous analysis from 2013, the GHG reduction calculated for the introduction of AD in an organic farming system was 83 kg CO 2 -eq ton −1 [15], but lower effects of both energy production and CH 4 emission during storage was assumed. In our study, the effect of substituting fossil fuels contributed more to the overall GHG impact than in previous studies, in which the importance of reducing CH 4 emissions was greater and a reduction in N 2 O emissions was included in the calculations [57].
Energy crops, such as maize, are still a significant source of substrates used by Danish biogas plants, but the amount that can be used is constrained by restrictions under subsidy schemes. Compared with cereal crops such as wheat, there are only limited negative effects of growing maize and other energy crops. However, grass and sugar beets have better environmental and GHG profiles for biogas production than maize [58], and in the future, cover crops are also expected to be used for biogas production. This may reduce the N 2 O emissions currently seen after the incorporation of cover crops [59] while at the same time maintaining and possibly improving soil C storage potential. Cover crops and straw together provide a promising source of biogas while at the same time increasing the recycling of nutrients in crop production [60]. Utilization of the expanding area with cover crops as a source of biomass for biogas production would not have the negative iLUC effects that are associated with the cultivation of energy crops for biogas.

Biogas Plant Configuration
Increasing the reactor size and hydraulic retention time (HRT) reduced net GHG emissions via an increase in the production of biogas and a reduction in the amount of degradable VS in digestate transferred for downstream storage, which will reduced CH 4 emissions from the digestate (Figure 7). The effect of increasing HRT was related to the degradability of the organic matter in the biomass used, and the highest effect was calculated when adding straw or deep litter, which feature high concentrations of slowly degradable biomass. There were increases in the GHG reduction potential by increasing HRT from 45 to 60 days in all scenarios, whereas the effect of extending HRT further was positive only for scenarios S1 to S4, because the positive effect in S5 was outweighed by greater consumption of process energy. degradability of the organic matter in the biomass used, and the highest effect was calculated when adding straw or deep litter, which feature high concentrations of slowly degradable biomass. There were increases in the GHG reduction potential by increasing HRT from 45 to 60 days in all scenarios, whereas the effect of extending HRT further was positive only for scenarios S1 to S4, because the positive effect in S5 was outweighed by greater consumption of process energy. Methane leakage may have a significant effect on total climate impact, which would mainly be due to the global warming potential of CH4 and, to a lesser extent, the unrealized energy production (Figure 8). The total climate impact was almost linearly reduced with increasing CH4 leakage ( Figure 8). The total impact was reduced by about 5 kg CO2-eq per ton of biomass from scenario S1 at a methane leakage of 1% to about 10 kg CO2-eq ton −1 of biomass at a methane leakage of 2%. This means that about 7% of the positive climate impact of the plant was lost for each percentage point of leakage. For a leakage of 15%, biogas no longer had a positive effect for scenario S1. Release and leakage of CH4 from small, unheated digesters may, in a scenario in which biogas energy substitutes coal, negate the GHG-reducing effect of biogas production if 40% of the biogas produced is emitted to the atmosphere [61]. Methane leakage may have a significant effect on total climate impact, which would mainly be due to the global warming potential of CH 4 and, to a lesser extent, the unrealized energy production (Figure 8). The total climate impact was almost linearly reduced with increasing CH 4 leakage (Figure 8). The total impact was reduced by about 5 kg CO 2 -eq per ton of biomass from scenario S1 at a methane leakage of 1% to about 10 kg CO 2 -eq ton −1 of biomass at a methane leakage of 2%. This means that about 7% of the positive climate impact of the plant was lost for each percentage point of leakage. For a leakage of 15%, biogas no longer had a positive effect for scenario S1. Release and leakage of CH 4 from small, unheated digesters may, in a scenario in which biogas energy substitutes coal, negate the GHG-reducing effect of biogas production if 40% of the biogas produced is emitted to the atmosphere [61]. Nielsen et al. [57] assumed that the organic waste used as codigestate would be stored under anaerobic conditions in the reference scenario and therefore be a significant source of CH4 emissions. Compared with [57], the biogas scenarios in the present study used a greater diversity of biomasses as codigestates. The relevant alternative management of these biomasses was incorporation (straw), ensiling (maize), storage in a heap (deep litter), Nielsen et al. [57] assumed that the organic waste used as codigestate would be stored under anaerobic conditions in the reference scenario and therefore be a significant source of CH 4 emissions. Compared with [57], the biogas scenarios in the present study used a greater diversity of biomasses as codigestates. The relevant alternative management of these biomasses was incorporation (straw), ensiling (maize), storage in a heap (deep litter), or composting (biowaste), and only the slaughterhouse waste included in scenario S4 was assumed to be stored under anaerobic conditions if not digested. To the extent that codigestates were not stored anaerobically in the reference scenarios, this reduced the CH 4 mitigation potential of biogas treatment compared with that in the previous analyses.

Nitrogen Losses
The reduction in NO 3 − leaching from the AD scenarios was lowest in the system with energy crops (S3), because the overall N input increased in this system with the introduction of more organic N from plant material. If 12% maize silage was used, the effect of digestion on leaching was close to zero, in accordance with previous estimates by Sørensen and Børgesen [23]. Nitrate leaching is typically greater for maize cultivation than for most other crops [44], and if this effect could be included, or if a higher proportion of energy crops were applied in S3, then an increase in NO 3 − leaching would be expected with AD compared with the corresponding reference scenario. However, since the effect is much affected by the assumption about which crop would be replaced by maize, we did not include the effect of a crop change to maize. On organic farms, AD of plant biomass from green manure crops, as in S5, increased the average plant availability of N [60]. This meant that less organic N was left in the soil to contribute to leaching by mineralization in the following years, and the effect of AD in such a system was estimated to reduce NO 3 − leaching by 0.45 kg N ton −1 biomass.
The NH 3 emission potential of digestate applied in the field was higher than that of cattle slurry and pig slurry because of the higher pH of the digestate. This effect, and the higher content of TAN in digestate, contributed to higher emission from the AD systems. The effect of higher TAN concentration contributed 60-70% of the increase in NH 3 emission from AD systems, and most of this increase was due to higher emission from digestate applied to soil. The relatively small increase in NH 3 emission in scenario S3 was due to the emissions from storage and application of deep litter and biowaste being large in the reference system. Ammonia emission in the organic scenario, S5, was high because of the increase in the TAN content of digestate originating from N in the codigested grass-clover and the low NH 3 emission from the reference system. This increase in NH 3 can be avoided if organic farms inject slurry into the soil, which is feasible because of the high share of spring crops in organic crop rotations for which slurry can be injected prior to seeding or on grassland during the growing season.
In Denmark, slurry acidification is an alternative to incorporation and injection, but this technology is not suitable for digestates, because the high pH buffer capacity of the digestate results in high demand for acid and thus high cost for this treatment; furthermore, acidification with sulfuric acid is not allowed in organic farming.

Uncertainties
The calculations were based on the current knowledge about energy production in the form of biogas from different types of biomasses and their related environmental and GHG impacts. Biogas technology is constantly developing, and so is the alternative use of biomasses. This leads to uncertainty with respect to the representativeness of the biogas plants defined and their composition of biomasses. However, the model plants analysed in this study represent the types of biomasses currently used for biogas production in Denmark.
Other uncertainties are associated with the way in which impacts were quantified. The study was based on the models and data used in Denmark's inventories of environmental and GHG impacts. These models are constantly being developed, particularly to better account for variation in environmental controls of the biological processes that determine the impacts and in the properties of biomasses and how they are managed in practice. With the current knowledge, it is not possible to quantify those uncertainties, but a qualitative discussion follows.
The gas potentials of the different biomasses, and the rate at which the gas was produced, are significant sources of uncertainty, especially in the assessment of the effect of retention time in the biogas reactor. The degradation profiles used were, therefore, essential for the estimates of gas yield with different retention times and for the assessment of residual VS in the digestates. The degradation profiles further influenced the CH 4 emissions during the subsequent storage. There is a considerable need for documentation of the rate at which biogas is produced and identification of any interactions between biomasses that may give rise to synergies and/or antagonism. Moreover, it is necessary to provide better documentation of the correlation of CH 4 production between batch tests and continuous systems. These sources of uncertainty may have affected the reported differences among the effects of 45, 60, and 90 d retention time.
Our study assumed that electricity for the process energy used in biogas production was covered by a mix of Danish electricity production, which was estimated to be 0.150 g CO 2 kWh −1 in 2019. It may be argued that such emissions could have been 0 g kWh −1 if only renewable energy had been used. If it were assumed that no CO 2 was emitted from the production of process energy, the total positive climate impact would increase by about 0.97 kg CO 2 ton −1 of biomass at 45 d retention time, increasing the total climate effect by a maximum of 1.7%. Hence, the emission factor assumed for electricity for process energy was less important.
The estimation of CH 4 emissions and the related degradation of organic matter during storage of biomasses was based on simplified input data and assumptions. Firstly, CH 4 emissions were assumed to be a product of VS and temperature alone, but this does not always well explain temporal dynamics [62], and the composition and growth of methanogenic communities would probably be part of an improved model [63]. Furthermore, CH 4 emissions were calculated from total VS and not degradable VS because of a lack of relevant experimental data regarding VS composition. In the analysis presented here, increasing the retention time in biogas reactors from 45 to 90 days showed only a limited effect on CH 4 emissions during subsequent storage, with a 15% reduction in posttreatment emissions from cattle slurry being the most significant effect. A possible reason for the limited sensitivity to HRT could be that CH 4 emissions were estimated on the based on total VS and using the same lnA value for digestate regardless of retention time. This parameter also represents the slowly degradable parts of VS for which anaerobic degradation was small whether HRT was 45, 60, or 90 days. It is likely that a model in which the VS degradability of each biomass was defined would better capture differences among digestates from the five scenarios with very different feedstocks.
Biogas treatment of pig and cattle slurry (and codigestates) reduces the availability of easily degradable organic matter. All other factors being equal, the resulting decline in demand for oxygen to degrade residual organic matter after field application should reduce the extent and lifetime of anoxic conditions with a potential for N 2 O production in well-drained soil. There are, however, confounding effects. For example, soil compaction and periods with rainfall reduce soil oxygen status and change the conditions for N 2 O production in untreated manure and digestates applied to soil [36]. Furthermore, fibre-rich codigestates such as maize silage or deep litter may change the distribution of degradable VS in the soil of digestates compared with that of untreated manure [64]. A systematic investigation is needed to elucidate interactions among manure and digestate properties, soil conditions, and N 2 O emissions before the effect of anaerobic digestion on N 2 O emissions can be included in biogas assessments.
The calculations included an assumption that digestion of slurry and biomasses reduced soil C storage compared with direct field application of those biomasses. Only very limited documentation exists of this effect [46], which is very difficult to determine experimentally. Therefore, the effect is also uncertain, and further studies are needed.
In our calculations, the higher content of TAN in the digestate caused a significant increase in NH 3 emissions in the scenario calculations, corresponding to 60-70% of the higher NH 3 emission. However, there is great uncertainty in these estimates due to a lack of knowledge about how the different combinations of substrates and slurry in the biogas scenarios would affect digestate physical characteristics and infiltration in the soil. Ammonia emissions from slurry or digestates are reduced with faster infiltration, which is a function of viscosity, dry matter content, and adhesiveness. It is poorly understood how infiltration of digestate is affected by the substrates used for AD.
Regardless the types of biomasses used for biogas production, the following measures are important to achieve the potential environmental and climate benefits: -CH 4 leaks from the biogas installation should be minimized. -Digestate storage should be covered, and low-NH 3 -emission technology should be used for field application. -Heat exchangers should be employed to cool down the digestate to ambient temperature before storage to improve the energy balance and reduce GHG and NH 3 emissions.

Conclusions
Environmental and climate assessments were conducted for different biogas scenarios to evaluate the sustainability of this treatment technology and identify potential improvements of environmental and climate impacts. The scenarios were analysed considering (i) biomass composition; (ii) process temperatures; (iii) hydraulic retention time; (iv) methane leakage from biogas installations; and (v) digestate storage and field application. With respect to energy production, only upgrading for the natural gas grid and substitution of natural gas with biogas were considered.
On the basis of this study, the following conclusions were drawn: (1) The scenarios investigated resulted in GHG mitigation ranging from 65 to 105 kg CO 2 -eq ton −1 biomass. Reductions per ton of biomass were greatest when straw or grass-clover was used for codigestion, whereas reductions per unit energy produced were highest with deep litter and deep litter plus maize silage. (2) The ammonia emission potential of digestate applied in the field was higher than that from untreated cattle and pig slurry because of digestates' higher pH, resulting in an increase in ammonia emission of 0.14 to 0.3 kg NH 3 -N ton −1 biomass. The use of low-emissions application technology for a larger share of the digestate should limit these higher emissions. (3) All scenarios reduced nitrate leaching (0.04 to 0.45 kg NO 3 -N ton −1 biomass). However, introducing maize silage almost eliminated this reduction. (4) Increasing the hydraulic retention times led to higher climate impact via increased energy production and lower amounts of volatile solids available for degradation and subsequent CH 4 emission during digestate storage. (5) Methane leakages can have a significant effect on the total climate impact, with about 7% of the positive climate impact being lost for each percentage point of leakage in a manure-based biogas scenario. (6) The methodology used predicted significant reductions in CH 4 emissions but assumed there was no reduction in direct emissions of N 2 O from digestates, which is not always true. Furthermore, iLUC, which was ignored which for bioenergy use, may have a negative impact on the GHG balance.
These and other examples given above show the importance of the assumptions chosen for this type of analysis. Still, it was concluded that biogas treatment of livestock slurry and biowastes has the potential to reduce GHG emissions, improve N use efficiency, and reduce nitrate leaching losses. However, the risks of higher ammonia emission and CH 4 leakage during AD need to be managed.

Supplementary Materials:
The following supporting information can be downloaded at: https:// www.mdpi.com/article/10.3390/su14031849/su14031849/s1, Table S1: Assumptions on dry matter content and gas potential of different biomasses used in biogas production. The ultimate CH 4 yield is the yield achieved at a retention time of more than 90 days. The CH 4 yields after 45 and 60 days and ultimate gas yield are based on data from tests at the Foulum biogas plant Aarhus University. Sources; (1) Average of 50 analyses of slurry supplied to two biogas plants, ( Table S2: Data used for the calculation of energy consumption on a standard Danish biogas plant; Table S3: Energy use and CO 2 emission due to transportation of biomass. CO 2 emissions of 2.7 kg per litre of diesel is assumed; Table S4: The methane production potential values, lnA , for digestate, cattle slurry and pig slurry were calculated based on information extracted from published studies about methane production rate, total VS and temperature. In the table, x ± s.e. refers to average and standard errors, Table S5: Ammonia emission factors for stored liquid and solid manure (Hansen et al. 2008) and organic food waste (Pardo et al. 2015); Table S6: Ammonia emission factors for cattle and pig slurry applied to soil (Hansen et al. 2008), and the novel estimates emission from digestate; Table S7: Assumptions about plant available N (NH 4 + -N) in biomasses before and after biogas treatment during the first crop growing season after application of manure, required N use efficiency for manures and organic wastes (by Danish legislation), and calculated reduction in NO 3 − leaching due to AD of manure-not accounting for changed NH 3 loss. The share of NH 4 + -N in manure is based on Sørensen and Børgesen (2015). Organic N expected to be transformed to NH 4 + within the first season is included in the NH 4 + -N share of total N; Figure S1: Average cumulative net N mineralisation from organic N applied in livestock manure over a 10-year period after application. Funding: This report was prepared as part of the agreement between the Danish Energy Agency and Aarhus University.