This page was generated from docs/Examples/Intro_Example_Petrolog_FC/FC_Petrolog.ipynb. Interactive online version: Binder badge.

Python Notebook Download

Simple fractional crystallization model

If you havent done so already, you need to pip install PySulfSat

  • Do this by removing the #. You only need to do this once per computer. After your initial installation, you will want to upgrade instead using the second command

[1]:
#!pip install PySulfSat
#!pip install PySulfSat --upgrade
[2]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import PySulfSat as ss
pd.options.display.max_columns = None
[32]:
pd.__version__
[32]:
'2.1.1'

Import data

  • Here we have Ni and Cu contents in Petrolog, although in reality, its better to fit to observed Ni and Cu contents in your samples, as once you start to remove sulfide, you change Cu and Ni (alternatively an iterative model could be built of how these are removed).

[3]:
df_out=ss.import_data('PetrologCalculations.xlsx', Petrolog=True)
df_out.head()
We have replaced all missing liquid oxides and strings with zeros.
[3]:
SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq Ni_Liq_ppm Cu_Liq_ppm SiO2_magma TiO2_magma Al2O3_magma Fe2O3_magma FeO_magma MnO_magma MgO_magma CaO_magma Na2O_magma K2O_magma P2O5_magma Cr2O3_magma Ni_magma Cu_magma Cr2O3_Liq Ni_Liq Cu_Liq SiO2_cumulate TiO2_cumulate Al2O3_cumulate Fe2O3_cumulate FeO_cumulate MnO_cumulate MgO_cumulate CaO_cumulate Na2O_cumulate K2O_cumulate P2O5_cumulate Cr2O3_cumulate Ni_cumulate Cu_cumulate Temperature Temperature_Olv Olv_Fo_magma Olv_Kd Olv_Fo_cumulate Pressure(kbar) Lg(fO2) dNNO density Ln(viscosity) Melt_%_magma Olv_%_magma Olv_Peritectic Fluid_%_magma Olv_%_cumulate Sample Unnamed:58 T_K P_kbar Fraction_melt Sample_ID_Liq
0 49.9010 0.9981 14.9715 8.980926 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0 0.098489 697.8 99.8 49.9010 0.9981 14.9715 0.9839 8.0964 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0998 697.8 99.8 0.0998 697.8 99.8 40.2986 0 0 0 11.7372 0 46.9121 0 0 0 0 0 8257.6 10.0 1253.281 1253.281 87.69 0.308 87.69 1 -7.72 -0.7 2.683 6.25 99.9900 0 N 0 0.0100 PetrologDefault 08:21:15 1526.431 1 0.999900 0
1 49.9978 1.0081 15.1220 8.951296 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.0 0.097851 624.6 100.7 49.9978 1.0081 15.1220 0.9743 8.0754 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.1008 624.6 100.7 0.1008 624.6 100.7 40.2698 0 0 0 11.9273 0 46.7855 0 0 0 0 0 7984.5 10.0 1243.430 1243.430 87.28 0.309 87.49 1 -7.83 -0.7 2.682 6.38 98.9950 0 N 0 1.0050 PetrologDefault 08:21:15 1516.580 1 0.989950 1
2 50.0982 1.0185 15.2770 8.916645 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.0 0.097284 554.8 101.6 50.0982 1.0185 15.2770 0.9649 8.0492 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.1018 554.8 101.6 0.1018 554.8 101.6 40.2390 0 0 0 12.1280 0 46.6507 0 0 0 0 0 7708.8 10.1 1233.064 1233.064 86.83 0.310 87.27 1 -7.94 -0.7 2.681 6.52 97.9904 0 N 0 2.0096 PetrologDefault 08:21:15 1506.214 1 0.979904 2
3 50.2003 1.0289 15.4337 8.877334 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.0 0.096823 489.9 102.6 50.2003 1.0289 15.4337 0.9561 8.0178 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.1029 489.9 102.6 0.1029 489.9 102.6 40.2069 0 0 0 12.3359 0 46.5096 0 0 0 0 0 7436.5 10.1 1222.361 1222.361 86.36 0.311 87.05 1 -8.05 -0.7 2.680 6.67 96.9959 0 N 0 3.0041 PetrologDefault 08:21:15 1495.511 1 0.969959 3
4 50.3062 1.0397 15.5950 8.832002 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.0 0.096445 428.7 103.5 50.3062 1.0397 15.5950 0.9475 7.9802 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.1040 428.7 103.5 0.1040 428.7 103.5 40.1725 0 0 0 12.5558 0 46.3589 0 0 0 0 0 7162.8 10.2 1211.080 1211.080 85.84 0.312 86.81 1 -8.18 -0.7 2.679 6.83 95.9923 0 N 0 4.0077 PetrologDefault 08:21:15 1484.230 1 0.959923 4

Example 1 - SCSS calculations

Example 1a: Calculate SCSS using Smythe

  • First, we perform calculations using a Fe/FeNiCu ratio determined by measuring sulfides in the sample suite we are trying to model by quantitative EDS analysis (see Wieser et al. 2019)

[4]:
Smythe_FixedSulf=ss.calculate_S2017_SCSS(df=df_out,
T_K=df_out['T_K'], P_kbar=df_out['P_kbar'],
Fe3Fet_Liq=df_out['Fe3Fet_Liq'],
Fe_FeNiCu_Sulf=0.65)
Smythe_FixedSulf.head()
Using inputted Fe_FeNiCu_Sulf ratio for calculations.
no non ideal SCSS as no Cu/CuFeNiCu
[4]:
SCSS2_ppm_ideal_Smythe2017 SCSS2_ppm_ideal_Smythe2017_1sigma T_Input_K P_Input_kbar Fe_FeNiCu_Sulf Fe3Fet_Liq_input Si_wt_atom Ti_wt_atom Al_wt_atom Mg_wt_atom Mn_wt_atom Fe2_wt_atom Fe3_wt_atom Ca_wt_atom Na_wt_atom K_wt_atom P_wt_atom H_wt_atom Si_XA_ideal Ti_XA_ideal Al_XA_ideal Mg_XA_ideal Fe2_XA_ideal Ca_XA_ideal Na_XA_ideal K_XA_ideal H_XA_ideal Si*Fe_ideal Si_XA_non_ideal Ti_XA_non_ideal Al_XA_non_ideal Mg_XA_non_ideal Fe2_XA_non_ideal Ca_XA_non_ideal Na_XA_non_ideal K_XA_non_ideal H_XA_non_ideal Si*Fe_non_ideal log_SCSS_ideal Fe_FeNiCu_Sulf_calc SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq Ni_Liq_ppm Cu_Liq_ppm SiO2_magma TiO2_magma Al2O3_magma Fe2O3_magma FeO_magma MnO_magma MgO_magma CaO_magma Na2O_magma K2O_magma P2O5_magma Cr2O3_magma Ni_magma Cu_magma Cr2O3_Liq Ni_Liq Cu_Liq SiO2_cumulate TiO2_cumulate Al2O3_cumulate Fe2O3_cumulate FeO_cumulate MnO_cumulate MgO_cumulate CaO_cumulate Na2O_cumulate K2O_cumulate P2O5_cumulate Cr2O3_cumulate Ni_cumulate Cu_cumulate Temperature Temperature_Olv Olv_Fo_magma Olv_Kd Olv_Fo_cumulate Pressure(kbar) Lg(fO2) dNNO density Ln(viscosity) Melt_%_magma Olv_%_magma Olv_Peritectic Fluid_%_magma Olv_%_cumulate Sample Unnamed:58 T_K P_kbar Fraction_melt Sample_ID_Liq Fe_FeNiCu_Sulf_calc
0 1163.632126 317.869126 1526.431 1 0.65 0.098489 0.458760 0.006900 0.162217 0.136728 0.000777 0.062247 0.006799 0.117975 0.044478 0.002341 0.000777 0.0 -12643.917846 -77.425761 -2992.954217 -1910.042747 -2133.469827 -923.846254 -589.186980 -67.922629 -0.0 3328.767457 -12843.656196 -73.937634 -3082.117373 -1984.261077 -2172.132780 -1041.911444 -609.912056 -66.914620 -0.0 3364.402871 7.059302 0.65 49.9010 0.9981 14.9715 8.980926 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0 0.098489 697.8 99.8 49.9010 0.9981 14.9715 0.9839 8.0964 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0998 697.8 99.8 0.0998 697.8 99.8 40.2986 0 0 0 11.7372 0 46.9121 0 0 0 0 0 8257.6 10.0 1253.281 1253.281 87.69 0.308 87.69 1 -7.72 -0.7 2.683 6.25 99.9900 0 N 0 0.0100 PetrologDefault 08:21:15 1526.431 1 0.999900 0 0.65
1 1132.187652 309.279446 1516.580 1 0.65 0.097851 0.460128 0.006977 0.164018 0.131795 0.000786 0.062150 0.006740 0.119285 0.044970 0.002367 0.000785 0.0 -12681.596545 -78.282676 -3026.179002 -1841.131776 -2130.145227 -934.101871 -595.707729 -68.674435 -0.0 3333.484439 -12881.930112 -74.755944 -3116.331958 -1912.672440 -2168.747932 -1053.477703 -616.662177 -67.655269 -0.0 3369.170350 7.031907 0.65 49.9978 1.0081 15.1220 8.951296 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.0 0.097851 624.6 100.7 49.9978 1.0081 15.1220 0.9743 8.0754 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.1008 624.6 100.7 0.1008 624.6 100.7 40.2698 0 0 0 11.9273 0 46.7855 0 0 0 0 0 7984.5 10.0 1243.430 1243.430 87.28 0.309 87.49 1 -7.83 -0.7 2.682 6.38 98.9950 0 N 0 1.0050 PetrologDefault 08:21:15 1516.580 1 0.989950 1 0.65
2 1099.523987 300.356720 1506.214 1 0.65 0.097284 0.461540 0.007056 0.165875 0.126736 0.000794 0.062014 0.006682 0.120635 0.045480 0.002394 0.000794 0.0 -12720.511949 -79.173986 -3060.433090 -1770.461624 -2125.481450 -944.675207 -602.466551 -69.463239 -0.0 3336.392958 -12921.460271 -75.607099 -3151.606511 -1839.256265 -2163.999637 -1065.402284 -623.658745 -68.432367 -0.0 3372.110005 7.002633 0.65 50.0982 1.0185 15.2770 8.916645 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.0 0.097284 554.8 101.6 50.0982 1.0185 15.2770 0.9649 8.0492 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.1018 554.8 101.6 0.1018 554.8 101.6 40.2390 0 0 0 12.1280 0 46.6507 0 0 0 0 0 7708.8 10.1 1233.064 1233.064 86.83 0.310 87.27 1 -7.94 -0.7 2.681 6.52 97.9904 0 N 0 2.0096 PetrologDefault 08:21:15 1506.214 1 0.979904 2 0.65
3 1066.279038 291.275205 1495.511 1 0.65 0.096823 0.462968 0.007136 0.167753 0.121655 0.000804 0.061837 0.006628 0.122000 0.045995 0.002421 0.000803 0.0 -12759.875643 -80.066770 -3095.084610 -1699.479235 -2119.422207 -955.366577 -609.283904 -70.253349 -0.0 3337.176747 -12961.445800 -76.459662 -3187.290335 -1765.515721 -2157.830588 -1077.459984 -630.715903 -69.210751 -0.0 3372.902185 6.971930 0.65 50.2003 1.0289 15.4337 8.877334 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.0 0.096823 489.9 102.6 50.2003 1.0289 15.4337 0.9561 8.0178 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.1029 489.9 102.6 0.1029 489.9 102.6 40.2069 0 0 0 12.3359 0 46.5096 0 0 0 0 0 7436.5 10.1 1222.361 1222.361 86.36 0.311 87.05 1 -8.05 -0.7 2.680 6.67 96.9959 0 N 0 3.0041 PetrologDefault 08:21:15 1495.511 1 0.969959 3 0.65
4 1031.735153 281.838860 1484.230 1 0.65 0.096445 0.464443 0.007218 0.169688 0.116454 0.000813 0.061613 0.006575 0.123408 0.046526 0.002449 0.000813 0.0 -12800.521565 -80.994067 -3130.789539 -1626.819177 -2111.747851 -966.392392 -616.316520 -71.046416 -0.0 3335.684853 -13002.733814 -77.345183 -3224.058949 -1690.032319 -2150.017156 -1089.894870 -637.995897 -69.992049 -0.0 3371.394320 6.938997 0.65 50.3062 1.0397 15.5950 8.832002 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.0 0.096445 428.7 103.5 50.3062 1.0397 15.5950 0.9475 7.9802 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.1040 428.7 103.5 0.1040 428.7 103.5 40.1725 0 0 0 12.5558 0 46.3589 0 0 0 0 0 7162.8 10.2 1211.080 1211.080 85.84 0.312 86.81 1 -8.18 -0.7 2.679 6.83 95.9923 0 N 0 4.0077 PetrologDefault 08:21:15 1484.230 1 0.959923 4 0.65

plot results against FeO content

[5]:
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10,5))
ax1.plot(Smythe_FixedSulf['FeOt_Liq'], Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017'],
         '-r')
ax1.plot(Smythe_FixedSulf['FeOt_Liq'],
         Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017']+Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017_1sigma'],
         ':r')
ax1.plot(Smythe_FixedSulf['FeOt_Liq'],
         Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017']-Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017_1sigma'],
         ':r')
ax1.set_ylabel('SCSS (ppm) Smythe et al. (2017)')
ax1.set_xlabel('FeO$_{T}$ Liq (Wt%)')

ax2.plot(Smythe_FixedSulf['MgO_Liq'], Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017'],
         '-r')
ax2.plot(Smythe_FixedSulf['MgO_Liq'],
         Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017']+Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017_1sigma'],
         ':r')
ax2.plot(Smythe_FixedSulf['MgO_Liq'],
         Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017']-Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017_1sigma'],
         ':r')
ax2.set_ylabel('SCSS (ppm) Smythe et al. (2017)')
ax2.set_xlabel('MgO Liq (Wt%)')
[5]:
Text(0.5, 0, 'MgO Liq (Wt%)')
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_11_1.png

Example 1b: Using the ONeill model

[6]:
ONeill_FixedSulf=ss.calculate_O2021_SCSS(df=df_out,
T_K=df_out['T_K'], P_kbar=df_out['P_kbar'],
Fe3Fet_Liq=df_out['Fe3Fet_Liq'],
Fe_FeNiCu_Sulf=0.65)

ONeill_FixedSulf.head()
Using inputted Fe_FeNiCu_Sulf ratio for calculations.
[6]:
SCSS2_ppm LnS Ln_a_FeO Ln_a_FeS DeltaG LnCS2_calc SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq Ni_Liq_ppm Cu_Liq_ppm SiO2_magma TiO2_magma Al2O3_magma Fe2O3_magma FeO_magma MnO_magma MgO_magma CaO_magma Na2O_magma K2O_magma P2O5_magma Cr2O3_magma Ni_magma Cu_magma Cr2O3_Liq Ni_Liq Cu_Liq SiO2_cumulate TiO2_cumulate Al2O3_cumulate Fe2O3_cumulate FeO_cumulate MnO_cumulate MgO_cumulate CaO_cumulate Na2O_cumulate K2O_cumulate P2O5_cumulate Cr2O3_cumulate Ni_cumulate Cu_cumulate Temperature Temperature_Olv Olv_Fo_magma Olv_Kd Olv_Fo_cumulate Pressure(kbar) Lg(fO2) dNNO density Ln(viscosity) Melt_%_magma Olv_%_magma Olv_Peritectic Fluid_%_magma Olv_%_cumulate Sample Unnamed:58 T_K P_kbar Fraction_melt Sample_ID_Liq Fe_FeNiCu_Sulf_calc
0 1117.435082 7.018791 -2.405572 -0.495104 7.309272 -2.200950 49.9010 0.9981 14.9715 8.980926 0.0998 9.9763 11.9772 2.4953 0.1996 0 0.0 0.098489 697.8 99.8 49.9010 0.9981 14.9715 0.9839 8.0964 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0998 697.8 99.8 0.0998 697.8 99.8 40.2986 0 0 0 11.7372 0 46.9121 0 0 0 0 0 8257.6 10.0 1253.281 1253.281 87.69 0.308 87.69 1 -7.72 -0.7 2.683 6.25 99.9900 0 N 0 0.0100 PetrologDefault 08:21:15 1526.431 1 0.999900 0 0.65
1 1085.704562 6.989984 -2.401368 -0.495001 7.373234 -2.289616 49.9978 1.0081 15.1220 8.951296 0.1008 9.6064 12.0976 2.5203 0.2016 0 0.0 0.097851 624.6 100.7 49.9978 1.0081 15.1220 0.9743 8.0754 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.1008 624.6 100.7 0.1008 624.6 100.7 40.2698 0 0 0 11.9273 0 46.7855 0 0 0 0 0 7984.5 10.0 1243.430 1243.430 87.28 0.309 87.49 1 -7.83 -0.7 2.682 6.38 98.9950 0 N 0 1.0050 PetrologDefault 08:21:15 1516.580 1 0.989950 1 0.65
2 1053.015445 6.959413 -2.397406 -0.494856 7.441489 -2.384626 50.0982 1.0185 15.2770 8.916645 0.1018 9.2279 12.2216 2.5462 0.2037 0 0.0 0.097284 554.8 101.6 50.0982 1.0185 15.2770 0.9649 8.0492 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.1018 554.8 101.6 0.1018 554.8 101.6 40.2390 0 0 0 12.1280 0 46.6507 0 0 0 0 0 7708.8 10.1 1233.064 1233.064 86.83 0.310 87.27 1 -7.94 -0.7 2.681 6.52 97.9904 0 N 0 2.0096 PetrologDefault 08:21:15 1506.214 1 0.979904 2 0.65
3 1020.044506 6.927602 -2.393819 -0.494668 7.513007 -2.484556 50.2003 1.0289 15.4337 8.877334 0.1029 8.8486 12.3469 2.5723 0.2058 0 0.0 0.096823 489.9 102.6 50.2003 1.0289 15.4337 0.9561 8.0178 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.1029 489.9 102.6 0.1029 489.9 102.6 40.2069 0 0 0 12.3359 0 46.5096 0 0 0 0 0 7436.5 10.1 1222.361 1222.361 86.36 0.311 87.05 1 -8.05 -0.7 2.680 6.67 96.9959 0 N 0 3.0041 PetrologDefault 08:21:15 1495.511 1 0.969959 3 0.65
4 986.093004 6.893751 -2.390570 -0.494430 7.589560 -2.591950 50.3062 1.0397 15.5950 8.832002 0.1040 8.4612 12.4760 2.5992 0.2079 0 0.0 0.096445 428.7 103.5 50.3062 1.0397 15.5950 0.9475 7.9802 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.1040 428.7 103.5 0.1040 428.7 103.5 40.1725 0 0 0 12.5558 0 46.3589 0 0 0 0 0 7162.8 10.2 1211.080 1211.080 85.84 0.312 86.81 1 -8.18 -0.7 2.679 6.83 95.9923 0 N 0 4.0077 PetrologDefault 08:21:15 1484.230 1 0.959923 4 0.65
[7]:
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10,5))
ax1.plot(Smythe_FixedSulf['FeOt_Liq'], Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017'],
         '-r', label='S2017')
ax1.plot(Smythe_FixedSulf['FeOt_Liq'],
         Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017']+Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017_1sigma'],
         ':r', label='S2017+-σ')
ax1.plot(Smythe_FixedSulf['FeOt_Liq'],
         Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017']-Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017_1sigma'],
         ':r')
ax1.plot(ONeill_FixedSulf['FeOt_Liq'],
         ONeill_FixedSulf['SCSS2_ppm'],
         '-b', label='ONeill 2021')
ax1.set_ylabel('SCSS (ppm)')
ax1.set_xlabel('FeO$_{T}$ Liq (Wt%)')

ax2.plot(Smythe_FixedSulf['MgO_Liq'], Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017'],
         '-r')
ax2.plot(Smythe_FixedSulf['MgO_Liq'],
         Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017']+Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017_1sigma'],
         ':r')
ax2.plot(Smythe_FixedSulf['MgO_Liq'],
         Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017']-Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017_1sigma'],
         ':r')
ax2.plot(ONeill_FixedSulf['MgO_Liq'],
         ONeill_FixedSulf['SCSS2_ppm'],
         '-b', label='ONeill 2021')
ax2.set_ylabel('SCSS (ppm)')
ax2.set_xlabel('MgO Liq (Wt%)')
ax1.legend()
[7]:
<matplotlib.legend.Legend at 0x24d89e3e250>
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_14_1.png

Example 1c: Using the Li and Zhang (2022 model)

[8]:
LZ2022_FixedSulf=ss.calculate_LiZhang2022_SCSS(df=df_out,
T_K=df_out['T_K'], P_kbar=df_out['P_kbar'],
Fe3Fet_Liq=df_out['Fe3Fet_Liq'],
Fe_FeNiCu_Sulf=0.65)
LZ2022_FixedSulf.head()
Using inputted Fe_FeNiCu_Sulf ratio for calculations.
replacing Fe3Fet_Liq in the original dataframe with that input into the function
c:\Users\penny\anaconda3\Lib\site-packages\pandas\core\arraylike.py:396: RuntimeWarning: divide by zero encountered in log
  result = getattr(ufunc, method)(*inputs, **kwargs)
[8]:
SCSS_Tot SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq Ni_Liq_ppm Cu_Liq_ppm SiO2_magma TiO2_magma Al2O3_magma Fe2O3_magma FeO_magma MnO_magma MgO_magma CaO_magma Na2O_magma K2O_magma P2O5_magma Cr2O3_magma Ni_magma Cu_magma Cr2O3_Liq Ni_Liq Cu_Liq SiO2_cumulate TiO2_cumulate Al2O3_cumulate Fe2O3_cumulate FeO_cumulate MnO_cumulate MgO_cumulate CaO_cumulate Na2O_cumulate K2O_cumulate P2O5_cumulate Cr2O3_cumulate Ni_cumulate Cu_cumulate Temperature Temperature_Olv Olv_Fo_magma Olv_Kd Olv_Fo_cumulate Pressure(kbar) Lg(fO2) dNNO density Ln(viscosity) Melt_%_magma Olv_%_magma Olv_Peritectic Fluid_%_magma Olv_%_cumulate Sample Unnamed:58 T_K P_kbar Fraction_melt Sample_ID_Liq Fe_FeNiCu_Sulf_calc lnCHS_NKA_term NaKAl DeltaGRT SumXMAM lnCs lnXFeO LnrFeO lnaFeS C1PC2erf lnS S2_calc lnXH2Ot KOH XOH lnXOH XH2Om lnXH2Om lnXOH_XH2O lnCHScalc HScal NaKAlterm HScal2 Si_cat Ti_cat Al_cat Fe_cat Mn_cat Mg_cat Ca_cat Na_cat K_cat P_cat H_cat Fe3_cat
0 944.864154 49.9010 0.9981 14.9715 8.980926 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0 0.098489 697.8 99.8 49.9010 0.9981 14.9715 0.9839 8.0964 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0998 697.8 99.8 0.0998 697.8 99.8 40.2986 0 0 0 11.7372 0 46.9121 0 0 0 0 0 8257.6 10.0 1253.281 1253.281 87.69 0.308 87.69 1 -7.72 -0.7 2.683 6.25 99.9900 0 N 0 0.0100 PetrologDefault 08:21:15 1526.431 1 0.999900 0 0.65 -inf -0.115398 7.303803 4.316075 -2.369795 2.776639 -0.371351 -0.495052 0.006797 6.851041 944.864154 -inf 0.894569 -0.0 -inf 0.0 -inf -inf -inf 0.0 -2.283851 0.0 0.458757 0.006902 0.162217 0.062247 0.000777 0.136726 0.117978 0.044478 0.002341 0.000777 0.0 0.006800
1 918.799931 49.9978 1.0081 15.1220 8.951296 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.0 0.097851 624.6 100.7 49.9978 1.0081 15.1220 0.9743 8.0754 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.1008 624.6 100.7 0.1008 624.6 100.7 40.2698 0 0 0 11.9273 0 46.7855 0 0 0 0 0 7984.5 10.0 1243.430 1243.430 87.28 0.309 87.49 1 -7.83 -0.7 2.682 6.38 98.9950 0 N 0 1.0050 PetrologDefault 08:21:15 1516.580 1 0.989950 1 0.65 -inf -0.116681 7.367736 4.328636 -2.457638 2.778198 -0.377121 -0.494949 0.006841 6.823068 918.799931 -inf 0.886706 -0.0 -inf 0.0 -inf -inf -inf 0.0 -2.335989 0.0 0.460124 0.006978 0.164017 0.062150 0.000786 0.131793 0.119288 0.044970 0.002367 0.000785 0.0 0.006741
2 891.807650 50.0982 1.0185 15.2770 8.916645 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.0 0.097284 554.8 101.6 50.0982 1.0185 15.2770 0.9649 8.0492 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.1018 554.8 101.6 0.1018 554.8 101.6 40.2390 0 0 0 12.1280 0 46.6507 0 0 0 0 0 7708.8 10.1 1233.064 1233.064 86.83 0.310 87.27 1 -7.94 -0.7 2.681 6.52 97.9904 0 N 0 2.0096 PetrologDefault 08:21:15 1506.214 1 0.979904 2 0.65 -inf -0.118000 7.435962 4.341439 -2.551906 2.780390 -0.383281 -0.494803 0.006888 6.793250 891.807650 -inf 0.878358 -0.0 -inf 0.0 -inf -inf -inf 0.0 -2.390696 0.0 0.461536 0.007058 0.165874 0.062014 0.000794 0.126734 0.120638 0.045480 0.002394 0.000794 0.0 0.006683
3 864.417345 50.2003 1.0289 15.4337 8.877334 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.0 0.096823 489.9 102.6 50.2003 1.0289 15.4337 0.9561 8.0178 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.1029 489.9 102.6 0.1029 489.9 102.6 40.2069 0 0 0 12.3359 0 46.5096 0 0 0 0 0 7436.5 10.1 1222.361 1222.361 86.36 0.311 87.05 1 -8.05 -0.7 2.680 6.67 96.9959 0 N 0 3.0041 PetrologDefault 08:21:15 1495.511 1 0.969959 3 0.65 -inf -0.119336 7.507449 4.354223 -2.651232 2.783245 -0.389729 -0.494615 0.006938 6.762056 864.417345 -inf 0.869664 -0.0 -inf 0.0 -inf -inf -inf 0.0 -2.447215 0.0 0.462964 0.007137 0.167752 0.061838 0.000804 0.121653 0.122003 0.045995 0.002421 0.000803 0.0 0.006629
4 836.086510 50.3062 1.0397 15.5950 8.832002 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.0 0.096445 428.7 103.5 50.3062 1.0397 15.5950 0.9475 7.9802 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.1040 428.7 103.5 0.1040 428.7 103.5 40.1725 0 0 0 12.5558 0 46.3589 0 0 0 0 0 7162.8 10.2 1211.080 1211.080 85.84 0.312 86.81 1 -8.18 -0.7 2.679 6.83 95.9923 0 N 0 4.0077 PetrologDefault 08:21:15 1484.230 1 0.959923 4 0.65 -inf -0.120713 7.583970 4.367258 -2.758111 2.786873 -0.396613 -0.494376 0.006991 6.728732 836.086510 -inf 0.860418 -0.0 -inf 0.0 -inf -inf -inf 0.0 -2.506736 0.0 0.464439 0.007220 0.169687 0.061614 0.000813 0.116452 0.123411 0.046526 0.002449 0.000813 0.0 0.006577

Example 1d: Using the Fortin et al. (2015) model at a fixed water content

[9]:
F2015_3H=ss.calculate_F2015_SCSS(df=df_out, T_K=df_out['T_K'],
P_kbar=df_out['P_kbar'], H2O_Liq=3)
F2015_3H.head()
[9]:
SCSS2_ppm SiO2_Liq_mol_frac MgO_Liq_mol_frac MnO_Liq_mol_frac FeOt_Liq_mol_frac CaO_Liq_mol_frac Al2O3_Liq_mol_frac Na2O_Liq_mol_frac K2O_Liq_mol_frac TiO2_Liq_mol_frac P2O5_Liq_mol_frac H2O_Liq_mol_frac Cr2O3_Liq_mol_frac SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq Ni_Liq_ppm Cu_Liq_ppm SiO2_magma TiO2_magma Al2O3_magma Fe2O3_magma FeO_magma MnO_magma MgO_magma CaO_magma Na2O_magma K2O_magma P2O5_magma Cr2O3_magma Ni_magma Cu_magma Cr2O3_Liq Ni_Liq Cu_Liq SiO2_cumulate TiO2_cumulate Al2O3_cumulate Fe2O3_cumulate FeO_cumulate MnO_cumulate MgO_cumulate CaO_cumulate Na2O_cumulate K2O_cumulate P2O5_cumulate Cr2O3_cumulate Ni_cumulate Cu_cumulate Temperature Temperature_Olv Olv_Fo_magma Olv_Kd Olv_Fo_cumulate Pressure(kbar) Lg(fO2) dNNO density Ln(viscosity) Melt_%_magma Olv_%_magma Olv_Peritectic Fluid_%_magma Olv_%_cumulate Sample Unnamed:58 T_K P_kbar Fraction_melt Sample_ID_Liq
0 2094.796875 0.464555 0.138454 0.000787 0.069921 0.119469 0.082133 0.022520 0.001185 0.006989 0.000393 0.093226 0.000367 49.9010 0.9981 14.9715 8.980926 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 3 0.098489 697.8 99.8 49.9010 0.9981 14.9715 0.9839 8.0964 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0998 697.8 99.8 0.0998 697.8 99.8 40.2986 0 0 0 11.7372 0 46.9121 0 0 0 0 0 8257.6 10.0 1253.281 1253.281 87.69 0.308 87.69 1 -7.72 -0.7 2.683 6.25 99.9900 0 N 0 0.0100 PetrologDefault 08:21:15 1526.431 1 0.999900 0
1 2030.706171 0.466442 0.133603 0.000797 0.069837 0.120926 0.083135 0.022794 0.001200 0.007074 0.000398 0.093424 0.000372 49.9978 1.0081 15.1220 8.951296 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 3 0.097851 624.6 100.7 49.9978 1.0081 15.1220 0.9743 8.0754 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.1008 624.6 100.7 0.1008 624.6 100.7 40.2698 0 0 0 11.9273 0 46.7855 0 0 0 0 0 7984.5 10.0 1243.430 1243.430 87.28 0.309 87.49 1 -7.83 -0.7 2.682 6.38 98.9950 0 N 0 1.0050 PetrologDefault 08:21:15 1516.580 1 0.989950 1
2 1964.563286 0.468395 0.128618 0.000806 0.069718 0.122431 0.084170 0.023078 0.001215 0.007163 0.000403 0.093627 0.000376 50.0982 1.0185 15.2770 8.916645 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 3 0.097284 554.8 101.6 50.0982 1.0185 15.2770 0.9649 8.0492 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.1018 554.8 101.6 0.1018 554.8 101.6 40.2390 0 0 0 12.1280 0 46.6507 0 0 0 0 0 7708.8 10.1 1233.064 1233.064 86.83 0.310 87.27 1 -7.94 -0.7 2.681 6.52 97.9904 0 N 0 2.0096 PetrologDefault 08:21:15 1506.214 1 0.979904 2
3 1897.743399 0.470376 0.123601 0.000817 0.069563 0.123957 0.085219 0.023366 0.001230 0.007252 0.000408 0.093831 0.000381 50.2003 1.0289 15.4337 8.877334 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 3 0.096823 489.9 102.6 50.2003 1.0289 15.4337 0.9561 8.0178 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.1029 489.9 102.6 0.1029 489.9 102.6 40.2069 0 0 0 12.3359 0 46.5096 0 0 0 0 0 7436.5 10.1 1222.361 1222.361 86.36 0.311 87.05 1 -8.05 -0.7 2.680 6.67 96.9959 0 N 0 3.0041 PetrologDefault 08:21:15 1495.511 1 0.969959 3
4 1828.862700 0.472425 0.118455 0.000827 0.069363 0.125534 0.086303 0.023663 0.001245 0.007344 0.000413 0.094042 0.000386 50.3062 1.0397 15.5950 8.832002 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 3 0.096445 428.7 103.5 50.3062 1.0397 15.5950 0.9475 7.9802 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.1040 428.7 103.5 0.1040 428.7 103.5 40.1725 0 0 0 12.5558 0 46.3589 0 0 0 0 0 7162.8 10.2 1211.080 1211.080 85.84 0.312 86.81 1 -8.18 -0.7 2.679 6.83 95.9923 0 N 0 4.0077 PetrologDefault 08:21:15 1484.230 1 0.959923 4

Calculate expected FC trajectory

[10]:
FC=ss.crystallize_S_incomp(S_init=1000, F_melt=df_out['Fraction_melt'])

Simple figure for paper

[11]:
MI_data=pd.read_excel('MI_Data.xlsx')
fig, (ax1) = plt.subplots(1, 1, figsize=(4,3.5))
ax1.plot(df_out['MgO_Liq'], FC,
':k', label='Incompatible Behavoir')
ax1.plot(Smythe_FixedSulf['MgO_Liq'],
Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017'], '-r',
label='S2017 SCSS')
ax1.plot(LZ2022_FixedSulf['MgO_Liq'],
LZ2022_FixedSulf['SCSS_Tot'], '-c', label='LZ22 SCSS')
ax1.plot(ONeill_FixedSulf['MgO_Liq'],
ONeill_FixedSulf['SCSS2_ppm'], '-b', label='O2021 SCSS')
ax1.plot(MI_data['MgO_Liq'], MI_data['S_ppm'],
'^k', mfc='yellow', label='MI')
ax1.set_ylabel('S (ppm)')
ax1.set_xlabel('MgO Liq (wt%)')
ax1.legend(fontsize=8)
plt.xlim([4, 10])
plt.ylim([200, 1300])
fig.savefig('SCSS_Models.png', dpi=200, bbox_inches='tight')
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_22_0.png
[12]:

fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10,5)) ax1.plot(Smythe_FixedSulf['FeOt_Liq'], Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017'], '-r', label='S2017') ax1.plot(LZ2022_FixedSulf['FeOt_Liq'], LZ2022_FixedSulf['SCSS_Tot'], '-c', label='LiZhang2022') ax1.plot(ONeill_FixedSulf['FeOt_Liq'], ONeill_FixedSulf['SCSS2_ppm'], '-b', label='ONeill 2021') ax1.set_ylabel('SCSS (ppm)') ax1.set_xlabel('FeO$_{T}$ Liq (Wt%)') ax2.plot(Smythe_FixedSulf['MgO_Liq'], Smythe_FixedSulf['SCSS2_ppm_ideal_Smythe2017'], '-r') ax2.plot(LZ2022_FixedSulf['MgO_Liq'], LZ2022_FixedSulf['SCSS_Tot'], '-c', label='LiZhang2022') ax2.plot(ONeill_FixedSulf['MgO_Liq'], ONeill_FixedSulf['SCSS2_ppm'], '-b', label='ONeill 2021') ax2.set_ylabel('SCSS (ppm)') ax2.set_xlabel('MgO Liq (Wt%)') ax1.legend()
[12]:
<matplotlib.legend.Legend at 0x24d8b144950>
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_23_1.png

Example 1e - Calculated sulfide composition

  • We can use the Smythe 2017 SCSS model with the Symthe or ONeill calc sulfide model

[13]:
Smythe_ONeillSulf=ss.calculate_S2017_SCSS(df=df_out, T_K=df_out['T_K'],
P_kbar=df_out['P_kbar'], Fe_FeNiCu_Sulf="Calc_ONeill",
Ni_Liq=df_out['Ni_Liq_ppm'],
Cu_Liq=df_out['Cu_Liq_ppm'],
Fe3Fet_Liq=df_out['Fe3Fet_Liq'])

Smythe_ONeillSulf.head()
no non ideal SCSS as no Cu/CuFeNiCu
[13]:
SCSS2_ppm_ideal_Smythe2017 SCSS2_ppm_ideal_Smythe2017_1sigma T_Input_K P_Input_kbar Fe_FeNiCu_Sulf Fe3Fet_Liq_input Si_wt_atom Ti_wt_atom Al_wt_atom Mg_wt_atom Mn_wt_atom Fe2_wt_atom Fe3_wt_atom Ca_wt_atom Na_wt_atom K_wt_atom P_wt_atom H_wt_atom Si_XA_ideal Ti_XA_ideal Al_XA_ideal Mg_XA_ideal Fe2_XA_ideal Ca_XA_ideal Na_XA_ideal K_XA_ideal H_XA_ideal Si*Fe_ideal Si_XA_non_ideal Ti_XA_non_ideal Al_XA_non_ideal Mg_XA_non_ideal Fe2_XA_non_ideal Ca_XA_non_ideal Na_XA_non_ideal K_XA_non_ideal H_XA_non_ideal Si*Fe_non_ideal log_SCSS_ideal Fe_FeNiCu_Sulf_calc SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq Ni_Liq_ppm Cu_Liq_ppm SiO2_magma TiO2_magma Al2O3_magma Fe2O3_magma FeO_magma MnO_magma MgO_magma CaO_magma Na2O_magma K2O_magma P2O5_magma Cr2O3_magma Ni_magma Cu_magma Cr2O3_Liq Ni_Liq Cu_Liq SiO2_cumulate TiO2_cumulate Al2O3_cumulate Fe2O3_cumulate FeO_cumulate MnO_cumulate MgO_cumulate CaO_cumulate Na2O_cumulate K2O_cumulate P2O5_cumulate Cr2O3_cumulate Ni_cumulate Cu_cumulate Temperature Temperature_Olv Olv_Fo_magma Olv_Kd Olv_Fo_cumulate Pressure(kbar) Lg(fO2) dNNO density Ln(viscosity) Melt_%_magma Olv_%_magma Olv_Peritectic Fluid_%_magma Olv_%_cumulate Sample Unnamed:58 T_K P_kbar Fraction_melt Sample_ID_Liq Fe_FeNiCu_Sulf_calc
0 737.138239 201.363887 1526.431 1 0.411762 0.098489 0.458760 0.006900 0.162217 0.136728 0.000777 0.062247 0.006799 0.117975 0.044478 0.002341 0.000777 0.0 -12643.917846 -77.425761 -2992.954217 -1910.042747 -2133.469827 -923.846254 -589.186980 -67.922629 -0.0 3328.767457 -12843.656196 -73.937634 -3082.117373 -1984.261077 -2172.132780 -1041.911444 -609.912056 -66.914620 -0.0 3364.402871 6.602775 0.411762 49.9010 0.9981 14.9715 8.980926 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0 0.098489 697.8 99.8 49.9010 0.9981 14.9715 0.9839 8.0964 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0998 697.8 99.8 0.0998 697.8 99.8 40.2986 0 0 0 11.7372 0 46.9121 0 0 0 0 0 8257.6 10.0 1253.281 1253.281 87.69 0.308 87.69 1 -7.72 -0.7 2.683 6.25 99.9900 0 N 0 0.0100 PetrologDefault 08:21:15 1526.431 1 0.999900 0 0.411762
1 751.679396 205.336092 1516.580 1 0.431546 0.097851 0.460128 0.006977 0.164018 0.131795 0.000786 0.062150 0.006740 0.119285 0.044970 0.002367 0.000785 0.0 -12681.596545 -78.282676 -3026.179002 -1841.131776 -2130.145227 -934.101871 -595.707729 -68.674435 -0.0 3333.484439 -12881.930112 -74.755944 -3116.331958 -1912.672440 -2168.747932 -1053.477703 -616.662177 -67.655269 -0.0 3369.170350 6.622310 0.431546 49.9978 1.0081 15.1220 8.951296 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.0 0.097851 624.6 100.7 49.9978 1.0081 15.1220 0.9743 8.0754 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.1008 624.6 100.7 0.1008 624.6 100.7 40.2698 0 0 0 11.9273 0 46.7855 0 0 0 0 0 7984.5 10.0 1243.430 1243.430 87.28 0.309 87.49 1 -7.83 -0.7 2.682 6.38 98.9950 0 N 0 1.0050 PetrologDefault 08:21:15 1516.580 1 0.989950 1 0.431546
2 764.865429 208.938117 1506.214 1 0.452162 0.097284 0.461540 0.007056 0.165875 0.126736 0.000794 0.062014 0.006682 0.120635 0.045480 0.002394 0.000794 0.0 -12720.511949 -79.173986 -3060.433090 -1770.461624 -2125.481450 -944.675207 -602.466551 -69.463239 -0.0 3336.392958 -12921.460271 -75.607099 -3151.606511 -1839.256265 -2163.999637 -1065.402284 -623.658745 -68.432367 -0.0 3372.110005 6.639700 0.452162 50.0982 1.0185 15.2770 8.916645 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.0 0.097284 554.8 101.6 50.0982 1.0185 15.2770 0.9649 8.0492 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.1018 554.8 101.6 0.1018 554.8 101.6 40.2390 0 0 0 12.1280 0 46.6507 0 0 0 0 0 7708.8 10.1 1233.064 1233.064 86.83 0.310 87.27 1 -7.94 -0.7 2.681 6.52 97.9904 0 N 0 2.0096 PetrologDefault 08:21:15 1506.214 1 0.979904 2 0.452162
3 775.897941 211.951866 1495.511 1 0.472985 0.096823 0.462968 0.007136 0.167753 0.121655 0.000804 0.061837 0.006628 0.122000 0.045995 0.002421 0.000803 0.0 -12759.875643 -80.066770 -3095.084610 -1699.479235 -2119.422207 -955.366577 -609.283904 -70.253349 -0.0 3337.176747 -12961.445800 -76.459662 -3187.290335 -1765.515721 -2157.830588 -1077.459984 -630.715903 -69.210751 -0.0 3372.902185 6.654021 0.472985 50.2003 1.0289 15.4337 8.877334 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.0 0.096823 489.9 102.6 50.2003 1.0289 15.4337 0.9561 8.0178 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.1029 489.9 102.6 0.1029 489.9 102.6 40.2069 0 0 0 12.3359 0 46.5096 0 0 0 0 0 7436.5 10.1 1222.361 1222.361 86.36 0.311 87.05 1 -8.05 -0.7 2.680 6.67 96.9959 0 N 0 3.0041 PetrologDefault 08:21:15 1495.511 1 0.969959 3 0.472985
4 784.772165 214.376036 1484.230 1 0.494412 0.096445 0.464443 0.007218 0.169688 0.116454 0.000813 0.061613 0.006575 0.123408 0.046526 0.002449 0.000813 0.0 -12800.521565 -80.994067 -3130.789539 -1626.819177 -2111.747851 -966.392392 -616.316520 -71.046416 -0.0 3335.684853 -13002.733814 -77.345183 -3224.058949 -1690.032319 -2150.017156 -1089.894870 -637.995897 -69.992049 -0.0 3371.394320 6.665393 0.494412 50.3062 1.0397 15.5950 8.832002 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.0 0.096445 428.7 103.5 50.3062 1.0397 15.5950 0.9475 7.9802 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.1040 428.7 103.5 0.1040 428.7 103.5 40.1725 0 0 0 12.5558 0 46.3589 0 0 0 0 0 7162.8 10.2 1211.080 1211.080 85.84 0.312 86.81 1 -8.18 -0.7 2.679 6.83 95.9923 0 N 0 4.0077 PetrologDefault 08:21:15 1484.230 1 0.959923 4 0.494412
[14]:
Smythe_SmytheSulf=ss.calculate_S2017_SCSS(df=df_out, T_K=df_out['T_K'],
P_kbar=df_out['P_kbar'], Fe_FeNiCu_Sulf="Calc_Smythe", Ni_Liq=df_out['Ni_Liq_ppm'],
Cu_Liq=df_out['Cu_Liq_ppm'], Fe3Fet_Liq=df_out['Fe3Fet_Liq'])

Smythe_SmytheSulf.head()
[14]:
SCSS2_ppm_ideal_Smythe2017 SCSS2_ppm_ideal_Smythe2017_1sigma SCSS2_ppm_non_ideal_Smythe2017 SCSS2_ppm_non_ideal_Smythe2017_1sigma T_Input_K P_Input_kbar Fe_FeNiCu_Sulf Fe3Fet_Liq_input Si_wt_atom Ti_wt_atom Al_wt_atom Mg_wt_atom Mn_wt_atom Fe2_wt_atom Fe3_wt_atom Ca_wt_atom Na_wt_atom K_wt_atom P_wt_atom H_wt_atom Si_XA_ideal Ti_XA_ideal Al_XA_ideal Mg_XA_ideal Fe2_XA_ideal Ca_XA_ideal Na_XA_ideal K_XA_ideal H_XA_ideal Si*Fe_ideal Si_XA_non_ideal Ti_XA_non_ideal Al_XA_non_ideal Mg_XA_non_ideal Fe2_XA_non_ideal Ca_XA_non_ideal Na_XA_non_ideal K_XA_non_ideal H_XA_non_ideal Si*Fe_non_ideal log_SCSS_ideal log_SCSS_non_ideal Fe_FeNiCu_Sulf_calc SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq Ni_Liq_ppm Cu_Liq_ppm SiO2_magma TiO2_magma Al2O3_magma Fe2O3_magma FeO_magma MnO_magma MgO_magma CaO_magma Na2O_magma K2O_magma P2O5_magma Cr2O3_magma Ni_magma Cu_magma Cr2O3_Liq Ni_Liq Cu_Liq SiO2_cumulate TiO2_cumulate Al2O3_cumulate Fe2O3_cumulate FeO_cumulate MnO_cumulate MgO_cumulate CaO_cumulate Na2O_cumulate K2O_cumulate P2O5_cumulate Cr2O3_cumulate Ni_cumulate Cu_cumulate Temperature Temperature_Olv Olv_Fo_magma Olv_Kd Olv_Fo_cumulate Pressure(kbar) Lg(fO2) dNNO density Ln(viscosity) Melt_%_magma Olv_%_magma Olv_Peritectic Fluid_%_magma Olv_%_cumulate Sample Unnamed:58 T_K P_kbar Fraction_melt Sample_ID_Liq Ni_Sulf_Calc Cu_Sulf_Calc Fe_Sulf_Calc O_Sulf_Calc S_Sulf_Calc DCu DNi Fe_FeNiCu_Sulf_calc Cu_FeNiCu_Sulf_calc Ni_FeNiCu_Sulf_calc
0 404.163237 110.405181 416.652720 111.370889 1526.431 1 0.225764 0.098489 0.458760 0.006900 0.162217 0.136728 0.000777 0.062247 0.006799 0.117975 0.044478 0.002341 0.000777 0.0 -12643.917846 -77.425761 -2992.954217 -1910.042747 -2133.469827 -923.846254 -589.186980 -67.922629 -0.0 3328.767457 -12843.656196 -73.937634 -3082.117373 -1984.261077 -2172.132780 -1041.911444 -609.912056 -66.914620 -0.0 3364.402871 6.001819 6.032253 0.225764 49.9010 0.9981 14.9715 8.980926 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0 0.098489 697.8 99.8 49.9010 0.9981 14.9715 0.9839 8.0964 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0998 697.8 99.8 0.0998 697.8 99.8 40.2986 0 0 0 11.7372 0 46.9121 0 0 0 0 0 8257.6 10.0 1253.281 1253.281 87.69 0.308 87.69 1 -7.72 -0.7 2.683 6.25 99.9900 0 N 0 0.0100 PetrologDefault 08:21:15 1526.431 1 0.999900 0 30.0 24.842866 14.689696 0.617110 29.850328 695.202539 530.599060 0.225764 0.335540 0.438696
1 426.633338 116.543333 435.666026 116.453129 1516.580 1 0.244934 0.097851 0.460128 0.006977 0.164018 0.131795 0.000786 0.062150 0.006740 0.119285 0.044970 0.002367 0.000785 0.0 -12681.596545 -78.282676 -3026.179002 -1841.131776 -2130.145227 -934.101871 -595.707729 -68.674435 -0.0 3333.484439 -12881.930112 -74.755944 -3116.331958 -1912.672440 -2168.747932 -1053.477703 -616.662177 -67.655269 -0.0 3369.170350 6.055925 6.076876 0.244934 49.9978 1.0081 15.1220 8.951296 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.0 0.097851 624.6 100.7 49.9978 1.0081 15.1220 0.9743 8.0754 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.1008 624.6 100.7 0.1008 624.6 100.7 40.2698 0 0 0 11.9273 0 46.7855 0 0 0 0 0 7984.5 10.0 1243.430 1243.430 87.28 0.309 87.49 1 -7.83 -0.7 2.682 6.38 98.9950 0 N 0 1.0050 PetrologDefault 08:21:15 1516.580 1 0.989950 1 30.0 23.312084 15.905289 0.613639 30.168987 732.559209 599.270479 0.244934 0.315494 0.439572
2 450.330338 123.016637 455.176828 121.668348 1506.214 1 0.266219 0.097284 0.461540 0.007056 0.165875 0.126736 0.000794 0.062014 0.006682 0.120635 0.045480 0.002394 0.000794 0.0 -12720.511949 -79.173986 -3060.433090 -1770.461624 -2125.481450 -944.675207 -602.466551 -69.463239 -0.0 3336.392958 -12921.460271 -75.607099 -3151.606511 -1839.256265 -2163.999637 -1065.402284 -623.658745 -68.432367 -0.0 3372.110005 6.109981 6.120686 0.266219 50.0982 1.0185 15.2770 8.916645 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.0 0.097284 554.8 101.6 50.0982 1.0185 15.2770 0.9649 8.0492 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.1018 554.8 101.6 0.1018 554.8 101.6 40.2390 0 0 0 12.1280 0 46.6507 0 0 0 0 0 7708.8 10.1 1233.064 1233.064 86.83 0.310 87.27 1 -7.94 -0.7 2.681 6.52 97.9904 0 N 0 2.0096 PetrologDefault 08:21:15 1506.214 1 0.979904 2 30.0 21.619458 17.249266 0.609589 30.521686 772.808320 680.273690 0.266219 0.293235 0.440546
3 473.272121 129.283639 473.374878 126.532670 1495.511 1 0.288505 0.096823 0.462968 0.007136 0.167753 0.121655 0.000804 0.061837 0.006628 0.122000 0.045995 0.002421 0.000803 0.0 -12759.875643 -80.066770 -3095.084610 -1699.479235 -2119.422207 -955.366577 -609.283904 -70.253349 -0.0 3337.176747 -12961.445800 -76.459662 -3187.290335 -1765.515721 -2157.830588 -1077.459984 -630.715903 -69.210751 -0.0 3372.902185 6.159671 6.159888 0.288505 50.2003 1.0289 15.4337 8.877334 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.0 0.096823 489.9 102.6 50.2003 1.0289 15.4337 0.9561 8.0178 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.1029 489.9 102.6 0.1029 489.9 102.6 40.2069 0 0 0 12.3359 0 46.5096 0 0 0 0 0 7436.5 10.1 1222.361 1222.361 86.36 0.311 87.05 1 -8.05 -0.7 2.680 6.67 96.9959 0 N 0 3.0041 PetrologDefault 08:21:15 1495.511 1 0.969959 3 30.0 19.855116 18.650002 0.605077 30.889805 815.325100 771.950059 0.288505 0.269928 0.441567
4 493.960136 134.934979 488.892399 130.680489 1484.230 1 0.311198 0.096445 0.464443 0.007218 0.169688 0.116454 0.000813 0.061613 0.006575 0.123408 0.046526 0.002449 0.000813 0.0 -12800.521565 -80.994067 -3130.789539 -1626.819177 -2111.747851 -966.392392 -616.316520 -71.046416 -0.0 3335.684853 -13002.733814 -77.345183 -3224.058949 -1690.032319 -2150.017156 -1089.894870 -637.995897 -69.992049 -0.0 3371.394320 6.202455 6.192142 0.311198 50.3062 1.0397 15.5950 8.832002 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.0 0.096445 428.7 103.5 50.3062 1.0397 15.5950 0.9475 7.9802 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.1040 428.7 103.5 0.1040 428.7 103.5 40.1725 0 0 0 12.5558 0 46.3589 0 0 0 0 0 7162.8 10.2 1211.080 1211.080 85.84 0.312 86.81 1 -8.18 -0.7 2.679 6.83 95.9923 0 N 0 4.0077 PetrologDefault 08:21:15 1484.230 1 0.959923 4 30.0 18.066651 20.069628 0.600093 31.263628 861.422428 875.097626 0.311198 0.246194 0.442608
[15]:
fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(12,4))
ax1.plot(Smythe_ONeillSulf['FeOt_Liq'], Smythe_ONeillSulf['SCSS2_ppm_ideal_Smythe2017'],
         '-g', label='S2017, O2021 Calc Sulf')

ax1.plot(Smythe_SmytheSulf['FeOt_Liq'],
         Smythe_SmytheSulf['SCSS2_ppm_ideal_Smythe2017'],
         '-m', label='S2017, S2017 Calc Sulf')
ax1.set_ylabel('SCSS (ppm)')
ax1.set_xlabel('FeO$_{T}$ Liq (Wt%)')

ax2.plot(Smythe_ONeillSulf['MgO_Liq'], Smythe_ONeillSulf['SCSS2_ppm_ideal_Smythe2017'],
         '-g')
ax2.plot(Smythe_SmytheSulf['MgO_Liq'],
         Smythe_SmytheSulf['SCSS2_ppm_ideal_Smythe2017'],
         '-m', label='S2017, S2017 Calc Sulf')
ax2.set_ylabel('SCSS (ppm)')
ax2.set_xlabel('MgO Liq (Wt%)')
ax1.legend()


ax3.plot(Smythe_SmytheSulf['MgO_Liq'],
         Smythe_SmytheSulf['Fe_FeNiCu_Sulf'],
         '-m')
ax3.plot(Smythe_ONeillSulf['MgO_Liq'],
         Smythe_ONeillSulf['Fe_FeNiCu_Sulf'],
         '-g')
ax3.plot([0, 10], [0.65, 0.65], '-r', label='Av Meas Sulf')
ax3.legend()
ax3.set_ylabel('Fe/(Fe+Ni+Cu) Sulf')
ax3.set_xlabel('MgO Liq (wt%)')
fig.tight_layout()
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_27_0.png

Example 2: SCAS models

  • This petrolog model is for Hawaii, so it is unlikely you would ever want to calculate SCAS, but just incase, we show how to do it here!

[16]:
CD19_SCAS=ss.calculate_CD2019_SCAS(df=df_out, T_K=df_out['T_K'])
ZT22_SCAS=ss.calculate_ZT2022_SCAS(df=df_out, T_K=df_out['T_K'])
[17]:
CD19_SCAS.head()
[17]:
SCAS6_ppm lnXS Xs molesS SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq Ni_Liq_ppm Cu_Liq_ppm SiO2_magma TiO2_magma Al2O3_magma Fe2O3_magma FeO_magma MnO_magma MgO_magma CaO_magma Na2O_magma K2O_magma P2O5_magma Cr2O3_magma Ni_magma Cu_magma Cr2O3_Liq Ni_Liq Cu_Liq SiO2_cumulate TiO2_cumulate Al2O3_cumulate Fe2O3_cumulate FeO_cumulate MnO_cumulate MgO_cumulate CaO_cumulate Na2O_cumulate K2O_cumulate P2O5_cumulate Cr2O3_cumulate Ni_cumulate Cu_cumulate Temperature Temperature_Olv Olv_Fo_magma Olv_Kd Olv_Fo_cumulate Pressure(kbar) Lg(fO2) dNNO density Ln(viscosity) Melt_%_magma Olv_%_magma Olv_Peritectic Fluid_%_magma Olv_%_cumulate Sample Unnamed:58 T_K P_kbar Fraction_melt Sample_ID_Liq SiO2_Liq_mol_prop MgO_Liq_mol_prop MnO_Liq_mol_prop FeOt_Liq_mol_prop CaO_Liq_mol_prop Al2O3_Liq_mol_prop Na2O_Liq_mol_prop K2O_Liq_mol_prop TiO2_Liq_mol_prop P2O5_Liq_mol_prop H2O_Liq_mol_prop Cr2O3_Liq_mol_prop SiO2_Liq_mol_frac MgO_Liq_mol_frac MnO_Liq_mol_frac FeOt_Liq_mol_frac CaO_Liq_mol_frac Al2O3_Liq_mol_frac Na2O_Liq_mol_frac K2O_Liq_mol_frac TiO2_Liq_mol_frac P2O5_Liq_mol_frac H2O_Liq_mol_frac Cr2O3_Liq_mol_frac
0 22381.770953 -3.173787 0.041845 0.069801 49.9010 0.9981 14.9715 8.980926 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0 0.098489 697.8 99.8 49.9010 0.9981 14.9715 0.9839 8.0964 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0998 697.8 99.8 0.0998 697.8 99.8 40.2986 0 0 0 11.7372 0 46.9121 0 0 0 0 0 8257.6 10.0 1253.281 1253.281 87.69 0.308 87.69 1 -7.72 -0.7 2.683 6.25 99.9900 0 N 0 0.0100 PetrologDefault 08:21:15 1526.431 1 0.999900 0 0.833854 0.248519 0.001413 0.125504 0.214442 0.147426 0.040422 0.002128 0.012545 0.0 0.0 0.0 0.512746 0.152817 0.000869 0.077174 0.131863 0.090654 0.024856 0.001308 0.007714 0.0 0.0 0.0
1 24252.043336 -3.093293 0.045352 0.075634 49.9978 1.0081 15.1220 8.951296 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.0 0.097851 624.6 100.7 49.9978 1.0081 15.1220 0.9743 8.0754 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.1008 624.6 100.7 0.1008 624.6 100.7 40.2698 0 0 0 11.9273 0 46.7855 0 0 0 0 0 7984.5 10.0 1243.430 1243.430 87.28 0.309 87.49 1 -7.83 -0.7 2.682 6.38 98.9950 0 N 0 1.0050 PetrologDefault 08:21:15 1516.580 1 0.989950 1 0.835420 0.239289 0.001427 0.125082 0.216584 0.148898 0.040825 0.002149 0.012670 0.0 0.0 0.0 0.514946 0.147496 0.000879 0.077100 0.133501 0.091780 0.025164 0.001324 0.007810 0.0 0.0 0.0
2 26332.709650 -3.010922 0.049246 0.082123 50.0982 1.0185 15.2770 8.916645 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.0 0.097284 554.8 101.6 50.0982 1.0185 15.2770 0.9649 8.0492 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.1018 554.8 101.6 0.1018 554.8 101.6 40.2390 0 0 0 12.1280 0 46.6507 0 0 0 0 0 7708.8 10.1 1233.064 1233.064 86.83 0.310 87.27 1 -7.94 -0.7 2.681 6.52 97.9904 0 N 0 2.0096 PetrologDefault 08:21:15 1506.214 1 0.979904 2 0.837050 0.229848 0.001441 0.124591 0.218792 0.150416 0.041242 0.002171 0.012800 0.0 0.0 0.0 0.517224 0.142026 0.000890 0.076986 0.135194 0.092944 0.025484 0.001341 0.007909 0.0 0.0 0.0
3 28603.678810 -2.928343 0.053486 0.089205 50.2003 1.0289 15.4337 8.877334 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.0 0.096823 489.9 102.6 50.2003 1.0289 15.4337 0.9561 8.0178 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.1029 489.9 102.6 0.1029 489.9 102.6 40.2069 0 0 0 12.3359 0 46.5096 0 0 0 0 0 7436.5 10.1 1222.361 1222.361 86.36 0.311 87.05 1 -8.05 -0.7 2.680 6.67 96.9959 0 N 0 3.0041 PetrologDefault 08:21:15 1495.511 1 0.969959 3 0.838712 0.220389 0.001456 0.124035 0.221023 0.151951 0.041663 0.002193 0.012930 0.0 0.0 0.0 0.519535 0.136518 0.000902 0.076833 0.136911 0.094125 0.025808 0.001359 0.008010 0.0 0.0 0.0
4 31130.910816 -2.844053 0.058189 0.097087 50.3062 1.0397 15.5950 8.832002 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.0 0.096445 428.7 103.5 50.3062 1.0397 15.5950 0.9475 7.9802 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.1040 428.7 103.5 0.1040 428.7 103.5 40.1725 0 0 0 12.5558 0 46.3589 0 0 0 0 0 7162.8 10.2 1211.080 1211.080 85.84 0.312 86.81 1 -8.18 -0.7 2.679 6.83 95.9923 0 N 0 4.0077 PetrologDefault 08:21:15 1484.230 1 0.959923 4 0.840444 0.210731 0.001472 0.123396 0.223324 0.153532 0.042096 0.002215 0.013065 0.0 0.0 0.0 0.521925 0.130866 0.000914 0.076631 0.138687 0.095345 0.026142 0.001376 0.008114 0.0 0.0 0.0
[18]:
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10,5), sharey=True)
ax1.plot(CD19_SCAS['FeOt_Liq'], CD19_SCAS['SCAS6_ppm']/10000, '-r', label='CD19')
ax2.plot(CD19_SCAS['MgO_Liq'], CD19_SCAS['SCAS6_ppm']/10000, '-r', label='CD19')
ax1.plot(ZT22_SCAS['FeOt_Liq'], ZT22_SCAS['SCAS6_ppm']/10000, '-b', label='CD19')
ax2.plot(ZT22_SCAS['MgO_Liq'], ZT22_SCAS['SCAS6_ppm']/10000, '-b', label='CD19')
ax1.set_xlabel('FeOt Liq (Wt%)')
ax2.set_xlabel('MgO Liq (Wt%)')
ax1.set_ylabel('SCAS (wt%)')

[18]:
Text(0, 0.5, 'SCAS (wt%)')
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_31_1.png
[19]:
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10,5), sharey=True)
ax1.plot(ZT22_SCAS['FeOt_Liq'], ZT22_SCAS['SCAS6_ppm'], '-b', label='CD19')
ax2.plot(ZT22_SCAS['MgO_Liq'], ZT22_SCAS['SCAS6_ppm'], '-b', label='CD19')
ax1.set_xlabel('FeOt Liq (Wt%)')
ax2.set_xlabel('MgO Liq (Wt%)')
ax1.set_ylabel('SCAS (wt%)')

[19]:
Text(0, 0.5, 'SCAS (wt%)')
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_32_1.png

Example 3 - Calculating amount of sulfide which has formed

[20]:

# Select inital S content, from other knowledge of the system, highest S melt inclusion etc. S_init=1600 # Amount of S in the sulfide S_sulf=32*10**4 # Which SCSS model you have choosen S_model=ONeill_FixedSulf['SCSS2_ppm']
[21]:
Mass_Frac_S=ss.calculate_mass_frac_sulf(F_melt=df_out['Fraction_melt'],
            S_init=S_init, S_sulf=S_sulf, S_model=S_model)
Mass_Frac_S.head()
[21]:
0    0.001508
1    0.001641
2    0.001775
3    0.001908
4    0.002042
dtype: float64
[22]:
plt.plot(df_out['MgO_Liq'], 100*Mass_Frac_S, '-r')
plt.xlabel('MgO (wt%)')
plt.ylabel('Mass % sulfide')
[22]:
Text(0, 0.5, 'Mass % sulfide')
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_36_1.png

Example 4 - S6 Corrections

  • In reality, we may have some S6+ in our samples. We can use the Nash and Jugo models to try to account for this, based on our Fe3Fet_Liq ratios from Petrolog, or S6+ proportions measured by methods such as XANES

  • We can also use the sulfide and sulfate capacity model of ONeill and Mavrogenes (2022) and ONeill (2021)

First, we use the python package Thermobar (Wieser et al. 2022) to convert our measured Fe3 proportion into a buffer position (needed for Jugo)

  • You will need to pip install Thermobar if it is not already installed

[23]:
#!pip install Thermobar
[24]:
import Thermobar as pt
pt.__version__
[24]:
'1.0.30'

This function converts from a logfo2 value into QFM and NNO buffer positions

  • Petrolog actually uses a slightly different buffer position to Frost (1991), which is used in the Jugo et al. (2010) parameterization

  • If you want to use the Oneill (2022) model, that uses a different QFM position again.

[25]:
Buffer_calc=pt.convert_fo2_to_buffer(fo2=10**df_out['Lg(fO2)'],
                                     T_K=df_out['T_K'],  P_kbar=df_out['P_kbar'])
Buffer_calc.head()
[25]:
DeltaNNO_Frost1991 DeltaQFM_Frost1991 QFM_equation_Choice T_K P_kbar fo2 DeltaQFM_ONeill1987 Cut off T (K)
0 -0.777890 -0.085829 High T 1526.431 1 1.905461e-08 0.110830 871.15
1 -0.781999 -0.089502 High T 1516.580 1 1.479108e-08 0.107427 871.15
2 -0.779077 -0.086116 High T 1506.214 1 1.148154e-08 0.111103 871.15
3 -0.770841 -0.077393 High T 1495.511 1 8.912509e-09 0.120128 871.15
4 -0.774373 -0.080406 High T 1484.230 1 6.606934e-09 0.117438 871.15

Using Jugo

  • To use Jugo, you need to make sure the QFM buffer is relative to frost.

[26]:
Jugo_Frost_S6=ss.calculate_S6St_Jugo2010_eq10(deltaQFM=Buffer_calc['DeltaQFM_Frost1991'])

Using Nash

  • Here lets use the Petrolog Fe3FeT ratio. This is uncertain, if you selected Kress and Carmichael, you would get a different ratio, so different S6+ proportions.

[27]:
Nash_S6=ss.calculate_S6St_Nash2019(T_K=df_out['T_K'], Fe3Fet_Liq=df_out['Fe3Fet_Liq'])
Nash_S6.head()
[27]:
0    0.015050
1    0.012156
2    0.009777
3    0.007880
4    0.006324
dtype: float64

Lets use the ONeill method

  • ONeill and Mavrogenes (2022) have a method using the sulfate and sulfide carrying capacity

  • But, this uses a different position for the QFM buffer as Frost and Petrolog, can either enter the logfo2 value, or the position of the ONeill buffer we calculated above

[28]:
S6_ONeill=ss.calculate_OM2022_S6St(df=df_out,
T_K=df_out['T_K'], logfo2=df_out['Lg(fO2)'])
S6_ONeill.head()
[28]:
S6St_Liq LnCS2_calc LnCS6_calc LnKSO2S2 LnS6S2 deltaQFM_calc SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq Ni_Liq_ppm Cu_Liq_ppm SiO2_magma TiO2_magma Al2O3_magma Fe2O3_magma FeO_magma MnO_magma MgO_magma CaO_magma Na2O_magma K2O_magma P2O5_magma Cr2O3_magma Ni_magma Cu_magma Cr2O3_Liq Ni_Liq Cu_Liq SiO2_cumulate TiO2_cumulate Al2O3_cumulate Fe2O3_cumulate FeO_cumulate MnO_cumulate MgO_cumulate CaO_cumulate Na2O_cumulate K2O_cumulate P2O5_cumulate Cr2O3_cumulate Ni_cumulate Cu_cumulate Temperature Temperature_Olv Olv_Fo_magma Olv_Kd Olv_Fo_cumulate Pressure(kbar) Lg(fO2) dNNO density Ln(viscosity) Melt_%_magma Olv_%_magma Olv_Peritectic Fluid_%_magma Olv_%_cumulate Sample Unnamed:58 T_K P_kbar Fraction_melt Sample_ID_Liq SiO2_Liq_mol_frac MgO_Liq_mol_frac MnO_Liq_mol_frac FeOt_Liq_mol_frac CaO_Liq_mol_frac Al2O3_Liq_mol_frac Na2O_Liq_mol_frac K2O_Liq_mol_frac TiO2_Liq_mol_frac P2O5_Liq_mol_frac Si_Liq_cat_frac Mg_Liq_cat_frac Mn_Liq_cat_frac Fet_Liq_cat_frac Ca_Liq_cat_frac Al_Liq_cat_frac Na_Liq_cat_frac K_Liq_cat_frac Ti_Liq_cat_frac P_Liq_cat_frac Mg_Number_Liq_NoFe3 Mg_Number_Liq_Fe3 Fe2Fet_Liq_calc Fe2_Liq_cat_frac
0 0.013062 -2.202857 12.716180 -16.307958 -4.324920 0.112443 49.9010 0.9981 14.9715 8.980926 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0 0.098489 697.8 99.8 49.9010 0.9981 14.9715 0.9839 8.0964 0.0998 9.9763 11.9772 2.4953 0.1996 0.0998 0.0998 697.8 99.8 0.0998 697.8 99.8 40.2986 0 0 0 11.7372 0 46.9121 0 0 0 0 0 8257.6 10.0 1253.281 1253.281 87.69 0.308 87.69 1 -7.72 -0.7 2.683 6.25 99.9900 0 N 0 0.0100 PetrologDefault 08:21:15 1526.431 1 0.999900 0 0.512524 0.152750 0.000868 0.077140 0.131805 0.090614 0.024845 0.001308 0.007711 0.000434 0.458757 0.136726 0.000777 0.069048 0.117978 0.162217 0.044478 0.002341 0.006902 0.000777 0.664440 0.687150 0.899352 0.062098
1 0.012295 -2.291531 12.838958 -16.541783 -4.386210 0.109061 49.9978 1.0081 15.1220 8.951296 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.0 0.097851 624.6 100.7 49.9978 1.0081 15.1220 0.9743 8.0754 0.1008 9.6064 12.0976 2.5203 0.2016 0.1008 0.1008 624.6 100.7 0.1008 624.6 100.7 40.2698 0 0 0 11.9273 0 46.7855 0 0 0 0 0 7984.5 10.0 1243.430 1243.430 87.28 0.309 87.49 1 -7.83 -0.7 2.682 6.38 98.9950 0 N 0 1.0050 PetrologDefault 08:21:15 1516.580 1 0.989950 1 0.514720 0.147431 0.000879 0.077066 0.133442 0.091739 0.025153 0.001324 0.007806 0.000439 0.460124 0.131793 0.000786 0.068892 0.119288 0.164017 0.044970 0.002367 0.006978 0.000785 0.656710 0.679537 0.898646 0.061909
2 0.011922 -2.386549 12.969959 -16.791165 -4.417377 0.112759 50.0982 1.0185 15.2770 8.916645 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.0 0.097284 554.8 101.6 50.0982 1.0185 15.2770 0.9649 8.0492 0.1018 9.2279 12.2216 2.5462 0.2037 0.1018 0.1018 554.8 101.6 0.1018 554.8 101.6 40.2390 0 0 0 12.1280 0 46.6507 0 0 0 0 0 7708.8 10.1 1233.064 1233.064 86.83 0.310 87.27 1 -7.94 -0.7 2.681 6.52 97.9904 0 N 0 2.0096 PetrologDefault 08:21:15 1506.214 1 0.979904 2 0.516994 0.141963 0.000890 0.076952 0.135134 0.092903 0.025473 0.001341 0.007906 0.000445 0.461536 0.126734 0.000794 0.068697 0.120638 0.165874 0.045480 0.002394 0.007058 0.000794 0.648476 0.671438 0.897532 0.061658
3 0.011826 -2.486488 13.107226 -17.052315 -4.425590 0.121808 50.2003 1.0289 15.4337 8.877334 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.0 0.096823 489.9 102.6 50.2003 1.0289 15.4337 0.9561 8.0178 0.1029 8.8486 12.3469 2.5723 0.2058 0.1029 0.1029 489.9 102.6 0.1029 489.9 102.6 40.2069 0 0 0 12.3359 0 46.5096 0 0 0 0 0 7436.5 10.1 1222.361 1222.361 86.36 0.311 87.05 1 -8.05 -0.7 2.680 6.67 96.9959 0 N 0 3.0041 PetrologDefault 08:21:15 1495.511 1 0.969959 3 0.519301 0.136457 0.000902 0.076798 0.136850 0.094083 0.025796 0.001358 0.008006 0.000451 0.462964 0.121653 0.000804 0.068467 0.122003 0.167752 0.045995 0.002421 0.007137 0.000803 0.639869 0.662987 0.896111 0.061354
4 0.011098 -2.593890 13.254914 -17.331682 -4.489806 0.119144 50.3062 1.0397 15.5950 8.832002 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.0 0.096445 428.7 103.5 50.3062 1.0397 15.5950 0.9475 7.9802 0.1040 8.4612 12.4760 2.5992 0.2079 0.1040 0.1040 428.7 103.5 0.1040 428.7 103.5 40.1725 0 0 0 12.5558 0 46.3589 0 0 0 0 0 7162.8 10.2 1211.080 1211.080 85.84 0.312 86.81 1 -8.18 -0.7 2.679 6.83 95.9923 0 N 0 4.0077 PetrologDefault 08:21:15 1484.230 1 0.959923 4 0.521687 0.130806 0.000913 0.076596 0.138624 0.095302 0.026130 0.001375 0.008110 0.000457 0.464439 0.116452 0.000813 0.068190 0.123411 0.169687 0.046526 0.002449 0.007220 0.000813 0.630682 0.653976 0.895277 0.061049
[29]:
fig, (ax1) = plt.subplots(1, 1, figsize=(6,5))
ax1.plot(df_out['MgO_Liq'], 100*Jugo_Frost_S6, '-r', label='Jugo-Frost-recalc')
ax1.plot(df_out['MgO_Liq'], 100*Nash_S6, '-k', label='Jugo-Boro')
ax1.plot(df_out['MgO_Liq'], 100*S6_ONeill['S6St_Liq'], '-m', label='O21-22')



ax1.set_xlabel('MgO Liquid (wt%)')
ax1.set_ylabel('S6/ST (%)')

ax1.set_xlim([2, 10])

[29]:
(2.0, 10.0)
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_49_1.png

Perform correction

[30]:
# Perfrom correction using Nash
SCSS_Tot_Nash_Recalc_Smythe=ss.calculate_SCSS_Total(SCSS=Smythe_ONeillSulf['SCSS2_ppm_ideal_Smythe2017'],
S6St_Liq=Nash_S6)
# Using Jugo
SCSS_Tot_Jugo_Recalc_Smythe=ss.calculate_SCSS_Total(SCSS=Smythe_ONeillSulf['SCSS2_ppm_ideal_Smythe2017'],
S6St_Liq=Jugo_Frost_S6)



fig, (ax1) = plt.subplots(1, 1, figsize=(6,5))
ax1.plot(Smythe_ONeillSulf['MgO_Liq'], Smythe_ONeillSulf['SCSS2_ppm_ideal_Smythe2017'],
         '-g', label='S2017, O2021 Calc Sulf, S2-')
ax1.plot(Smythe_ONeillSulf['MgO_Liq'], SCSS_Tot_Jugo_Recalc_Smythe,
         ':k', label='S2017, O2021 Calc Sulf, ST Jugo')
ax1.plot(Smythe_ONeillSulf['MgO_Liq'], SCSS_Tot_Nash_Recalc_Smythe,
         '-b', label='S2017, O2021 Calc Sulf, ST Nash')

ax1.set_xlabel('MgO')
ax1.set_ylabel('SCSS')
ax1.legend()

[30]:
<matplotlib.legend.Legend at 0x24d8ba8e2d0>
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_51_1.png
[31]:

SCSS_Tot_ONeill_Smythe=ss.calculate_SCSS_Total(SCSS=Smythe_ONeillSulf['SCSS2_ppm_ideal_Smythe2017'], S6St_Liq=S6_ONeill['S6St_Liq']) fig, (ax1) = plt.subplots(1, 1, figsize=(6,5)) ax1.plot(Smythe_ONeillSulf['MgO_Liq'], Smythe_ONeillSulf['SCSS2_ppm_ideal_Smythe2017'], '-g', label='S2017, O2021 Calc Sulf, S2-') ax1.plot(Smythe_ONeillSulf['MgO_Liq'], SCSS_Tot_Jugo_Recalc_Smythe, ':k', label='S2017, O2021 Calc Sulf, ST Jugo') ax1.plot(Smythe_ONeillSulf['MgO_Liq'], SCSS_Tot_Nash_Recalc_Smythe, '-b', label='S2017, O2021 Calc Sulf, ST Nash') ax1.set_xlabel('MgO') ax1.set_ylabel('SCSS') ax1.legend() ax1.plot(Smythe_ONeillSulf['MgO_Liq'], SCSS_Tot_ONeill_Smythe, '-m', label='S2017, O2021 Calc Sulf, ST from ONeill 21-22') ax1.set_xlabel('MgO') ax1.set_ylabel('SCSS') ax1.legend() ax1.set_xlim([2, 10]) ax1.set_ylim([0, 2000])
[31]:
(0.0, 2000.0)
../../_images/Examples_Intro_Example_Petrolog_FC_FC_Petrolog_52_1.png
[ ]:

[ ]:

[ ]: