Compositional and pressure effects on the solubility of H2O and CO2 in mafic melts