the Creative Commons Attribution 4.0 License.
the Creative Commons Attribution 4.0 License.
SedTrace 1.0: a Julia-based framework for generating and running reactive-transport models of marine sediment diagenesis specializing in trace elements and isotopes
Abstract. Trace elements and isotopes (TEIs) are important tools in studying ocean biogeochemistry. Understanding their modern ocean budgets and using their sedimentary records to reconstruct paleoceanographic conditions require mechanistic understanding of the diagenesis of TEIs, yet the lack of appropriate modeling tools has limited our ability to perform such research. Here we introduce SedTrace, a modeling framework that can be used to generate reactive-transport code for modeling marine sediment diagenesis and assist model simulation using advanced numerical tools in Julia. SedTrace enables mechanistic TEI modeling by providing flexible tools of pH and speciation modeling, which are essential in studying TEI diagenesis. SedTrace is designed to solve one particular challenge facing the users of diagenetic models: existing models are usually case-specific and not easily adaptable for new problems, such that the user has to choose between modifying published code and writing their own code, both of which demand strong coding skills. To lower this barrier, SedTrace can generate diagenetic models only requiring the user to supply Excel spreadsheets containing necessary model information. The resulting code is clearly structured and readable, and is integrated with Julia’s differential equation solving ecosystems, utilizing tools such as automatic differentiation, sparse numerical methods, Newton-Krylov solvers and preconditioner. This allows efficient solution of large systems of stiff diagenetic equations. We demonstrate the capacity of SedTrace using case studies of modeling the diagenesis of pH, radiogenic and stable isotopes of TEIs.
- Preprint
(2518 KB) - Metadata XML
- BibTeX
- EndNote
Jianghui Du
Status: closed
-
RC1: 'Comment on gmd-2022-281', Anonymous Referee #1, 28 Feb 2023
Comments on manuscript gmd-2022-281,
“SedTrace 1.0: a Julia-based framework for generating and running reactive-transport models of marine sediment diagenesis specializing in trace elements and isotopes”,
by Jianghui Du
The author provided a Julia based code for generating diagenetic reactive transport codes. The goal of the model development is well described and the code realizes the flexibility to enable various usages targeting at different sediment environments with different tracers of interest. The model’s validity has been well examined and example simulations demonstrate the capacity of the model well. Accordingly, I think the paper is well-suited for publication in GMD. Followings are my comments on specifics that I hope the author may find of some use to improve the manuscript.
Potential internal inconsistency. pH calculation in Sect. 4.2 does not seem to take into account detailed aqueous speciation (e.g., no accounts of Fe + CO3, Fe + HCO3, Fe +HS in Eqs. 27, 28, etc.). However, those are included in aqueous speciation calculation in Sect. 4.3. As long as concs. of included aqueous species with EIs or other tracked aqueous species are insignificant compared to total concs. of EIs/other tracked species, pH calculation as well as mass balance must not be significantly affected, but we can think of a situation where some ion pairs matter relative to EIs/other tracked species, e.g., ferruginous oceans in the Precambrian or deep depths of sediments where porewater chemistry is in equilibrium with some soluble solid phases. This may be my misunderstanding but potential problem here is model’s internal inconsistency between aqueous speciation and pH modeling, and potential violation of charge balance in porewater. If this is the case, it should be clarified.
Numerical diffusion. Especially related to Sect. 4.4. It is well known that numerical diffusion affects proxy record and thus different models have attempted to deal with it together with diagenetic reactions (e.g., Kanzaki et al., 2021; Munhoven, 2021). It probably does not affect steady state age-profiles, but the author should make it clear how the model deals with numerical diffusion and its effects on proxy reading or comparison with observations.
L419-425. The author should show a plot of Logistic and Heaviside functions as a function of omega so that it is easy for the reader to compare the two functions and evaluate the approximation here as I have not seen this approximation elsewhere. Also, Eq. 24 does not look the same as that in L428. Please make sure they are consistent. Also, it would be better to show how this approximation affect the results where omega calculation can affect sediment profiles (e.g., Fig. 4).
Technical comments:
Code. I have tried to install and use the code to test example simulations in this paper (from examples directories) but ended up not being able to (failed with windows Cygwin and virtual Ubuntu in windows). This could be only because of me not used so much to Julia but it might be better to indicate under what environments the code has been tested so far and is supposed to work. This does not have to be in the text but anywhere else like Supplement or docs in code repository.
L106. Why does it have to be in mathematica notebook, which is not open to everyone? It would be better to give some final form of derivation in the main text or even supplement (or any form available to the reader) rather than saying that the reader can check them if they can use mathematica.
L106. maybe --> may be
L831. Sensitivity --> sensitive
L1097. It would be easier to read results if the author also provides delta values (1000 x ln alpha) in per mil.
Citation: https://doi.org/10.5194/gmd-2022-281-RC1 - AC1: 'Reply on RC1', Jianghui Du, 26 Jul 2023
-
RC2: 'Comment on gmd-2022-281', Anonymous Referee #2, 02 Jul 2023
- AC2: 'Reply on RC2', Jianghui Du, 26 Jul 2023
Status: closed
-
RC1: 'Comment on gmd-2022-281', Anonymous Referee #1, 28 Feb 2023
Comments on manuscript gmd-2022-281,
“SedTrace 1.0: a Julia-based framework for generating and running reactive-transport models of marine sediment diagenesis specializing in trace elements and isotopes”,
by Jianghui Du
The author provided a Julia based code for generating diagenetic reactive transport codes. The goal of the model development is well described and the code realizes the flexibility to enable various usages targeting at different sediment environments with different tracers of interest. The model’s validity has been well examined and example simulations demonstrate the capacity of the model well. Accordingly, I think the paper is well-suited for publication in GMD. Followings are my comments on specifics that I hope the author may find of some use to improve the manuscript.
Potential internal inconsistency. pH calculation in Sect. 4.2 does not seem to take into account detailed aqueous speciation (e.g., no accounts of Fe + CO3, Fe + HCO3, Fe +HS in Eqs. 27, 28, etc.). However, those are included in aqueous speciation calculation in Sect. 4.3. As long as concs. of included aqueous species with EIs or other tracked aqueous species are insignificant compared to total concs. of EIs/other tracked species, pH calculation as well as mass balance must not be significantly affected, but we can think of a situation where some ion pairs matter relative to EIs/other tracked species, e.g., ferruginous oceans in the Precambrian or deep depths of sediments where porewater chemistry is in equilibrium with some soluble solid phases. This may be my misunderstanding but potential problem here is model’s internal inconsistency between aqueous speciation and pH modeling, and potential violation of charge balance in porewater. If this is the case, it should be clarified.
Numerical diffusion. Especially related to Sect. 4.4. It is well known that numerical diffusion affects proxy record and thus different models have attempted to deal with it together with diagenetic reactions (e.g., Kanzaki et al., 2021; Munhoven, 2021). It probably does not affect steady state age-profiles, but the author should make it clear how the model deals with numerical diffusion and its effects on proxy reading or comparison with observations.
L419-425. The author should show a plot of Logistic and Heaviside functions as a function of omega so that it is easy for the reader to compare the two functions and evaluate the approximation here as I have not seen this approximation elsewhere. Also, Eq. 24 does not look the same as that in L428. Please make sure they are consistent. Also, it would be better to show how this approximation affect the results where omega calculation can affect sediment profiles (e.g., Fig. 4).
Technical comments:
Code. I have tried to install and use the code to test example simulations in this paper (from examples directories) but ended up not being able to (failed with windows Cygwin and virtual Ubuntu in windows). This could be only because of me not used so much to Julia but it might be better to indicate under what environments the code has been tested so far and is supposed to work. This does not have to be in the text but anywhere else like Supplement or docs in code repository.
L106. Why does it have to be in mathematica notebook, which is not open to everyone? It would be better to give some final form of derivation in the main text or even supplement (or any form available to the reader) rather than saying that the reader can check them if they can use mathematica.
L106. maybe --> may be
L831. Sensitivity --> sensitive
L1097. It would be easier to read results if the author also provides delta values (1000 x ln alpha) in per mil.
Citation: https://doi.org/10.5194/gmd-2022-281-RC1 - AC1: 'Reply on RC1', Jianghui Du, 26 Jul 2023
-
RC2: 'Comment on gmd-2022-281', Anonymous Referee #2, 02 Jul 2023
- AC2: 'Reply on RC2', Jianghui Du, 26 Jul 2023
Jianghui Du
Model code and software
SedTrace.jl: a Julia package for generating and running reactive-transport models of marine sediment diagenesis Jianghui Du https://doi.org/10.5281/zenodo.7225861
Jianghui Du
Viewed
HTML | XML | Total | BibTeX | EndNote | |
---|---|---|---|---|---|
586 | 167 | 15 | 768 | 2 | 5 |
- HTML: 586
- PDF: 167
- XML: 15
- Total: 768
- BibTeX: 2
- EndNote: 5
Viewed (geographical distribution)
Country | # | Views | % |
---|
Total: | 0 |
HTML: | 0 |
PDF: | 0 |
XML: | 0 |
- 1