Introduction

Apatite [Ca10(PO4)6(F,Cl,OH)2] is a common volatile-bearing accessory mineral in terrestrial rocks (Webster and Piccoli 2015). It can preserve the most important magmatic volatiles as anions in its crystallographic structure, including monovalent anions in its anion column (e.g., F, Cl, OH, and Br), as well as divalent anions in the anion column (e.g., S2−, and type-A CO32−) and/or tetrahedral site (e.g., SO42−; type-B CO32−) (see review by Pan and Fleet 2002, and references therein). Therefore, volatile composition of apatite can be utilized to study magmatic volatile budgets, based on apatite-melt volatile partition relations constrained by experimental data (e.g. Webster et al. 2009; McCubbin et al. 2015a, b; Li and Hermann 2015, 2017; McCubbin and Ustunisik 2018) and thermodynamic models (Li and Costa 2020, 2023). Many studies in the past two decades have used apatite to investigate volatile abundances in individual magmatic systems on Earth (e.g., Boyce et al. 2008, 2009; Stock et al. 2016, 2018; Li et al. 2021; Humphreys et al. 2021; Bernard et al. 2022a) and the systematics of volatile elements on the Moon (e.g. Boyce et al. 2010, 2014) and Mars (see McCubbin and Jones 2015 and references therein). However, the systematics of volatile chemistry in magmatic apatite across geological environments on Earth was not fully understood and is investigated in this study.

Inferring volatile concentrations in the melt using apatite also requires reliable instrumental analysis. A variety of techniques have been used for in-situ analysis of apatite, including electron probe microanalysis (EPMA) for F–Cl–S measurements (e.g., Stormer et al. 1993; Stock et al. 2015; Li et al. 2021), secondary ion mass spectrometry for halogen-H2O–S–C measurements (SIMS: e.g., Marks et al. 2012; Li et al. 2021; Humphreys et al. 2021; Bernard et al. 2022b; NanoSIMS: e.g., Barnes et al. 2013; Hu et al. 2014), Fourier-transform-infrared spectroscopy (FTIR: e.g., Fleet et al. 2004; Marks et al. 2012; Clark et al. 2016; attenuated total reflection (ATR)-FTIR: e.g., Hammerli et al. 2021) for H2O–CO2 measurements, and laser-ablation inductively-coupled plasma mass spectrometry (LA-ICP-MS; e.g., Chew et al. 2014) for analysis of trace elements (including rare earth elements—REEs). Among the variety of techniques available, electron microprobe was commonly used as it is widely accessible, time-saving and cost-effective, yet it cannot measure water directly and can only produce estimation of OH content based on the assumption of apatite stoichiometry (e.g., Ketcham 2015). However, the precision and accuracy of the stoichiometry based OH estimation were rarely evaluated.

In this study, we investigate the systematics of volatile (F–Cl–H2O–CO2–S) chemistry in terrestrial magmatic apatite via compilation, screening, and statistical analysis of a global dataset on apatite composition in igneous rocks spanning a wide range of bulk compositions and rock types from different tectonic settings. We report the compositional features observed in apatite from different geological environments and explore the links to magmatic conditions (in particular, temperature and volatile composition) based on existing volatile partitioning models. The main aim of this study is to provide an overview of volatile compositions of terrestrial magmatic apatite and explore whether apatite could be useful for investigating volatile behavior in large-scale processes on Earth.

Data analysis approaches

Data compilation and definition of geological features

The pre-compiled dataset in the Geochemistry of Rocks of the Oceans and Continents database (GEOROC: https://georoc.eu/; DIGIS Team 2023) contain ~ 25,000 data primarily associated with igneous rocks, with a small proportion for sedimentary and metamorphic rocks, as well as ore deposits. After removing the data for non-igneous rocks (n ≈ 1800), we combined the remaining data with those we compiled from additional publications (n ≈ 2000 from 24 publications; see data sources in Online Appendix A) and measured in this study (n ≈ 70; see analytical condition in Online Appendix A). We conducted data screening using a series of criteria described in this section and obtained ~ 21,000 qualified data (see Supplementary Table S1), about half of which have F–Cl contents reported (n ≈ 11,000) and were used for statistical analysis in this study. The filtered dataset covers > 800 localities, ten different tectonic environments, > 300 bulk-rock compositions, and a geological time range extending from the Archean to Cenozoic. Classifications of tectonic settings, types of igneous rocks, and bulk-rock compositions are described below.

Tectonic settings where apatite data were reported are classified into 10 types in the GEOROC database. Here we classified them into six groups for easier comparison: (I) convergent plate boundary (convergent margin), (II) divergent plate boundary (rift volcanics), (III) intraplate (intraplate); (IV) craton (craton, Archean craton), (V) plume-related settings (ocean island, continental flood basalt, oceanic plateau, hot spot/mid-ocean ridge, i.e., Iceland in the data compilation), and (VI) others (complex volcanic settings). For the names and longitudes-latitudes of volcanic arcs, we referred to those reported in Jarrard (2003) and Stern (2002). For the classification of different types of igneous rocks, we distinguished carbonatite/kimberlite from plutonic/volcanic rocks due to their characteristic chemical compositions and genesis and regarded mantle-derived ultramafic rocks and xenoliths as distinct groups. Overall, we considered six groups of igneous rocks, i.e., plutonic rocks, volcanic rocks, carbonatite, kimberlite, ultramafic rocks (mainly pyroxenites), and xenoliths (mostly in mantle-derived peridotite, pyroxenites, harzburgite and dunite). For bulk-rock compositions, we adopted the IUGS rock classifications for igneous rocks (see categories in Supplementary Table S2). The compiled data cover common bulk-rock compositions from mafic to felsic endmembers in the calc-alkaline and alkaline series.

Based on the classifications described above, we observed relatively large amounts of data for apatite in intraplate (~ 14,000) and convergent margin (~ 6000) as compared to other tectonic settings; more data for plutonic rocks (~ 9400) than volcanic rocks (~ 5600); as well as more data in granite (~ 3600) than other compositions (e.g., n = 1000–1500 in gabbro, rhyolite, syenite, dacite and granodiorite. The compiled data were carefully screened based on the criteria described below prior to statistical analysis of volatile concentrations.

Data screening based on geological information and rock types

The compiled dataset includes n = 41 “altered” samples and n = 8 “secondary” samples (specified in the GEOROC database). These samples do not exhibit any obvious differences in major-minor elements or volatile compositions from the “fresh” samples. However, considering that they may not be in equilibrium with the primary melt from which they crystallized, the “altered” and “secondary” samples (n = 49) were excluded from statistical analysis hereafter.

The dataset contains n = 369 samples from “subaquatic” locations (all submarine, but one from an intraplate lake). Apatite from seamounts (n = 46) shows a remarkably higher median Cl (1.0 wt.%) than apatite from other subaquatic environments (i.e., ocean islands/ocean plateaus/convergent margins; median: 0.05 wt.%) and subaerial localities (median: 0.26 and 0.30 wt.% before and after data filtering, respectively), but does not show any significant difference in concentrations of other elements (e.g., Na or F). Therefore, the data for “subaquatic” samples were considered in our analysis.

Data screening based on apatite stoichiometry

A stoichiometry test was applied based on the ratio of the total molar concentration of elements on the Ca site to that on the P (tetrahedral) site of apatite, i.e., \(\frac{\sum [Ca]}{\sum [P]}\), which should equate to 10/6≈1.667, according to apatite’s chemical formula. Here we consider Ca, Fe, Mn, Mg, Na, Sr and Ce occupying the Ca site, and P, Si and S occupying the P site. Complexities are involved in sulfur and carbon as they can enter not only the P site but the anion site of apatite (see review by Pan and Fleet 2002). Sulfur can occur as S2−, S4+ and S6+ and their relative abundances are mainly controlled by oxygen fugacity (Konecke et al. 2017, 2019; Brounce et al. 2019). Under most oxidation conditions on Earth, S6+ is the dominant species of sulfur in apatite (Konecke et al. 2019), therefore we consider all sulfur occurring as sulfate (at P site) for stoichiometry calculation. The site preference of CO2 is poorly studied and its relative abundances at the tetrahedral and anion sites were not reported for any samples in the dataset. Considering relatively low abundances of total CO2 compared to \(\sum [P]\) in most samples (median \({X}_{\text{CO}2}\): \({0.005}_{-0.001}^{+0.002}\), calculated for the n = 120 data measured by SIMS), CO2 is likely to have a negligible effect on \(\frac{\sum [Ca]}{\sum [P]}\) and was excluded from stoichiometry calculation in this work.

To calculate \(\frac{\sum [Ca]}{\sum [P]}\), the concentrations of Ca and P must be known and were reported for about half of the dataset (n≈13,400). With these data, stoichiometry calculation was carried out using a python module we developed (pyAp: pyap.readthedocs.io), which allows for calculation using different anion numbers. To evaluate the stoichiometry of the natural apatite, we propose a parameter, “stoichiometry discrepancy”, expressed as: \(\Delta Stoic=\frac{{\left(\frac{\sum [Ca]}{\sum [P]}\right)}^{sample}-{\left(\frac{\sum [Ca]}{\sum [P]}\right)}^{ideal}}{{\left(\frac{\sum [Ca]}{\sum [P]}\right)}^{ideal}}\times\) 100%, where \({\left(\frac{\sum [Ca]}{\sum [P]}\right)}^{ideal}\)=10/6. The value of \(\Delta Stoic\) is independent of the anion number adopted in the calculation. When it is close to zero, the crystal is close to the stoichiometric ideality and the analysis can be regarded as relatively reliable. We find that the calculated \(\Delta Stoic\) shows a large variation (from < − 90% to > 100%) and a median close to 0 (− 0.3%). We adopted the 10th–90th percentiles of the values obtained, i.e., − 4.7% and 5.6%, as the lower and upper limits for data filtering. The filtered data show 2 \(\sigma\) of 51–56 wt.% CaO and 38–43 wt.% P2O5, matching well with the theoretical values we calculated in this study for an ideal apatite only containing Ca, P and F (or Cl or OH), i.e., 53.8–55.8 wt.% and 40.9–42.4 wt.%, respectively (see Fig. S1 in Online Appendix A). This filtering excludes ~ 2600 data (i.e., did not pass the above test), and retains ~ 10,700 that pass the test and ~ 12,000 that do not permit the test because their Ca–P contents were not reported.

Data screening based on the theoretically maximum F–Cl concentrations in apatite

The data that meet the above criteria include ~ 12,300 for F and ~ 11,100 for Cl. To screen the data for F–Cl, we consider their maximum abundances in apatite based on apatite’s chemical formula (referred to as “F–Cl test” in the following text). For a fluorapatite endmember (FAp), chlorapatite endmember (ClAp), and F–Cl binary apatite (OH-free), the upper limits were calculated to be ~ 3.77 wt.% F, ~ 6.81 wt.% Cl and a total F–Cl content of ~ 6.81 wt.%, respectively. Given that the data reported for F and Cl in natural samples contain errors from analysis, we took an intermediate error for a normal electron microprobe analysis (i.e., 5–6%, relative) and increased the theoretical values mentioned above to be 4.0 wt.%, 7.2 wt.%, and 7.2 wt.% respectively. The amounts of data that exceed these upper limits are 492, 1, and 5, respectively, i.e., more data exceeding the limit of F. This can be explained by a commonly higher abundance of F than Cl in most terrestrial apatite (see Results section), and some risk of overestimating F using EPMA due to possible F migration towards the sample surface during analysis (Stormer et al. 1993; Goldoff et al. 2012; Stock et al. 2015). The data exceeding the upper limits were excluded.

Calculation of H2O content and mole fractions of F–Cl–OH for qualified data

We mentioned that stoichiometry calculations using different anion numbers do not change \(\frac{\sum [Ca]}{\sum [P]}\), but they do influence the calculated mole fractions of F–Cl–OH. For any endmember/binary/ternary apatite, the theoretical anion number (expressed as A.N. hereafter) should be equal to 26-XOH (Ketcham 2015). This calculation is not straightforward because the values of A.N. and XOH are both unknown (where H2O was not measured). We have developed an algorithm (in pyAp module) to carry out stoichiometry calculation using A.N. = 26-XOH. The calculation started with an estimated A.N. that can yield two different values of XOH, i.e., one calculated using XOH = 26-A.N., the other calculated from other elements (including F-Cl) assuming stoichiometry. The calculation was repeated until the two values of XOH become equal. Many previous studies adopted a simpler method to estimate OH in apatite, i.e., taking a fixed A.N. of 26 or 25. These values are supposedly only applicable to OH-free apatite (XOH≈0) and endmember hydroxyapatite (HAp; XOH≈1), respectively, and thus may increase errors in the OH estimation. To investigate this, we calculated XOH using variable A.N., A.N. = 26, and A.N. = 25 for the qualified data (based on the tests above) having both F-Cl contents reported.

We find that compared to those calculated using variable A.N., values calculated using 25-anion and 26-anion show an overestimation of up to ~ 0.038 (when XOH = 0) and a smaller underestimation of up to ~ 0.01 (when XOH≈0.5), respectively. When applying 25-anion to a low OH apatite (e.g., 0 < XOH < 0.1), the overestimation of XOH can be significant, i.e., up to 4 times higher than the true values. Therefore, for terrestrial igneous apatite that normally contains more F-Cl than OH (Fig. 6A), stoichiometry calculation using variable anion number is preferable over 26-anion, whereas 25-anion is not recommended unless the crystal was known to be OH-rich.

Mole fractions (denoted as X hereafter) of F-Cl-OH were calculated in two different ways for two types of data: (1) for the data where H2O contents were not reported (i.e., the majority of the compiled data), mole fractions were derived from stoichiometry calculation (when the sum of the calculated XF and XCl exceeds 1, we assumed XOH = 0 and re-normalized XF and XCl to 100%; n = 488), and (2) for the data where H2O contents were determined by SIMS (often measured concurrently with F-Cl), we normalized the mass concentrations of F-Cl-H2O to calculate mole fractions. For the sake of consistency, we did not consider CO2 in the above calculation. The mole fractions of F-Cl-OH reported in this study thus represent the maximum.

Results

Considering the criteria mentioned above, we obtained ~ 11,000 qualified data for F and Cl, and smaller amounts of data for other volatiles (H2O: ~ 8100; S: ~ 3600; CO2: < 300). The data for individual volatiles were grouped into sub-datasets based on tectonic settings, rock types and bulk composition of the host rocks (see classifications above). Some sub-datasets have a small sample size (n < 50) and may introduce large bias into the results, so they were excluded from consideration. For individual sub-datasets, we report the median and 1 \(\sigma\) of volatile concentrations as \({median }_{median-16^{th} percentile}^{84^{th} percentile-median}\) (summarized in Table 1; see values for different tectonic settings and rock types/compositions in Supplementary Tables S3, S4).

Table 1 Summary of F-Cl-H2O concentrations in apatite in different types of igneous rocks spanning a wide range of bulk compositions

Amounts of data for different bulk-rock compositions and tectonic environments

Since F has a larger data size than other volatiles, we took the data for F (n = 11,981) to report the amounts of data available for individual geological environments. Larger amounts of data were reported for convergent margin (n = 5104) and intraplate volcanics (n = 4304), followed by divergent plate boundaries (rift volcanics: n = 1132), plume-related settings (continental flood basalt: n = 666; ocean island: n = 487), and cratons (Archean craton: n = 130; younger craton: n = 55). Regarding rock types, more data were reported for plutonic rocks (n = 3546) and volcanic rocks (n = 3234) than carbonatite (n = 623), kimberlite (n = 297), xenoliths (n = 119) and ultramafic rocks (n = 81). For volcanic-plutonic rocks of different bulk compositions, most data were reported for felsic rocks (granite and rhyolite: n = 900–1000) and mafic plutonic rocks (gabbro: n = 951), whereas less were presented for intermediate rocks (dacite, syenite, andesite and diorite; n = 300–800) and mafic volcanic rocks (basalt and basanite: n < 100) (Fig. 1B–D). About 70% of the qualified data were reported for apatite in Cenozoic rocks (including a large proportion of Holocene volcanic rocks), whereas the rest were reported for older rocks (Mesozoic: ~ 14%; Paleozoic: ~ 5%; Proterozoic: ~ 8%; Andean: < 1%).

Fig. 1
figure 1

Overview of the global data compilation for igneous apatite. A Localities (samples with known F-Cl contents marked in orange; others marked in yellow). BD Amounts of data (numbers in black) and localities (numbers in purple) for apatite from different bulk rocks considered in the statistical analysis for this study. Locations of arcs in panel (A) (marked in green lines) were adopted from Stern (2002) (those having n > 50 apatite data are marked in red boxes). Arc names: 1. Aegean, 2. Aleutian, 3. Andaman, 4. Banda, 5. Bismarck, 6. Cascade, 7. Central America, 8. Central Andes, 9. Honshu, 10. Italian, 11. Izu-bonin, 12. Japan, 13. Kamtchatka, 14. Kurile, 15. Lesser Antilles, 16. Luzon, 17. Maluku, 18. Mariana, 19. New Hebrides, 20. Northern Andes, 21. Palau, 22. Philippines, 23. Ryukyu, 24. Solomon, 25. South Sandwich, 26. Southern Andes, 27. Sulawesi, 28. Sunda, 29. Tonga-kermadec and 30. Trans-mexican

F and Cl concentrations

Concentrations of F (n = 11,981) and Cl (n = 10,770) in the dataset exhibit a large variation, i.e., 0.02–4.0 wt.% (up to 7.4 wt.% in the original dataset) with a median of \({2.3}_{-0.8}^{+1.0}\) wt.% for F, and from 0.00001 wt.% (i.e., below the detection limit of EPMA) to 7.2 wt.% (up to 7.58 wt.% in the original dataset) with a median of \({0.30}_{-0.27}^{+0.72}\) wt.% for Cl.

Among apatite at different tectonic settings, median F contents show a smaller variation (nearly two-fold: 1.8–3.1 wt.%) compared to median Cl (15-fold: 0.05–0.75 wt.%) (Fig. 2; Supplementary Table S3). The two endmember tectonic settings are convergent margin and rift, i.e., apatite at convergent margin (n = 5060–5100) shows the highest median Cl (\({0.75}_{-0.54}^{+0.51}\) wt.%) and lowest median F (\({1.8}_{-0.5}^{+0.8}\) wt.%), whereas apatite at rift (n = 960–1130) shows the opposite (\({0.05}_{-0.04}^{+0.04}\) wt.% Cl and \({3.1}_{-0.8}^{+0.3}\) wt.% F). Apatite from ocean islands (n = 460–490) also shows a low median of Cl (\({0.28}_{-0.12}^{+0.36}\) wt.%) and a high median of F (\({2.92}_{-0.93}^{+0.71}\) wt.%). The small amounts of data for ocean island basalt (OIB) show an even lower median of Cl (~ 0.17 wt.%; n = 44 for Kohala, Hawaii and n = 2 for Jan Mayen), less than one fifths of that in mafic rocks from convergent margin (~ 0.95 wt.%; n = 286, mostly for basaltic andesite and only n = 8 for basalt).

Fig. 2
figure 2

F-Cl concentrations in igneous apatite from different types of rocks (with decreasing median Cl contents from the top left panel to the bottom right panel). Colors represent H2O concentrations calculated from stoichiometry. Data with unknown H2O contents are marked in black dots (i.e., stoichiometry calculation not permitted). The other compiled data are marked in grey dots. A typical detection limit for Cl measured by EPMA (i.e., 0.01 wt.%) is marked with dark horizontal lines

Among the 26 volcanic arcs in the dataset, we focus on comparing four that have relatively large amounts of data (n = 760–1220) and cover > 10 different localities, i.e., Honshu, Ryukyu, Aegean and Calabrian. The data for other arcs mostly have n < 100 and cover only a few localities, so they are not compared in this study. The median F contents vary from \({1.49}_{-0.34}^{+0.56}\) wt.% (Honshu arc) to \({2.40}_{-0.40}^{+0.52}\) wt.% (Calabrian arc), whereas the median Cl content is the lowest on Ryukyu arc (\({0.21}_{-0.01}^{+0.03}\) wt.%) but higher on other arcs (Honshu: \({0.70}_{-0.16}^{+0.28}\) wt.%; Calabrian: \({0.91}_{-0.69}^{+0.17}\) wt.%; Aegean: \({1.14}_{-0.38}^{+0.33}\) wt.%), which are higher than the median values at other tectonic settings (≤ 0.43 wt.%).

Compared to tectonic settings, apatite in different types of igneous rocks shows larger compositional differences (Fig. 3; Table 1), i.e., by a factor of ~ 4 for F (i.e., from \({0.7}_{-0.5}^{+1.6}\) wt.% in xenoliths to \({2.8}_{-0.6}^{+0.6}\) wt.% in plutonic rocks), and a factor of ~ 30 for Cl (i.e., from \({0.03}_{-0.02}^{+0.08}\) wt.% in kimberlite to \({0.89}_{-0.69}^{+0.63}\) wt.% in mantle xenoliths). Volcanic apatite shows a median Cl content (\({0.77}_{-0.59}^{+0.67}\) wt.%) much higher than other types of rocks (including plutonic rocks, with a median of < 0.2 wt.%), and a moderate median F (\({2.0}_{-0.4}^{+1.2}\) wt.%). For apatite in plutonic rocks, the median F content increases with increasing bulk-rock silica contents in the calc-alkaline series (gabbro < granodiorite < granite) and alkaline series (monzodiorite < monzonite < syenite), whereas the median Cl content decreases monotonically (Fig. 4A; Supplementary Table S4). These trends are not shown in volcanic rocks, i.e., median F contents in rhyolite and dacite are similar (~ 1.8 wt.%) and lower than those in basaltic andesite (\({2.1}_{-0.3}^{+0.8}\) wt.%), basalt (\({2.7}_{-1.4}^{+0.6}\) wt.%) and andesite (\({3.0}_{-1.9}^{+0.6}\) wt.%). Since the amounts of data for basalt and basanite are small, we only compared median F–Cl contents of apatite in felsic volcanic and plutonic rocks. Apatite in volcanic rocks in both the calc-alkaline and alkaline series (i.e., rhyolite and trachyte) show a higher median Cl and lower median F than their plutonic equivalents (i.e., granite and syenite) (Fig. 4A). Comparison between calc-alkaline and alkaline rocks does not show any single trend in apatite composition, i.e., those in trachyte and syenite show higher median F and lower median Cl than those in rhyolite and granite, but this was not observed in less felsic rocks (Fig. 4A).

Fig. 3
figure 3

F–Cl concentrations in igneous apatite from different tectonic settings (with decreasing median Cl contents from the top left panel to the bottom right panel). Symbols and detection limit are the same as described in the caption of Fig. 2

Fig. 4
figure 4

Median F versus median Cl contents of apatite in (A) volcanic and plutonic rocks of different bulk compositions and (B) different tectonic settings. In panel (A), calc-alkaline and alkaline rocks are marked in different symbols (see legend, numbers in square brackets represent the amounts of data; different colors represent different silica contents). In panel (B), only a few compositions of rocks (marked in different colors) that span more than one tectonic setting (in different symbols; see legend) and contain n > 100 data at each tectonic setting are plotted

H2O concentration

The data for H2O in the original dataset comprise a small proportion measured by SIMS (n = 130; 0.06–0.94 wt.%), and the rest measured/calculated using other methods (0.0003–2.8 wt.%; n = 1386). In addition, we obtained n = 8116 data (0.0002–1.68 wt.%) from stoichiometry calculation in this study (using a variable anion number; median: \({25.73}_{-0.17}^{+0.18}\)). Here we adopted the data determined by SIMS and those calculated in this study for statistical analysis (when H2O contents were provided by both methods, we took the measured values). The H2O contents vary from 0 to 1.68 wt.%, i.e., all below the maximum abundance (~ 1.8 wt.%) calculated for an endmember hydroxyapatite (HAp). Values of zero were obtained when the sum of F–Cl contents equals to or exceeds the maximum abundances of F–Cl that can be preserved in a F–Cl binary apatite. We regard these values as indicating very low abundances of H2O in apatite and did not exclude them from statistical analysis.

The median H2O contents (in wt.%) show a two-fold variation (similar to F), i.e., from the lowest in craton (\({0.26}_{-0.11}^{+0.10}\); note that n = 55) and rift (\({0.29}_{-0.17}^{+0.33}\); n = 965), to the highest in intraplate (\({0.53}_{-0.39}^{+0.41}\); n = 3440) and convergent margin (\({0.52}_{-0.24}^{+0.21}\); n = 2482) (Supplementary Table S3). Compared to tectonic settings, the median values in different types of rocks show a slightly larger difference (by a factor of ~ 2.5), i.e., higher in mantle xenoliths, ultramafic rocks and kimberlite (0.7–1.0 wt.%) as compared to volcanic rocks and carbonatite (0.5–0.6 wt.%), as well as plutonic rocks (~ 0.4 wt.%) (Table 1). Different from F–Cl, comparisons of mafic-felsic rocks and volcanic-plutonic rocks do not show a large difference or clear trend in median H2O contents. This could be because for apatite, OH is the least favorite among F–Cl–OH and thus its concentration is affected by the halogens (see Discussion section).

S concentration

Sulfur concentrations reported as SO3 were converted into sulfur (in weight ppm) and combined with values reported as sulfur (in weight ppm) for statistical analysis. Compared to F–Cl–H2O mentioned above, the total amount of data for sulfur is smaller (n≈3700), yet sulfur concentrations show a much larger variation spanning four orders of magnitude, i.e., from < 1 ppm to 10,490 ppm (in a carbonatite). Most of the sulfur data were reported for convergent margin and intraplate settings (n > 1200), showing intermediate median sulfur contents (~ 680 ppm and ~ 520 ppm, respectively; Supplementary Table S3). The lowest and highest median values, i.e., at rift (~ 138 ppm; n = 148) and ocean islands (~ 800 ppm; n = 392) respectively, differ by a factor of ~ 6. For different rock types, the median values in ultramafic rocks and mantle xenoliths (1380–2170 ppm) are one order of magnitude higher than those in carbonatite and kimberlite (160–240 ppm). However, due to their small sample sizes (n = 14 to 111), the four rock types were excluded from consideration hereafter.

The sulfur contents of volcanic apatite show a higher median and a larger variation (\({761}_{-511}^{+1276}\); n = 1426) than plutonic apatite (\({481}_{-405}^{+652}\); n = 1495). For rocks of different bulk compositions, the median values span more than one order of magnitude (from ~ 194 ppm in gabbro to ~ 2600 ppm in phonolite) and do not show any correlation with the bulk-rock silica or alkali contents. For volcanic/plutonic rocks of the same bulk composition from different magmatic systems, the median values can differ by a factor of > 40–80 (in granite and dacite) and even higher (~ 6500, in gabbro from seven localities). Such a large inter-system variation may be due to differences in the magmatic sulfur budgets, and/or sulfur oxidation states in apatite where sulfate is much more compatible than sulfide (Konecke et al. 2019). Considering these, comparison of median sulfur contents between apatite from different geological environments may not provide as much information as that by F–Cl–H2O as described above.

CO2 concentration

The amount of data for CO2 is much smaller than other volatiles mentioned above. The data include n = 142 determined by SIMS for volcanic apatite (20–16,000 ppm), n = 66 determined by attenuated total reflection (ATR)-FTIR for volcanic apatite (110–28,000 ppm), and n = 55 determined with other methods (by EPMA and stoichiometry calculation, or methods not reported) for apatite in mantle xenoliths, carbonatite and syenite (600–30,000 ppm). Specifically, CO2 contents measured for mantle xenoliths are high, i.e., 8000–20,100 ppm in wehrlite/lherzolite xenoliths from Calatrava volcanic field, Spain (determined by EPMA; Villaseca et al. 2019) and 6600–17,400 ppm in lherzolite xenoliths from Newer volcanic province, Australia (determined by wet chemical methods; O'Reilly and Griffin, 1988), highlighting the use of carbon in apatite for investigating mantle metasomatism. High values were also reported for carbonatites (1–3 wt.%), but since they were derived from stoichiometry calculation and may contain large errors due to unknown proportions of carbonate at the phosphorus-anion sites of apatite (see Methods), these data are excluded from consideration. In the following, we focus on the data determined by SIMS and ATR-FTIR.

The SIMS data were reported for three volcanoes encompassing a narrow range of bulk-rock compositions, i.e., basaltic andesite from two eruptions at Merapi (20–16,000 ppm; Li et al. 2021), as well as phonolites from the Laacher See tephra at the Eifel volcanic field (140–7500 ppm; Humphreys et al. 2021) and from Mt. Erebus (120–1580 ppm; Li et al. 2023). The intra-system variation is larger than one order of magnitude, likely due to apatite entrapment from magmas of different volatile budgets due to fractionation \(\pm\) degassing. This may be revealed by textural positions and/or REE contents of apatite as reported by Li et al. 2021, 2023). Specifically, Li et al. (2021) found that apatite inclusions in amphibole from Merapi volcano contain much more CO2 (2400–16,000 ppm) than apatite hosted by clinopyroxene and matrix (20–900 ppm), which when combined with the lower REE contents indicate that apatite in amphibole grew from a more mafic, CO2-rich melt at greater depths.

The ATR-FTIR data were reported for two alkaline volcanic suites (Tianbao alkali basalt and trachyte, and Tudiling trachyte) in the South Qinling belt, China (Su et al. 2023). The CO2 contents in apatite in the Tudiling trachyte (6100–15,000 ppm; n = 15) show generally higher values with a smaller variation than the Tianbao trachyte (110–21,000 ppm; n = 21); the latter shows a much lower median (~ 310 ppm) than that in the less evolved alkali basalt (~ 8800 ppm; n = 30) from the same volcanic suite. The difference in CO2 contents were combined with REEs in apatite to indicate different differentiation-degassing history (Su et al. 2023).

Overall, the available data (albeit few) for CO2 indicates a notable intra-system (inter-crystal) difference. This may be due to variations in CO2 solubility with varying pressure, and/or the variability of CO2 partition coefficients that lack investigation.

Comparison of F–Cl–H2O concentrations determined by EPMA and SIMS

A comparison of F–Cl–H2O concentrations determined by EPMA and SIMS were made on data determined for the same crystals. The pre-compiled GEOROC dataset contains 135 such data (i.e., n = 19 for 19 crystals from Merapi in Li et al. (2021) and n = 116 for ~ 100 crystals from Laacher See, Eifel volcanic field in Humphreys et al. 2021). Here we consider additional data reported in our previous work including 21 crystals in Merapi basaltic andesite (n = 120 by EPMA and n = 21 by SIMS; Li et al. 2021), and 7 crystals in Erebus phonolite (n = 39 by EPMA and n = 7 by SIMS; Li et al. 2023). For individual crystals, there are either equivalent amounts of measurements (mostly one or two) from EPMA and SIMS that can be compared directly, or more measurements from EPMA than SIMS, in which case we took the mean value determined by each technique for comparison. Crystals having relatively large compositional variations (e.g., > 5% relative in F–Cl concentrations) were excluded from consideration (n = 5). To describe the difference in values determined by SIMS and EPMA, we used a parameter expressed as: \({\updelta }_{\text{i}}^{\text{SIMS}-\text{EPMA}}=\frac{{\text{C}}_{\text{i}}^{\text{SIMS}}-{\text{C}}_{\text{i}}^{\text{EPMA}}}{{\text{C}}_{\text{i}}^{\text{EPMA}}}\times 100\text{\%}\) (\(\text{C}\) denotes mass concentration or mole fraction). The results are reported below.

The F contents determined by the two techniques yield differences of mostly < 0.5 wt.%, and the 5th–95th percentile of \({\updelta }_{\text{F}}^{\text{SIMS}-\text{EPMA}}\) calculated using all data are between -20% and 15% (Fig. 5A). Compared to F, the Cl–H2O concentrations (of lower values) show differences of mostly < 0.2 wt.%, and larger variations in \({\updelta }_{\text{Cl}}^{\text{SIMS}-\text{EPMA}}\) and \({\updelta }_{{\text{H}}_{2}\text{O}}^{\text{SIMS}-\text{EPMA}}\) (i.e., 5th–95th percentiles: − 32 to 10%, and − 30 to 25% respectively). Different studies provide different ranges of \({\updelta }_{\text{i}}^{\text{SIMS}-\text{EPMA}}\). The median \({\updelta }_{\text{i}}^{\text{SIMS}-\text{EPMA}}\) values closest to 0 (i.e., representing good agreement between the EPMA and SIMS data) were found in F contents reported by Humphreys et al. (2021) (except a few outliers), Cl contents reported by Li et al. (2021, 2023), and H2O contents reported by Li et al. (2021). This can be explained by the different analytical conditions and standards used in the EPMA and SIMS analyses, which largely determine the data precision as described in the Discussion section. For F and Cl, there does not seem to be any relationship between the elemental concentration and \({\updelta }_{\text{i}}^{\text{SIMS}-\text{EPMA}}\), except that some negative values of \({\updelta }_{\text{Cl}}^{\text{SIMS}-\text{EPMA}}\) deviate further away from zero at lower Cl concentrations (Fig. 5B), simply because \({\text{C}}_{\text{i}}^{\text{EPMA}}\) is the denominator in the equation used to calculate \({\updelta }_{\text{i}}^{\text{SIMS}-\text{EPMA}}\) (see above).

Fig. 5
figure 5

Comparison of F-Cl-H2O concentrations (AC) and mole fractions (DF) determined by SIMS and EPMA on the same crystals, by plotting the values determined by EPMA versus the relative difference in values determined by the two techniques (i.e., \({\updelta }_{\text{i}}^{\text{SIMS}-\text{EPMA}}=\frac{{\text{C}}_{\text{i}}^{\text{SIMS}}-{\text{C}}_{\text{i}}^{\text{EPMA}}}{{\text{C}}_{\text{i}}^{\text{EPMA}}}\times 100\text{\%}\)). With given differences in concentrations determined by the two techniques (i.e., \({\text{C}}_{\text{i}}^{\text{SIMS}}-{\text{C}}_{\text{i}}^{\text{EPMA}}\)), the value of \({\updelta }_{\text{i}}^{\text{SIMS}-\text{EPMA}}\) will deviate further away from zero at lower \({\text{C}}_{\text{i}}^{\text{EPMA}}\). To demonstrate this, we plotted values of \({\updelta }_{\text{i}}^{\text{SIMS}-\text{EPMA}}\) calculated using given values of \({\text{C}}_{\text{i}}^{\text{SIMS}}-{\text{C}}_{\text{i}}^{\text{EPMA}}\) (between 0.01 and 0.5; see numbers in red color on each plot). Data points within the shaded area (in grey color) has \({\text{C}}_{\text{i}}^{\text{SIMS}}-{\text{C}}_{\text{i}}^{\text{EPMA}}\)≤0.1. Median values calculated for crystals reported by Li et al. (2021) and Humphreys et al. (2021) are plotted in crosses filled in white. Data sources: L21 = Li et al. 2021; H21 = Humphreys et al. 2021; L23 = Li et al. 2023

The values of \({\updelta }_{\text{H}2\text{O}}^{\text{SIMS}-\text{EPMA}}\) shift from negative to positive towards lower H2O concentrations (Fig. 5C), likely indicating a change from overestimation to underestimation of H2O by EPMA. This can be explained by a larger influence of other components (e.g., F-Cl ± other anions/vacancy) at the anion site of apatite when H2O content is low. For the data showing even lower H2O contents (< 0.1 wt.%), the values of \({\updelta }_{\text{i}}^{\text{SIMS}-\text{EPMA}}\) show a large spread. For example, values measured with SIMS by Li et al. (2023) for the highly homogeneous fluorapatite (n = 7) from Erebus volcano show a mean value and standard deviation of 0.062 ± 0.001 wt.% (error of analysis: ~ 0.003 wt.%), whereas the H2O contents calculated for the same crystals using thirteen EPMA measurements show a much larger standard deviation (0.05 ± 0.05 wt.%), mainly due to variations in the F-Cl contents (± 0.15 wt.% for F and ± 0.01 wt.% for Cl). This indicates that H2O contents calculated for crystals where a small number of EPMA measurements were conducted may contain large uncertainties, in addition to errors introduced by the EPMA analysis (see error analysis in Discussion section). Therefore, direct measurement of H2O is highly recommended.

Comparison of mole fractions of F-Cl-OH derived from the two techniques (calculated using two different approaches described in Methods section) shows similar ranges of \({\updelta }_{\text{i}}^{\text{SIMS}-\text{EPMA}}\), compared to those reported above for mass concentrations. Even though most data determined by the two techniques yield mole fractions with a difference of < 0.1 for XF and XOH (Fig. 5D–E) and < 0.05 for XCl (Fig. 5F), these differences may produce largely different melt H2O estimates, especially when the apatite used in the calculation contains low OH and high F (see Discussion section).

F–Cl–OH mole fractions and variations across tectonic settings and volcanic-plutonic rocks

The compiled apatite data cover a wide range on a F-Cl-OH ternary diagram, i.e., XF = 0–1, XCl = 0–1, and XOH = 0–0.95, but most data are distributed far away from the ClAp endmember (Fig. 6A). Endmember fluorapatite (FAp) occurs in all tectonic settings and rock types. Apatite from different tectonic settings show large overlaps, whereas apatite from different types of rocks demonstrates some compositional differences (Fig. 6A). Specifically, most apatites in kimberlite (n = 161) and ultramafic rocks (n = 53) contain low XCl, particularly in kimberlite (XCl = 0–0.02), whereas apatite in mantle xenoliths (n = 117) shows the highest values of median XOH (≈0.57) and median XCl (≈0.13). Compositions of apatite in volcanic rocks (n = 2433) and plutonic rocks (n = 3199) largely overlap, except for XCl in volcanic apatite that extends towards higher values (Fig. 6B). This may indicate a feature of higher Cl in apatite from volcanic systems than plutonic systems, which was also observed in apatite from arcs compared to non-arc tectonic settings (Fig. 6B). To distinguish the effects of the three factors (i.e., tectonic settings, rock types and magma composition), we compared sub-datasets by having only one variable at a time. For example, we compared the compositions of apatite from (i) rhyolite within arc and non-arc settings to investigate arc signatures, (ii) rhyolite and granite within arcs to investigate the volcanic versus plutonic signatures and (iii) volcanic rocks of different bulk compositions within arc settings to investigate the effect of magma composition. Results are reported below (see Fig. 6C–D).

Fig. 6
figure 6

F–Cl–OH ternary diagrams showing varying compositions of apatite in A different types of igneous rocks, B arc versus non-arc settings, C mafic-intermediate volcanic-plutonic rocks and D intermediate-felsic volcanic-plutonic rocks. Panel A outlines the range of apatite compositions in different rock groups (kernel density distribution of all data shown in the shaded area in grey). Panels BD show kernel density distributions in volcanic-plutonic rocks in arc/non-arc settings (categories and amounts of data written in boxes filled in white and outlined in different colors). Note that some shaded areas exceed the boundary of the ternary diagrams (beyond the FAp endmember) due to large amounts of data for F-rich apatite. Panel B shows that apatite from arcs (colorful contour lines) covers a wider range of Cl than those from non-arc settings (shaded areas). In panels C, D, apatite in mafic/intermediate/felsic rocks in arcs and non-arc settings are marked in symbols (see legends) and shaded areas respectively for the sake of comparison. Some data show abnormally high Cl (marked in grey symbols; gabbro from Costa et al. 2002 and andesite from this study) compared to other data in the same category, possibly due to fluid addition. Numbers of data in each category are written in parentheses within all panels

For scenario (i), we observed a high XCl signature in apatite in given bulk composition of rocks (e.g., andesite, diorite, dacite and rhyolite) from arcs than at other tectonic settings (Fig. 6C–D). For scenario (ii), we find generally higher XCl, as well as higher XOH and lower XF in rhyolite than granite from arcs (with a ten times difference in median XCl). The compositional difference in F-Cl-OH is large enough to separate rhyolite from granite (Fig. 6D). Apatite in andesite from arcs spans a wider range of F-Cl-OH than those in diorite (with only n = 21 data from arcs), including some (from Singkut volcano measured in this study; see detail in Methods section) showing rather high XCl values (up to 0.4; Fig. 6C), similar to those in gabbro from southern Andean volcanic zone (n = 7) that was interpreted as a result of fluid addition (Costa et al. 2002). Apatite in gabbro (n = 884) and basalt (n = 72) from non-arc settings do not show the distinct compositional difference we mentioned above for felsic rocks, although this may be biased by the small amount of data for basalt. For scenario (iii), we compared the data for volcanic rocks of different bulk compositions from arcs (n = 120–630) and find that the composition of apatite in basaltic andesite to rhyolite largely overlaps, with similar median XF (≈0.48–0.53) but a slightly higher median XCl (hence lower XOH) in the more felsic rocks (i.e., dacite and rhyolite). With the data for plutonic rocks from non-arc settings (those from arcs are too few), we find generally higher XF and lower XCl in granite (median: 0.77 and 0.01) than gabbro (median: 0.64 and 0.04). The above findings imply different magmatic environments in volcanic and plutonic systems (see discussions below).

Discussion

Comparison of electron microprobe recipes for apatite

Electron probe microanalysis is the most accessible, efficient and commonly used technique for analyzing apatite. To acquire high precision data, the following factors need to be considered before analysis: (i) elements to be analyzed and their possible concentration ranges and (ii) analytical conditions, including the accelerating voltage, probe current, beam size and counting times for each element, which should be selected based on the concentration range and desired precision of the elements of interest. To provide a reference and benchmark for future electron microprobe analyses of apatite, we compiled six analytical recipes (Supplementary Table S5) that were applied with electron microprobes manufactured by JEOL or CAMECA (McCubbin et al. 2011; Scott et al. 2015; Webster et al. 2017; Li et al. 2020; Bernard et al. 2022a). The compiled recipes include analytical conditions (acceleration voltage, beam current and size, counting time and crystals used with given spectrometers), primary standards used for calibration, and errors associated with the measured concentrations. They can be chosen based on the aim of the study and characteristics of the samples of interest. For example, a defocused electron beam (e.g., 5–10 µm in diameter) can be applied to analyze large, unzoned apatite crystals (see Recipes 1 and 3 in Supplementary Table S5) but is not suitable for crystals that contain elemental zoning and/or are smaller. In the latter scenario, a smaller electron beam (e.g., 1 µm in size; see Recipe 2 in Supplementary Table S5) is favorable and can be used to acquire concentration profiles for revealing possibly variable magmatic environments.

The determined elemental concentrations could be examined by referring to the range of concentrations in the global dataset. Based on all qualified data in this study (n > 9000 for Ca and P, and less for other elements), we determine the 2.5th–97.5th percentiles of major-minor oxide concentrations (in wt.%): 51–56 CaO, 38–43 P2O5, 0.01–4.16 SrO, 0.03–2.2 Ce2O3, 0.02–2.0 SiO2, 0.02–1.5 FeO, 0.01–0.7 MnO, 0–0.6 MgO and 0–0.5 Na2O (see distributions and median values in Fig. S1 in Online Appendix A). Other oxides, including Al2O3, K2O and TiO2, show trace abundances (mostly < 0.2 wt.%; median: 0.01–0.02 wt.%) that may be close to or below the detection limit of normal electron microprobe analyses. The qualified F and Cl data show 2.5th–97.5th percentiles of 0.9–3.8 wt.% and 0.005–1.6 wt.%, respectively. Analysis of F in apatite requires special caution because F may migrate along the c-axis of the crystal towards the sample surface if the c-axis is oriented parallel to the direction of the electron beam (Stormer et al. 1993; Goldoff et al. 2012; Stock et al. 2015). This may be the cause of some values of > 4 wt.% in the global dataset (n = 746) that exceed the theoretical upper limit of F in an endmember FAp and thus were excluded from consideration in this study. Compared to F, Cl is less sensitive to electron beam and the error in its concentration can be reduced to ~ 1% (see Recipes 1–2 in Supplementary Table S5). High-precision measurements of F and Cl are essential for reducing errors in H2O content derived from stoichiometry calculation (see the following sub-section).

Data accuracy can be assessed by analyzing secondary standards under the same analytical conditions as applied to the unknowns (Webster et al. 2017; Supplementary Table S5, Recipe 6). The commonly used secondary standards are mainly fluorapatite (e.g., from Durango or Wilberforce, XF≈1), which are suitable for examining the data for F (and Ca-P) but do not work for other volatiles such as chlorine and sulfur. This exposes the community’s need for developing and distributing apatite standards spanning a wide range of F-Cl-OH compositions to be used as secondary standards in future analysis of natural samples. The standards can be synthetized from experiments (e.g., see method in Schettler et al. 2011) or selected from natural samples of high chemical homogeneity (e.g., gem-quality apatite from Morocco used in the diffusion experiments of Li et al. 2020).

Uncertainty in H2O contents calculated assuming apatite stoichiometry

The concentration of H2O in apatite was commonly calculated from stoichiometry, assuming that the crystal anion site is fully occupied by F, Cl and OH, however, it is possible that other components (such as O2− and vacancy) are also incorporated at the anion site (Schettler et al. 2011; Jones et al. 2014; McCubbin and Ustunisk 2018). The uncertainty introduced by this to the calculated OH is difficult to quantify. In addition, analytical errors on elements used in stoichiometry calculation also introduce errors to the calculated OH, but these errors were rarely calculated or reported partly due to complexity of the error propagation. To quantify the errors in OH contents derived from stoichiometry calculation, we used the data reported by Li et al. (2021) for apatite from Merapi volcano. Considering that these data were measured using the same analytical condition and have similar errors, we arbitrarily selected one data point for our calculation (Supplementary Table S6). The concentrations of a few key elements and their errors (relative error: \(\updelta\)=\(\frac{\text{absolute error }(\sigma )}{mean }*\) 100%) are: 2.133 \(\pm\) 0.021 wt.% F (\(\updelta\)=0.97%), 1.016 \(\pm\) 0.014 wt.% Cl (\(\updelta\)=1.3%), 54.48 \(\pm\) 0.17 wt.% CaO (\(\updelta\)=0.3%) and 41.37 \(\pm\) 0.16 wt.% P2O5 (\(\updelta\)=0.4%). The stoichiometry calculation and calculation of errors (using a Monte Carlo algorithm) were conducted using the python module (pyAp).

For the crystal chosen, we calculated oxygen number = 25.719 \(\pm\) 0.007, XF = 0.572 \(\pm\) 0.006 (\(\updelta\)=1.0%), XCl = 0.146 \(\pm\) 0.002 (\(\updelta\)=1.4%) and \(\Delta Stoic\)=0.39%, which indicates that the crystal is close to stoichiometric ideality. The small errors in XF and XCl produced small errors in the calculated XOH (0.281 \(\pm\) 0.007; \(\updelta\)≈2.4%) and H2O (0.497 \(\pm\) 0.012 wt.%; \(\updelta\)≈2.4%). In addition to the calculation of errors using a Monte Carlo method, previous studies proposed that the absolute error (\(\sigma\)) in XOH can be derived from errors in F-Cl mole fractions based on the rule of propagation: \({\sigma }_{{X}_{OH}}=\sqrt{{{\sigma }_{{X}_{F}}}^{2}+{{\sigma }_{{X}_{Cl}}}^{2}}\) (Ketcham 2015). The values of \({\sigma }_{{X}_{F}}\) and \({\sigma }_{{X}_{Cl}}\) are, however, determined by errors in all elements involved in stoichiometry calculation and not easy to calculate. Therefore, based on the results reported above, we suggest using the following equation to estimate the absolute error in XOH:

$${\sigma }_{{X}_{OH}}=\sqrt{{{\sigma }_{{X}_{F}}}^{2}+{{\sigma }_{{X}_{Cl}}}^{2}}\approx \sqrt{{\left({\updelta }_{{C}_{F}}{X}_{F}\right)}^{2}+{\left({\updelta }_{{C}_{Cl}}{X}_{Cl}\right)}^{2}}$$
(1)

where \({\updelta }_{{C}_{F}}\) and \({\updelta }_{{C}_{Cl}}\) are the relative errors in the measured F and Cl concentrations (in weight percent or ppm). This equation indicates that errors in the XOH calculated based on stoichiometry mainly depend on errors in the measured F (especially for F-rich apatite) and Cl (especially for Cl-rich apatite) concentrations. Again, any other components (e.g., O2−) or vacancy that may exist at the crystal anion site are neglected, thus errors calculated from Eq. (1) represent the minimum.

To investigate changes in \({\sigma }_{{X}_{OH}}\) with larger analytical errors in other elements, we decreased or increased the errors in the individual measured elements by ten times compared to the original values and re-calculated the error in OH. We find that the error in XOH is dominated by that in the measured F concentrations, e.g., increasing \({\updelta }_{{C}_{F}}\) by ten times results in almost an order of magnitude higher \({\sigma }_{{X}_{OH}}\), whereas decreasing \({\updelta }_{{C}_{F}}\) by ten times produces a smaller \({\sigma }_{{X}_{OH}}\) that is about two-fifths of its original value (Fig. 7). As comparison, when errors in both F and Cl were reduced by ten times and errors in other components remain unchanged, \({\sigma }_{{X}_{OH}}\) is decreased to about one-third of its original value (\(\updelta\): from 2.4 to 0.8%). This likely represent the lowest error in XOH that can be achieved with the current EPMA technique.

Fig. 7
figure 7

Changes in the uncertainty in XOH compared to the original errors (in dark triangles) determined for volcanic apatite by Li et al. (2021), when (i) analytical errors in individual components were increased or decreased by a factor of 10 (in red and blue circles, respectively), and (ii) analytical errors in both F and Cl reduce by 10 times (in green square)

The reason why F has a larger control on the error in XOH than Cl can be explained by the higher concentration of F than Cl in the selected crystal. Based on Eq. (1), it is anticipated that the effect of Cl could be larger for crystals containing more Cl. Therefore, to reduce errors in OH calculated for natural apatite, we suggest minimizing analytical errors in both F and Cl by referring to EPMA recipes compiled in Supplementary Table S5. Additionally, it is recommended to carry out multiple measurements on different positions of individual crystals, to reduce random errors that can strongly affect the OH estimation (reported above by comparing the EPMA and SIMS data).

Chlorine signatures in subduction-zone apatite

Volatile concentrations in primitive melts in different tectonic settings can differ by a large extent. Previous studies on melt inclusions showed that subduction-related basalts contain a much higher maximum amount of Cl (0.6 wt.%) than mid-ocean ridge basalts (0.04 wt.%) and ocean island basalts (0.1 wt.%), whereas felsic melts at subduction zones can contain even higher amounts of Cl (up to 0.75 wt.%; see Aiuppa et al. 2009 and references therein). This matches well with the observation from this study that the median Cl content of apatite in felsic volcanic rocks from arcs (~ 1.1 wt.%) is slightly higher than those in mafic volcanic rocks from arcs (~ 0.95 wt.%) but 5–6 times higher than that in OIB (although the data size is small: n < 50). In comparison, the median H2O content of apatite in mafic volcanic rocks between subduction zones and ocean islands only differ by a factor of < 2. Moreover, the variation in median apatite Cl contents of different volcanic arcs reported in this study (by a factor of ~ 5) may be explained by different Cl contents of the source melts, which are ultimately controlled by the amounts of Cl supplied by subducted oceanic crust and sediments (e.g. Jarrard 2003; Wallace 2005; Aiuppa et al. 2009). Therefore, the abundance of Cl in apatite on volcanic arcs can potentially be used to study the recycling of Cl at subduction zones. The lack of F signature in subduction-zone apatite could be due to the highly compatible nature of F in apatite and less efficient recycling of F through volcanic arcs to the surface in comparison with Cl (e.g., Barnes et al. 2018). The lack of H2O-rich signature in subduction-zone apatite may be explained by a higher incompatibility of H2O compared to Cl-F and a larger influence of magmatic P–T conditions (on H2O solubility in the melt and volatile partitioning, respectively; see below) that possibly hinders the preservation of original tectonics-induced signature of H2O.

Controls of F–Cl–OH variability in apatite in different magmatic environments

For apatite in different types of igneous rocks, we observed the following features: apatite in plutonic rocks can show higher XF and lower XCl than their volcanic equivalents; apatite in all kimberlites in our dataset exhibits a low Cl feature (XCl < 0.025); apatite in mantle xenoliths and ultramafic rocks span a wider range of XCl than kimberlite. To link these observations to the characteristics of the magmas that form these rocks, we conduct forward modelling of apatite compositions using a wide range of melt F–Cl–H2O contents and different temperatures (see below), and then discuss key processes that can affect melt volatile composition in this section.

To maximize the range of predicted apatite composition, we considered a wide range of melt F–Cl–H2O contents (F: 0.01–2 wt.%; Cl: 0.01–2 wt.%; H2O: 0.01–15 wt.%). A concentration array was pre-generated for each volatile with a small spacing (0.01 wt.% for F–Cl and 0.075 wt.% for H2O). Values were selected arbitrarily from the arrays for the prediction of apatite composition, using the F–Cl–OH partition model of Li and Costa (2020, 2023) at two temperatures (1150 ℃ and 750 ℃, representative of (ultra)mafic and felsic magmas, respectively). The calculation was repeated for 100,000 iterations (at each temperature) such that the input melt F–Cl–H2O contents cover those in most terrestrial magmas. Some of the input values may not occur in natural systems, but we decided not to exclude any in order to investigate the range of apatite composition. The choice of water speciation model has little effect on the predicted apatite compositions in intermediate-felsic magmas but could provide higher XOH than those in mafic magma (e.g., using the model of Lesne et al. 2011 for alkaline basalt). Here we used one water speciation model (i.e., for dacite of Liu et al. 2004) for calculations at both temperatures to investigate the T effect.

The model results show a large difference in the range of apatite composition at the two temperatures (Fig. 8A–B). Most modelled compositions at 1150 ℃ show low XCl (< 0.5) but a wide range of XF and XOH (Fig. 8A), whereas those at 750 ℃ exhibit low XOH (< 0.2) but a wide range of XF and XCl (Fig. 8B). Specifically, none of the predicted XOH at 750 ℃ exceeds 0.75 despite the wide range of melt H2O contents (0.01–15 wt.%) and H2O/F ratios (0.005–1500; all ratios reported hereafter are mass concentration ratios unless otherwise specified). Magmas with given H2O contents (e.g., 5 wt.%) but varying halogen contents can produce a range of apatite compositions at a given temperature, and those at the higher T contain significantly higher XOH. In comparison, magmas with given H2O-halogen ratios (e.g., H2O/Cl = 1) produce a much smaller spread of apatite composition, because the composition is controlled by the partitioning of H2O-halogen pairs rather than that of H2O alone. Under this condition, the variation in apatite composition is mainly due to varying concentration of the third volatile (increasing towards the corresponding endmember of apatite; Fig. 8A). The above results highlight that accurate estimation of melt H2O content using apatite requires constraints on temperature and melt halogen contents. For apatite containing high F (e.g., XF > 0.9) and low OH-Cl that occur in most types of igneous rocks as described in this study, an additional major source of error is the determination of volatile concentrations in apatite, where direct measurements of H2O (e.g., by SIMS) are more reliable than stoichiometry calculation and can reduce errors in the melt water estimation. In the following, we discuss apatite compositions observed in different rock groups based on the above model results.

Fig. 8
figure 8

Calculated compositions of apatite generated by liquids spanning a wide range of F–Cl–H2O concentrations (see main text) at two temperatures: A 1150 ℃ and B 750 ℃ (modelled compositions marked in grey dots and their kernel density distribution marked in dark contours lines), compared with those observed in different rocks (see legends; shaded areas in grey represent gabbro in panel C and granite in panel D; empty areas outlined in dashed lines represent xenoliths in panel C and rhyolite in panel D). Apatite compositions calculated using given volatile concentration ratios in the melt (H2O/F = 100; H2O/Cl = 1 or 100; F/Cl = 10) are marked in colorful dots (see ratios in text boxes in panels A, B). Apatite compositions calculated using liquids with 5 wt.% H2O and varying F-Cl contents show different ranges at the two temperatures (empty areas outlined with purple dashed lines in panels A, B)

We find that the low-Cl apatite in kimberlite lying near the FAp-HAp binary joint (XCl < 0.025; XF = 0.25–1; XF and XOH are negatively correlated) can be generated by hot magmas (e.g., 1150 °C) with either a high H2O/Cl ratio (e.g., of 100) and varying F content, or a moderate F/Cl ratio (e.g., of 10) but varying H2O content (Fig. 8C). Cooling of the magma with a constant H2O-Cl-F ratio can cause an increase in XF. Considering a relatively large extent of cooling of 150 ℃ (Kavanagh and Sparks 2009), the resultant increase in XF (by ~ 0.25 at maximum) is comparable to the spread of XF observed for a few localities but smaller than those found in most kimberlites at individual localities (~ 0.4 to 0.7). This indicates additional contributor(s) besides cooling, which could be H2O ± CO2 exsolution (e.g., see review by Sparks 2013). For example, a 150 °C cooling and exsolution of 5 wt.% H2O can increase XF by ~ 0.4, whereas exsolution of CO2 may further decrease XOH (if the partition coefficient of CO2 is proportional to that of H2O at given P–T conditions; Riker et al. 2018) and thus increase XF to cover the observed spread (i.e., up to 0.7). With one experimental study on apatite-melt CO2 partitioning (Riker et al. 2018), it is impracticable to quantify the effect of CO2 exsolution, and further investigations can be carried out when more experimental data are available.

Most apatite in mantle xenoliths and ultramafic rocks fall into the compositional range predicted for melts with H2O/F < 100 at 1150 ℃ (Fig. 8C). This implies that if a primitive mafic magma contains ~ 100 ppm F (see review by Aiuppa et al. 2009), it is likely to have < 1 wt.% H2O such that the apatite in equilibrium with it would not exceed the maximum XOH observed to date. At a higher T (> 1150 ℃) and/or in a melt with less F (< 100 ppm), the estimated H2O content mentioned above would be even lower and may match with those commonly found in mantle xenoliths (i.e., hundreds of ppm, e.g., Peslier and Luhr 2006; Warren and Hauri 2014).

The higher median XF and lower median XCl in plutonic apatite than volcanic apatite (Fig. 8D) may be due to lower temperatures of magmas that generated plutonic rocks (cooled till their solidi) than their volcanic equivalents (quenched at temperatures above their solidi) (Bachmann et al. 2007). The difference in thermal conditions may also be one explanation of why apatite in plutonic rocks shows increasing XF towards the felsic endmember, whereas this trend is less obvious in volcanic rocks (i.e., those in basaltic andesite, dacite and rhyolite show largely overlapping compositions). The composition difference between volcanic-plutonic apatite could also be attributed to different volatile concentration ratios in the melt, e.g., at given temperatures, the plutonic apatite requires melts with lower Cl–F and/or higher H2O–Cl ratios. Key processes that control magmatic volatile composition, including fractional crystallization, degassing and melt-fluid interaction, are discussed as follows.

For a water- and halogen-undersaturated magma, crystallization of anhydrous minerals can cause an increase of its Cl/F, H2O/F and H2O/Cl ratios, due to differences in the incompatibility of these volatiles (i.e., bulk partition coefficients: F < Cl < H2O, see Stock et al. (2018) and Li et al. (2021) and references therein). Crystallization of hydrous minerals (amphibole, micas) can increase Cl/F in the melt to a larger extent because F is compatible/incompatible while Cl is mostly incompatible for these minerals (e.g., Iveson et al. 2017; Flemetakis et al. 2021; Zhang et al. 2022). Considering that amphibole and micas are more common in plutonic rocks than their volcanic equivalents (Bachmann et al. 2007), it is more likely to have a higher Cl/F ratio in the melt that generates plutonic apatite than the opposite (i.e., as what we observed in this study; see above). Therefore, crystallization of hydrous mineral is unlikely the main cause of different volatile compositions of apatite between plutonic and volcanic rocks. If the magma is saturated in water, its H2O/F and H2O/Cl contents are likely to produce apatite compositions different from those discussed above for water-undersaturated magma, while the Cl/F content may continue to increase till Cl exsolution occurs (see below). The former has been revealed by observations of different trends of OH-halogen mole fraction ratios in apatite from individual volcanoes (e.g. Stock et al. 2016, 2018; Popa et al. 2021a, b; Keller et al. 2023), which were interpreted as a result of transition from water-undersaturated to water-saturated conditions before large, caldera-forming eruptions.

Other factors that affect melt Cl/F content include (i) degassing, which may occur to Cl at relatively late evolution stages and shallow (near-surface) depths due to lower solubility of Cl in more felsic melts at lower pressure (Webster et al. 2015; Thomas and Wood 2023), but will unlikely occur to F (as it is highly soluble in silicate melts; see Aiuppa et al. 2009 and references therein) and (ii) melt-fluid-apatite interactions (e.g., in magmatic–hydrothermal ores; see Webster and Piccoli 2015 and references therein), which largely complicates the interpretation of apatite volatile composition. This is due to the complex behavior of halogen partitioning between fluid(s)-melt (see a series of research by J. D. Webster and co-authors, e.g., Webster et al. 2009, 2017; Doherty et al. 2014), where the partition coefficient (especially that of Cl) can change drastically with varying fluids composition (e.g., Doherty et al. 2014) and pressure (e.g., Shinohara 2009; Tattitch et al. 2021). Recent modelling efforts have shown that it is possible to estimate melt volatile budgets and fluid salinity in porphyry mineralization systems using apatite based on pre-existing knowledge of temperature, pressure, bulk crystal-melt and fluid-melt partition coefficients of the systems of interest (Lormand et al. 2024).

The overall effect of temperature and other controlling factors discussed above on apatite composition depends on which factor(s) are dominant. The dominant factor could differ largely between different magmatic systems. For the difference in compositions between plutonic-volcanic apatite, we propose that lower temperature could be a cause of the on average higher XF and lower XCl-XOH in apatite in granite than rhyolite, and the effects of volatile compositions of melt ± fluid(s) require investigations on a case-by-case basis in the future (e.g., via comparing apatite in different types of granite). These discussions demonstrate a potential use of apatite to investigate the volcanic-plutonic connection.

Controls of apatite crystallization and growth

Volatile composition of apatite is determined by temperature and melt (± fluids) volatile compositions and thus can be used to infer these conditions as mentioned in the previous section. A main question here is the timing of apatite crystallization (apatite-in) and the duration of apatite survival in given magmatic systems because these will determine the records of magmatic P–T-X conditions that apatite can provide. Apatite was previously thought to be a late crystallization phase considering low phosphorus contents in most of the primary melts and their increase due to fractional crystallization. However, the data collection in this study shows the occurrence of apatite in mantle-derived xenoliths and ultramafic/mafic rocks. Possible causes relating to the conditions of apatite saturation are discussed below.

Previous studies have shown that apatite saturation in silicate melts is dependent on temperature and liquid composition (Harrison and Watson 1984; Pichavant et al. 1992; Tollari et al. 2006) and barely affected by pressure (Harrison and Watson 1984). A commonly used model for the apatite saturation temperature (AST) was proposed by Harrison and Watson (1984) based on the melt Si and P concentrations. Application of this model to natural samples showed that the calculated AST can either be similar to temperatures provided by geothermometric calculations (e.g., Bernard et al. 2022a) or notably different (e.g., lower by ~ 100 ℃ for the Erebus phonolite; Li et al. 2023). To test this model, we took the data provided by fractionation experiments conducted at 1 GPa and a series of temperatures, with starting compositions of basalt and basaltic andesite by Ulmer et al. (2018). These experiments showed the absence of apatite at T = 900 ℃ and presence at T ≤ 850 ℃ (no experiments conducted between the two temperatures), thus indicating apatite-in at a temperature between 850 and 900 ℃ (in andesitic melts with ~ 58% SiO2, 0.21 wt.% P2O5 and 9–10 wt.% H2O). In comparison, for the apatite-free melt from two experiments at 900 ℃, the model of Harrison and Watson (1984) provided ASTs of 927–958 °C, i.e., at least 27 ℃ higher than the real values (< 900 ℃), whereas the model of Tollari et al. (2006) provided much lower values (< 820 ℃). The discrepancy in the ASTs found from experimental and natural samples raises the alarm about the existing AST models and indicates a necessity of improving them, possibly by considering additional components such as H2O.

While the melt can be globally saturated in apatite (as assumed in the above calculation of AST), this is not required if there is a local saturation associated with growing major mineral phases in the melt (Harrison and Watson 1984; Green and Watson 1982; Bacon 1989). Local saturation allows apatite to crystallize and grow at temperatures higher than AST and may explain the occurrence of tiny inclusions of apatite commonly found in major minerals (e.g., pyroxenes and Fe-Ti oxides) and the apatite in silica-poor, water-rich hot magmas (e.g., forming kimberlite). However, whether this could generate large, euhedral crystals (e.g., 60–100 microns in length within the groundmass of volcanic rocks) requires further investigation.

Another possible cause of the occurrence of apatite in rocks that are supposedly phosphorus-undersaturated is that the apatite was inherited from other sources. For example, some apatite crystals from the Fish Canyon Tuff were found to be antecrysts that crystallized from a compositionally different magma at earlier stages of magma evolution (e.g., Charlier et al. 2007). This may also occur in other large, silicic systems with a prolonged history of magma recharge and mixing, or in magmas that generate ultramafic/mafic rocks although this has yet to be verified. One way to examine this is using an equilibrium test based on REE partition coefficients that have been determined by experiments (e.g., Watson and Green 1981; Prowatke and Klemme 2006) and can be calculated using existing models (e.g., a generalized model for silicate melts by Li et al. 2023 based on the crystal lattice properties of apatite and melt structure). The equilibrium in REEs may also indicate equilibria in other metal elements but does not guarantee the equilibrium of volatiles because the latter are easier to be reset in apatite due to faster diffusion rates than REEs (see Cherniak 2010 for REEs and Li et al. 2020 for F–Cl–OH diffusivity) and may be subject to additional processes (e.g., degassing, as discussed above).

Overall, the discussion above indicates the following causes of the occurrence of apatite in ultramafic/mafic rocks: (i) the existing AST models (describing “global” apatite saturation) may have omitted some key components apart from Si, Ca, and P (e.g., H2O), and thus should be used with caution before new calibrations are available; (ii) “local” saturation of apatite at the major mineral-melt interface, however, whether this can produce large crystals of tens to hundreds of micrometers in size has yet to be examined; and (iii) the apatite may be inherited from other sources, and this could be examined based on existing REE partition models.

Conclusions

The global dataset for apatite analyzed in this study demonstrates the large stability field of the mineral across major tectonic settings, a variety of magma compositions, and a wide range of P–T conditions. Based on the compiled data, we observed compositional features of apatite as follows. Apatite from volcanic arcs shows a high Cl feature compared to other tectonic settings and a variation in median Cl contents between arcs. This indicates a potential use of Cl in apatite to track the Cl recycling at subduction zones. Apatite in kimberlites shows very low Cl and a wide spread of F–OH contents, possibly due to cooling and H2O ± CO2 exsolution from a hot magma, in agreement with the known characteristics of kimberlite magma. Apatite in plutonic-volcanic rocks having similar bulk-rock compositions shows overlapping F–Cl–OH compositions, but those in plutonic rocks can contain higher F and lower Cl contents. This could be due to a difference in temperature (shown by our calculation), and/or different magmatic volatile compositions which require investigation on a case-by-case basis in the future. Moreover, it is highlighted that a high OH (or high F) apatite can be generated by a hot (cold) magma that is not necessarily H2O-rich (or H2O-poor), due to a combined effect of temperature and relative abundances of F-Cl-H2O in the melt, rather than the melt H2O content alone.

These findings reveal an urgent need for a large amount of high-quality data for volatiles in magmatic apatite. Electron microprobe analyses using suitable analytical conditions (e.g., referring to recipes compiled in this study) can produce high-precision data for halogens but are likely to generate large errors in the stoichiometry-based H2O estimation. These errors are introduced by analytical errors in elements used in stoichiometry calculation (mainly those in F–Cl contents, as shown by our error analysis), random errors due to a small number of single-point analyses of individual crystals (e.g., according to our comparison of SIMS-EPMA data), and an unknown extent of uncertainty embedded in the assumption that the anion site of apatite only contains F, Cl and OH. Given these, direct measurement of H2O is highly recommended. Overall, our findings suggest that accurate interpretation of high-quality geochemical data for magmatic apatite may shed light on fundamental questions on volatile behavior in volcanism and igneous processes on Earth, including but not limited to the recycling of volatiles at subduction zones, the volcanic-plutonic connection, and the formation of specific types of igneous rocks.