A pedagogical approach to estimating the CO2 budget of magmas

On a planetary scale, the carbon cycle describes the movement of carbon between the atmosphere and the deep Earth. Carbon species are involved in diverse Earth processes, ranging from sedimentary, metamorphic and igneous petrology to the long-term viability of life at the Earth's surface. Volcanoes, and their associated magmatic systems, represent the interface through which carbon is transferred from the deep Earth to the surface. Thus, quantifying the CO2 budget of volcanic systems is necessary for understanding the deep carbon cycle and, concomitantly, the CO2 budget of the near surface, including the atmosphere. In this review, Kilauea volcano (Hawaii) is used as a case study to illustrate simple calculations that can account for processes that affect the amount and distribution of CO2 in this relatively well-studied volcanic system. These processes include methods to estimate the concentration of CO2 in a melt derived by partial melting of a source material, enrichment of CO2 in the melt during fractional crystallization, exsolution of CO2 from a fluid-saturated melt, trapping and post-entrapment modification of melt inclusions, and outgassing from the volcanic edifice. Our goal in this review is to provide straightforward example calculations that can be used to derive first-order estimates regarding processes that control the CO2 budgets of magmas and that can be incorporated into global carbon cycle models.

There is much interest today in the global carbon cycle and linkages between the various carbon reservoirs that extend from the deep mantle to the atmosphere. Much of the c. 175 Mt of carbon per year (Burton et al. 2013) that is currently transferred from the Earth's interior to the surface is a result of magmatic and volcanic activity. Carbon dissolved in melts is transported towards the surface by ascending magmas and most of the dissolved carbon, in the form of CO 2 , is eventually lost to the atmosphere as a result of degassing as magmas approach the surface (Fig. 1). Accordingly, the CO 2 budgets of magmas provide constraints on the rate at which CO 2 is transferred from the solid Earth to the atmosphere. Determining the CO 2 budgets of active, degassing volcanic systems is relatively straightforward and provides information concerning the mechanisms and magnitudes of fluid exsolution and outgassing today. However, much less is known about CO 2 budgets and outgassing behavior in extinct or dormant volcanic systems, and such information is needed to better understand the style of past volcanic eruptions; also, volatiles such as CO 2 have important implications for ore-forming and other metasomatic processes. Developing a better understanding of magma CO 2 budgets may also advance our understanding of the extent to which volcanic processes have modulated the climate and contributed to global weathering, ocean acidity and habitability of the Earth's surface in the past.
This review and the review of Frondini et al. (2018) describe the processes that transfer carbon from the deep Earth to the exosphere in active volcanic settings. Here, we quantify the path that carbon follows from a melting mantle source to exsolution from the melt into the atmosphere or preservation in the geological record, with example calculations based on the CO 2 budget of the active Kilauea volcano (Hawaii). We selected Kilauea because it is well studied and is in a steady state of relatively continuous open-system degassing that permits comparison between observations of the volcanic plume and the petrology of erupted material (e.g. Gerlach et al. 2002). Specifically, these example calculations follow the processes of (1) melting a carbon-bearing source material, (2) melt evolution during fractional crystallization, volatile saturation and exsolution of CO 2 into a separate fluid phase (degassing), and finally (3) mass transfer of the exsolved carbon-bearing fluid into the atmosphere (outgassing).

Generation of CO 2 from the source region: batch melting
Carbon is partitioned into the melt phase when a C-bearing source material melts, either in the mantle or in the crust. Carbon may occur in the melt as a variety of species, including CO, CO 2 or CO 2À 3 , depending on the temperature and oxygen fugacity of the melt (Ni & Keppler 2013). Usually, the total carbon concentration in the bulk mantle and in the melt generated by partial melting is expressed in terms of CO 2 abundance or concentration, and we will use this convention in this example. The source material may include mixtures of nominally anhydrous endmember lithologies (e.g. peridotite, pyroxenite, eclogite) with most of the C contained in accessory mineral phases (e.g. carbonates, graphite, diamond). Estimates of the average CO 2 concentration in the mantle vary from tens of ppm (Trull et al. 1993;Canil et al. 1994) to thousands of ppm (Javoy & Pineau 1991) or higher (Luth 1999).
As a first approximation, batch melting simulations can be used to relate the composition of the source material to the composition of the melt produced, provided that the degree of melting and bulk partition coefficient of the element(s) of interest are known or can be determined. The bulk partition coefficient is determined as a weighted average based on the proportions of each mineral forming the source material, combined with experimentally determined mineral-melt partition coefficients for each element. Experimentally determined mineral-melt partition coefficients relevant to various mantle lithologies have been provided by Salters et al. (2002), White (2013) and Rollinson (2014), among others, and in online databases such as the GERM database (earthref.org/KDD). Using trace element partitioning data, the trace element composition of the melt is often used to constrain the melt fraction. However, it should be noted that the partitioning of elements between the source material and primary melt can vary with melt composition and thermodynamic conditions (temperature, pressure, oxygen fugacity, etc.) during melting. Therefore, because multiple factors can affect the partitioning behavior of elements during melting, the results of batch melting calculations can be model-dependent and poorly constrained. For more information regarding strategies for estimating the conditions of melting, the reader is referred to White (2013) and Rollinson (2014).
The batch melting equation is often expressed as a ratio, where C L and C 0 are the concentrations of a component in the primary melt and source material, respectively, D is the bulk partition coefficient of the component, and F is the melt fraction. It should be noted that as F approaches unity, C L approaches C 0 , which represents the endmember case in which complete melting of the source would produce a melt with a composition identical to that of the source material (Fig. 2).
From melting experiments over a range of melt compositions, CO 2 has been found to behave as a highly incompatible element (e.g. Rosenthal et al. 2015). Therefore, when calculating the CO 2 concentration in a crystallizing primary melt below Kilauea, the mineral-melt partition coefficient D can be considered to be arbitrarily small. Therefore, we can apply the simplifying assumption that C L =C 0 approaches 1=F as D approaches zero because CO 2 behaves as a highly incompatible element and is partitioned into the melt phase during melting. The trace element compositions of Hawaiian shield lavas such as those erupted at Kilauea are consistent with c. 4-15% melting (e.g. Dixon et al. 2008), so we can use an average value of F ¼ 0:1 in our calculations. Estimates of the primary CO 2 concentration in Hawaiian melts vary from thousands of ppm to c. 2 wt% (Dixon & Clague 2001;Gerlach et al. 2002), and we use C L = 1 wt% (10 000 ppm) in this example. With these parameters specified and the simplifying assumptions described above, the calculated bulk CO 2 concentration in the source material is given by In addition to the challenges associated with constraining the conditions of melting described above, an additional limitation of the batch melting approach described above is that it assumes that all minerals in the source melt in proportions equal to their modal Fig. 1. Schematic illustration of the distribution of CO 2 in the volcanic system and processes that control the CO 2 budget of a magma. CO 2 is transferred into the melt by melting a source material that contains carbon. As the melt ascends toward the surface, the CO 2 concentration may be enriched as a result of fractional crystallization or depleted as a result of fluid exsolution. Melt inclusions in crystallizing minerals may trap samples of the melt at different stages in this evolution, but determining the depth at which the inclusions were trapped is often challenging. At the surface, submarine or subaerial lava and tephra samples may be used to determine CO 2 concentration of the melt after it has degassed at hydrostatic or atmospheric pressure. Remote sensing methods can be used to determine the CO 2 flux from the volcanic gas plume, which is related to the CO 2 concentration of the degassing melt and the melt production rate.  (1)). The curved continuous red line corresponds to conditions at which D ¼ 0 and (C L =C 0 ) ¼ (1=F) representing a highly incompatible component. If the melt fraction (F) is 0.1, the concentration of the component in the resulting melt will be enriched by a factor of 10 relative to its concentration in the source material. (b) Relationship between the concentration of a highly incompatible component (D ¼ 0) in the source material (C 0 ) and its concentration in the resulting melt (C L ), for various melt fractions. The melt generated by 10% melting (F ¼ 0:1) of a source material containing 1000 ppm of a component will contain 10 000 ppm (1 wt %) of that component.

399
The CO 2 budget of magmas abundance (modal melting). If non-modal melting occurs, it is necessary to determine the proportion of each mineral phase that melts (Rollinson 2014). For example, it is likely that carbonate minerals in the mantle source preferentially melt early in the melting process to produce a more CO 2 -rich melt than would be predicted for modal melting, and the effects of melting carbonated peridotite source are not well known (Dasgupta et al. 2007(Dasgupta et al. , 2013. Furthermore, in the case of preferential melting of C-rich accessory minerals, the distinction between the breakdown of carbonate accessory minerals to produce a CO 2 -rich melt and low degrees of partial melting to produce a carbonatite melt may not exist (Wirth & Rocholl 2003;Frezzotti & Peccerillo 2007). To compensate for these uncertainties, Dixon et al. (2008) used a mixture of nominally anhydrous lherzolite and carbonatite as a source composition (C 0 ) rather than a modal melting calculation to calculate the composition of alkaline lavas erupted in Hawaii's North Arch (C L ), which probably melted a source material enriched in C. This is in contrast to the center of the plume where Kilauea is located and where incorporation of volatile-enriched material in the source region is less likely (Dixon & Clague 2001).

Fractionation of CO 2 in melts: crystallization and degassing
The CO 2 concentration in the melt phase that migrates from the source region towards the surface is controlled by two competing processes: volatile exsolution and fractional crystallization. As the melt ascends from the region of melting and pressure decreases, the melt may reach fluid saturation and exsolve a CO 2 -rich fluid. The loss of this CO 2 from the melt leads to a lower CO 2 concentration in the melt. If the melt stalls during ascent and begins to cool, removal of silicate and other components from the melt by crystallization of silicate and oxide phases (e.g. olivine, spinel, pyroxene) will lead to an increase in the concentration of CO 2 and other volatiles, which are generally more compatible in the residual melt than in crystallizing (non-carbonate) minerals. Distinguishing which of these two processes exerts the strongest control on the volatile content of the melt is challenging, and this is especially true for CO 2 owing to its relatively low solubility in silicate melts at crustal pressures (Stolper & Holloway 1988). Although it may not be possible to predict with certainty the manner in which the CO 2 content will change as the melt crystallizes, degasses and erupts, different samples representing different stages in melt evolution may preserve a record of the volatile content of melts as they evolve. For example, fluid (Roedder 1965;Mironov & Portnyagin 2011;Oglialoro et al. 2018) and melt inclusions (Mironov et al. 2015) may record evidence of early degassing processes, whereas whole-rock and matrix glass samples preserve a record of late degassing and fractional crystallization processes (Dixon & Clague 2001;Lloyd et al. 2014). Thus, to constrain the volatile evolution of a degassing, crystallizing magma, it is necessary to consider information preserved by various geological materials produced from the same overall eruptive event.

Fractional crystallization
As a melt cools during its ascent from its source region, minerals may begin to crystallize from the melt. In the case of a silicate melt crystallizing silicate (non-carbonate) minerals, the degree of CO 2 enrichment in the melt phase resulting from fractional crystallization can be calculated using the Raleigh Law. Similar to the batch melting equation, the change in melt concentration is expressed as a ratio, where F is the fraction of melt remaining following crystallization of a fraction (1 À F) of its total mass, and C i and C f are the initial and final concentrations of a component in the liquid (melt) after crystallization has occurred. Similar to the batch melting equation, the mineral-melt partition coefficient D is equal to the ratio of the concentrations of a component in the mineral and melt phases. Estimating the degree of crystallization of a primary melt is relatively straightforward when only a single phase is crystallizing, and this is probably the case for some of the more primitive basaltic melts at Kilauea in which only olivine is crystallizing. In this case, the amount of melt that has crystallized to produce olivine can be determined iteratively by adding olivine to the melt until it is in equilibrium with the melting mantle source (e.g. 90 mol% forsterite). For more information concerning strategies to evaluate the effects of crystallization on melt composition, the reader is referred to White (2013) and Rollinson (2014). Similar to the previous example, the CO 2 concentration in a crystallizing primary melt below Kilauea can be estimated by assuming that the mineral-melt partition coefficient D is an arbitrarily small value (i.e. CO 2 remains in the melt phase) such that C f =C i approaches F À1 (Fig. 3). To determine the CO 2 concentration in a melt from Kilauea after some amount of fractional crystallization, we assume F ¼ 80% for this example; that is, 20% of the melt has crystallized (e.g. Anderson & Brown 1993). Starting with a primary melt containing 1 wt% CO 2 from the previous example, 20% olivine crystallization would yield a melt  Even under conditions in which a basaltic primary melt is crystallizing only olivine, estimating the extent of crystallization is not trivial. The composition of olivine that is crystallizing is a function of both the oxygen fugacity of the melt and the melt composition, and the amount of crystallization (1 À F) that is predicted depends on these parameters (e.g. Sobolev et al. 2005;Dixon et al. 2008;Matzen et al. 2011). For more evolved melt compositions in which several minerals are crystallizing simultaneously, a simple calculation such as the one illustrated here is not as easily applied and it is usually necessary to use the MELTS family of algorithms (e.g. Ghiorso & Sack 1995;Ghiorso et al. 2002) or Petrolog3 (Danyushevsky & Plechov 2011) to determine the identity, composition and amounts of crystallizing minerals.

CO 2 solubility and fluid exsolution
The physical and chemical factors that control the solubility of CO 2 and other volatiles in melts have been constrained through decades of experimental and modelling studies (Moore 2008). Experimental studies show that the solubility of CO 2 is strongly correlated with pressure (e.g. Mysen et al. 1976;Stolper & Holloway 1988), and that melt composition also plays an important role in CO 2 solubility because of the potential for C to dissolve in the melt as carbonate ions (Fine & Stolper 1986;Guillot & Sator 2011). As more experimental data covering an increasing range of melt compositions and thermodynamic conditions have become available, the compositional range over which these models are valid has grown from tholeiites (Dixon et al. 1995) to include more alkaline and silica undersaturated conditions as well as rhyolitic compositions (Dixon 1997;Papale et al. 2006;Iacono-Marziano et al. 2012). A variety of software tools have also been developed that incorporate the experimental data to produce melt volatile solubility models that are applicable to a wider range of compositions and conditions (Newman & Lowenstern 2002;Witham et al. 2012;Burgisser et al. 2015).
Iacono-Marziano et al. (2012) presented a thermodynamically based model that is empirically calibrated to account for the effect of melt composition on volatile solubility. For a volatile-saturated melt with a given major element composition, the model of Iacono-Marziano et al. (2012) can be simplified and expressed as a system of three equations

401
The CO 2 budget of magmas consolidated here into the terms B Ã CO 2 and B Ã H 2 O , which can be considered as constant for a given melt composition.
In some cases, it is desirable to calculate a saturation pressure P corresponding to known concentrations of CO 2À 3 and H 2 O at a constant temperature. Given equations (3)-(5) and three unknown parameters, it is possible to determine the remaining three parameters analytically. However, for situations requiring multiple calculations, it is usually more convenient to use a numerical method to obtain the desired solution. To accomplish this, equations (3) and (4) can be rewritten such that P CO 2 and P H 2 O are expressed as a function of P, and then P is determined numerically using a root-finding algorithm to identify the pressure P for which P CO 2 þ P H 2 O À P ¼ 0.
Using this method, we can calculate the saturation pressure of a primary melt from Hawaii described above (Table 1). For the calculation, we use an average primary melt composition for Kilauea estimated from petrological modelling (Sobolev et al. 2005; Table 1) and the 'anhydrous' calculation method as described by Iacono-Marziano et al. (2012). Based on the assumed volatile concentration of X CO 2À 3 = 14900 ppm (1 wt% CO 2 ), X H 2 O = 1 wt%, and a typical basaltic melt temperature of 1473 K (1200°C), the calculated saturation pressure is c. 9.7 kbar. Assuming a pressure gradient of 3.5 km kbar −1 , the calculated depth is c. 34 km. This is less than the inferred depth of melting c. 40 km below Kilauea (e.g. Ryan 1988) and suggests that a primary melt with the composition used in this example would have been fluid-undersaturated. The pressure at 40 km is consistent with a higher CO 2 concentration (c. 1.25 wt%) or a melt that is more evolved (e.g. higher Al 2 O 3 and lower MgO). If the saturation pressure is similar to the pressure at the depth of melting, the melt would become saturated in CO 2 immediately as it begins to ascend and decompress.
Fractional crystallization may promote or inhibit CO 2 exsolution because the concentration of CO 2 in the melt is enriched owing to crystallization, and because the solubility of CO 2 in the melt is a function of melt composition, which changes during fractional crystallization. Specifically, the CO 2 solubility in the melt tends to decrease as the melt becomes more evolved. At the same time, as melt crystallizes less melt is available to dissolve the CO 2 , and these combined effects can lead to oversaturation in CO 2 and degassing. However, this is less likely to be significant in the case of Kilauea, where evidence suggests that decompression and degassing begin deep in the melt conduit, before significant fractional crystallization occurs (Ryan 1988;Anderson & Brown 1993;Dixon et al. 1997).

Melt inclusions
As a consequence of decompression and fractional crystallization, magmas degas as they approach the surface and erupt. Most of the available information concerning the current flux of volatiles from the deep Earth to the atmosphere is provided by remote sensing and in situ sampling of fumaroles and volcanic vents (Burton et al. 2013). Although these methods provide the most robust estimates of the CO 2 output of an actively degassing modern volcano, they cannot be applied to inactive or extinct volcanoes. It is also worth noting that a significant portion of the CO 2 transferred from the deep Earth to the surface bypasses volcanic centers entirely as a part of widespread regional outgassing (Chiodini et al. 2004), even though the CO 2 might originate from the same primary melt that is outgassing CO 2 at the volcanic vent. For these reasons, it is sometimes advantageous to use petrological information to constrain the flux of CO 2 from a degassing volcanic system.
As indicated in the previous section, the bulk compositions of lava and tephra samples provide information regarding the melt composition as a function of melting and fractional crystallization. However, because volatile solubility approaches zero with decreasing pressure, the volatile abundances of bulk lavas and tephras do not reliably record the degassing history of a volcanic system. In some cases, dredged submarine lavas may be used to estimate the volatile composition of the melt at ocean-bottom pressures (e.g. Dixon et al. 2008), and this composition can be used as a boundary condition when modelling the degassing process (e.g. Dixon & Clague 2001). As an alternative, melt inclusions trapped by minerals that are crystallizing deep within magma reservoirs are often used to estimate the pre-eruptive CO 2 (and other) concentrations of melts associated with both recent and ancient volcanic events (Métrich & Wallace 2008;Audétat & Lowenstern 2014) because they trap a melt that is less likely to have degassed. This approach has been applied to estimate the CO 2 content of magmas from a range of tectonic environments that include convergent margin settings (Johnson et al. 2008;Esposito et al. 2011;  Melt inclusions represent samples of melt trapped by a growing phenocryst, and are analogous to fluid inclusions (Roedder 1979(Roedder , 1984. Melt inclusions may be classified petrographically in the same manner as fluid inclusions whereby 'primary' melt inclusions are those trapped during crystal growth in irregularities in discrete growth episodes, and 'secondary' melt inclusions are formed when melt is trapped as a fracture in a crystal heals. Groups of petrographically related melt inclusions, which can be presumed to have been trapped at the same time, are referred to as 'melt inclusion assemblages' (Bodnar & Student 2006), and the degree to which the composition of a melt inclusion represents the composition of the melt present during the time of trapping can be evaluated by comparing the compositions of multiple inclusions within a melt inclusion assemblage (Esposito et al. 2014). Additionally, it is worth noting that the term 'primary' melt inclusion does not imply that the melt inclusion trapped a 'primary' melt. For example, let us consider the case of 'primary melt inclusions' trapping an andesitic melt that has fractionated from a basaltic 'primary melt'. The term 'melt inclusion' may refer to silicate melts as well as salt, carbonatite and sulfide melts, and in some cases, crystallized melt inclusion with a high volatile content may be referred to as 'high-density fluid inclusions'.
A melt inclusion behaves as a 'miniature magma chamber' in that it experiences fractional crystallization and fluid saturation as it cools. During this cooling process, the melt within the inclusion is likely to become volatile-saturated and exsolve CO 2 (Moore et al. 2015) and potentially other volatile elements (e.g. Esposito et al. 2016) into a separate fluid phase. However, unlike an actual magma chamber, melt inclusions behave as a closed system with respect to C provided that they do not leak (Maclennan 2017). This is in contrast to some elements, such as H (Mironov & Portnyagin 2011;Gaetani et al. 2012) and Fe (Danyushevsky et al. 2002), that can diffuse into and out of melt inclusions. Therefore, it is possible to determine the total CO 2 content of the inclusion using experimental, numerical or mass-balance techniques (Moore et al. 2018), and this value should represent the CO 2 content of the melt that was originally trapped in the inclusion. For example, microthermometry (Naumov et al. 2006) or Raman spectroscopy (Lamadrid et al. 2017) can be used to estimate the density of CO 2 fluid bubbles in melt inclusions and the total CO 2 content of the inclusion can be determined using a mass-balance calculation (Steele-MacInnis et al. 2011;Hartley et al. 2014;Moore et al. 2015;Aster et al. 2016). In the case of a glassy melt inclusion containing a bubble, the total amount of CO 2 contained in the inclusion can be expressed as where m glass CO 2 and m bubble CO 2 represent the mass of CO 2 in the glass and 402 L. R. Moore & R. J. Bodnar bubble, and m glass and m bubble represent the total mass of each of the two phases. The total mass of the bubble is negligible compared with the mass of the glass for bubbles that contain CO 2 vapor and occupy only a few volume per cent of the inclusion. As such, the concentration of CO 2 in the trapped melt can be calculated by adding the concentration of CO 2 in the glass X glass CO 2 to DX bubble CO 2 , the ratio of the mass of CO 2 in the bubble to the mass of the glass. This is calculated using a mass-balance approach: where DX bubble CO 2 is the amount that the concentration of CO 2 in the inclusion changes when the CO 2 in the bubble is included, r bubble CO 2 is the density of CO 2 in the fluid bubble, r glass is the bulk density of the glass and V bubble is the volume proportion of the bubble.
Melt inclusions from the 1959 Kilauea Iki eruption reported by Moore et al. (2015) typically contain bubbles with r bubble CO 2 = 0.1 g cm −3 , V bubble ¼ 0:03 (i.e. 3 vol%), and r glass = 2.75 g cm −3 . These values yield a calculated contribution of CO 2 from the bubble of DX inclusion CO 2 = 1124 ppm (Fig. 4). Given an assumed CO 2 concentration in the glass of X glass CO 2 = 300 ppm from the range of concentrations reported by Anderson & Brown (1993), 21% of the CO 2 in this inclusion is contained in the glass, 79% is contained in the bubble, and the concentration of CO 2 in the melt trapped by the inclusion is X inclusion CO 2 % 0:1 g cm À3 Â 0:03 2:75 g cm À3 Â (1 À 0:03) þ 300 ppm ¼ 1424 ppm: It should also be noted that largest uncertainty associated with the calculated CO 2 content of a melt inclusion is related to the volume proportion of the inclusion occupied by the vapor bubble. For example, if the volume proportion of the bubble in the calculation above is constrained only to within ±1 vol%, this corresponds to c. 33% relative uncertainty in the amount of CO 2 contained within the bubble. Accordingly, Moore et al. (2015) reported CO 2 contents that vary from c. 150 to 1900 ppm in melt inclusions erupted from Kilauea and its East Rift Zone, although Tuohy (2013) reported limited variations in the major element content of the glass (c. 8-10 wt% MgO). The variation in the CO 2 content of the melt inclusions exceeds the propagated analytical uncertainty described above and is also greater than the variability that would be produced by crystal fractionation implied by the observed range in MgO concentration. This suggests that the variation in the CO 2 content of the melt is primarily controlled by the extent of degassing that had occurred.
Volatile saturation pressures of melts contained within olivinehosted melt inclusions are often used to infer the conditions at which melt inclusions were trapped. This is particularly useful because barometers that can be applied to volcanic systems in which olivine is the only crystallizing phase are not available. For example, using the same assumptions from the volatile solubility calculation above and a melt containing 1424 ppm of CO 2 and a typical value of 0.5 wt% H 2 O (Anderson & Brown 1993), the calculated saturation pressure is 1.1 kbar. However, it should be noted that a calculated saturation pressure reflects the pressure at which the melt inclusion was trapped only if the melt was saturated in a separate fluid phase at the time of trapping. In other words, if volatile saturation at the time of trapping cannot be confirmed, then the pressure recorded by a melt inclusion represents a minimum trapping pressure because the inclusion could have trapped a melt that was volatile undersaturated.
Petrographic information may sometimes be used to assess whether volatile saturation has occurred. For example, the presence of phenocrysts containing CO 2 -rich fluid inclusions suggests that a separate CO 2 phase was present, indicating that CO 2 degassing had occurred previously (Roedder 1965;Hansteen & Klügel 2008;Mironov & Portnyagin 2011;Oglialoro et al. 2018). In the case of melt inclusions from Kilauea reported by Moore et al. (2015), it was noted that melt inclusion assemblages found in some of the crystals contained both CO 2 -rich fluid inclusions and melt inclusions with varying proportions of CO 2 -rich fluid, which suggests that volatile saturation was reached while the melt inclusions were being trapped. However, because the relative timing of inclusion entrapment could not be petrographically constrained, it is unclear which if any of the melt inclusions considered in that study were trapped before this episode of heterogeneous fluid entrapment. Alternatively, the state of volatile saturation can be determined if the pressure at which the host mineral crystallized can be determined independently of the volatile-melt saturation pressure. For example, Maclennan (2017) described a group of olivine-hosted melt inclusions from Iceland with saturation pressures significantly less than equilibrium pressures estimated from cotectic pyroxene crystallization. In that case, it was observed that the melt inclusion trapping pressures were significantly greater than the calculated saturation pressures. These results suggest that the inclusions could have trapped a volatileundersaturated melt similar to the undegassed melts that have been previously reported in several mid-ocean ridge settings (Saal et al. 2002;Shimizu et al. 2016;Matthews et al. 2017;Le Voyer et al. 2017).

Total CO 2 flux
The final stage in the transfer of CO 2 from the deep Earth to the atmosphere occurs at the surface during volcanic outgassing. Estimating the flux of CO 2 owing to outgassing is complicated by the potential for CO 2 -bearing melts to form. These may originate from the same region of melting and be partitioned into different magma reservoirs and outgas from different volcanic edifices or by diffuse regional degassing (e.g. Chiodini et al. 2004). Evidence of calculated as a function of the bubble volume fraction (V bubble ), the density of CO 2 in the bubble (r bubble CO2 ; equation (7)), and the density of the glass (r glass = 2.75 g cm −3 ). Dashed lines indicate the range of CO 2 densities that correspond to liquid and vapor CO 2 . Red lines indicate the amount of CO 2 typical in melt inclusions from Kilauea (Moore et al. 2015). When the CO 2 contained in a bubble occupying 3% of the inclusion volume and containing CO 2 vapor with a density of 0.1 g cm −3 is added to the CO 2 dissolved in the glass, the total CO 2 concentration of the inclusion is increased by 1124 ppm.

403
The CO 2 budget of magmas multiple reservoirs is particularly well documented for Hawaii, where outgassing occurs both through a main summit reservoir and from multiple rift zones that are supplied by the lateral transport of melt (Poland et al. 2014). Therefore, in this example, we assume a steady state between the rate at which CO 2 -bearing magma is supplied to the summit reservoir below Kilauea and the rate of outgassing of CO 2 in the gas plume, as described by Gerlach et al. (2002), and we ignore the possible distribution of magma into multiple magma reservoirs. In this case, the flux of CO 2 from a volcano can be related to the melt supply rate and the CO 2 concentration in the melt (e.g. Wallace 2005). This relationship is based on the assumption that the melt degasses almost entirely as it ascends and erupts, and can be quantified following a mass-balance approach: where m CO 2 is the mass flux of CO 2 leaving the volcanic system, X melt CO 2 is the concentration of CO 2 in the undegassed melt, V melt is the volume flux of the melt, and r melt is the bulk density of the melt.
Many geophysical, petrological and remote sensing studies have been conducted at Kilauea and these studies provide information needed to solve the mass-balance equation above (Fig. 5). For example, Gerlach et al. (2002) inferred a CO 2 flux of m CO 2 = 9000 t day −1 based on gas measurements of the volcanic plume. The bulk density of the degassing magma was estimated to be r melt = 2600 kg m −3 , based on the temperature and composition of the melt. Geophysical data of Cayol et al. (2000) indicate that the eastern flank of Kilauea is swelling at a rate of V melt = 0.18 km 3 a −1 , and this was assumed to represent the rate of magma generation in the subsurface. Given these assumptions described by Gerlach et al. (2002), the primary melt contains X melt CO 2 ¼ m CO 2 V melt r melt ¼ 9000 t day À1 0:18 km 3 a À1 Â 2600 kg m À3 ¼ 3:28 Â 10 9 kg a À1 0:18 Â 10 9 m 3 a À1 Â 2600 kg m À3 % 7000 ppm CO 2 : Because the rate of outgassing is related to the concentration of CO 2 in the melt, it is possible to compare the CO 2 concentration recorded by melt inclusions with the rate of outgassing determined by gas measurements from the volcanic plume. For example, Moore et al. (2015) reported melt inclusions from Kilauea containing up to c. 3000 ppm CO 2 . Given the same melt production rate as reported by Cayol et al. (2000), this concentration suggests either that the melt inclusions trapped a partially degassed melt or that the average CO 2 flux is about half of the value reported by Gerlach et al. (2002) and is more consistent with fluxes reported by Greenland et al. (1985; 0.58 Mt a −1 ) and Hager et al. (2008;1.79 Mt a −1 ). Cayol et al. (2000) used geophysical methods to estimate the melt production rate based on swelling of the volcanic edifice. Alternatively, Robinson & Eakins (2006) calculated the melt production rate to be c. 0.25 km 3 a −1 using a combination of radiometric age dating and high-resolution bathymetry. If this latter melt production rate is used instead of the rate (0.18 km 3 a −1 ) provided by Cayol et al. (2000), then the CO 2 flux from Gerlach et al. (2002) is consistent with a concentration of CO 2 in the melt of 5000 ppm, which is more similar to the composition of melt inclusions reported by Moore et al. (2015). As the calculations above demonstrate, estimates of CO 2 flux based on melt inclusions are sensitive to the melt volume flux that is used. The melt production rate for Hawaii is highly variable both at the island scale as recorded by ocean bathymetry (Van Ark & Lin 2004;Vidal & Bonneville 2004) and at the volcano scale as shown by the stratigraphy of lava flows present at Kilauea (Peterson & Moore 1987). In addition to the geophysical approach described by Cayol et al. (2000) the melt volume flux may also be constrained using methods that include field and remote sensing observations of lava flow morphology and extent (Walker 1973;Kilburn & Lopes 1991;Favalli et al. 2010) as well as thermal monitoring techniques (Wright et al. 2001;Harris et al. 2010 ).
A disadvantage of using petrological information (e.g. melt inclusions, dredged submarine lavas) to infer the CO 2 flux of a volcanic system is that determining the extent to which CO 2 has been lost by degassing is challenging. As described above, it is likely that the CO 2 contents of melt inclusions reported by Moore et al. (2015) and Tuohy (2013) represent melt compositions after some amount of degassing had occurred, and in the absence of information concerning the concentration of CO 2 in the primary melt (C L ), the amount of CO 2 that may have been lost by degassing cannot be determined. Therefore, melt inclusions from the petrological record may be preferred for deriving an average flux of volatiles from volcanic systems over long periods of time. However, owing to its relatively low solubility compared with other volatile components, CO 2 fluxes estimated in this manner probably represent a minimum estimate (Wallace 2005).
Other geochemical data have also been used to estimate the CO 2 concentration of the primary melt associated with Kilauea. Dixon et al. (1997) used the observed CO 2 concentration and CO 2 /P 2 O 5 ratio of dredged submarine lavas and the P 2 O 5 concentration calculated for the primary melt to obtain a CO 2 concentration of 1.3-4.9 wt%. Dixon & Clague (2001) used a degassing model to obtain a similar result based on analyses of dredged submarine glasses from the Loihi seamount. More recently, Sides et al. (2014) obtained results roughly consistent with those of Dixon & Clague  Cayol et al. (2000) and diagonal lines (red) indicate CO 2 fluxes estimated for Kilauea based on remote sensing methods (Greenland et al. 1985;Gerlach et al. 2002;Hager et al. 2008). Anthropogenic CO 2 flux (Friedlingstein et al. 2010) and total volcanic CO 2 flux (Burton et al. 2013) are also shown for reference. Given a melt volume flux of 0.18 km 3 a −1 , the 3.1 Mt a −1 CO 2 flux of Kilauea corresponds to a CO 2 concentration of c. 7000 ppm (equation (8)). Given the same melt volume flux, the melt CO 2 concentration of 3000 ppm estimated from melt inclusions is consistent with a lower volcanic CO 2 flux than 3.1 Mt a −1 , and the concentration of 1 wt% used from the previous examples is consistent with a higher CO 2 flux.

404
L. R. Moore & R. J. Bodnar (2001) and the CO 2 concentration inferred by Gerlach et al. (2002) by analyzing Nb concentrations in melt inclusion glasses from Kilauea lava fountains, and calculating the CO 2 concentration of the primary melt using the CO 2 /Nb ratio of melts that are presumed to be fluid-undersaturated or to not have lost a significant amount of CO 2 by degassing (e.g. Saal et al. 2002;Shimizu et al. 2016;Matthews et al. 2017;Le Voyer et al. 2017). Additionally, Bayesian statistical methods have also been used to estimate the CO 2 concentration of the primary melt based on data from melt inclusions and measurements of the gas plume (Barsanti et al. 2009;Anderson & Poland 2017).

Outlook and conclusions
In this review, we demonstrate the relationship between the CO 2 budget of a magma and the processes of melting, crystallization, fluid exsolution, degassing and outgassing. We also show that one can quantify the effects of these processes by using a combination of petrological, geochemical and remote sensing methods. As shown in the examples from Kilauea, an integrated approach that includes multiple types of information can be applied to develop a CO 2 budget for the volcanic system. Constraining the CO 2 budgets of magmas is fundamental to estimating the transfer of CO 2 from the deep Earth to the atmosphere, and by using a combination of the available information preserved in bulk-rock, fluid and melt inclusion samples preserved in the geological record, it is possible to estimate volcanic CO 2 fluxes in the past.