{"id":13948849,"url":"https://github.com/EarthSystemDiagnostics/sedproxy","last_synced_at":"2025-07-20T10:32:53.777Z","repository":{"id":41407099,"uuid":"158822183","full_name":"EarthSystemDiagnostics/sedproxy","owner":"EarthSystemDiagnostics","description":"An R package for modelling sediment archived climate proxy records.","archived":false,"fork":false,"pushed_at":"2025-06-15T17:34:16.000Z","size":52112,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-22T16:05:55.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://earthsystemdiagnostics.github.io/sedproxy/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EarthSystemDiagnostics.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-11-23T11:13:05.000Z","updated_at":"2025-06-15T17:31:58.000Z","dependencies_parsed_at":"2025-04-17T08:55:49.550Z","dependency_job_id":"0a9db0cb-f687-460d-8e1a-a614f09e2a1d","html_url":"https://github.com/EarthSystemDiagnostics/sedproxy","commit_stats":{"total_commits":332,"total_committers":2,"mean_commits":166.0,"dds":0.003012048192771122,"last_synced_commit":"4cc47b411fd149d6fedc9853d33127852d3580e9"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/EarthSystemDiagnostics/sedproxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EarthSystemDiagnostics%2Fsedproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EarthSystemDiagnostics%2Fsedproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EarthSystemDiagnostics%2Fsedproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EarthSystemDiagnostics%2Fsedproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EarthSystemDiagnostics","download_url":"https://codeload.github.com/EarthSystemDiagnostics/sedproxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EarthSystemDiagnostics%2Fsedproxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261320598,"owners_count":23140943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-08T05:01:32.526Z","updated_at":"2025-07-20T10:32:53.738Z","avatar_url":"https://github.com/EarthSystemDiagnostics.png","language":"R","funding_links":[],"categories":["Observation and Conservation of Ecosystems","Climate Change"],"sub_categories":["Ocean and Climate","Earth and Climate Modeling"],"readme":"---\noutput: github_document\n---\n\n# Sedproxy: Simulation of Sediment Archived Climate Proxy Records.\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/EarthSystemDiagnostics/sedproxy/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/EarthSystemDiagnostics/sedproxy/actions/workflows/R-CMD-check.yaml)\n[![codecov](https://codecov.io/gh/EarthSystemDiagnostics/sedproxy/branch/master/graph/badge.svg?token=hht8uueIsX)](https://codecov.io/gh/EarthSystemDiagnostics/sedproxy)\n\u003c!-- badges: end --\u003e\n\n```{r knitr_setup, echo=FALSE}\nknitr::opts_chunk$set(dev = \"svg\",\n                      fig.path = \"man/figures/README-\",\n                      out.width = \"100%\")\n```\n\n\n## Introduction\n\n\n`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)](https://www.clim-past.net/14/1851/2018/cp-14-1851-2018.html).\n\nPlease contact Dr Andrew Dolman \u003c\u003candrew.dolman@awi.de\u003e\u003e, or Dr Thomas Laepple \u003c\u003ctlaepple@awi.de\u003e\u003e, at the Alfred-Wegener-Institute, Helmholtz Centre for Polar and Marine Research, Germany, for more information.\n\nThis work was supported by German Federal Ministry of Education and Research (BMBF) as Research for Sustainability initiative [FONA](https://www.fona.de/) through the [PalMod](https://www.palmod.de/) project (FKZ: 01LP1509C). \n\n![](man/figures/PalMod_Logo_RGB.png)\n\n## Installation\n\n**sedproxy** is available from CRAN\n\n```{r, eval=FALSE}\ninstall.packages(\"sedproxy\")\n```\n\nOr the development version can be installed directly from GitHub\n\n```{r, eval=FALSE}\nif (!require(\"remotes\")) {\n  install.packages(\"remotes\")\n}\n\nremotes::install_github(\"EarthSystemDiagnostics/sedproxy\")\n```\n\n## Shiny app\n\nA Shiny app is available via an additional package `shinysedproxy` which is currently only available on Github\n\n[shinysedproxy](https://github.com/EarthSystemDiagnostics/shinysedproxy)\n\n\n```{r, eval=FALSE}\nremotes::install_github(\"EarthSystemDiagnostics/shinysedproxy\")\n```\n\nIt 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.\n\nTo run the Shiny app enter the following in the R terminal:\n\n```{r run_shiny, eval=FALSE}\nlibrary(shinysedproxy)\nShinySedproxy()\n```\n\n![](man/figures/sedproxy-screenshot.png)\n\nAn online version of the Shiny app is hosted at [shinyapps.io](https://limnolrgy.shinyapps.io/sedproxy-shiny/)\n\n\n\nBelow are some brief examples of how to run `sedproxy` from a script or the command line.\n\n## Example data\n\n`sedproxy` includes example data for a single sediment core and location: core number 41 in the Shakun et al. (2012) compilation (`r sedproxy::N41.proxy.details$Core`, Rosenthal et al. 2003). The climate signal is taken from the [TraCE-21ka](http://www.cgd.ucar.edu/ccr/TraCE/) Simulation of Transient Climate Evolution over the last 21,000 years, using the grid cell closest to core `r sedproxy::N41.proxy.details$Core`. 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 `r sedproxy::N41.proxy.details$Core`, with a minimum rate of 0.2 * the mean rate.\n\n\n**The `r sedproxy::N41.proxy.details$Core` core**\n\n```{r message = FALSE, warning = FALSE}\nlibrary(tidyverse)\nlibrary(knitr)\nlibrary(sedproxy)\n```\n\n\n```{r}\nN41.proxy.details %\u003e% \n  mutate_if(is.numeric, round, digits = 2) %\u003e% \n  gather() %\u003e% \n  kable(., format = \"markdown\", digits = 2)\n```\n\n\n**Input climate signal**\n\nThe first 5 rows:\n\n```{r}\n(N41.t21k.climate[1:5,]-273.15) %\u003e% \n  kable(., format = \"markdown\", digits = 2)\n```\n\n**Actual proxy record**\n\nCore `r sedproxy::N41.proxy.details$Core` (Rosenthal et al. 2003)\n\n```{r}\nkable(head(N41.proxy), format = \"markdown\")\n```\n\n*******\n\n## Function `ClimToProxyClim`\n\n`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.\n\n\n```{r , fig.show='hold', warning=FALSE}\nset.seed(26052017)\nclim.in \u003c- N41.t21k.climate[nrow(N41.t21k.climate):1,] - 273.15\n\n# The input climate signal should be a time series object\n# The Trace simulation runs to the year 1990 AD, therefore the start time for \n# the input climate is -39 years BP\nclim.in \u003c- ts(clim.in, start = -39)\n\nPFM \u003c- ClimToProxyClim(clim.signal = clim.in,\n                       timepoints = round(N41.proxy$Published.age),\n                       calibration.type = \"identity\",\n                       habitat.weights = N41.G.ruber.seasonality,\n                       sed.acc.rate = N41.proxy$Sed.acc.rate.cm.ka,\n                       sigma.meas = 0.23,\n                       sigma.ind = 2,\n                       n.samples = 30,\n                       n.replicates = 10)\n```\n\n\n```{r}\nPFM$everything\n```\n\n**Simple plotting**\n\n```{r default_plot, fig.width=6, fig.height=5.5}\nPFM %\u003e% \n  PlotPFMs(max.replicates = 1)\n```\n\n\n**Plot 5 replicates of the final simulated proxy**\n\n```{r plot_reps, fig.width=6, fig.height=5.5}\nPFM %\u003e% \n  #filter(stage == \"simulated.proxy\") %\u003e% \n  PlotPFMs(., max.replicates = 5, plot.stages = \"simulated.proxy\")\n```\n\n\n**Conversion to proxy units**\n \nThe initial input climate signal can be converted into \"proxy units\" if a `calibration.type` is specified. This simulates the Environment -\u003e Sensor stage of the proxy system.\n\n```{r MgCa, fig.show='hold', warning=FALSE, echo=FALSE, eval=TRUE}\nset.seed(26052017)\nPFM_2 \u003c- ClimToProxyClim(clim.signal = clim.in, \n                         timepoints = round(N41.proxy$Published.age),\n                         calibration.type = \"MgCa\",\n                         #calibration = \"Ten planktonic species_350-500\",\n                         habitat.weights = N41.G.ruber.seasonality,\n                         sed.acc.rate = N41.proxy$Sed.acc.rate.cm.ka,\n                         sigma.meas = 0.46,\n                         sigma.ind = 0,\n                         n.samples = 30,\n                         n.replicates = 1)\n```\n\n\n```{r MgCa_plot, fig.width=6, fig.height=5.5, echo=FALSE, eval=TRUE}\nPFM_2 %\u003e%\n  PlotPFMs(.) \n```\n\n\n\n\n## Literature cited\n\nDolman, 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.\n\nFraile, I., Schulz, M., Mulitza, S., \u0026 Kucera, M. (2008): Predicting the global distribution of planktonic foraminifera using a dynamic ecosystem model. Biogeosciences, 5: 891–911.\n\nLaepple, T., \u0026 Huybers, P. (2013): Reconciling discrepancies between Uk37 and Mg/Ca reconstructions of Holocene marine temperature variability. Earth and Planetary Science Letters, 375: 418–429.\n\nRosenthal, Y., Oppo, D. W., \u0026 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.\n\nShakun, J. D., Clark, P. U., He, F., Marcott, S. A., Mix, A. C., Liu, Z., Otto-Bliesner, B., Schmittner, A., \u0026 Bard, E. (2012): Global warming preceded by increasing carbon dioxide concentrations during the last deglaciation. Nature, 484: 49–54.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEarthSystemDiagnostics%2Fsedproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEarthSystemDiagnostics%2Fsedproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEarthSystemDiagnostics%2Fsedproxy/lists"}