Skip to content

Commit

Permalink
Minor change to d18O_model.r to update the VPDB to VSMOW conversion
Browse files Browse the repository at this point in the history
Added citation information about the paper
  • Loading branch information
nielsjdewinter committed Feb 18, 2022
1 parent 58cf0d3 commit e911bee
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2021-07-02.
Once it is accepted, delete this file and tag the release (commit 7d1ccf3).
This package was submitted to CRAN on 2021-07-05.
Once it is accepted, delete this file and tag the release (commit 58cf0d3).
9 changes: 4 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ShellChron
Title: Builds Chronologies from Oxygen Isotope Profiles in Shells
Version: 0.4.0
Version: 0.4.1
Authors@R:
person(given = "Niels",
family = "de Winter",
Expand All @@ -10,10 +10,9 @@ Authors@R:
Description: 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
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.
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ Previous versions of ShellChron underestimated the seasonal d18Oc range and retu
1. The boundaries on the growth rate sinusoid were set too liberally, causing growth rates to vary by several orders of magnitude within years and allowing growth rate variability over time to be nearly flat or vertical. The run_model function was modified to make the growth rate boundaries more restrictive, and dependent on the estimated initial value for the mean growth rate. The new boundaries still allow growth rate to vary by a factor 10 within a year, which should cover the natural variability of growth rates in d18Oc archives.
2. Constant d18Oc solutions in modeling windows were often a result of the number of years of d18Oc that were modeled within a window. If the window contained more time than expected the samples outside the d18Oc curve were assigned a constant value, resulting in a flat d18Oc
profile. This issue also explained why the mean modeled d18Oc values underestimated the true d18Oc variability in the record.
3. Slight modifications were made to the cumulative_day function that aligns results from individual modeling windows to a common time axis. The previous version of ShellChron added too many or too little days to the age results in modeling windows in which either none or multiple year transitions occur. This resulted in sudden jumps in time in the age-distance relationship.
3. Slight modifications were made to the cumulative_day function that aligns results from individual modeling windows to a common time axis. The previous version of ShellChron added too many or too little days to the age results in modeling windows in which either none or multiple year transitions occur. This resulted in sudden jumps in time in the age-distance relationship.

## 0.4.0
Added citation data of the now-published paper
Slightly modified d18O_model.r to update the function for VPDB to VSMOW conversion
6 changes: 5 additions & 1 deletion R/d18O_model.r
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
#' international reference materials for isotope-ratio analysis (IUPAC Technical
#' Report), _Pure and Applied Chemistry_ **2014**, _86.3_, 425-467.
#' \doi{10.1515/pac-2013-1023}
#' Kim, S.-T., Coplen, T. B., and Horita, J.: Normalization of stable
#' isotope data for carbonate minerals: Implementation of IUPAC
#' guidelines, Geochim. Cosmochim. Ac. **2015** 158, 276-289.
#' \doi{10.1016/j.gca.2015.02.011}
#' @examples
#' # Create dummy SST data
#' t <- seq(1, 40, 1)
Expand All @@ -52,7 +56,7 @@ d18O_model <- function(SST, # Function that converts SST values into d18O
d18Ow <- c(0, rep(d18Ow, length(SST[,1])/length(d18Ow))) # If d18Ow is a vector with more than one value, multiply it to reach the same length of SST (multiply by "years")
}
if(transfer_function == "KimONeil97"){
d18Oc <- cbind(SST[,1], (exp((18.03 * 1000 / (SST[,2] + 273.15) - 32.42) / 1000) - 1) * 1000 + (0.97002 * d18Ow - 29.98)) # Use Kim and O'Neil (1997) with conversion between VSMOW and VPDB by Brand et al. (2014)
d18Oc <- cbind(SST[,1], (exp((18.03 * 1000 / (SST[,2] + 273.15) - 32.42) / 1000) - 1) * 1000 + (0.97001 * d18Ow - 29.99)) # Use Kim and O'Neil (1997) with conversion between VSMOW and VPDB by Brand et al. (2014) and Kim et al. (2015)
}else if(transfer_function == "GrossmanKu86"){
d18Oc <- cbind(SST[,1], (20.6 - SST[,2]) / 4.34 + d18Ow + 0.2) # Use Grossmann and Ku (1986) modified by Dettmann et al. (1999)
}else{
Expand Down
3 changes: 3 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ The model builds on previous work by [Judd et al. 2018](https://doi.org/10.1016/

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

When you use ShellChron, please cite [de Winter, 2022](https://gmd.copernicus.org/articles/15/1247/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

Expand Down
90 changes: 90 additions & 0 deletions README.html

Large diffs are not rendered by default.

22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ in “temperature\_curve()” function) and a skewed growth rate sinusoid
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](https://doi.org/10.1029/91WR02985)) 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.
using the SCEUA algorithm (see [Duan et al.,
1992](https://doi.org/10.1029/91WR02985)) 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 sinusoid](man/figures/README-SSTcurve.png)
![Figure 2: Growth rate sinusoid](man/figures/README-GRcurve.png)
Expand All @@ -35,8 +35,8 @@ 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
“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
Expand Down Expand Up @@ -79,6 +79,14 @@ transitions.
**column 5: d18Oc\_err** stable oxygen isotope value uncertainty, in
permille.

When you use ShellChron, please cite [de Winter,
2022](https://gmd.copernicus.org/articles/15/1247/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
Expand Down
15 changes: 15 additions & 0 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
citHeader("To cite ShellChron in publications use:")

citEntry(
entry = "Article",
title = "ShellChron 0.4.0: a new tool for constructing chronologies in accretionary carbonate archives from stable oxygen isotope profiles",
author = person("Niels J.", "de Winter"),
journal = "Geoscientific Model Development",
year = "2022",
volume = "15",
pages = "1247-1267",
url = "https://gmd.copernicus.org/articles/15/1247/2022/",
textVersion = paste(
"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"
)
)
4 changes: 4 additions & 0 deletions man/d18O_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e911bee

Please sign in to comment.