Skip to content

Code for "Identification of the Mode of Evolution in Incomplete Carbonate Successions"

License

Notifications You must be signed in to change notification settings

MindTheGap-ERC/CarbonateStratPalEvo

Repository files navigation

CarboStratPalEvo

DOI

Supplementary code for "Identification of the mode of evolution in incomplete carbonate successions", DOI: 10.1101/2023.12.18.572098.

Authors

Niklas Hohmann
Utrecht University
email: n.h.hohmann [at] uu.nl
Web page: www.uu.nl/staff/NHohmann
ORCID: 0000-0003-1559-1838

Jan Roel Koelewijn
Utrecht University
ORCID: 0000-0002-4668-3797

Emilia Jarochowska
Utrecht University
email: e.b.jarochowska [at] uu.nl
Web page: www.uu.nl/staff/EBJarochowska
ORCID: 0000-0001-8937-9405

Software requirements

R and the Rstudio IDE.
Matlab is necessary tu fully reproduce the study from scratch. However, all data generated by Matlab can also be downloaded from a repository when only the part simulating and testing the mode of evolution is reproduced, which can be done fully in R Software.

Usage

Open the Rproject file "CarbonateStratPalEvo.Rproj" in Rstudio. This will bootstrap the renv package if it is not installed yet. Next, run

renv::restore()

This will install all required packages and their dependencies needed in the project. Last, download all required data from OSF by running the following in the R console:

source("code/utils.R")
get_data_from_osf(link = "https://osf.io/zbpwa/")

Mac users may need to install GNU Fortran 12.2 compiler from Development Tools. See REPRODUCEME file for more info on running code and examining data.

Repository Structure

  • .gitignore : Untracked files
  • .Rprofile : R project settings
  • CarbonateStratPalEvo.Rproj : Rstudio project file
  • LICENSE : Apache 2.0 license text
  • README.md : Readme file
  • renv.lock : lock file from renv
  • REPRODUCEME.md : Instructions for repetition of the study
  • code : Folder with main code
  • make_plots.R : generate plots
    • parameters_for_tests.R : define test & simulation settings
    • process_adm_from_matlab.R : extreact adm from Matlab data & determine hiatuses & completeness
    • simulate_and_test_modes_of_evolution.R : perform simulations & tests
    • utils : utility functions to simulate trait evolution in time & strat domain, determine sample ages, completeness , etc.
    • visualize_data : Visualize downloadable data
  • data : Folder for data. After downloading data, it contains the following files:
    • matlab_outputs : Folder with raw data generated by CarboCATLite in Matlab
      • scenarioA_glob_matlab_outputs.mat : raw data of scenario A
      • scenarioB_glob_matlab_outputs.mat : raw data of scenario B
      • scenarioA_and_B_matlab_to_R.m : function to extract ADMs from CarboCATLite outputs
      • get_adm_from_carbocat_outputs.m : ADMs from CarboCATLite for import in R
      • codebook.md : Describes contents of .mat files in this folder
      • figs : folder with figures from CarboCAT Lite
    • R_outputs : Folder with data generated by R
      • ageDepthModelsScenariosAandB.Rdata : ADMs, completeness, & hiatus durations from scenario A and B
      • parameters_for_tests.Rdata : test & simulation settings
      • results_modes_of_evolution.Rdata : test and simulation results
      • codebook.md : Describes contents of .Rdata files in this folder
  • figs : Folder with figures
    • R : figures generated by /code/make_plots.R
  • renv : Folder generated by renv package

Copyright

Copyright 2023 Utrecht University

Citation

To cite this repository, please use

  • Hohmann, N., Koelewijn, J. R., Burgess, P., & Jarochowska, E. (2024). Supplementary code for "Identification of the Mode of Evolution in Incomplete Carbonate Successions" (v1.1.2). Zenodo. https://doi.org/10.5281/zenodo.11394049

License

The code is licensed under the Apache 2.0 License, see LICENSE file for full license text.

This data is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original authors and the source, provide a link to the Creative Commons license, and indicate if changes were made. If your intended use exceeds the permitted use, you will need to obtain permission directly from the authors. To view a copy of this licence, visit http:https://creativecommons.org/licenses/by/4.0/.

Funding information

Funded by the European Union (ERC, MindTheGap, StG project no 101041077). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them. European Union and European Research Council logos