Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.3%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: yumzh3
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 313 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

Overview

Please read the README.md and LICENSE before downloading and using the codes.
Please follow the CITATION.cff to cite the codes.
Codes and demo data are listed in folder 'mantle melting_crystallization2023'. Please download all the files.
Codes here are used to calculate certain element concentrations in the liquid and olivine during mantle melting and crystallization with given mantle compositions and melting-crystallization conditions.
This is a part of Supplementary Materials for paper "The origin of Ni and Mn variations in Hawaiian and MORB olivines and associated basalts" written by Mingzhen Yu (myu@g.harvard.edu) and Charles H. Langmuir (langmuir@eps.harvard.edu) being submitted to Chemical Geology (in press). Correspondence to Mingzhen Yu (myu@g.harvard.edu, Department of Earth and Planetary Sciences, Harvard University, Cambridge, MA 02138, USA)
Codes are written with Python.

Files Introduction

In the folder 'mantle melting_crystallization2023', there are seven '.py' files and one '.csv' file.

data file

The '.csv' file named 'olivineglassdata.csv' provides users with natural data for Hawaiian olivines and MORB olivines, Hawaiian basalts, and MORB glasses, which can be used to compared to the modeled crystallization results. After running code 'melting_cystallization2023.py', six figures will be plotted automatically.
Olivine data are given by Sobolev, A. V. et al. The amount of recycled crust in sources of mantle-derived melts. science 316, 412-417 (2007). MORB glasses data are given by Jenner, F.E. and O'Neill, H.S.C., 2012. Analysis of 60 elements in 616 ocean floor basaltic glasses. Geochemistry, Geophysics, Geosystems, 13(2); Yang, S., Humayun, M. and Salters, V.J., 2018. Elemental systematics in MORB glasses from the Mid‐Atlantic Ridge. Geochemistry, Geophysics, Geosystems, 19(11), pp.4236-4259; Yang, A.Y., Langmuir, C.H., Cai, Y., Michael, P., Goldstein, S.L. and Chen, Z., 2021. A subduction influence on ocean ridge basalts outside the Pacific subduction shield. Nature communications, 12(1), p.4757. Hawaiian basalts data are compiled from Georoc (references listed in the .csv file).

code files

melting_function2023.py

This code defines functions used in the calculation of melt compositions for two types of mantle melting: polybaric fractional melting and isobaric equilibrium melting. Melt compositions calculated include SiO2, MgO, FeO, MnO, NiO, TiO2, Na2O and K2O.
Fundamental algorithms are given by Langmuir, C. H., Klein, E. M. & Plank, T. Petrological systematics of mid‐ocean ridge basalts: Constraints on melt generation beneath ocean ridges. Mantle flow and melt generation at mid‐ocean ridges 71, 183-280 (1992). Melting reactions and partition coefficients are commented in the code and explained in the paper "The origin of Ni and Mn variations in Hawaiian and MORB olivines and associated basalts" written by Mingzhen Yu (myu@g.harvard.edu) and Charles H. Langmuir (langmuir@eps.harvard.edu) being submitted to Chemical Geology (in press). This code will be called by 'melting_crystallization2023.py'.

olonly_function2023.py

This code defines functions used in the calculation of melt and olivine compositions for twy types of olivine-only crystallization: fractional crystallization and equilibrium crystallization. Compositions calculated include MgO, FeO, SiO2, MnO and NiO.
Fundamental algorithm is the olivine stoichiometry: MgO+FeO=66.67. Partition coefficients are commented in the code and explained in the paper "The origin of Ni and Mn variations in Hawaiian and MORB olivines and associated basalts" written by Mingzhen Yu (myu@g.harvard.edu) and Charles H. Langmuir (langmuir@eps.harvard.edu) being submitted to Journal (status will be updated). This code will be called by 'melting_crystallization2023.py'.

wl1990stoich2023.py, wl1990kdcalc2023.py, wl1990state2023.py, wl1990models2023.py

These codes define functions used in the calculation of melt and mineral (olivine, plagioclase, clinopyroxene) compositions for two types of crystallization: fractional crystallizationa nd equilibrium crystallization. Compositions calculated include SiO2, TiO2, Al2O3, FeO, MgO, K2O, MnO, Na2O, P2O5, CaO, NiO.
Fundamental algorithms are given by Weaver, J.S. and Langmuir, C.H., 1990. Calculation of phase equilibrium in mineral-melt systems. Computers & Geosciences, 16(1), pp.1-19. The purpose is commented at the beginning of each code. These codes will be called by 'melting_crystallization2023.py'.

melting_crystallization2023.py

This code calls all the functions defined for melting and crystallization calculations. Running this code, users will get melting results of given mantle compositions under given starting pressures, and crystallization results of magma determined by a given extent of melting.
Here we compare between Hawaii and MORB data, hence, we model these two tectonic settings simultaneously. Mantle source compositions are given in wt% including SiO2, TiO2, Al2O3, FeO(Fe2), CaO, MgO, MnO, K2O, Na2O, P2O5, Cr2O3, NiO. Mantle source mineral modes are given in percent including olivine, orthopyroxene, clinopyroxene, garnet and spinel. Mantle source compositions for Hawaii and MORB are saved in variable 'sourcewtHaw' and 'sourcewtMORB', respectively. Mantle source mineral modes for Hawaii and MORB are saved in variable 'sourcephaseHaw' and 'sourcephaseMORB', respectively. Melting pressures are given in kbar. Melting pressures for Hawaii and MORB are saved in variable 'Pohigh' and 'Polow', respectively. The targeted extent of melting is given in fraction. The targeted extent of melting for Hawaii and MORB are saved in variable 'FtargetHaw' and 'FtargetMORB'. The targeted extent of melting determines the magma compositions used for following crystallization modeling. Two types of melting can be calculated, polybaric fractional melting denoted by 'polybaric' and isobaric equilibrium melting denoted by 'isobaric'. Melting modes for Hawaii and MORB are saved in variable 'meltingmodelHaw' and 'meltingmodelMORB', respectively. Two types of crystallization can be calculated, fractional crystallization denoted by 'fractional' and equilibrium crystallization denoted by 'equilibrium'. The crystallization mode for Hawaii and MORB is saved in variable 'xtalizationmodel'. Note here only olivine-only crystallization is calculated for Hawaii, and both olivine-only and ol-pl-cpx crystallizations are calculated for MORB. Also note that the fractional and equilibrium olivine-only crystallization can be switched easily by changing the variable 'xtalizationmodel'. The default type of ol-pl-cpx crystallization is fractional. Users need to modify the relevant codes in 'meltingcrystallization2023.py' to calculate ol-pl-cpx equilibrium crystallization. The default pressure for olivine-only crystallization is 0.001 kbar and is saved in variable 'P' (line 376 and line 981). Users can change its value to model crystallization under high pressures. The default pressure for ol-pl-cpx crystallization modeled for MORB is also 1 bar, and users need to modify relevant functions and codes to change its value if needed.
The melting results for Hawaii and MORB are saved in dataframe variable 'melting
dfhighP' and 'meltingdflowP', respectively. The two dataframes are in the same format. In the dataframe for polybaric melting results, Column 'T Celsius' and 'P kbar' are temperature (Celsius degree) and pressure (kbar) during melting. Column 'fstep' is the melting extent per each step. Column 'ol', 'opx', 'cpx', 'gt', and 'sp' are mantle mineral phase proportions (percent) during melting. Column 'mineralphasetot' is the sum of all mineral proportions during melting and its value should be 100. Column from 'Fliqitg2' to 'clSiO2wtitg1' are accumulated fractional melt compositions for different extent of melting, and will be used as magma compositions in the following crystallization modeling. Extent of melting and melt compositions for Hawaii are saved by Column from 'Fliqitg1' to 'clSiO2wtitg1' with extent in fraction and melt compositions in wt%. Extent of melting and melt compositions for MORB are saved by Column from 'Fliqitg2' to 'clSiO2wtitg2' with extent in fraction and melt compositions in wt%. Note that FeO is ferrous Fe. The algorithm for accumulated fractional melting calculation is given by Langmuir, C. H., Klein, E. M. & Plank, T. Petrological systematics of mid‐ocean ridge basalts: Constraints on melt generation beneath ocean ridges. Mantle flow and melt generation at mid‐ocean ridges 71, 183-280 (1992). Column from 'olMgOcm' to 'olMnOwt' are residual mantle olivine compositions during melting with MgO, FeO and Fo in cation mole percent and NiO and MnO in wt%. Column from 'clMgOcm' to 'clK2Omolar' are compositions of intermediate melt during fractional melting with 'cm' denoting 'cation mole percent' and 'molar' denoting 'molar fraction'. Column 'clSiO2adjust' is the adjusted SiO2 concentration of intermediate melt during fractional melting needed to calculate Fe-Mg exchange coefficient between olivine liquid. Its calculation is given by Toplis, M. The thermodynamics of iron and magnesium partitioning between olivine and liquid: criteria for assessing and predicting equilibrium in natural and experimental systems. Contributions to Mineralogy and Petrology 149, 22-39 (2005). Column from 'resMgOcm' to 'resMgnumber' are compositions of the mantle residue during melting with 'cm' denoting 'cation mole percent' and 'wt' denoting 'wt%'. Column from 'kdMgOollcm' to 'KDFe2Mgoll' are MgO, FeO partition coefficients in cation mole and Fe-Mg exchange coefficient between olivine and liquids. Column from 'DK2O' to 'DMnO' are bulk partition coefficients between minerals and liquids in wt%. Column from 'KdNiollwt' to 'KdMnspolwt' are relevant partition coefficients for Ni and Mn in wt% with 'ol', 'opx', 'cpx', 'gt', 'sp' and 'l' denoting olivine, orthopyroxene, clinooyroxene, garnet, spinel and liquid, respectively. The difference between the dataframe saving results from isobaric melting and polybaric melting is that the columns from 'Fliqitg2' to 'clSiO2wtitg1' are replaced by columns from 'clMgOwt' to 'clSiO2wt', and these columns are melt compositions during isobaric melting which will be used as magma compositions in the following crystallization.
The olivine-only crystallization results for Hawaii and MORB are saved in dataframe variable 'olonly-xtalization' and 'olonly
xtalizationlowP', respectively. The two dataframes are in the same format. Column 'T Celsius' is the temperature (Clesius degree) during crystallization. Column 'melt fraction' is the melt proportion remainning in the system during crystallization with the unit in fraction. If conducting fractional crystallization, column 'Fstep' is the melt proportion remaining per each step with the unit in fraction. If conducting equilibrium crystallization, column 'Fstep' is the crystallization degree per each step with the unit in fraction. Column from 'clwtMgO' to 'clppmMn' are melt compositions during crystallization in wt% used to draw liquid line of descent. Note that 'FeO' is ferrous Fe and 'FeOt' is the total Fe. Column from 'Fo' to '(MgO+FeO)ol' are olivine compositions during crystallization used to draw crystal line of descent with 'ppm' denoting 'ppm' and 'cm' denoting 'cation mole percent'. Column from 'cmkdMgoll' to 'wtkdMnoll' are relevant partition coefficients with 'cm' denoting 'cation mole' and 'wt' denoting 'wt%'. Column from 'clcmMgO' to 'molarSiO2adjust' are melt compositions with 'cm' denoting 'cation mole percent' and 'molar' denoting 'molar fraction'.
The ol-pl-cpx crystallization results for MORB are saved in dataframe variable 'LLD
df'. Column 'TC' is the remperature (Celsius degree) during crystallization. Column from 'fliq' to 'fol' are phase proportions (fraction) of liquid, plagioclase, clinopyroxene and olivine in the system during crystallization. Column from 'liqSiO2' to 'liqNiO' and column 'liqFeOt', column 'liqNippm' and 'liqFeOtMnO' are melt compositions during crystallization used to draw liquid line of descent. Oxides are calculated in wt% and Ni is calculated in ppm. 'FeO' denotes ferrous Fe and 'FeOt' denotes total Fe. Column from 'olSiO2' to 'olNiO' and column from 'Fo' to 'olMnppm' are olivine compositions during crystallization used to draw crystal line of descent. Oxides are calculated in wt% and Ni and Mn are calculated in ppm. Column from 'cpxSiO2' to 'plgNiO' are clinopyroxene and plagioclase compositions during crystallization in wt%.
After running the code, six figures with natural data and modeled crystal line of descent and liquid line of descent will show up. Users need to download the data file 'olivineglassdata.csv' from the folder and enter the correct local address of the data file in the line 1133 to make the figures plotted.

Updates and cite policy

The updates of the code will be posted timely. Comments and suggestions are welcome and can be sent to Mingzhen Yu (myu@g.harvard.edu).
Any publications using this code need to follow the CITATION.cff to cite the codes.

Owner

  • Login: yumzh3
  • Kind: user

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: mantle_melt_xtal_2023
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Mingzhen
    family-names: Yu
    email: myu@g.harvard.edu
    affiliation: >-
      Department of Earth and Planetary Sciences at Harvard
      University
    orcid: 'https://orcid.org/0000-0002-4622-1605'
abstract: >-
  Modeling for mantle melting (polybaric and isobaric) and
  crystallization.
license: MIT
version: '1.0'
date-released: '2023-06-22'

GitHub Events

Total
Last Year