Package: ShellChron 0.4.1

ShellChron: Builds Chronologies from Oxygen Isotope Profiles in Shells

Takes as input a stable oxygen isotope (d18O) profile measured in growth direction (D) through a shell + uncertainties in both variables (d18O_err & D_err). It then models the seasonality in the d18O record by fitting a combination of a growth and temperature sine wave to year-length chunks of the data (see Judd et al., (2018) <doi:10.1016/j.palaeo.2017.09.034>). This modeling is carried out along a sliding window through the data and yields estimates of the day of the year (Julian Day) and local growth rate for each data point. Uncertainties in both modeling routine and the data itself are propagated and pooled to obtain a confidence envelope around the age of each data point in the shell. The end result is a shell chronology consisting of estimated ages of shell formation relative to the annual cycle with their uncertainties. All formulae in the package serve this purpose, but the user can customize the model (e.g. number of days in a year and the mineralogy of the shell carbonate) through input parameters.

Authors:Niels de Winter [aut, cre]

ShellChron_0.4.1.tar.gz
ShellChron_0.4.1.zip(r-4.5)ShellChron_0.4.1.zip(r-4.4)ShellChron_0.4.1.zip(r-4.3)
ShellChron_0.4.1.tgz(r-4.5-any)ShellChron_0.4.1.tgz(r-4.4-any)ShellChron_0.4.1.tgz(r-4.3-any)
ShellChron_0.4.1.tar.gz(r-4.5-noble)ShellChron_0.4.1.tar.gz(r-4.4-noble)
ShellChron_0.4.1.tgz(r-4.4-emscripten)ShellChron_0.4.1.tgz(r-4.3-emscripten)
ShellChron.pdf |ShellChron.html
ShellChron/json (API)
NEWS

# Install 'ShellChron' in R:
install.packages('ShellChron', repos = c('https://nielsjdewinter.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/nielsjdewinter/shellchron/issues

Datasets:

On CRAN:ShellChron-0.4.0(2021-07-05)

Conda-Forge:

3.18 score 3 stars 7 scripts 224 downloads 22 exports 91 dependencies

Last updated 3 years agofrom:ac2ecdddd0. Checks:1 OK, 7 ERROR. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 21 2025
R-4.5-winERRORFeb 21 2025
R-4.5-macERRORFeb 21 2025
R-4.5-linuxERRORFeb 21 2025
R-4.4-winERRORFeb 21 2025
R-4.4-macERRORFeb 21 2025
R-4.3-winERRORFeb 21 2025
R-4.3-macERRORFeb 21 2025

Exports:%>%age_corrcumdycumulative_dayd18O_modeld18Oc_from_T_d18Owd18Ow_from_d18O_Tdata_importdata_import_objectexport_resultsgrowth_modelgrowth_rate_curvemc_err_formmc_err_orthmc_err_projpeakidrun_modelsd_wtsinregT_from_d18O_d18Owtemperature_curvewrap_function

Dependencies:abindbackportsbootbroomcarcarDataclassclassIntclicolorspacecorrplotcowplotcpp11DBIDerivdoBydplyre1071fansifarverFNNFormulagenericsggplot2ggpubrggrepelggsciggsignifgluegridExtragstatgtableintervalsisobandKernSmoothlabelinglatticelifecyclelme4magrittrMASSMatrixMatrixModelsmgcvmicrobenchmarkminqamodelrmunsellnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigpolynomproxypurrrquantregR6rbibutilsRColorBrewerRcppRcppEigenRdpackreformulasrlangrstatixrtops2scalessfsftimespspacetimeSparseMstarsstringistringrsurvivaltibbletidyrtidyselectunitsutf8vctrsviridisLitewithrwkxtszoo

Citation

To cite ShellChron in publications use:

de Winter, N.J. (2022) ShellChron 0.4.0: a new tool for constructing chronologies in accretionary carbonate archives from stable oxygen isotope profiles. Geoscientific Model Development 15, 1247-1267,<doi:10.5194/gmd-15-1247-2022>

Corresponding BibTeX entry:

  @Article{,
    title = {ShellChron 0.4.0: a new tool for constructing chronologies
      in accretionary carbonate archives from stable oxygen isotope
      profiles},
    author = {Niels J. {de Winter}},
    journal = {Geoscientific Model Development},
    year = {2022},
    volume = {15},
    pages = {1247-1267},
    url = {https://gmd.copernicus.org/articles/15/1247/2022/},
  }

Readme and manuals

ShellChron

The ShellChron package contains all formulae and documentation required to run the ShellChron model. The ShellChron model uses stable oxygen isotope records (d18O) from seasonal paleo-archives to create an age model for the archive.

In short, ShellChron feeds a temperature sinusoid (Figure 1; see details in “temperature_curve()” function) and a skewed growth rate sinusoid (Figure 2; see details in “growth_rate_curve()” function) to a d18O model (see details in “d18O_model()” function). The resulting modeled d18O is then compared with the user-provided d18O data and the parameters of the temperature and growth rate functions are optimized using the SCEUA algorithm (see Duan et al., 1992) to match the d18O data. As a result, the timing of each data point with reference to the seasonal cycle is exported, from which an age model for the entire record can be constructed.

Figure 1: Temperature sinusoidFigure 2: Growth rate sinusoid

The model builds on previous work by Judd et al. 2018 and expands on this previous model in several key ways:

  1. ShellChron allows SCEUA optimization to be carried out in a sliding window through the data and recognizes year transitions (see “cumulative_day()” formula) to produce seamless age models through multiple years. Overlapping windows are used to estimate the reproducibility of model results.
  2. ShellChron provides the option to take uncertainties on the input data (“D_err” and “d18Oc_err”) into account in error estimation (see “mc_err_orth()” and "export_results() functions), providing realistic errors on the age estimation which were previously unsupported.
  3. ShellChron supports different empirical formulae for converting temperature and d18O of the precipitation fluid into d18O records, providing compatibility with records consisting of various mineralogies (e.g. calcite and aragonite).
  4. ShellChron offers more dynamic input options for data on the variable that is not modeled (usually d18O of precipitation fluid), circumventing the (often false) assumption that this variable remains constant throughout the year and preventing fixed values for this variable hardcoded in the model.
  5. ShellChron achieves more efficient SCEUA modeling by pre-guessing the parameters of temperature and growth rate sinusoids using a sinusoidal regression (see “sinreg()” formula). This is an essential feature that allows ShellChron to process more optimization windows while retaining competitive processing time (see Figure 3).

Figure 3: Timing of whole model run at various data resolutions

NOTE: To run optimally, ShellChron requires sampling distance data to be provided in micrometers (see “data_import()” function). The optimal structure of the input CSV should be as follows (see description in “Virtual_shell” example):

column 1: D Sampling distance, in micrometers along the virtual record.

column 2: d18Oc stable oxygen isotope value, in permille VPDB.

column 3: YEARMARKER Vector of zeroes with “1” marking year transitions.

column 4: D_err Sampling distance uncertainty, in micrometers.

column 5: d18Oc_err stable oxygen isotope value uncertainty, in permille.

When you use ShellChron, please cite de Winter, 2022:

de Winter, N.J. (2022) “ShellChron 0.4.0: a new tool for constructing chronologies in accretionary carbonate archives from stable oxygen isotope profiles” Geoscientific Model Development 15, 1247-1267, DOI: 10.5194/gmd-15-1247-2022

Installation

You can install the released version of ShellChron from CRAN with:

install.packages("ShellChron")

And the development version from GitHub with:

# install.packages("devtools")
# devtools::install_github("nielsjdewinter/ShellChron")
install.packages("ShellChron", repos = c('https://nielsjdewinter.r-universe.dev', 'https://cloud.r-project.org'))

Example

This is a basic example which shows you how to solve a common problem:

library(ShellChron)
## Full model run
# WARNING: Running the full ShellChron model (even on small example data) always takes some time (usually in the order of 30-60 minutes)
# example <- wrap_function(path = getwd(),
#  file_name = system.file("extdata", "Virtual_shell.csv",
#  package = "ShellChron"),
#  "calcite",
#  1,
#  365,
#  d18Ow = 0,
#  t_maxtemp = 182.5,
#  MC = 1000,
#  plot = FALSE,
#  plot_export = FALSE,
#  export_raw = FALSE)"

# Quick demo on how to create an SST curve
# Set parameters
T_amp <- 20
T_per <- 365
T_pha <- 150
T_av <- 15
T_par <- c(T_amp, T_per, T_pha, T_av)
SST <- temperature_curve(T_par, 1, 1) # Run the function

Help Manual

Help pageTopics
Function that corrects chronologies for sudden jumps in timeage_corr
Function to detect year transitions and calculate cumulative age of model resultscumdy
Function to detect year transitions and calculate cumulative age of model resultscumulative_day
Function to convert SST data to d18Od18O_model
Function to convert T data to d18Od18Oc_from_T_d18Ow
Function BLATANTLY STOLEN FROM SHELLCHRON PACKAGE to convert d18O data to SSTd18Ow_from_d18O_T
Function to import d18O data and process yearmarkers and calculation windowsdata_import
Function to prepare d18O data from a preexisting object and process yearmarkers and calculation windowsdata_import_object
Function to merge and export the results of the ShellChron modelexport_results
Function that models a d18O curve through SST and GR sinusoidsgrowth_model
Function that creates a skewed sinusoidal growth rate (GR) curve from a list of parametersgrowth_rate_curve
Function that propagates measurement uncertainty through model resultsmc_err_form
Function that propagates measurement uncertainty through model resultsmc_err_orth
Function that propagates measurement uncertainty through model resultsmc_err_proj
Function that identifies peaks in a datasetpeakid
Function that optimizes sinusoid parameters to fit d18O datarun_model
Function to calculate weighted standard deviationsd_wt
Function that carries out a sinusoidal regressionsinreg
Function BLATANTLY STOLEN FROM SHELLCHRON PACKAGE to convert d18O data to SSTT_from_d18O_d18Ow
Function that creates a sinusoidal Sea Surface Temperature (SST) curve from a list of parameterstemperature_curve
Virtual input data for ShellChronVirtual_shell
Full ShellChron workflow wrapped in a single functionwrap_function