Home

Awesome

Sedproxy: Simulation of Sediment Archived Climate Proxy Records.

<!-- badges: start -->

R-CMD-check codecov

<!-- badges: end -->

Introduction

sedproxy provides a forward model for sediment archived climate proxies. The forward model and its applications are described in detail in (Dolman and Laepple, CP 2018).

Please contact Dr Andrew Dolman <andrew.dolman@awi.de>, or Dr Thomas Laepple <tlaepple@awi.de>, at the Alfred-Wegener-Institute, Helmholtz Centre for Polar and Marine Research, Germany, for more information.

This work was supported by German Federal Ministry of Education and Research (BMBF) as Research for Sustainability initiative FONA through the PalMod project (FKZ: 01LP1509C).

Installation

sedproxy is available from CRAN

install.packages("sedproxy")

Or the development version can be installed directly from GitHub

if (!require("remotes")) {
  install.packages("remotes")
}

remotes::install_github("EarthSystemDiagnostics/sedproxy")

Shiny app

A Shiny app is available via an additional package shinysedproxy which is currently only available on Github

shinysedproxy

remotes::install_github("EarthSystemDiagnostics/shinysedproxy")

It provides a graphical user interface to the main sedproxy function ClimToProxyClim. Currently this app forward models a proxy from a randomly generated input climate and serves only to illustrate the functionality of sedproxy. The user can alter the parameters of the forward model and observe the results graphically. In future versions it may be possible to load input climates and other input parameters from a file and to save the output.

To run the Shiny app enter the following in the R terminal:

library(shinysedproxy)
ShinySedproxy()

An online version of the Shiny app is hosted at shinyapps.io

Below are some brief examples of how to run sedproxy from a script or the command line.

Example data

sedproxy includes example data for a single sediment core and location: core number 41 in the Shakun et al. (2012) compilation (MD97-2141, Rosenthal et al. 2003). The climate signal is taken from the TraCE-21ka Simulation of Transient Climate Evolution over the last 21,000 years, using the grid cell closest to core MD97-2141. Seasonality of G.ruber, the Foraminifera for which test Mg/Ca ratios were measured, is taken from the model of Fraile et al (2008). Sediment accumulation rates were estimated from the depth and age data associated with core MD97-2141, with a minimum rate of 0.2 * the mean rate.

The MD97-2141 core

library(tidyverse)
library(knitr)
library(sedproxy)
N41.proxy.details %>% 
  mutate_if(is.numeric, round, digits = 2) %>% 
  gather() %>% 
  kable(., format = "markdown", digits = 2)
keyvalue
Number41
ID.noN41
CoreMD97-2141
LocationSulu Sea
ProxyMg/Ca
Lat8.78
Lon121.28
Elevation-3633.000000
ReferenceRosenthal et al., 2003
Resolution77.89
Calibration.refRosenthal and Lohman, 2002
CalibrationT = ln(MgCa/0.28)/0.095
Foram.spG. ruber
Ref.14Cde Garidel-Thoron et al., 2001, Paleoceanography
NotesNA
Geo.clusterSulu Sea
Archive.typeMarine sediment

Input climate signal

The first 5 rows:

(N41.t21k.climate[1:5,]-273.15) %>% 
  kable(., format = "markdown", digits = 2)
123456789101112
24.7124.2424.9126.0726.5327.0727.4026.7726.4926.4926.7826.19
24.8424.3824.6825.8626.5726.5227.0127.5226.6326.7026.6325.82
24.6924.6025.2126.0026.4626.9427.0026.9926.3926.4526.6625.77
24.5524.5225.3426.3626.8726.7527.2926.8326.5526.9126.5925.84
24.6224.1924.8026.0226.8426.6726.9927.2526.8027.0126.6725.81

Actual proxy record

Core MD97-2141 (Rosenthal et al. 2003)

kable(head(N41.proxy), format = "markdown")
Published.agePublished.temperatureSed.acc.rate.cm.kaProxy.value
4334.28628.9236.794.346
4527.42929.2036.754.460
4575.71429.1536.774.442
4720.57128.5536.774.195
4913.71428.3336.704.109
4994.40029.4436.674.564

Function ClimToProxyClim

ClimToProxyClim is the main function in package sedproxy. It simulates a sediment archived proxy from an assumed true climate signal, the sediment accumulation rate, seasonality of the encoding organism/process, and the number of samples per timepoint.

set.seed(26052017)
clim.in <- N41.t21k.climate[nrow(N41.t21k.climate):1,] - 273.15

# The input climate signal should be a time series object
# The Trace simulation runs to the year 1990 AD, therefore the start time for 
# the input climate is -39 years BP
clim.in <- ts(clim.in, start = -39)

PFM <- ClimToProxyClim(clim.signal = clim.in,
                       timepoints = round(N41.proxy$Published.age),
                       calibration.type = "identity",
                       habitat.weights = N41.G.ruber.seasonality,
                       sed.acc.rate = N41.proxy$Sed.acc.rate.cm.ka,
                       sigma.meas = 0.23,
                       sigma.ind = 2,
                       n.samples = 30,
                       n.replicates = 10)
PFM$everything
## # A tibble: 14,045 x 7
##    timepoints n.samples replicate stage             value scale       label     
##         <dbl>     <dbl>     <dbl> <chr>             <dbl> <chr>       <chr>     
##  1       4334        30         1 proxy.bt.sb.sampY  27.7 Proxy units (4) +Alia~
##  2       4527        30         1 proxy.bt.sb.sampY  27.7 Proxy units (4) +Alia~
##  3       4576        30         1 proxy.bt.sb.sampY  27.7 Proxy units (4) +Alia~
##  4       4721        30         1 proxy.bt.sb.sampY  27.6 Proxy units (4) +Alia~
##  5       4914        30         1 proxy.bt.sb.sampY  27.6 Proxy units (4) +Alia~
##  6       4994        30         1 proxy.bt.sb.sampY  27.6 Proxy units (4) +Alia~
##  7       5092        30         1 proxy.bt.sb.sampY  27.7 Proxy units (4) +Alia~
##  8       5156        30         1 proxy.bt.sb.sampY  27.6 Proxy units (4) +Alia~
##  9       5254        30         1 proxy.bt.sb.sampY  27.7 Proxy units (4) +Alia~
## 10       5318        30         1 proxy.bt.sb.sampY  27.7 Proxy units (4) +Alia~
## # ... with 14,035 more rows

Simple plotting

PFM %>% 
  PlotPFMs(max.replicates = 1)
## Joining, by = c("stage", "scale")
## Scale for 'alpha' is already present. Adding another scale for 'alpha', which
## will replace the existing scale.
<img src="man/figures/README-default_plot-1.svg" width="100%" />

Plot 5 replicates of the final simulated proxy

PFM %>% 
  #filter(stage == "simulated.proxy") %>% 
  PlotPFMs(., max.replicates = 5, plot.stages = "simulated.proxy")
## Joining, by = c("stage", "scale")
## Scale for 'alpha' is already present. Adding another scale for 'alpha', which
## will replace the existing scale.
<img src="man/figures/README-plot_reps-1.svg" width="100%" />

Conversion to proxy units

The initial input climate signal can be converted into “proxy units” if a calibration.type is specified. This simulates the Environment -> Sensor stage of the proxy system.

## Rescaling noise

## Joining, by = c("stage", "scale")
## Scale for 'alpha' is already present. Adding another scale for 'alpha', which
## will replace the existing scale.
<img src="man/figures/README-MgCa_plot-1.svg" width="100%" />

Literature cited

Dolman, A. M. and Laepple, T.: Sedproxy: a forward model for sediment archived climate proxies, Clim. Past Discuss., https://doi.org/10.5194/cp-2018-13, in review, 2018.

Fraile, I., Schulz, M., Mulitza, S., & Kucera, M. (2008): Predicting the global distribution of planktonic foraminifera using a dynamic ecosystem model. Biogeosciences, 5: 891–911.

Laepple, T., & Huybers, P. (2013): Reconciling discrepancies between Uk37 and Mg/Ca reconstructions of Holocene marine temperature variability. Earth and Planetary Science Letters, 375: 418–429.

Rosenthal, Y., Oppo, D. W., & Linsley, B. K. (2003): The amplitude and phasing of climate change during the last deglaciation in the Sulu Sea, western equatorial Pacific. Geophys. Res. Lett., 30: 1428.

Shakun, J. D., Clark, P. U., He, F., Marcott, S. A., Mix, A. C., Liu, Z., Otto-Bliesner, B., Schmittner, A., & Bard, E. (2012): Global warming preceded by increasing carbon dioxide concentrations during the last deglaciation. Nature, 484: 49–54.