diff --git a/.Rbuildignore b/.Rbuildignore index ba21ef32..de7d2093 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,3 +7,4 @@ ci_dependencies ^docs$ ^pkgdown$ ^\.github$ +^cran-comments.md diff --git a/.github/old/R-CMD-check.yaml b/.github/old/R-CMD-check.yaml new file mode 100644 index 00000000..3873fb02 --- /dev/null +++ b/.github/old/R-CMD-check.yaml @@ -0,0 +1,49 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [master, dev, gitactions] + pull_request: + branches: [master, dev, gitactions] + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macOS-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true diff --git a/.github/old/pkgdown_temp.yaml b/.github/old/pkgdown_temp.yaml new file mode 100644 index 00000000..00b82cb4 --- /dev/null +++ b/.github/old/pkgdown_temp.yaml @@ -0,0 +1,43 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master, dev] + release: + types: [published] + workflow_dispatch: + +name: pkgdown + +jobs: + pkgdown: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + cache-version: 2 + extra-packages: any::pkgdown + needs: website + + - name: Downgrade terra + run: | + Rscript -e 'pak::pkg_install("devtools")' + Rscript -e 'devtools::install_version("terra", version="1.6.7", repos = "https://cloud.r-project.org/")' + + - name: Deploy package + run: | + git config --local user.name "$GITHUB_ACTOR" + git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" + Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, commit_message =paste0(pkgdown:::construct_commit_message("."),"\n [skip ci]"))' diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 91d99550..b2846346 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,8 +1,10 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [main, master] + branches: [master, dev] + pull_request: + branches: [master, dev] release: types: [published] workflow_dispatch: @@ -12,24 +14,38 @@ name: pkgdown jobs: pkgdown: runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: pkgdown + extra-packages: any::pkgdown, local::. needs: website - - name: Deploy package + - name: Downgrade terra run: | - git config --local user.name "$GITHUB_ACTOR" - git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, commit_message =paste0(pkgdown:::construct_commit_message("."),"\n [skip ci]"))' + Rscript -e 'pak::pkg_install("devtools")' + Rscript -e 'devtools::install_version("terra", version="1.6.7", repos = "https://cloud.r-project.org/")' + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/DESCRIPTION b/DESCRIPTION index 551acbfa..7f5c2582 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,7 @@ Package: pastclim Type: Package -Title: This package provides helper functions to interact with timeseries of worldwide climate - reconstructions -Version: 1.0.1 +Title: Manipulate Timeseries of Paleoclimate Reconstructions +Version: 1.1.0 Authors@R: c( person("Michela", "Leonardi", role = "aut"), person(c("Emily","Y."), "Hallet", role = "ctb"), @@ -12,11 +11,8 @@ Authors@R: c( email = "am315@cam.ac.uk") ) Maintainer: Andrea Manica -Description: Currently this package focuses on Beyer et al 2020, a reconstruction - of climate based on the HadCM3 model for the last 120k years, and Krapp et al - 2021, covering the last 800k years. The reconstructions - are bias-corrected and downscaled to 0.5 degree, and this package helps using - these data for ecological and archaeological studies. +Description: This R package is designed to provide an easy way to extract and manipulate paleoclimate + reconstructions for ecological and anthropological analyses. License: CC BY 4.0 URL: https://github.com/EvolEcolGroup/pastclim, https://evolecolgroup.github.io/pastclim/ @@ -24,20 +20,18 @@ BugReports: https://github.com/EvolEcolGroup/pastclim/issues Encoding: UTF-8 LazyData: true LazyDataCompression: xz -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.1 Depends: - R (>= 3.5.0) + R (>= 4.0.0) Imports: curl, ncdf4, - terra + terra, + utils Suggests: - rmarkdown, - knitr, - pastclimData, - sf, - testthat (>= 3.0.0) -Remotes: - EvolEcolGroup/pastclimData + rmarkdown, + knitr, + sf, + testthat (>= 3.0.0) VignetteBuilder: knitr Config/testthat/edition: 3 diff --git a/NAMESPACE b/NAMESPACE index a15f5969..1f259976 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,15 +1,28 @@ # Generated by roxygen2: do not edit by hand +export(check_dataset_path) export(climate_for_locations) export(climate_for_time_slice) +export(df_from_region_series) +export(df_from_region_slice) export(download_dataset) export(get_available_datasets) export(get_biome_classes) +export(get_data_path) export(get_downloaded_datasets) export(get_ice_mask) export(get_land_mask) export(get_mis_time_steps) -export(get_pastclimdata_path) +export(get_time_steps) export(get_vars_for_dataset) +export(is_region_series) +export(location_series) +export(location_slice) +export(region_series) +export(region_slice) +export(sample_region_series) +export(sample_region_slice) +export(set_data_path) +export(slice_region_series) export(time_series_for_locations) import(terra) diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 00000000..62164e9d --- /dev/null +++ b/NEWS.md @@ -0,0 +1,18 @@ +# pastclim 1.1.0 + +* Expand functionality to handle time series for regions; rename functions to + extract data for regions and locations to make them consistent. Old code will + still work, but will raise a warning that the functions are deprecated. + +* Remove the need for `pastclimData`, we now put any data in the user dir returned + by R>=4.0.0. This removes the need of re-downloading the data when upgrading R. + +* Add monthly variables to Beyer2020 and Krapp2021. + +# pastclim 1.0.1 + +* Fix bug when information was extracted for just one location. + +# pastclim 1.0.0 + +* Initial public release \ No newline at end of file diff --git a/R/check_available_datasets.R b/R/check_available_datasets.R new file mode 100644 index 00000000..732806a6 --- /dev/null +++ b/R/check_available_datasets.R @@ -0,0 +1,23 @@ +#' Check if dataset is available. +#' +#' Internal getter function +#' +#' @param dataset string defining dataset +#' @param include_custom boolean whether a 'custom' dataset is allowed +#' +#' @keywords internal + + +check_available_dataset <- function(dataset, include_custom = FALSE) { + available_datasets <- get_available_datasets() + if (include_custom) { + available_datasets <- c(available_datasets, "custom") + } + if (!dataset %in% available_datasets) { + stop("'dataset' must be one of ", paste(available_datasets, + collapse = ", " + )) + } else { + return(TRUE) + } +} diff --git a/R/check_dataset_path.R b/R/check_dataset_path.R new file mode 100644 index 00000000..c27b22f0 --- /dev/null +++ b/R/check_dataset_path.R @@ -0,0 +1,30 @@ +#' Check dataset and path_to_nc params. +#' +#' Check that the dataset and path_to_nc parameters are valid +#' +#' @param dataset string defining the dataset to use. If set to "custom", +#' then a single nc file is used from "path_to_nc" +#' @param path_to_nc the path to the custom nc file containing the paleoclimate +#' reconstructions. All the variables of interest need to be included in +#' this file. +#' +#' @export + + +check_dataset_path <- function(dataset, path_to_nc) { + check_available_dataset(dataset = dataset, include_custom = TRUE) + + if (all(dataset == "custom", is.null(path_to_nc))) { + stop("you need to set path_to_nc if dataset='custom'") + } + # check that we are only given path_to_nc if we use a custom dataset + if (!is.null(path_to_nc)) { + if (dataset != "custom") { + stop("path_to_nc can only be set if dataset=='custom'") + } + if (!file.exists(path_to_nc)) { + stop("path_to_nc does not point to a file") + } + } + return(TRUE) +} diff --git a/R/check_var_downloaded.R b/R/check_var_downloaded.R new file mode 100644 index 00000000..8d8f17ff --- /dev/null +++ b/R/check_var_downloaded.R @@ -0,0 +1,24 @@ +#' Internal functions to check whether we have downloaded a given variable +#' for a dataset +#' +#' @param variable a vector of names of the variables of interest +#' @param dataset dataset of interest +#' +#' @keywords internal + +check_var_downloaded <- function(variable, dataset) { + # first check the variable exists for that dataset + check_available_variable(variable, dataset) + + # test if we have downloaded already + if (!all(variable %in% get_downloaded_datasets() + [[dataset]])) { + missing_vars <- variable[!variable %in% + get_downloaded_datasets()[[dataset]]] + stop( + "variable (", paste(missing_vars, collapse = ", "), + ") not yet downloaded, use `download_dataset()`" + ) + } + return(TRUE) +} diff --git a/R/check_var_in_nc.R b/R/check_var_in_nc.R index da355570..02d46b89 100644 --- a/R/check_var_in_nc.R +++ b/R/check_var_in_nc.R @@ -3,8 +3,8 @@ #' Internal function to test a custom nc file. #' #' @param bio_variables vector of names of variables to be extracted -#' @param path_to_nc the path to the file that contains the downloaded -#' resonstructions. +#' @param path_to_nc the path to the custom nc file containing the paleoclimate +#' reconstructions. #' #' @keywords internal @@ -25,7 +25,8 @@ check_var_in_nc <- function(bio_variables, path_to_nc) { if (!all(bio_variables %in% nc_in_vars)) { stop( "variable (", paste(bio_variables[!bio_variables %in% nc_in_vars], - collapse = ", "), + collapse = ", " + ), ") not present in the file" ) } diff --git a/R/climate_for_time_slice.R b/R/climate_for_time_slice.R deleted file mode 100644 index c0d2956f..00000000 --- a/R/climate_for_time_slice.R +++ /dev/null @@ -1,60 +0,0 @@ -#' Extract a raster brick for a given time slice -#' -#' This function extracts a raster brick for a given time slice. -#' -#' @param time_bp time slice in years before present (negative) -#' @param bio_variables vector of names of variables to be extracted -#' @param dataset string defining the dataset to use -#' @param path_to_nc the path to the directory containing the downloaded -#' reconstructions. Leave it unset if you are using the companion `pastclimData` -#' to store datasets. -#' -#' @import terra -#' @export - -climate_for_time_slice <- - function(time_bp, - bio_variables, - dataset, - path_to_nc = NULL) { - - # if we are using standard datasets, check whether a variables exists - if (dataset != "custom") { - check_var_downloaded(bio_variables, dataset, path_to_nc) - } else { # else check that the variables exist in the custom nc - check_var_in_nc(bio_variables, path_to_nc) - } - - # if path_to_nc is not set, use pastclimData - if (is.null(path_to_nc)) { - path_to_nc <- get_pastclimdata_path() - } - - time_index <- NULL - climate_spatraster <- NULL - - for (this_var in bio_variables) { - # get name of file that contains this variable - if (dataset != "custom") { - this_file <- get_file_for_dataset(this_var, dataset)$file_name - this_file <- file.path(path_to_nc, this_file) - this_var_nc <- get_varname(variable = this_var, dataset = dataset) - } else { - this_file <- file.path(path_to_nc) - this_var_nc <- this_var - } - if (is.null(time_index)) { - time_index <- time_bp_to_index(time_bp = time_bp, path_to_nc = - this_file) - } - var_brick <- terra::rast(this_file, subds = this_var_nc) - var_slice <- terra::subset(var_brick, subset = time_index) - if (is.null(climate_spatraster)) { - climate_spatraster <- var_slice - } else { - terra::add(climate_spatraster) <- var_slice - } - } - names(climate_spatraster) <- varnames(climate_spatraster) <- bio_variables - return(climate_spatraster) - } diff --git a/R/datasets_docs.R b/R/datasets_docs.R index cc4fff32..050a974f 100644 --- a/R/datasets_docs.R +++ b/R/datasets_docs.R @@ -1,61 +1,79 @@ -#' Documentation for the Beyer2020 dataset -#' -#' This dataset covers the last 120k years, at intervals of 1/2 k years. +#' Documentation for the Example dataset #' -#' This dataset can be downloaded with \code{\link{download_dataset}}. The -#' files can be found at +#' This dataset is a subset of Beyer2020, used for the vignette of pastclim. +#' Do not use this dataset for any real work, as it might not reflect the most +#' up-to-date version of Beyer2020. #' -#' Manica, Andrea (2022): pastclim_beyer2020_v1.0.0. figshare. Dataset. -#' \url{https://doi.org/10.6084/m9.figshare.19723405.v1} +#' @name Example +NULL +#> NULL + +#' Documentation for the Beyer2020 dataset #' -#' based on +#' This dataset covers the last 120k years, at intervals of 1/2 k years, and a +#' resolution of 0.5 degrees in latitude and longitude. +#' +#' If you use this dataset, make sure to cite the original publication: #' #' Beyer, R.M., #' Krapp, M. & Manica, A. High-resolution terrestrial climate, bioclimate and #' vegetation for the last 120,000 years. Sci Data 7, 236 (2020). -#' \url{https://doi.org/10.1038/s41597-020-0552-1} +#' \doi{doi.org/10.1038/s41597-020-0552-1} #' -#' The version included in `pastclim` has the icesheets masked, as well as +#' The version included in `pastclim` has the ice sheets masked, as well as #' internal seas (Black and Caspian Sea) removed. The latter are based on: #' #' \url{https://www.marineregions.org/gazetteer.php?p=details&id=4278} #' #' \url{https://www.marineregions.org/gazetteer.php?p=details&id=4282} #' -#' As there is no reconstruction of their depth throught time, modern outlines +#' As there is no reconstruction of their depth through time, modern outlines #' were used for all time steps. #' #' Also, for bio15, the coefficient of variation was computed after adding one #' to monthly estimates, and it was multiplied by 100 following #' \url{https://pubs.usgs.gov/ds/691/ds691.pdf} #' +#' Changelog +#' +#' v1.1.0 Added monthly variables. Files can be downloaded from: +#' \url{https://zenodo.org/deposit/7062281} +#' +#' v1.0.0 Remove icesheets and internal seas, and use correct formula for bio15. +#' Files can be downloaded from: +#' \doi{doi.org/10.6084/m9.figshare.19723405.v1} +#' +#' #' @name Beyer2020 NULL #> NULL - #' Documentation for the Krapp2021 dataset #' -#' This dataset covers the last 800k years, at intervals of 1k years. -#' -#' This dataset can be downloaded with \code{\link{download_dataset}}. The -#' files can be found at +#' This dataset covers the last 800k years, at intervals of 1k years, and a +#' resolution of 0.5 degrees in latitude and longitude. #' -#' Manica, Andrea (2022): pastclim_krapp2021_v1.0.0. figshare. Dataset. -#' \url{https://doi.org/10.6084/m9.figshare.19733680.v1} -#' -#' based on +#' If you use this dataset, make sure to cite the original publication: #' #' Krapp, M., Beyer, R.M., Edmundson, S.L. et al. A statistics-based #' reconstruction of high-resolution global terrestrial climate for the last #' 800,000 years. Sci Data 8, 228 (2021). -#' \url{https://doi.org/10.1038/s41597-021-01009-3} +#' \doi{doi.org/10.1038/s41597-021-01009-3} #' -#' The version included in `pastclim` has the icesheets masked. +#' The version included in `pastclim` has the ice sheets masked. #' #' Note that, for bio15, we use the corrected version, which follows #' \url{https://pubs.usgs.gov/ds/691/ds691.pdf} #' +#' Changelog +#' +#' v1.1.0 Added monthly variables. Files can be downloaded from: +#' \url{https://zenodo.org/record/7065055} +#' +#' v1.0.0 Remove ice sheets and use correct formula for bio15. +#' Files can be downloaded from: +#' \doi{doi.org/10.6084/m9.figshare.19733680.v1} +#' #' @name Krapp2021 NULL -#> NULL +#> NULL \ No newline at end of file diff --git a/R/df_from_region_series.R b/R/df_from_region_series.R new file mode 100644 index 00000000..51a0d788 --- /dev/null +++ b/R/df_from_region_series.R @@ -0,0 +1,30 @@ +#' Extract data frame from a region series +#' +#' Extract the climatic information from a region series and organise them as +#' a data frame. +#' +#' To extract a data frame from a region slice, see \code{df_from_region_slice}. +#' +#' @param x climate time series generated with \code{region_series} +#' @param xy a boolean whether x and y coordinates should be added +#' to the dataframe (default to TRUE) +#' +#' @export + +df_from_region_series <- function(x ,xy=TRUE) { + if (!is_region_series(x)){ + stop("x is not a valid object generated by region_series") + } + times_all <- time(x[[1]]) + for (i in seq_len(terra::nlyr(x[1]))){ + x_slice <- slice_region_series(x,times_all[i]) + slice_df <- terra::as.data.frame(x_slice,xy=xy) + slice_df$time_bp <- times_all[i] + if (i==1){ + region_df <- slice_df + } else { + region_df <- rbind(region_df, slice_df) + } + } + return(region_df) +} diff --git a/R/df_from_region_slice.R b/R/df_from_region_slice.R new file mode 100644 index 00000000..1d69e656 --- /dev/null +++ b/R/df_from_region_slice.R @@ -0,0 +1,21 @@ +#' Extract data frame from a region slice +#' +#' Extract the climatic information from a region slice and organise it as +#' a data frame. This is just a wrapper around \code{terra::as.data.frame}. +#' +#' To extract a data frame from a region series, see \code{df_from_region_series}. +#' +#' @param x climate time slice (i.e. a \code{terra::SpatRaster}) +#' generated with \code{region_slice} +#' @param xy a boolean whether x and y coordinates should be added +#' to the dataframe (default to TRUE) +#' +#' @export + +df_from_region_slice <- function(x ,xy=TRUE) { + if (!inherits(x,"SpatRaster")){ + stop("x is not a valid SpatRaster generated by region_slice") + } + slice_df <- terra::as.data.frame(x,xy=xy) + return(slice_df) +} diff --git a/R/download_dataset.R b/R/download_dataset.R index 323feeb1..792ca430 100644 --- a/R/download_dataset.R +++ b/R/download_dataset.R @@ -1,24 +1,18 @@ #' Download paeloclimate reconstructions. #' -#' This function downloads paleoclimate reconstructions +#' This function downloads paleoclimate reconstructions. Files will be stored +#' in the data path of `pastclim`, which can be inspected with +#' \code{get_data_path} and changed with \code{set_data_path} #' -#' @param dataset string defining dataset to be downloaded (currently only -#' "Beyer" is available) +#' @param dataset string defining dataset to be downloaded (a list of possible +#' values can be obtained with \code{get_available_datasets}). This function +#' will not work on custom datasets. #' @param bio_variables one or more variable names to be downloaded. If left #' to NULL, all variables available for this dataset will be downloaded -#' @param path_to_nc directory where the files will be saved. If not set, the -#' data will be downloaded into the storage package pastclimData; an error -#' will be returned if this package is not installed. #' #' @export -download_dataset <- function(dataset, bio_variables = NULL, path_to_nc = NULL) { - if (is.null(path_to_nc)) { - path_to_nc <- system.file("extdata", package = "pastclimData") - if (path_to_nc == "") { - stop("the parameter path was not set, and the package pastclimData is not installed.") - } - } +download_dataset <- function(dataset, bio_variables = NULL) { # check the dataset exists available_datasets <- unique(files_by_dataset$dataset) @@ -59,9 +53,9 @@ download_dataset <- function(dataset, bio_variables = NULL, path_to_nc = NULL) { for (this_var in bio_variables) { file_details <- get_file_for_dataset(this_var, dataset) # only download the file if it is needed - if (!file.exists(file.path(path_to_nc, file_details$file_name))) { + if (!file.exists(file.path(get_data_path(), file_details$file_name))) { curl::curl_download(file_details$download_path, - destfile = file.path(path_to_nc, file_details$file_name), + destfile = file.path(get_data_path(), file_details$file_name), quiet = FALSE ) } diff --git a/R/get_available_datasets.R b/R/get_available_datasets.R index d1c2597c..be688bec 100644 --- a/R/get_available_datasets.R +++ b/R/get_available_datasets.R @@ -1,28 +1,10 @@ #' Get the available datasets. #' -#' List the available datasets +#' List the datasets available in pastclim. Most functions can also be +#' used on custom datasets by setting `dataset="custom"` #' #' @export get_available_datasets <- function() { - return(unique(files_by_dataset$dataset)) -} - - -#' Check if dataset is available. -#' -#' Internal getter function -#' -#' @param dataset string defining dataset -#' -#' @keywords internal - - -check_available_dataset <- function(dataset) { - if (!dataset %in% get_available_datasets()) { - stop("'dataset' must be one of ", paste(get_available_datasets(), - collapse = ", ")) - } else { - return(TRUE) - } + return(unique(as.character(files_by_dataset$dataset))) } diff --git a/R/get_biome_classes.R b/R/get_biome_classes.R index 0306d099..acb53128 100644 --- a/R/get_biome_classes.R +++ b/R/get_biome_classes.R @@ -3,23 +3,19 @@ #' Get a full list of biomes and how their id as coded in the biome variable #' for a given dataset. #' -#' @param dataset string defining dataset to be downloaded (currently only -#' "Beyer2020", "Krapp2021" or "Example" are available) -#' @param path_to_nc the path to the directory containing the downloaded -#' reconstructions. Leave it unset if you are using the companion -#' `pastclimData` to store datasets. +#' @param dataset string defining dataset to be downloaded (a list of possible +#' values can be obtained with \code{get_available_datasets}). This function +#' will not work on custom datasets. #' #' @export -get_biome_classes <- function(dataset, path_to_nc = NULL) { - if (is.null(path_to_nc)) { - path_to_nc <- get_pastclimdata_path() - } +get_biome_classes <- function(dataset) { + data_path <- get_data_path() # test that we ahve the biome variable - check_var_downloaded("biome", dataset, path_to_nc = path_to_nc) + check_var_downloaded("biome", dataset) # get file name for biome this_file <- get_file_for_dataset("biome", dataset)$file_name - this_file <- file.path(path_to_nc, this_file) + this_file <- file.path(data_path, this_file) nc_in <- ncdf4::nc_open(this_file) biome_attributes <- ncdf4::ncatt_get(nc_in, "biome") # format the table @@ -31,8 +27,10 @@ get_biome_classes <- function(dataset, path_to_nc = NULL) { ) row.names(biome_categories) <- NULL } else if (dataset == "Krapp2021") { - biomes_string <- trimws(unlist(strsplit(biome_attributes$biomes, split = - ";"))) + biomes_string <- trimws(unlist(strsplit(biome_attributes$biomes, + split = + ";" + ))) biomes_string <- biomes_string[-length(biomes_string)] biomes_string <- substr(biomes_string, 4, nchar(biomes_string)) biome_categories <- data.frame( diff --git a/R/get_dataset_info.R b/R/get_dataset_info.R new file mode 100644 index 00000000..0560ece6 --- /dev/null +++ b/R/get_dataset_info.R @@ -0,0 +1,49 @@ +#' Get the information about a dataset +#' +#' This function provides full information about a given dataset. A full +#' list of datasets available in pastclim can be obtained with +#' \code{get_available_datasets} +#' +#' @param dataset A dataset in pastclim +#' @keywords internal + +get_dataset_info <- function(dataset) { + if (!dataset %in% get_available_datasets()){ + stop("The dataset is not available in pastclim") + } + help_console(dataset) +} + +#' Print help to console +#' +#' This function prints a help file to console. It is based on a function published on +#' R-bloggers: +#' from https://www.r-bloggers.com/2013/06/printing-r-help-files-in-the-console-or-in-knitr-documents/ +#' @param topic The topic of the help +#' @param format how the output should be formatted +#' @param which lines should be printed +#' @param before string to be printed before the output +#' @param after string to be printed after the output +#' +#' @keywords internal + +help_console <- function(topic, format=c("text", "html", "latex"), + lines=NULL, before=NULL, after=NULL) { + format=match.arg(format) + if (!is.character(topic)) topic <- deparse(substitute(topic)) + getHelpFile <- utils::getFromNamespace(".getHelpFile", "utils") + helpfile = getHelpFile(utils::help(topic)) + hs <- utils::capture.output(switch(format, + text=tools::Rd2txt(helpfile, + outputEncoding = "ASCII"), + html=tools::Rd2HTML(helpfile), + latex=tools::Rd2latex(helpfile) + ) + ) + # replace strange formatting of title + hs[substr(hs,1,2)=="_\b"]<- gsub("_\b","",hs[substr(hs,1,2)=="_\b"],fixed = TRUE) + if(!is.null(lines)) hs <- hs[lines] + hs <- c(before, hs, after) + cat(hs, sep="\n") + invisible(hs) +} \ No newline at end of file diff --git a/R/get_downloaded_datasets.R b/R/get_downloaded_datasets.R index be0b425d..7bd91aa2 100644 --- a/R/get_downloaded_datasets.R +++ b/R/get_downloaded_datasets.R @@ -2,45 +2,23 @@ #' #' List the downloaded variable for each dataset. #' -#' @param path_to_nc path to the netcdf datasets +#' @param data_path leave it to NULL to use the default datapath #' #' @export -get_downloaded_datasets <- function(path_to_nc = NULL) { - if (is.null(path_to_nc)) { - path_to_nc <- get_pastclimdata_path() +get_downloaded_datasets <- function(data_path = NULL) { + if (is.null(data_path)) { + data_path <- get_data_path() } - all_nc_files <- list.files(path_to_nc) + all_nc_files <- list.files(data_path) files_subset <- files_by_dataset[files_by_dataset$file_name %in% - all_nc_files, ] + all_nc_files, ] downloaded_vars <- list() for (dataset in unique(files_subset$dataset)) { - downloaded_vars[[dataset]] <- files_subset[files_subset$dataset == dataset, - "variable"] + downloaded_vars[[dataset]] <- files_subset[ + files_subset$dataset == dataset, + "variable" + ] } downloaded_vars -} - -#' Internal functions to check whether we have downloaded a given variable -#' for a dataset -#' -#' @param variable a vector of names of the variables of interest -#' @param dataset dataset of interest -#' @param path_to_nc path to the netcdf datasets -#' -#' @keywords internal - -check_var_downloaded <- function(variable, dataset, path_to_nc = NULL) { - # first check the variable exists for that dataset - check_available_variable(variable, dataset) - - # test if we have downloaded already - if (!all(variable %in% get_downloaded_datasets(path_to_nc = path_to_nc) - [[dataset]])) { - missing_vars <- variable[!variable %in% get_downloaded_datasets(path_to_nc = - path_to_nc)[[dataset]]] - stop("variable (", paste(missing_vars, collapse = ", "), - ") not yet downloaded, use `download_dataset()`") - } - return(TRUE) -} +} \ No newline at end of file diff --git a/R/get_file_for_dataset.R b/R/get_file_for_dataset.R index dba3f8cc..fc749b9a 100644 --- a/R/get_file_for_dataset.R +++ b/R/get_file_for_dataset.R @@ -1,10 +1,11 @@ -get #' Get the file details for a variable and dataset. +#' Get the file details for a variable and dataset. #' #' Internal getter function #' #' @param variable one or more variable names to be downloaded -#' @param dataset string defining dataset to be downloaded (currently only -#' "Beyer" or "Krapp" are available) +#' @param dataset string defining dataset to be downloaded (a list of possible +#' values can be obtained with \code{get_available_datasets}). This function +#' will not work on custom datasets. get_file_for_dataset <- function(variable, dataset) { check_available_variable(variable, dataset) diff --git a/R/get_ice_mask.R b/R/get_ice_mask.R index fd0903de..2c7cba3c 100644 --- a/R/get_ice_mask.R +++ b/R/get_ice_mask.R @@ -3,20 +3,17 @@ #' Get the ice mask for a dataset at a given timepoint. #' #' @param time_bp time slice in years before present (negative) -#' @param dataset string defining dataset to be downloaded (currently only -#' "Beyer2020" or "Krapp2021" are available). Note that this function will -#' not work on an custom dataset. -#' @param path_to_nc the path to the directory containing the downloaded -#' reconstructions. Leave it unset if you are using the companion -#' `pastclimData` to store datasets. +#' @param dataset string defining dataset to be downloaded (a list of possible +#' values can be obtained with \code{get_available_datasets}). This function +#' will not work on custom datasets. #' #' @import terra #' @export -get_ice_mask <- function(time_bp, dataset, path_to_nc = NULL) { - climate_slice <- climate_for_time_slice( +get_ice_mask <- function(time_bp, dataset) { + climate_slice <- region_slice( time_bp = time_bp, bio_variables = "biome", - dataset = dataset, path_to_nc = path_to_nc + dataset = dataset ) climate_slice$ice_mask <- climate_slice[names(climate_slice)] climate_slice$ice_mask[climate_slice$ice_mask != 28] <- NA diff --git a/R/get_land_mask.R b/R/get_land_mask.R index 056adac4..e29b0e0f 100644 --- a/R/get_land_mask.R +++ b/R/get_land_mask.R @@ -3,20 +3,17 @@ #' Get the land mask for a dataset at a given timepoint. #' #' @param time_bp time slice in years before present (negative) -#' @param dataset string defining dataset to be downloaded (currently only -#' "Beyer2020" or "Krapp2021" are available). Note that this function will -#' not work on an custom dataset. -#' @param path_to_nc the path to the directory containing the downloaded -#' reconstructions. Leave it unset if you are using the companion -#' `pastclimData` to store datasets. +#' @param dataset string defining dataset to be downloaded (a list of possible +#' values can be obtained with \code{get_available_datasets}). This function +#' will not work on custom datasets. #' #' @import terra #' @export -get_land_mask <- function(time_bp, dataset, path_to_nc = NULL) { - climate_slice <- climate_for_time_slice( +get_land_mask <- function(time_bp, dataset) { + climate_slice <- region_slice( time_bp = time_bp, bio_variables = "biome", - dataset = dataset, path_to_nc = path_to_nc + dataset = dataset ) climate_slice$land_mask <- climate_slice[names(climate_slice)] climate_slice$land_mask[climate_slice$land_mask != 28] <- TRUE diff --git a/R/get_mis_time_steps.R b/R/get_mis_time_steps.R index f6272052..37717f13 100644 --- a/R/get_mis_time_steps.R +++ b/R/get_mis_time_steps.R @@ -4,11 +4,12 @@ #' #' @param mis string giving the mis; it must use the same spelling as used in #' /code{mis_boundaries} -#' @param dataset string defining dataset to be downloaded (currently only -#' "Beyer2020" or "Krapp2021" are available) -#' @param path_to_nc the path to the directory containing the downloaded -#' reconstructions. Leave it unset if you are using the companion -#' `pastclimData` to store datasets. +#' @param dataset string defining dataset to be downloaded (a list of possible +#' values can be obtained with \code{get_available_datasets}). If set to +#' "custom", then a single nc file is used from "path_to_nc" +#' @param path_to_nc the path to the custom nc file containing the paleoclimate +#' reconstructions. All the variables of interest need to be included in +#' this file. #' #' @export @@ -17,19 +18,9 @@ get_mis_time_steps <- function(mis, dataset, path_to_nc = NULL) { stop("'mis' should be one of ", paste(mis_boundaries$mis, collapse = ",")) } - if (is.null(path_to_nc)) { - path_to_nc <- get_pastclimdata_path() - } - # we get the first available file to get info for the dataset - possible_vars <- get_vars_for_dataset(dataset) - this_file <- get_file_for_dataset(possible_vars[1], dataset)$file_name - this_file <- file.path(path_to_nc, this_file) - - climate_nc <- ncdf4::nc_open(this_file) - time_steps <- (climate_nc$dim$time$vals) - ncdf4::nc_close(climate_nc) + time_steps <- get_time_steps(dataset = dataset, path_to_nc = path_to_nc) mis_time_steps <- time_steps[time_steps > (mis_boundaries[mis_boundaries$mis - == mis, "start"] * 1000) & + == mis, "start"] * 1000) & time_steps <= (mis_boundaries[mis_boundaries$mis == mis, "end"] * 1000)] return(mis_time_steps) } diff --git a/R/get_pastclimdata_path.R b/R/get_pastclimdata_path.R deleted file mode 100644 index 007fbe35..00000000 --- a/R/get_pastclimdata_path.R +++ /dev/null @@ -1,16 +0,0 @@ -#' Get the path for pastclimdata. -#' -#' This function returns the path for pastclimData where reconstructions -#' are stored. -#' -#' @export - -get_pastclimdata_path <- function() { - path_to_nc <- system.file("extdata", package = "pastclimData") - if (path_to_nc == "") { - stop('the parameter path_to_nc was not set, and the package pastclimData is not installed.\n - You can install pastclimData with the following command:\n - devtools::install_github("EvolEcolGroup/pastclimData",ref="master")') - } - return(path_to_nc) -} diff --git a/R/get_time_steps.R b/R/get_time_steps.R new file mode 100644 index 00000000..42ae9f00 --- /dev/null +++ b/R/get_time_steps.R @@ -0,0 +1,28 @@ +#' Get time steps for a given dataset +#' +#' Get the time steps available in a given dataset. +#' +#' @param dataset string defining dataset to be downloaded (a list of possible +#' values can be obtained with \code{get_available_datasets}). If set to +#' "custom", then a single nc file is used from "path_to_nc" +#' @param path_to_nc the path to the custom nc file containing the paleoclimate +#' reconstructions. All the variables of interest need to be included in +#' this file. +#' +#' @export + +get_time_steps <- function(dataset, path_to_nc = NULL) { + check_dataset_path(dataset = dataset, path_to_nc = path_to_nc) + + if (is.null(path_to_nc)) { + # we get the first available file to get info for the dataset + possible_vars <- get_vars_for_dataset(dataset) + this_file <- get_file_for_dataset(possible_vars[1], dataset)$file_name + path_to_nc <- file.path(get_data_path(), this_file) + } + + climate_nc <- ncdf4::nc_open(path_to_nc) + time_steps <- (climate_nc$dim$time$vals) + ncdf4::nc_close(climate_nc) + return(time_steps) +} diff --git a/R/get_vars_for_dataset.R b/R/get_vars_for_dataset.R index 0640952d..646f0747 100644 --- a/R/get_vars_for_dataset.R +++ b/R/get_vars_for_dataset.R @@ -5,8 +5,9 @@ #' publications, as `pastclim` harmonises the names of variables across #' different reconstructions. #' -#' @param dataset string defining dataset to for which variables are given. -#' It can take the value "Beyer2020", "Krapp2021" or "Example" +#' @param dataset string defining dataset to be downloaded (a list of possible +#' values can be obtained with \code{get_available_datasets}). This function +#' will not work on custom datasets. #' #' @export @@ -48,5 +49,5 @@ check_available_variable <- function(variable, dataset) { get_varname <- function(variable, dataset) { return(files_by_dataset$ncvar[files_by_dataset$variable == variable & - files_by_dataset$dataset == dataset]) + files_by_dataset$dataset == dataset]) } diff --git a/R/is_region_slice.R b/R/is_region_slice.R new file mode 100644 index 00000000..3b6024ab --- /dev/null +++ b/R/is_region_slice.R @@ -0,0 +1,32 @@ +#' Check the object is a valid region series +#' +#' A region series is a \code{terra::SpatRasterDataset} for which each +#' subdataset is a variable, and all variables have the same number of +#' time steps. +#' +#' The standard test only checks that each SpatRaster has the same number of +#' layers. The more thorough test (obtaned with strict=TRUE) actually checks +#' that all time steps are identical by comparing the result of +#' \code{terra::time} applied to each variable +#' +#' @param x a \code{terra::SpatRasterDataset} representing a time series of +#' regional reconstructions obtained from \code{region_series}. +#' @param strict a boolean defining whether to preform a thorough test (see +#' description above for details). +#' +#' @export + +is_region_series <- function (x, strict = FALSE) { + if (!inherits(x,"SpatRasterDataset")){ + stop("x should be a SpatRasterDataset") + } + if (!strict){ + return (length(unique(terra::nlyr(x)))==1) + } else { + all_times<-list() + for (i in terra::varnames(x)){ + all_times[[i]] <- terra::time(x[i]) + } + return(length(unique(all_times))==1) + } +} \ No newline at end of file diff --git a/R/location_series.R b/R/location_series.R new file mode 100644 index 00000000..55caec5b --- /dev/null +++ b/R/location_series.R @@ -0,0 +1,117 @@ +#' Extract a time series of bioclimatic variables for one or more locations. +#' +#' This function extract a time series of local climate for +#' a set of locations +#' +#' @param x a 2 column data.frame (with columns `longitude`, ranging +#' -180 to 180, and `latitude`, from -90 to 90), or a vector of cell numbers. +#' @param time_bp time slices in years before present (negative values represent +#' time before present, positive values time in the future). This parameter can +#' be a vector of times (the slices need +#' to exist in the dataset), a list with a min and max element setting the +#' range of values, or left to NULL to retrieve all time steps. +#' To check which slices are available, you can use +#' \code{get_time_steps}. +#' @param bio_variables vector of names of variables to be extracted. +#' @param dataset string defining the dataset to use. If set to "custom", +#' then a single nc file is used from "path_to_nc" +#' @param path_to_nc the path to the custom nc file containing the paleoclimate +#' reconstructions. All the variables of interest need to be included in +#' this file. +#' +#' @export + +location_series <- + function(x, + time_bp = NULL, + bio_variables, + dataset, + path_to_nc = NULL) { + + check_dataset_path(dataset = dataset, path_to_nc = path_to_nc) + + # if we are using standard datasets, check whether a variables exists + if (dataset != "custom") { + check_var_downloaded(bio_variables, dataset) + } else { # else check that the variables exist in the custom nc + check_var_in_nc(bio_variables, path_to_nc) + } + + # reorder the inputs by time + if (inherits(x, "data.frame")) { + locations_data <- x + } else if (inherits(x, "matrix")) { + locations_data <- as.data.frame(x) + } else { + locations_data <- data.frame(cell_number = x) + } + + time_series_df <- locations_data + time_series_df$id <- seq_len(nrow(time_series_df)) + time_index <- NULL + for (this_var in bio_variables) { + # get name of file that contains this variable + if (dataset != "custom") { + this_file <- get_file_for_dataset(this_var, dataset)$file_name + this_file <- file.path(get_data_path(), this_file) + this_var_nc <- get_varname(variable = this_var, dataset = dataset) + } else { + this_file <- file.path(path_to_nc) + this_var_nc <- this_var + } + + # figure out the time indeces the first time we run this + if (is.null(time_index)) { + # as we have the file name, we can us the same code for custom and + # standard datasets. + times <- get_time_steps(dataset = "custom", path_to_nc = this_file) + time_index <- time_bp_series(time_bp = time_bp, + time_steps = times) + } + + climate_brick_temp <- terra::rast(this_file, subds = this_var_nc) + if (!is.null(time_bp)){ + climate_brick <- terra::subset(climate_brick_temp, + subset = time_index) + } else { + climate_brick <- climate_brick_temp + } + # add time var if it doesn't exist yet + if (!("time" %in% names(time_series_df))) { + n_time_steps <- length(time(climate_brick)) + n_locations <- nrow(time_series_df) + time_series_df <- time_series_df[rep( + seq_len(nrow(time_series_df)), + n_time_steps + ), ] + time_series_df$time <- rep(time(climate_brick), each = n_locations) + } + this_var_ts <- terra::extract(climate_brick, x) + names(this_var_ts)[-1] <- terra::time(climate_brick) + time_series_df[this_var] <- utils::stack(this_var_ts, select = -ID)$values + } + return(time_series_df) + } + + + +#' Extract a time series of bioclimatic variables for one or more locations. +#' +#' Deprecated version of \code{location_series} +#' +#' @param ... arguments to be passed to \code{series} +#' +#' @export + +time_series_for_locations <- function(...) { + warning("DEPRECATED: use 'location_slice' instead") + # if (!is.null(path_to_nc)) { + # stop( + # "the use of pastclimData is now deprecated", + # "use 'set_path_data' instead" + # ) + # } + location_series(...) +} + + diff --git a/R/climate_for_location.R b/R/location_slice.R similarity index 62% rename from R/climate_for_location.R rename to R/location_slice.R index c08fb598..ec05531a 100644 --- a/R/climate_for_location.R +++ b/R/location_slice.R @@ -1,18 +1,20 @@ -#' Extract local climate for one or more locations. +#' Extract local climate for one or more locations for a given time slice. #' -#' This function extract local climate from Beyer et al for a set of locations -#' at the appropriate times +#' This function extract local climate for a set of locations +#' at the appropriate times (selecting the closest time slice available for the +#' specific date associated with each location). #' #' @param x a 2 column matrix (with columns `longitude`, ranging #' -180 to 180, and `latitude`, from -90 to 90), or a vector of cell numbers. -#' @param time_bp vector of ages, in years before present (negative). +#' @param time_bp the dates in years before present (negative +#' values represent time before present, i.e. 1950, positive values time in the future) +#' for each location. #' @param bio_variables vector of names of variables to be extracted. -#' @param dataset string defining the dataset to use (one of Beyer2020, -#' Krapp2021 or custom). -#' @param path_to_nc the path to the directory containing the downloaded -#' reconstructions. -#' Leave it unset if you are using the companion `pastclimData` to store -#' datasets. +#' @param dataset string defining the dataset to use. If set to "custom", +#' then a single nc file is used from "path_to_nc" +#' @param path_to_nc the path to the custom nc file containing the paleoclimate +#' reconstructions. All the variables of interest need to be included in +#' this file. #' @param nn_interpol boolean determining whether nearest neighbour #' interpolation is used to estimate climate for cells that lack such #' information (i.e. they are under water or ice). Interpolation is only @@ -21,25 +23,24 @@ #' #' @export -climate_for_locations <- +location_slice <- function(x, time_bp, bio_variables, dataset, path_to_nc = NULL, nn_interpol = TRUE) { + check_dataset_path(dataset = dataset, path_to_nc = path_to_nc) # if we are using standard datasets, check whether a variables exists if (dataset != "custom") { - check_var_downloaded(bio_variables, dataset, path_to_nc) + check_var_downloaded(bio_variables, dataset) } else { # else check that the variables exist in the custom nc check_var_in_nc(bio_variables, path_to_nc) } - if (is.null(path_to_nc)) { - path_to_nc <- get_pastclimdata_path() - } - + # TODO CHECK THAT X HAS THE CORRECT COLUMNS AND THAT TIME_BP IS OF THE RIGHT LENGTH + # reorder the inputs by time if (inherits(x, "data.frame")) { x <- x[order(time_bp), ] @@ -57,20 +58,23 @@ climate_for_locations <- # get name of file that contains this variable if (dataset != "custom") { this_file <- get_file_for_dataset(this_var, dataset)$file_name - this_file <- file.path(path_to_nc, this_file) + this_file <- file.path(get_data_path(), this_file) this_var_nc <- get_varname(variable = this_var, dataset = dataset) } else { - this_file <- file.path(path_to_nc) + this_file <- path_to_nc this_var_nc <- this_var } if (is.null(time_indeces)) { - time_indeces <- time_bp_to_index(time_bp = time_bp, path_to_nc = - this_file) + times <- get_time_steps(dataset = "custom", path_to_nc = this_file) + time_indeces <- time_bp_to_index( + time_bp = time_bp, time_steps = times + ) + locations_data$time_bp_slice <- times[time_indeces] unique_time_indeces <- unique(time_indeces) } climate_brick <- terra::rast(this_file, subds = this_var_nc) - # create column to store variable + # create column to store variable locations_data[this_var] <- NA for (j in unique_time_indeces) { this_slice <- terra::subset(climate_brick, j) @@ -79,19 +83,23 @@ climate_for_locations <- x = this_slice, y = x[this_slice_indeces, ] ) - locations_data[this_slice_indeces, this_var] <- this_climate[, - ncol(this_climate)] + locations_data[this_slice_indeces, this_var] <- this_climate[ + , + ncol(this_climate) + ] if (nn_interpol) { locations_to_move <- this_slice_indeces[this_slice_indeces %in% - which(is.na(locations_data[, this_var]))] + which(is.na(locations_data[, this_var]))] if (length(locations_to_move) == 0) { next } for (i in locations_to_move) { if (inherits(x, "data.frame")) { cell_id <- - terra::cellFromXY(climate_brick, as.matrix(locations_data[i, - 1:2])) + terra::cellFromXY(climate_brick, as.matrix(locations_data[ + i, + 1:2 + ])) } else { cell_id <- x[i] } @@ -114,3 +122,23 @@ climate_for_locations <- return(locations_data) } + + +#' Extract local climate for one or more locations for a given time slice. +#' +#' Deprecated version of \code{location_slice} +#' +#' @param ... arguments to be passed to \code{location_slice} +#' +#' @export + +climate_for_locations <- function(...) { + warning("DEPRECATED: use 'location_slice' instead") + # if (!is.null(path_to_nc)) { + # stop( + # "the use of pastclimData is now deprecated", + # "use 'set_path_data' instead" + # ) + # } + location_slice(...) +} diff --git a/R/region_series.R b/R/region_series.R new file mode 100644 index 00000000..b7ba0864 --- /dev/null +++ b/R/region_series.R @@ -0,0 +1,115 @@ +#' Extract a time series of climate variables for a region +#' +#' This function extracts a time series of one or more climate variables for +#' a given +#' dataset covering a region (or the whole world). The function returns a +#' SpatRasterDataset \code{terra::sds} object, with +#' each variable as a sub-dataset. +#' +#' @param time_bp time slices in years before present (negative values represent +#' time before present, positive values time in the future). This parameter can +#' be a vector of times (the slices need +#' to exist in the dataset), a list with a min and max element setting the +#' range of values, or left to NULL to retrieve all time steps. +#' To check which slices are available, you can use +#' \code{get_time_steps}. +#' @param bio_variables vector of names of variables to be extracted +#' @param dataset string defining the dataset to use. If set to "custom", +#' then a single nc file is used from "path_to_nc" +#' @param path_to_nc the path to the custom nc file containing the paleoclimate +#' reconstructions. All the variables of interest need to be included in +#' this file. +#' @param ext an extent, coded as numberic vector (length=4; +#' order= xmin, xmax, ymin, ymax) or a \code{terra::SpatExtent} object. If NULL, +#' the full extent of the reconstruction is given. +#' @param crop a polygon used to crop the reconstructions (e.g. the outline +#' of a continental mass). A \code{sf:sfg} or a \code{terra::SpatVector} object +#' is used to define the polygon. +#' +#' @import terra +#' @export + +region_series <- + function(time_bp = NULL, + bio_variables, + dataset, + path_to_nc = NULL, + ext = NULL, + crop = NULL) { + + check_dataset_path(dataset = dataset, path_to_nc = path_to_nc) + + if (!is.null(ext)){ + if(!any(inherits(ext,"SpatExtent"), + all(inherits(ext,"numeric"), length(ext)==4))){ + stop ("ext should be a numeric vector of length 4 or a terra::SpatExtent object created terra::ext") + } + if (inherits(ext,"numeric")){ + ext <- terra::ext(ext) + } + } + if (!is.null(crop)){ + if(!any(inherits(crop,"SpatVector"), + inherits(crop,"sfg"))){ + stop ("crop should be a sf::sfg or a terra::SpatVector object created with terra::vect") + } + if(inherits(crop,"sfg")){ + crop <- terra::vect(crop) + } + } + + # check whether the variables exist for this dataset + if (dataset != "custom") { # if we are using standard datasets + check_var_downloaded(bio_variables, dataset) + } else { # else check that the variables exist in the custom nc + check_var_in_nc(bio_variables, path_to_nc) + } + + time_index <- NULL + climate_spatrasters <- list() + + for (this_var in bio_variables) { + # get name of file that contains this variable + if (dataset != "custom") { + this_file <- get_file_for_dataset(this_var, dataset)$file_name + this_file <- file.path(get_data_path(), this_file) + this_var_nc <- get_varname(variable = this_var, dataset = dataset) + } else { + this_file <- file.path(path_to_nc) + this_var_nc <- this_var + } + # figure out the time indeces the first time we run this + if (is.null(time_index)) { + # as we have the file name, we can us the same code for custom and + # standard datasets. + times <- get_time_steps(dataset = "custom", path_to_nc = this_file) + time_index <- time_bp_series(time_bp = time_bp, + time_steps = times) + } + var_brick <- terra::rast(this_file, subds = this_var_nc) + # subset extent + if (!is.null(ext)){ + var_brick <- terra::crop(var_brick, ext) + } + # subset to crop + if (!is.null(crop)){ + terra::crs(crop) <- terra::crs(var_brick) + var_brick <- terra::mask(var_brick, crop) + var_brick <- terra::crop(var_brick, crop) + } + + if (!is.null(time_bp)){ + climate_spatrasters[[this_var]] <- terra::subset(var_brick, + subset = time_index) + } else { + climate_spatrasters[[this_var]] <- var_brick + } + varnames(climate_spatrasters[[this_var]]) <- this_var + names(climate_spatrasters[[this_var]]) <- paste(this_var, + time(climate_spatrasters[[this_var]]), + sep = "_" + ) + } + climate_sds <- terra::sds(climate_spatrasters) + return(climate_sds) + } diff --git a/R/region_slice.R b/R/region_slice.R new file mode 100644 index 00000000..2bfbb730 --- /dev/null +++ b/R/region_slice.R @@ -0,0 +1,64 @@ +#' Extract a climate slice for a region +#' +#' This function extracts a slice of one or more climate variables for a given +#' dataset covering a region (or the whole world). The function returns a +#' SpatRaster \code{terra::SpatRaster} object, with +#' each variable as a layer. +#' +#' @param time_bp the time slice in years before present (negative +#' values represent +#' time before present, positive values time in the future). The slice needs +#' to exist in the dataset. To check which slices are available, you can use +#' \code{get_time_steps}. +#' @param bio_variables vector of names of variables to be extracted +#' @param dataset string defining the dataset to use. If set to "custom", +#' then a single nc file is used from "path_to_nc" +#' @param path_to_nc the path to the custom nc file containing the paleoclimate +#' reconstructions. All the variables of interest need to be included +#' in this file. +#' @param ext an extent, coded as numberic vector (length=4; +#' order= xmin, xmax, ymin, ymax) or a \code{terra::SpatExtent} object. If NULL, +#' the full extent of the reconstruction is given. +#' @param crop a polygon used to crop the reconstructions (e.g. the outline +#' of a continental mass). A \code{sf:sfg} or a \code{terra::SpatVector} object +#' is used to define the polygon. +#' +#' @import terra +#' @export + +region_slice <- + function(time_bp, + bio_variables, + dataset, + path_to_nc = NULL, + ext = NULL, + crop = NULL) { + + this_series <- region_series( + time_bp = time_bp, + bio_variables = bio_variables, + dataset = dataset, + path_to_nc = path_to_nc, + ext = ext, + crop = crop + ) + return(slice_region_series(x = this_series, time_bp = time_bp)) + } + + +#' Extract a climate slice for a region +#' +#' Deprecated version of \code{region_slice} +#' +#' @param ... arguments to be passed to \code{region_slice} +#' +#' @export + +climate_for_time_slice <- function(...) { + warning("DEPRECATED: use 'region_slice' instead") + # if (!is.null(path_to_nc)) { + # stop("the use of pastclimData is now deprecated,", + # " use 'set_path_data' instead") + # } + region_slice(...) +} diff --git a/R/sample_region_series.R b/R/sample_region_series.R new file mode 100644 index 00000000..815e9630 --- /dev/null +++ b/R/sample_region_series.R @@ -0,0 +1,121 @@ +#' Sample points from a region time series +#' +#' This function samples points from a region time series. Sampling can either be +#' performed for the same locations at all time steps (if only one value is given +#' for `size`), or for different locations for each time step (if `size` is a +#' vector of lenght equal to the number of time steps). To sample the same +#' number of points, but different locations, for each time step, provide a vector +#' repeating the same value for each time step. +#' +#' This function wraps \code{terra::spatSample} to appropriate sample the +#' \code{terra::SpatRaster}s in the \code{terra::SpatRasterDataset} returned +#' by \code{region_series}. +#' +#' @param x a \code{terra::SpatRasterDataset} returned +#' by \code{region_series} +#' @param size number of points sampled. A single value is used to sample the same +#' locations across all time steps, a vector of values to sample different locations +#' at each time step. +#' @param method one of the sampling methods from \code{terra::spatSample}. It +#' defaults to "random" +#' @param replace boolean determining whether we sample with replacement +#' @param na.rm boolean determining whether NAs are removed +#' +#' @export + +sample_region_series<-function(x, size, method="random", replace=FALSE, na.rm=TRUE) +{ + if (!is_region_series(x)){ + stop("x is not a valid object generated by region_series") + } + + if (length(size)==1) + { + sample_rs_fixed(x,size,method=method, replace=replace, na.rm=na.rm) + } else { + sample_rs_variable(x,size,method=method, replace=replace, na.rm=na.rm) + } +} + +#' Sample the same locations from a region time series +#' +#' Internal function for fixed sampling from \code{sample_region_series}, +#' used when a single size is given. +#' +#' @param x a \code{terra::SpatRasterDataset} returned +#' by \code{region_series} +#' @param size number of points sampled; the same +#' locations across all time steps +#' @param method one of the sampling methods from \code{terra::spatSample}. It +#' defaults to "random" +#' @param replace boolean determining whether we sample with replacement +#' @param na.rm boolean determining whether NAs are removed +#' +#' @keywords internal + +sample_rs_fixed<-function(x, size, method="random", replace=FALSE, na.rm=TRUE) + { + # sample the first variable + var_values <- terra::spatSample(x[1], size, method=method, + replace=replace, na.rm=na.rm, + cells=TRUE, xy=TRUE) + # get the details for the sampled cells + sampled_cells <- var_values[,c("cell","x","y")] + sampled_values <- sampled_cells[rep(seq_len(nrow(sampled_cells)), + times=length(time(x[1]))),] + sampled_values$time_bp <- rep(time(x[1]), each=nrow(sampled_cells)) + # let's reuse these vales + + for (this_var in names(x)){ + if (this_var != names(x)[1]){ + # extract values for this variable + var_values <- terra::extract(x[this_var],sampled_cells$cell) + } else { + # reuse the values obtained from spatSample + var_values <- var_values[,-c(1:3)] + } + colnames(var_values)<-time(x[1]) + var_values<-utils::stack(var_values) + sampled_values[this_var]<- var_values[,1] + } + return(sampled_values) +} + +#' Sample the different number of points from a region time series +#' +#' Internal function for sampling different number of points for each +#' timestep of a region series from \code{sample_region_series}, +#' used when size is a vector of values. +#' +#' @param x a \code{terra::SpatRasterDataset} returned +#' by \code{region_series} +#' @param size a vector of the number of points sampled for each time step +#' @param method one of the sampling methods from \code{terra::spatSample}. It +#' defaults to "random" +#' @param replace boolean determining whether we sample with replacement +#' @param na.rm boolean determining whether NAs are removed +#' +#' @keywords internal + +sample_rs_variable<-function(x, size, method="random", replace=FALSE, na.rm=TRUE) +{ + if (length(size)!=length(time(x[1]))){ + stop("size should be the same length as the number of time steps in x") + } + # create list to store samples for each time step + sample_list<-list() + t_steps <- time (x[1]) + for (i in seq_len(length(size))){ + x_step <- slice_region_series(x,t_steps[i]) + values <- terra::spatSample(x_step, size[i], method=method, + replace=replace, na.rm=na.rm, + cells=TRUE, xy=TRUE) + values$time_bp<- t_steps[i] + # write into output + sample_list[[as.character(t_steps[i])]]<-values + } + # combine them into a single matrix + sampled_climate <- do.call(rbind, sample_list) + return(sampled_climate) +} + diff --git a/R/sample_region_slice.R b/R/sample_region_slice.R new file mode 100644 index 00000000..49ebf1a3 --- /dev/null +++ b/R/sample_region_slice.R @@ -0,0 +1,28 @@ +#' Sample points from a region time slice +#' +#' This function samples points from a region time slice (i.e. a timepoint). +#' +#' This function wraps \code{terra::spatSample} to appropriate sample the +#' \code{terra::SpatRaster} returned +#' by \code{region_slice}. You can also use \code{terra::spatSample} directly +#' on a slice (which is a standard \code{terra::SpatRaster}). +#' +#' @param x a \code{terra::SpatRaster} returned +#' by \code{region_slice} +#' @param size number of points sampled. +#' @param method one of the sampling methods from \code{terra::spatSample}. It +#' defaults to "random" +#' @param replace boolean determining whether we sample with replacement +#' @param na.rm boolean determining whether NAs are removed +#' +#' @export + +sample_region_slice<-function(x, size, method="random", replace=FALSE, na.rm=TRUE) +{ + if (length(size)!=1) + { + stop("size should be a single value") + } + terra::spatSample(x, size, method=method, replace=replace, na.rm=na.rm, + cells = TRUE, xy = TRUE) +} diff --git a/R/set_data_path.R b/R/set_data_path.R new file mode 100644 index 00000000..fc3fcce3 --- /dev/null +++ b/R/set_data_path.R @@ -0,0 +1,103 @@ +#' Set the data path where climate reconstructions will be stored +#' +#' This function sets the path where climate reconstructions will be stored. +#' This +#' information is stored in a file names "pastclim_data.txt", which is found +#' in the directory returned by `tools::R_user_dir("pastclim","config")` (i.e. +#' the default configuration directory for the package as set in R >= 4.0). +#' +#' @param path_to_nc the path to the file that contains the downloaded +#' resonstructions. If left unset, the default location returned by +#' `tools::R_user_dir("pastclim","data")` will be used +#' +#' @export + +set_data_path <- function(path_to_nc = NULL) { + # if we don't have a config directory, create one + if (!dir.exists(tools::R_user_dir("pastclim", "config"))) { + dir.create(tools::R_user_dir("pastclim", "config"), recursive = TRUE) + } + # use the default location + if (is.null(path_to_nc)) { + cat(tools::R_user_dir("pastclim", "data"), "\n", + file = file.path( + tools::R_user_dir("pastclim", "config"), + "pastclim_data.txt" + ) + ) + # and now create it if it does not exist yet + if (!dir.exists(tools::R_user_dir("pastclim", "data"))) { + dir.create(tools::R_user_dir("pastclim", "data"), recursive = TRUE) + } + # update option + options(pastclim.data_path = tools::R_user_dir("pastclim", "data")) + } else { + # check that it exists + if (dir.exists(path_to_nc)) { + cat(path_to_nc, "\n", file = file.path( + tools::R_user_dir("pastclim", "config"), + "pastclim_data.txt" + )) + } else { + stop(path_to_nc, " does not exist!") + } + # update option + options(pastclim.data_path = path_to_nc) + } + # move the example data into the new data path + copy_example_data() +} + + +#' Get the data path where climate reconstructions are stored +#' +#' This function returns the path where climate reconstructions will be stored. +#' When `pastclim` is installed, the data path defaults to the directory +#' returned by `tools::R_user_dir("pastclim","data")` (i.e. the data directory +#' for the package in R>=4.0). The data path can be changed with +#' \code{set_data_path}. Once changed, `pastclim` will remember the new data +#' path in the future. +#' +#' The data path is stored in a file named "pastclim_data.txt", which +#' is found in the directory returned by +#' `tools::R_user_dir("pastclim","config")` (i.e. +#' the default configuration directory for the package as set in R >= 4.0). +#' +#' @export + +get_data_path <- function() { + # if the package already initiliased + if (!is.null(getOption("pastclim.data_path"))) { + return(getOption("pastclim.data_path")) + } else { # get the info from the config file + # if data path was never set before, we set it to its default location + if (!file.exists(file.path( + tools::R_user_dir("pastclim", "config"), + "pastclim_data.txt" + ))) { + set_data_path() + } + path_to_nc <- utils::read.table(file.path( + tools::R_user_dir("pastclim", "config"), + "pastclim_data.txt" + ))[1, 1] + return(path_to_nc) + } +} + +#' Internal function to copy the example dataset when a new data path is set +#' +#' Copy example dataset +#' +#' @keywords internal + +copy_example_data <- function() { + if (!file.exists(file.path(get_data_path(), "example_climate_nc"))) { + file.copy( + from = system.file("/extdata/example_climate.nc", + package = "pastclim" + ), + to = file.path(get_data_path(), "example_climate.nc") + ) + } +} diff --git a/R/slice_region_series.R b/R/slice_region_series.R new file mode 100644 index 00000000..3fd2fa5f --- /dev/null +++ b/R/slice_region_series.R @@ -0,0 +1,39 @@ +#' Extract a slice for a time series of climate variables for a region +#' +#' This function extracts a time slice from time series of one or more climate +#' variables for a given dataset covering a region (or the whole world). +#' +#' @param x climate time series generated with \code{region_series} +#' @param time_bp time slices in years before present (i.e. 1950, negative integers +#' for values in the past). The slices +#' need to exist in the dataset. To check which slices are available, you +#' can use \code{terra::time(x[[1]])} (note that you have to use +#' the `time` function on the first element of the 'sds' object, i.e. on one +#' of the 'SpatRaster' objects) +#' +#' @export + +slice_region_series <- function(x, time_bp) { + if (length(time_bp) != 1) { + stop("time_bp should be a single time step") + } + if (!is_region_series(x)){ + stop("x is not a valid object generated by region_series") + } + # check that time_bp is part of the series + if (!time_bp %in% time(x[[1]])) { + stop("time_bp is not a time slice within the region series x") + } + # get index + time_index <- which(time(x[[1]]) == time_bp) + # now slice it and convert it to a SpatRaster + for (i in 1:length(x)) { + if (i == 1) { + climate_spatraster <- subset(x[[i]], time_index) + } else { + terra::add(climate_spatraster) <- subset(x[[i]], time_index) + } + } + names(climate_spatraster) <- varnames(climate_spatraster) #<- names(x) + return(climate_spatraster) +} diff --git a/R/sysdata.rda b/R/sysdata.rda index d1cc27c0..ee139b39 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/R/time_bp_series.R b/R/time_bp_series.R new file mode 100644 index 00000000..70f92038 --- /dev/null +++ b/R/time_bp_series.R @@ -0,0 +1,34 @@ +#' Convert a time BP to indexes for a series +#' +#' Internal function +#' +#' @param time_bp vector of times BP +#' @param time_steps time steps for which reconstructions are available +#' +#' @keywords internal + +time_bp_series<-function(time_bp, time_steps){ + # if this is a vector, just use the values + if (is.numeric(time_bp)){ + time_index <- match(time_bp, time_steps) + if (any(is.na(time_index))) { + stop("time_bp should only include time steps available in the dataset") + } + # if this is a list + } else if (inherits(time_bp,"list")){ + if (!all(names(time_bp)==c("min","max"))){ + stop("time_bp should be a list with min and max elements") + } + if (time_bp$min>time_bp$max){ + stop("in time_bp, min should be less than max") + } + time_bp <- time_steps[time_steps>=time_bp$min & time_steps<=time_bp$max] + time_index <- match(time_bp, time_steps) + # finally give an error if this is not null + } else if (is.null(time_bp)){ + time_index <- NULL + } else { + stop ("time_bp can only be NULL, a numeric vector, or a list with min and max values") + } + return(time_index) +} \ No newline at end of file diff --git a/R/time_bp_to_index.R b/R/time_bp_to_index.R index c3e6b66e..6769516c 100644 --- a/R/time_bp_to_index.R +++ b/R/time_bp_to_index.R @@ -1,15 +1,13 @@ -#' Convert a time BP to indeces in a netcdf file. +#' Convert a time BP to indexes in a netcdf file. #' #' Internal function #' #' @param time_bp vector of times BP -#' @param path_to_nc path to nc file +#' @param time_steps time steps for which reconstructions are available #' +#' @keywords internal -time_bp_to_index <- function(time_bp, path_to_nc) { - climate_nc <- ncdf4::nc_open(path_to_nc) - time_steps <- (climate_nc$dim$time$vals) - ncdf4::nc_close(climate_nc) +time_bp_to_index <- function(time_bp, time_steps) { time_indeces <- sapply(time_bp, function(a, b) { which.min(abs(a - b)) diff --git a/R/time_series_for_location.R b/R/time_series_for_location.R deleted file mode 100644 index 46cc57de..00000000 --- a/R/time_series_for_location.R +++ /dev/null @@ -1,71 +0,0 @@ -#' Extract a time series of bioclimatic variables for one or more locations. -#' -#' This function extract a time series of local climate for -#' a set of locations -#' -#' @param x a 2 column matrix or dataframe (with columns `longitude`, ranging -#' -180 to 180, and `latitude`, from -90 to 90), or a vector of cell numbers. -#' @param bio_variables vector of names of variables to be extracted. -#' @param dataset string defining the dataset to use. -#' @param path_to_nc the path to the directory containing the downloaded -#' reconstructions. Leave it unset if you are using the companion -#' `pastclimData` to store datasets. -#' -#' @export - -time_series_for_locations <- - function(x, - bio_variables, - dataset, - path_to_nc = NULL) { - - # if we are using standard datasets, check whether a variables exists - if (dataset != "custom") { - check_var_downloaded(bio_variables, dataset, path_to_nc) - } else { # else check that the variables exist in the custom nc - check_var_in_nc(bio_variables, path_to_nc) - } - - if (is.null(path_to_nc)) { - path_to_nc <- get_pastclimdata_path() - } - - # reorder the inputs by time - if (inherits(x, "data.frame")) { - locations_data <- x - } else if (inherits(x, "matrix")) { - locations_data <- as.data.frame(x) - } else { - locations_data <- data.frame(cell_number = x) - } - time_series_df <- locations_data - time_series_df$id <- seq_len(nrow(time_series_df)) - for (this_var in bio_variables) { - # get name of file that contains this variable - if (dataset != "custom") { - this_file <- get_file_for_dataset(this_var, dataset)$file_name - this_file <- file.path(path_to_nc, this_file) - this_var_nc <- get_varname(variable = this_var, dataset = dataset) - } else { - this_file <- file.path(path_to_nc) - this_var_nc <- this_var - } - climate_brick <- terra::rast(this_file, subds = this_var_nc) - # add time var if it doesn't exist yet - if (!("time" %in% names(time_series_df))) { - n_time_steps <- length(time(climate_brick)) - n_locations <- nrow(time_series_df) - time_series_df <- time_series_df[rep(seq_len(nrow(time_series_df)), - n_time_steps), ] - time_series_df$time <- rep(time(climate_brick), each = n_locations) - } - this_var_ts <- terra::extract(climate_brick, x) - if (n_locations>1){ - names(this_var_ts)[-1] <- terra::time(climate_brick) - time_series_df[this_var] <- utils::stack(this_var_ts, select = -ID)$values - } else { - time_series_df[this_var]<-t(this_var_ts)[,1] - } - } - return(time_series_df) - } diff --git a/R/zzz.R b/R/zzz.R new file mode 100644 index 00000000..2362fcaf --- /dev/null +++ b/R/zzz.R @@ -0,0 +1,10 @@ +.onLoad <- function(libname, pkgname) { + op <- options() + op.pastclim <- list( + pastclim.data_path = get_data_path() + ) + toset <- !(names(op.pastclim) %in% names(op)) + if (any(toset)) options(op.pastclim[toset]) + + invisible() +} diff --git a/README.md b/README.md index 97f82247..aba862b6 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,22 @@ [![codecov](https://codecov.io/gh/EvolEcolGroup/pastclim/branch/master/graph/badge.svg?token=NflUsWlnQR)](https://codecov.io/gh/EvolEcolGroup/pastclim) + + + This library is designed to provide an easy way to extract and manipulate paleoclimate -reconstructions for ecological and anthropological analyses. It currently focuses -on data from Beyer et al 2020, a reconstruction of climate based on the HadCM3 +reconstructions for ecological and anthropological analyses. It currently includes +data from Beyer et al 2020, a reconstruction of climate based on the HadCM3 model for the last 120k years, and Krapp et al 2021, which covers the last 800k years. -The reconstructions are bias-corrected and downscaled to 0.5 degree. A paper +The reconstructions are bias-corrected and downscaled to 0.5 degree. A vignette, which +can be found on the website under Articles, illustrates how additional dataset +can be read with pastclim (if you format a new dataset, please consider a pull request +to make it available to others!). + +A paper describing the functionality of `pastclim` can be found on [bioRxiv](https://www.biorxiv.org/content/10.1101/2022.05.18.492456v1). ## Install the library @@ -43,22 +54,56 @@ The issue has been fixed in the development version of `terra`. --- -There is a vignette with detailed step by step examples on how to use the library. You can -find it in the [article section of the `pastclim` website](https://evolecolgroup.github.io/pastclim/articles/pastclim_overview.html). Or, you can build it when installing -`pastclim` : +--- + +### IMPORTANT: terra version + +The latest version of `terra` on CRAN (1.6.17) has a bug which prevents correct sampling of `spatRasters`. For +a fully functional `pastclim`, you need to downgrade your version to 1.6.7: + +``` +devtools::install_version("terra", version="1.6.7") +``` + +This fix will work for Linux and Windows, but it turns out that for OSX, `terra` version 1.6.7 on CRAN is built +without support for reading netcdf files. So, if you are on OSX, you need to further downgrade `terra` to version +1.6.3: + +``` +devtools::install_version("terra", version="1.6.3") +``` + +The issue has been fixed in the development version of `terra`. + +--- + +## Overview of functionality + +There is a vignette with detailed step by step examples on how to use the library, as +well as a cheatsheet covering the key functions. You can +find them in the article and cheatsheet sections of the `pastclim` website. There are +also additional articles providing details of datasets available within `pastclim`, +and instructions on how to format and use custom datasets. + +You can also build the vignettes when installing +`pastclim` (note that you will need to have the necessary tools to build vignettes already installed; +requirements depend on your OS): ``` devtools::install_github("EvolEcolGroup/pastclim", build_vignette = TRUE) ``` -And read it directly in R with: +You can read the vignettes directly in R with: ``` -vignette("pastclim_overview",package="pastclim") +vignette("pastclim_overview", package = "pastclim") ``` -The vignette also provides instructions on how to install the optional -companion package `pastclimData`, which simplifies the task of downloading and -storing the climate simulations. --- +## Current issues + +If something does not work, check the [issues on Github] (https://github.com/EvolEcolGroup/pastclim/issues) to see whether the problem +has already been reported. If not, feel free to create an new issue. Please make sure you provide +[a reproducible example] (https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) for the developers to investigate the issue. + NOTE: `pastclim` relies on `terra` to process rasters. There is a known bug in `terra` that leads to the occasional message: ``` diff --git a/_pkgdown.yml b/_pkgdown.yml index 24ef6d72..3c3042fb 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,13 @@ url: https://evolecolgroup.github.io/pastclim/ template: bootstrap: 5 - +development: + mode: auto +navbar: + structure: + left: [intro, reference, articles, tutorials, news, cheatsheet] + right: [search, github] + components: + cheatsheet: + text: Cheatsheet + href: "./pastclim_cheatsheet.pdf" diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 00000000..ae457877 --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,5 @@ +## R CMD check results +There were no ERRORs, WARNINGs or NOTEs. + +## Downstream dependencies +There are currently no downstream dependencies for this package \ No newline at end of file diff --git a/data/region_outline.rda b/data/region_outline.rda index 7ca12492..db08d153 100644 Binary files a/data/region_outline.rda and b/data/region_outline.rda differ diff --git a/data/region_outline_union.rda b/data/region_outline_union.rda index ad05deed..2142cfa3 100644 Binary files a/data/region_outline_union.rda and b/data/region_outline_union.rda differ diff --git a/inst/extdata/CHELSA_bio01/CHELSA_TraCE21k_bio01_-1_V1.0.small.tif b/inst/extdata/CHELSA_bio01/CHELSA_TraCE21k_bio01_-1_V1.0.small.tif new file mode 100644 index 00000000..a1b5fa92 Binary files /dev/null and b/inst/extdata/CHELSA_bio01/CHELSA_TraCE21k_bio01_-1_V1.0.small.tif differ diff --git a/inst/extdata/CHELSA_bio01/CHELSA_TraCE21k_bio01_-2_V1.0.small.tif b/inst/extdata/CHELSA_bio01/CHELSA_TraCE21k_bio01_-2_V1.0.small.tif new file mode 100644 index 00000000..a3d55054 Binary files /dev/null and b/inst/extdata/CHELSA_bio01/CHELSA_TraCE21k_bio01_-2_V1.0.small.tif differ diff --git a/inst/extdata/CHELSA_bio01/CHELSA_TraCE21k_bio01_-3_V1.0.small.tif b/inst/extdata/CHELSA_bio01/CHELSA_TraCE21k_bio01_-3_V1.0.small.tif new file mode 100644 index 00000000..b20c36ca Binary files /dev/null and b/inst/extdata/CHELSA_bio01/CHELSA_TraCE21k_bio01_-3_V1.0.small.tif differ diff --git a/inst/extdata/example_climate.nc b/inst/extdata/example_climate.nc index bc950098..69ddb9c6 100644 Binary files a/inst/extdata/example_climate.nc and b/inst/extdata/example_climate.nc differ diff --git a/inst/extdata/sea_level_spratt2016.txt b/inst/extdata/sea_level_spratt2016.txt new file mode 100644 index 00000000..ae8fef42 --- /dev/null +++ b/inst/extdata/sea_level_spratt2016.txt @@ -0,0 +1,895 @@ +# Global Sea Level Reconstruction using Stacked Records from 0-800 ka +#----------------------------------------------------------------------- +# World Data Center for Paleoclimatology, Boulder +# and +# NOAA Paleoclimatology Program +#----------------------------------------------------------------------- +# NOTE: Please cite original publication, online resource and date accessed when using this data. +# If there is no publication information, please cite Investigator, title, online resource and date accessed. +# +# Description/Documentation lines begin with # +# Data lines have no # +# +# Online_Resource: http://www.ncdc.noaa.gov/paleo/study/19982 +# Online_Resource: http://www1.ncdc.noaa.gov/pub/data/paleo/paleocean/by_contributor/spratt2016/spratt2016.txt +# +# Archive: Paleoceanography +# +# Parameter_Keywords: reconstruction +#--------------------------------------- +# Contribution_Date +# Date: 2016-04-12 +#--------------------------------------- +# Title +# Study_Name: Global Sea Level Reconstruction using Stacked Records from 0-800 ka +#--------------------------------------- +# Investigators +# Investigators: Spratt, Rachel M.; Lisiecki, Lorraine E. +#--------------------------------------- +# Description and Notes +# Description: Late Pleistocene sea level stack based on marine sediment core data (foraminiferal carbonate d18O) as estimated by several different techniques in seven different studies. Sea level stack is a compilation data from the following published sea level reconstructions: Bintanja, R., Roderik, S.W., van de Wal, O. J.: Modeled atmospheric temperatures and global sea levels over the past million years, Nature, 437, 125-128 doi:10.1038/nature03975, 2005. ; Elderfield, H., Ferretti, P., Greaves, M., Crowhurst, S.J., McCave, I.N., Hodell, D.A., Piotrowski, A.M.: Evolution of ocean temperature and ice volume through the Mid-Pleistocene Climate Transition, Science, 337,6095, 704-709, doi:10.1126/science.1221294, 2012.; Rohling, E.J., Grant, K., Bolshaw, M., Roberts, A.P., Siddall, M., Hemleben, C., Kucera, M.: Antarctic temperature and global sea level closely coupled over the past five glacial cycles. Nat. Geosci., 2, 500-504, 2009.; Rohling, E.J., Grant, K.M., Bolshaw, M., Roberts, A. P., Siddall, M., Hemleben C. Kucera, M., Foster, G.L., Marino, G., Roberts, A.P., Tamisiea, M.E., and Williams, F.: Sea-level and deep-sea-temperature variability over the past 5.3 million years, Nature, 508, 477-482, 2014.; Shakun, J.D., Lea, D.W., Lisiecki, L.E., Raymo, M.E.: An 800-kyr record of global surface ocean d18O and implications for ice volume-temperature coupling, Earth. Planet. Sc. Lett., 426, 58-68, 2015.; Sosdian S., Rosenthal Y.: Deep-Sea Temperature and Ice Volume Changes Across the Pliocene-Pleistocene Climate Transitions, Science, 17, 325, 5938, 306-310, doi: 10.1126/science.1169938, 2009.; Waelbroeck, C., Labeyrie, L., Michel, E., Duplessy J.C., McManus J.: Sea-level and deep water temperature changes derived from benthic foraminifera isotopic records, Quaternary Sci. Rev., 21, 295-305, 2002. +# Provided Keywords: sea level, Pleistocene +#--------------------------------------- +# Publication +# Authors: Spratt, Rachel M. and Lorraine E. Lisiecki +# Published_Date_or_Year: 2016 +# Published_Title: A Late Pleistocene sea level stack +# Journal_Name: Climate of the Past +# Volume: in press +# Edition: +# Issue: +# Pages: +# Report Number: +# DOI: 10.5194/cp-12-1-2016 +# Online_Resource: +# Full_Citation: +# Abstract: Late Pleistocene sea level has been reconstructed from ocean sediment core data using a wide variety of proxies and models. However, the accuracy of individual reconstructions is limited by measurement error, local variations in salinity and temperature, and assumptions particular to each technique. Here we present a sea level stack (average) which increases the signal-to-noise ratio of individual reconstructions. Specifically, we perform principal component analysis (PCA) on seven records from 0-430 ka and five records from 0-798 ka. The first principal component, which we use as the stack, describes ~80% of the variance in the data and is similar using either five or seven records. After scaling the stack based on Holocene and Last Glacial Maximum (LGM) sea level estimates, the stack agrees to within 5 m with isostatically adjusted coral sea level estimates for Marine Isotope Stages 5e and 11 (125 and 400 ka, respectively). Bootstrapping and random sampling yield mean uncertainty estimates of 9-12 m (1s) for the scaled stack. Sea level change accounts for about 45% of the total orbital-band variance in benthic d18O, compared to a 65% contribution during the LGM-to-Holocene transition. Additionally, the second and third principal components of our analyses reflect differences between proxy records associated with spatial variations in the d18O of seawater. +#--------------------------------------- +# Funding_Agency +# Funding_Agency_Name: +# Grant: +#--------------------------------------- +# Site Information +# Site_Name: Global 61.5N to 41S +# Location: +# Country: +# Northernmost_Latitude: 61.425 +# Southernmost_Latitude: -40.937 +# Easternmost_Longitude: 180 +# Westernmost_Longitude: -180 +# Elevation: +#--------------------------------------- +# Data_Collection +# Collection_Name: global_sealevel_stack Spratt16 +# First_Year: -798000 +# Last_Year: 0 +# Time_Unit: cal yr BP +# Core_Length: +# Notes: Sea level stack is a compilation data from the following published sea level reconstructions: Bintanja, R., Roderik, S.W., van de Wal, O. J.: Modeled atmospheric temperatures and global sea levels over the past million years, Nature, 437, 125-128 doi:10.1038/nature03975, 2005. ; Elderfield, H., Ferretti, P., Greaves, M., Crowhurst, S. J., McCave, I.N., Hodell, D. A., Piotrowski, A. M.: Evolution of ocean temperature and ice volume through the Mid-Pleistocene Climate Transition, Science, 337,6095, 704-709, doi:10.1126/science.1221294, 2012.; Rohling, E.J., Grant, K., Bolshaw, M., Roberts, A.P., Siddall, M., Hemleben, C., Kucera, M.: Antarctic temperature and global sea level closely coupled over the past five glacial cycles. Nat. Geosci., 2, 500–504, 2009.; Rohling, E. J., Grant, K.M., Bolshaw, M., Roberts, A. P., Siddall, M., Hemleben C. Kucera, M., Foster, G.L., Marino, G., Roberts, A.P., Tamisiea, M.E., and Williams, F.: Sea-level and deep-sea-temperature variability over the past 5.3 million years, Nature, 508, 477–482, 2014.; Shakun, J. D., Lea, D. W., Lisiecki, L. E., Raymo, M. E.: An 800-kyr record of global surface ocean d18O and implications for ice volume-temperature coupling, Earth. Planet. Sc. Lett., 426, 58–68, 2015.; Sosdian S., Rosenthal Y.: Deep-Sea Temperature and Ice Volume Changes Across the Pliocene-Pleistocene Climate Transitions, Science, 17, 325, 5938, 306-310, doi: 10.1126/science.1169938, 2009.; Waelbroeck, C., Labeyrie, L., Michel, E., Duplessy J.C., McManus J.: Sea-level and deep water temperature changes derived from benthic foraminifera isotopic records, Quaternary Sci. Rev., 21, 295–305, 2002. +#--------------------------------------- +# Species +# Species_Name: Any additional species should be entered in Columns C,D, etc. +# Common_Name: +# Tree_Species_Code: +#--------------------------------------- +# Chronology_Information +# Chronology: +# For cores with benthic foraminiferal carbonate d18O, age models were developed by aligning the carbonate d18O to the "LR04" benthic d18O stack (Lisiecki and Raymo, Paleoceanography, 2005). In most cases, this was the published timescale of the original record. For cores which lacked benthic carbonate d18O, their sea level estimates were aligned to the sea level estimates of the records that were already on the LR04 age model. +#--------------------------------------- +# Variables +# Data variables follow that are preceded by "##" in columns one and two. +# Variables list, one per line, shortname-tab-longname components (9 components: what, material, error, units, seasonality, archive, detail, method, C or N for Character or Numeric data) +## age_calkaBP Age,,,calendar ka BP,,,,,N +## SeaLev_shortPC1 Sea Level,,,meters above present day,,climate reconstructions,,Scaled first principal component of seven sea level reconstructions (0-430 ka),N +## SeaLev_shortPC1_err_sig Sea Level,,standard deviation from bootstrap,meters,,climate reconstructions,,Scaled first principal component of seven sea level reconstructions (0-430 ka),N +## SeaLev_shortPC1_err_lo Sea Level,,95% confidence interval, lower bound,meters,,climate reconstructions,,Scaled first principal component of seven sea level reconstructions (0-430 ka),N +## SeaLev_shortPC1_err_up Sea Level,,95% confidence interval, upper bound,meters,,climate reconstructions,,Scaled first principal component of seven sea level reconstructions (0-430 ka),N +## SeaLev_longPC1 Sea Level,,,meters above present day,,climate reconstructions,,Scaled first principal component of five sea level reconstructions (0-798 ka),N +## SeaLev_longPC1_err_sig Sea Level,,standard deviation from bootstrap,meters,,climate reconstructions,,Scaled first principal component of five sea level reconstructions (0-798 ka),N +## SeaLev_longPC1_err_lo Sea Level,,95% confidence interval, lower bound,meters,,climate reconstructions,,Scaled first principal component of five sea level reconstructions (0-798 ka),N +## SeaLev_longPC1_err_up Sea Level,,95% confidence interval, upper bound,meters,,climate reconstructions,,Scaled first principal component of five sea level reconstructions (0-798 ka),N +#------------------------ +# Data +# Data lines follow (have no #) +# Data line format - tab-delimited text, variable short name as header +# Missing Value: NaN +age_calkaBP SeaLev_shortPC1 SeaLev_shortPC1_err_sig SeaLev_shortPC1_err_lo SeaLev_shortPC1_err_up SeaLev_longPC1 SeaLev_longPC1_err_sig SeaLev_longPC1_err_lo SeaLev_longPC1_err_up +0 8.49 5.23 -1.72 17.93 8.96 5.72 -1.21 20.38 +1 7.63 4.87 -2.9 16.39 7.72 5.13 -2.77 17.1 +2 4.01 4.83 -4.51 13.59 5.96 4.69 -5.01 14.21 +3 4.35 4.72 -6.93 12.08 3.54 4.42 -7.28 10.9 +4 3.13 4.74 -10.43 8.41 1.88 4.39 -10.54 7.63 +5 0 4.57 -12.34 5.12 0 4.54 -13.3 4.37 +6 -4.01 5.04 -16.88 0.62 -2 5.43 -17.74 2.26 +7 -6.11 5.9 -22.41 -0.39 -5.38 6.89 -23.29 3.65 +8 -9.09 6.79 -28.86 -2.96 -7.12 8.66 -31.66 4.08 +9 -15.83 8.3 -37.35 -5.22 -11.6 10.87 -43.21 2.56 +10 -24.59 10.3 -50.17 -9.89 -23.18 13.05 -56.03 -3.78 +11 -35.85 11.93 -63.99 -17.59 -36.19 14.92 -70.95 -11.27 +12 -51.05 12.3 -76.8 -28.6 -49.72 15.38 -83.72 -23.99 +13 -66.3 12.38 -89.53 -39.9 -64.58 15.65 -96.11 -34.83 +14 -76.64 12.35 -100.98 -53.14 -75.97 16.08 -107.68 -44.5 +15 -86.57 12.34 -111.08 -61.67 -86.08 16.33 -117.47 -53.8 +16 -98.06 12.28 -119.52 -70.64 -98.43 16.26 -125.37 -61.94 +17 -107.3 11.96 -125.43 -77.7 -108.23 15.9 -129.99 -68.78 +18 -113.01 11.16 -129.44 -84.14 -113.85 15.05 -131.8 -73.18 +19 -116.68 10.61 -131.87 -89.61 -117 14.4 -133.08 -77.34 +20 -117.56 10.08 -134.08 -95.64 -116.4 13.9 -134.48 -81.87 +21 -120.01 9.14 -134.42 -99.63 -118.61 12.14 -134.47 -91.28 +22 -125.82 7.66 -134.52 -106.07 -125.91 9.97 -134.42 -98.21 +23 -128.72 5.27 -134.73 -113.3 -128.71 6.49 -134.95 -107.99 +24 -130 4.38 -134.58 -118.09 -130 5.48 -134.67 -113.97 +25 -126.89 4.5 -134.18 -116.35 -124.87 5.87 -133.38 -110.94 +26 -122.4 5.15 -133.23 -113.54 -119.21 6.84 -132.58 -106.41 +27 -118.28 5.44 -130.83 -109.88 -114.93 6.7 -128.15 -102.77 +28 -115.19 5.74 -126.93 -105.25 -112.19 6.88 -123.71 -97.4 +29 -110.87 5.64 -123.11 -100.95 -107.65 6.6 -119.34 -94.56 +30 -105.78 5.72 -119.56 -97.59 -102.07 6.62 -116.2 -90.66 +31 -103.5 5.81 -115.83 -93.16 -99.97 6.49 -112.82 -87.56 +32 -100.63 6.14 -113.45 -89.89 -96.01 6.64 -109.99 -83.39 +33 -97.48 6.4 -112.63 -87.9 -93.69 7.04 -110.23 -81.11 +34 -97.37 6.64 -113.54 -87.15 -93.5 7.22 -109.73 -81.26 +35 -98.83 6.67 -112.65 -85.72 -97.21 7.47 -110.41 -80.66 +36 -99.39 6.81 -112.85 -85.29 -97.2 7.4 -110.04 -81.44 +37 -95.27 6.54 -112.21 -85.74 -93.4 6.97 -110.08 -82.41 +38 -93.1 6.16 -109.47 -84.17 -91.82 6.34 -105.63 -80.62 +39 -90.3 5.66 -102.83 -81.14 -88.47 6.05 -100.13 -76.35 +40 -85.9 5.74 -98.89 -76.15 -83.13 6.16 -96.46 -72.62 +41 -79.76 5.67 -94.67 -72.62 -78.15 5.79 -91.91 -69.35 +42 -75.76 5.2 -90.5 -70.82 -74.61 5.18 -87.44 -67.59 +43 -73.91 4.72 -86.67 -68.74 -73.02 4.9 -84.37 -65.65 +44 -76.18 4.8 -86.65 -67.68 -72.61 4.81 -82.85 -64.04 +45 -74.49 4.75 -85.47 -67.24 -71.01 5.04 -82.81 -63.31 +46 -75.78 5.1 -87.56 -67.52 -70.25 5.33 -83.46 -63.27 +47 -73.7 5.05 -87.1 -67.3 -71.4 5.51 -83.75 -62.55 +48 -76.71 5.49 -86.89 -65.61 -72.53 5.81 -83.47 -60.96 +49 -73.75 6.04 -84.42 -61.64 -70.54 6.08 -82.85 -58.88 +50 -68.3 6.49 -84.91 -58.55 -66.69 6.4 -82.6 -56.45 +51 -63.11 6.1 -82.32 -58.02 -65.99 7.09 -83.41 -54.32 +52 -67.88 6.37 -81.7 -57.24 -68.05 8.26 -86.9 -52.81 +53 -68.85 6.73 -82.99 -55.98 -69.87 8.81 -90.39 -53.31 +54 -70.05 7.18 -87.88 -58.82 -71.66 8.88 -91.32 -56.22 +55 -72.26 7.5 -91.66 -60.95 -74.43 8.82 -93.18 -58.04 +56 -78.03 7.9 -95.37 -63.04 -78.68 8.6 -95.38 -61.12 +57 -82.74 7.91 -96.96 -65.22 -81.58 8.51 -96.03 -62.47 +58 -85.71 8.31 -99.32 -66.11 -81.85 9.41 -96.26 -60.6 +59 -82.94 8.97 -101.54 -65.19 -76.51 10.52 -96.88 -56.87 +60 -84.73 8.89 -101.4 -66 -77.47 10.88 -96.11 -53.14 +61 -86.56 8.68 -100.68 -63.69 -78.58 10.85 -94.61 -52.59 +62 -84.32 8.77 -101.28 -65.01 -79.92 10.8 -95.35 -52.06 +63 -84.75 8.15 -100.11 -66.5 -79.92 9.73 -94.29 -57.7 +64 -83.48 7.06 -97.89 -69.28 -77.22 8.38 -94.13 -62.19 +65 -82.72 6.97 -97.61 -70.76 -78.75 7.52 -93.97 -65.09 +66 -82.47 7.09 -95.62 -68.69 -80.56 8.15 -92.94 -61.24 +67 -79.37 6.84 -92.04 -64.64 -80.05 8.98 -91.88 -56.91 +68 -71.06 7.3 -88.56 -60.46 -68.37 10.11 -89.84 -50.72 +69 -68.11 8.84 -85.22 -51.15 -64.56 11.75 -87.23 -40.67 +70 -65.39 9.4 -79.2 -42.67 -60.11 12.01 -79.15 -31.38 +71 -51.43 10.04 -75 -35.42 -50.56 12.81 -74.57 -24.32 +72 -46.71 10.17 -69.63 -29.21 -43.6 12.96 -69.85 -18.74 +73 -43.84 9.97 -63.09 -23.31 -38.44 12.79 -63.57 -14.2 +74 -36.18 9.68 -58.1 -21.24 -33.23 12.02 -57.33 -11.56 +75 -33.06 9.11 -54.25 -18.43 -27.81 10.95 -52.9 -10.46 +76 -31.58 8.27 -48.54 -16.13 -26.3 9.82 -48.48 -10.78 +77 -27.69 8.14 -47.93 -16.5 -26.85 9.73 -49.32 -10.95 +78 -28.8 7.77 -47.08 -16.64 -27.39 9.61 -50.73 -12.8 +79 -32.95 7.26 -46.29 -18.08 -32.53 9.36 -51.9 -14.88 +80 -30.85 6.98 -46.3 -19.38 -32.48 8.55 -51.28 -16.91 +81 -31.36 7.63 -47.64 -17.23 -32.68 9.9 -50.7 -10.68 +82 -29.64 8.01 -47.38 -15.87 -31.47 10.85 -49.49 -8.32 +83 -25.57 8.5 -47.98 -14.51 -24.15 11.71 -50.32 -6.17 +84 -30.66 8.78 -49.34 -14.48 -27.87 11.41 -48.53 -4.67 +85 -29.99 9.31 -51.51 -15.62 -29.96 11.38 -49.44 -5.73 +86 -38.77 9.49 -56.47 -18.08 -33.19 11.17 -52.56 -9.52 +87 -43.09 9.38 -58.24 -20.89 -36.68 10.74 -53.59 -11.63 +88 -46.6 8.91 -59.96 -25.72 -41.15 10.33 -54.29 -16.12 +89 -43.44 8.46 -60.47 -28.6 -40.65 10.16 -55.53 -17.01 +90 -43.63 7.86 -59.49 -28.89 -38.17 9.71 -55.64 -17.34 +91 -40.3 7.57 -57.19 -27.2 -35.91 9.1 -54.7 -17.93 +92 -41.67 7.59 -56.66 -26.28 -39.37 8.27 -53.95 -21.94 +93 -42.16 6.86 -53.77 -27.85 -41.76 7.38 -53.51 -25.78 +94 -40.52 6.68 -52.39 -26.54 -41.82 7.82 -53.09 -22.36 +95 -34.24 7.47 -50.8 -21.52 -34.94 8.88 -51.46 -16.76 +96 -27.74 7.82 -47.5 -16.22 -25.61 9.35 -48.3 -12.73 +97 -22.19 7.77 -42.02 -11.02 -20.95 8.82 -42.96 -9.02 +98 -21.19 7.38 -38.21 -9.82 -19.34 8.28 -39.79 -7.23 +99 -17.26 6.77 -35.67 -9.34 -16.97 8.25 -38.04 -5.59 +100 -19.49 7.09 -36.28 -9.29 -17 8.92 -40.14 -6.04 +101 -17.72 7.5 -37.95 -9.32 -16.69 9.75 -42.09 -4.56 +102 -25.03 7.58 -40.61 -10.86 -28.14 9.47 -44.78 -8.59 +103 -29.47 7.36 -43.31 -14.15 -31.04 8.95 -46.35 -11.46 +104 -31.71 6.23 -47.08 -22.42 -32.55 7.02 -48.84 -21.83 +105 -34.36 6.23 -51.67 -27 -35.22 6.72 -51.35 -24.85 +106 -40.33 5.91 -53.53 -30.24 -38.48 6.43 -53.04 -28.33 +107 -45.01 5.84 -56.12 -33.4 -41.37 6.19 -54.64 -30.54 +108 -44.48 5.71 -58.2 -36.24 -42.91 6.04 -56.07 -32.59 +109 -45.95 5.85 -59.78 -37.21 -45.17 6.4 -58.64 -32.84 +110 -46.36 5.75 -58.82 -35.63 -45.58 6.92 -59.89 -32.75 +111 -47.08 6.09 -57.92 -34.02 -47.87 7.55 -60.36 -30.63 +112 -43.18 6.7 -57.09 -29.37 -44.12 8.36 -60.54 -26.62 +113 -38.93 7.92 -55.23 -23.47 -39.03 9.4 -59.03 -21.34 +114 -33.84 8.71 -52.11 -17.24 -33.75 10.23 -56.93 -15.3 +115 -26.17 9.45 -48.38 -10.53 -29.37 10.8 -52.47 -8.99 +116 -22.5 9.57 -44.07 -4.55 -24.99 11.12 -49.38 -4.85 +117 -14.09 9.32 -38.52 -0.28 -17.04 11.13 -44.01 -0.79 +118 -7.56 9.65 -33.23 5.2 -9.18 11.01 -37.21 5.05 +119 -4 9.15 -25.34 11.96 -4.89 10.4 -30.7 10.75 +120 2.68 8.61 -20.11 13.96 -0.63 9.71 -25.06 12.85 +121 3.13 8.04 -16.66 14.85 0.38 9.35 -23.45 14.03 +122 2.27 7.48 -16.48 14.31 -2.96 9.3 -24.67 12.96 +123 1.2 7.72 -18.3 11.66 -2.86 9.73 -27.07 12.16 +124 -1.18 7.99 -23.61 7.96 -5.42 10.15 -31.36 8.15 +125 -6.65 9.21 -32.76 3.82 -9.84 11.39 -41.73 3.22 +126 -12.72 10.54 -42.73 -1.38 -16.25 13.48 -53.24 0.31 +127 -27.1 12.33 -57.04 -8.26 -26.94 16.01 -68.7 -5.1 +128 -36.13 14.35 -73.57 -15.92 -37.21 18.44 -84.72 -13.24 +129 -52.95 15.22 -87.96 -27.15 -54.53 19.9 -101.68 -23.06 +130 -73.72 16.05 -103.29 -40.2 -73.85 20.5 -117.67 -36.29 +131 -82.93 15.15 -117.04 -58.22 -90.07 19.13 -129.13 -54.68 +132 -102.14 13.62 -126.92 -75.11 -105.22 16.88 -134.27 -70.2 +133 -114.38 11.96 -132.62 -86.55 -115.02 14.67 -139.11 -83.56 +134 -120.26 9.69 -137.19 -98.98 -119.82 12.29 -142.25 -95.78 +135 -123.76 8.33 -139.42 -106.97 -123.64 10.54 -144.19 -104.37 +136 -123.95 7.89 -140.25 -109.67 -124.5 9.81 -144.28 -107.08 +137 -123.61 7.89 -140.8 -109.74 -123.8 9.73 -143.23 -106.28 +138 -122.72 7.99 -140.44 -108.75 -124.64 9.91 -142.56 -104.96 +139 -120.94 8.16 -138.39 -106.21 -122.69 10.13 -140.76 -102.04 +140 -118.88 8.2 -135.75 -103.44 -120.22 10.39 -139.53 -99.63 +141 -113.45 8.21 -131.84 -100.51 -114.5 10.42 -136.21 -96.44 +142 -110.78 8.29 -128.79 -96.54 -110.49 10.55 -133.45 -93.15 +143 -106.75 8.15 -124.16 -93.07 -107.59 10.45 -128.06 -88.82 +144 -102.4 8.25 -122.01 -89.94 -103.3 10.48 -123.89 -85.28 +145 -100.34 8.37 -119.96 -87.28 -98.2 10.5 -120.57 -81.37 +146 -100.71 8.59 -118.42 -84.49 -94.8 10.41 -116.9 -77.74 +147 -99.52 8.79 -117.05 -83.15 -93.03 10.43 -114.75 -75.88 +148 -99.18 9.39 -116.17 -80.07 -92.8 11.32 -112.58 -71.73 +149 -96.94 9.97 -115.26 -76.2 -91.47 12.4 -111.92 -66.16 +150 -90.79 10.67 -113.37 -71.82 -83.71 13.48 -111.56 -61.09 +151 -86.92 11.06 -111.4 -68.1 -81.41 14.21 -111.89 -57.3 +152 -85.9 11.34 -110.22 -66.06 -80.76 14.82 -111.28 -55.56 +153 -85.22 11.65 -110.45 -64.99 -81.58 15.31 -112.57 -54.96 +154 -86.91 11.83 -111.48 -65.21 -83.01 15.55 -114.78 -55.48 +155 -89.71 11.76 -112.73 -66.29 -85.36 15.51 -115.89 -57.6 +156 -92.51 11.48 -113.12 -67.92 -88.64 15.35 -115.36 -58.52 +157 -92.67 11.16 -113.7 -69.1 -87.48 14.99 -115.47 -58.14 +158 -88.91 10.91 -113.41 -69.99 -85.64 14.56 -114.52 -57.37 +159 -87.94 10.66 -111.3 -69.84 -86.43 14.05 -112.27 -57.92 +160 -86.95 10.45 -107.26 -68.12 -85.83 13.94 -110.13 -57.24 +161 -85.29 10.52 -105.8 -65.74 -81.01 14.14 -108.09 -54.07 +162 -78.74 10.6 -102.72 -61.83 -75.82 14.17 -104.53 -49.52 +163 -77.08 10.76 -99.81 -58.32 -72.41 14.06 -101.04 -46.87 +164 -74.42 10.78 -95.44 -53.52 -71.32 13.88 -97.6 -45.39 +165 -71.66 10.86 -93.59 -49.49 -68.5 13.58 -93.71 -42.36 +166 -65.29 10.33 -89.4 -48.42 -64.42 13.09 -90.94 -41.53 +167 -61.69 9.94 -85.89 -46.43 -60.97 12.81 -87.29 -39.12 +168 -61.52 9.69 -81.74 -43.66 -60.17 12.67 -84.25 -36.2 +169 -58.16 9.47 -79.33 -42.17 -58.35 12.29 -81.7 -35.58 +170 -55.34 9.17 -78.42 -41.44 -55.7 12.05 -80.82 -34.96 +171 -57.68 8.82 -77.29 -42.28 -56.66 11.73 -80.34 -35.67 +172 -64.45 8.71 -77.05 -43.49 -62.17 11.36 -78.98 -36.67 +173 -63.15 8.51 -78.23 -45.47 -59.51 11.03 -78.52 -36.88 +174 -62.14 8.69 -80.7 -46.37 -57.15 11.12 -78.87 -37 +175 -61.42 8.85 -80.24 -45.66 -56.68 11.45 -79.48 -35.8 +176 -63.68 9.14 -82.02 -45.79 -56.38 11.68 -80.39 -36.03 +177 -62.61 9.6 -83.68 -46.73 -57.08 11.92 -81.64 -36.64 +178 -66.03 9.64 -85.56 -48.19 -60.21 11.96 -83.15 -38.56 +179 -68.55 9.63 -86.44 -49.27 -61.56 11.86 -84.55 -40.33 +180 -68.12 9.68 -88.3 -50.86 -62.88 11.79 -85.81 -42.16 +181 -68.54 9.97 -89.62 -51.12 -63.81 12.12 -87.17 -41.85 +182 -68.59 9.78 -89.92 -51.76 -61.87 12.28 -88.1 -40.23 +183 -68.86 9.53 -90.08 -52.43 -61.47 12.18 -88.54 -40.34 +184 -70.31 9.51 -89.26 -52.66 -63.82 12.05 -88.8 -41.42 +185 -71.5 9.33 -87.58 -52.5 -66.14 11.78 -87.06 -42.63 +186 -67.51 8.85 -84.5 -51.87 -63.1 11.35 -86.29 -41.78 +187 -64.13 8.55 -82.3 -50.01 -58.35 11.01 -84.66 -39.31 +188 -58.98 8.27 -77.78 -46.09 -54.36 10.12 -79.21 -38.24 +189 -55.74 8.01 -72.75 -42.15 -49.67 9.03 -72.46 -35.38 +190 -50.97 8.16 -67.22 -35.52 -47.83 8.39 -66.65 -32.68 +191 -44.91 8.28 -63.42 -30.9 -43.67 8.09 -61.02 -28.97 +192 -37.3 7.61 -57.51 -27.61 -38.93 8.06 -57.07 -26.77 +193 -32.83 7.39 -52.64 -22.84 -34.32 8.22 -54.47 -22.57 +194 -32.43 7.44 -47.73 -18.33 -31.73 8.37 -51.01 -17.98 +195 -26.14 8.12 -43.23 -11.59 -27.93 8.44 -46.1 -11.87 +196 -21.7 8.7 -40.12 -5.12 -22.54 9.06 -41.46 -4.62 +197 -13.48 8.23 -33.94 -1.05 -16.51 9.31 -36.75 1.28 +198 -10.09 7.57 -29.94 -1.05 -10.22 9.21 -33.71 3.2 +199 -7.72 7.42 -30.57 -1.53 -8.16 9.04 -32.73 3.63 +200 -11.24 7.13 -31.15 -2.01 -10.01 8.93 -32.19 3.34 +201 -19.54 7.77 -34.84 -3.75 -14.6 9.21 -35.18 1.86 +202 -21.5 7.83 -37.32 -6.2 -19.64 9.19 -37.44 -0.26 +203 -26.54 8.11 -38.42 -6.62 -23.23 9.66 -38.41 0.28 +204 -23.73 8.69 -36.98 -3.55 -21.01 10.82 -38.56 3.78 +205 -14.39 9.93 -37.8 1.82 -10.72 11.8 -38.25 6.84 +206 -9.84 10.21 -36.75 4.99 -5.44 12.5 -36.92 11.27 +207 -14.1 10.51 -33.07 6.94 -8.14 13.15 -37.01 13.6 +208 -10.13 11.06 -33.91 8.75 -8.33 13.92 -37.17 15.02 +209 -10.6 11.02 -36.1 8.31 -9.22 13.92 -36.96 16.32 +210 -11.47 10.71 -32.76 9.33 -7.95 14.09 -36.16 17.17 +211 -9.45 10.92 -32.57 10.22 -4.98 14.07 -36.25 18.64 +212 -7.38 10.99 -32.48 11.61 -3.69 13.86 -35.44 19.02 +213 -6.78 10.76 -31.36 10.74 -4.4 13.52 -34.5 18.84 +214 -7.05 10.24 -31.51 9.5 -5.98 13.15 -35.33 16.19 +215 -9.18 10.12 -34.08 5.23 -6.5 13.16 -38.46 12.26 +216 -13.1 10 -38.83 0.74 -10.74 13.28 -43.41 7.3 +217 -23.51 10.25 -45.06 -3.7 -21.54 13.72 -51.94 1.35 +218 -29.26 10.72 -53.69 -11.56 -29.58 14.19 -61.91 -7.44 +219 -36.81 11.23 -64.27 -20.7 -39.16 14.14 -69.02 -16.17 +220 -49.33 11.33 -71.72 -28.9 -49.6 14.5 -80.09 -24.51 +221 -61.75 11.26 -80.17 -37.15 -57.84 14.11 -85.81 -32.27 +222 -67.03 9.92 -84.7 -45.94 -67.09 12.99 -89.46 -38.6 +223 -73.68 9.27 -88.74 -51.96 -69.51 12.08 -90.25 -44.46 +224 -72.15 8.69 -89.32 -55.76 -68.74 11.13 -89.71 -47.8 +225 -74.35 8.04 -89.03 -57.44 -69.26 10.04 -88.17 -50.63 +226 -70.68 7.46 -86.16 -56.76 -66.5 8.93 -85.06 -51.88 +227 -66.88 7.29 -84.73 -56.14 -65.16 8.43 -83.75 -51.78 +228 -65.45 6.79 -80.39 -53.85 -65.57 8.34 -81.38 -49.85 +229 -65.06 6.97 -76.6 -48.78 -62.94 8.9 -78.86 -44.16 +230 -59.11 8.12 -73.94 -43 -57.47 10.2 -75.76 -36.81 +231 -51.45 9.5 -71.41 -34.05 -49.89 11.19 -71.31 -27.67 +232 -41.76 9.78 -64.11 -25.49 -39.44 11.15 -65.33 -23.22 +233 -31.59 9.65 -55.79 -18.92 -31.3 10.86 -58.33 -16.43 +234 -26.47 9.23 -48.17 -12.27 -27.81 10.54 -51.57 -11.15 +235 -21.38 9.05 -41.7 -6.3 -22.9 10.31 -46.25 -6.4 +236 -15.03 8.65 -38.02 -3.4 -15.91 9.65 -43.15 -4.8 +237 -9.44 7.89 -36.19 -4.69 -12.93 9.15 -41.15 -4.99 +238 -14.82 7.64 -36.23 -6.94 -16.93 9.56 -43.28 -5.43 +239 -21.09 8.31 -42.1 -9.7 -21.86 10.97 -50.39 -8.26 +240 -26.31 9.54 -51.68 -14.84 -26.82 13.23 -61.67 -11.52 +241 -35.14 11.06 -62.85 -19.38 -35.26 14.85 -70.07 -14.17 +242 -44.9 11.35 -70.17 -25.03 -45.72 15.45 -78.36 -19.18 +243 -53.72 13.94 -78.84 -22.33 -51.2 20.06 -85.62 -3.09 +244 -58.16 14.8 -86.18 -28.82 -56.73 20.96 -91.1 -8.29 +245 -54.47 15.51 -94.02 -31.75 -47.88 22.01 -99.39 -4.83 +246 -73.1 15.29 -99.84 -33.85 -71.87 19.58 -102 -27.57 +247 -80.67 15.9 -103.93 -44.67 -80.64 19.05 -106.73 -31.42 +248 -86.71 11.84 -108.53 -63.57 -84.39 14.97 -112.95 -53.49 +249 -88.3 11.47 -113.32 -67.55 -87.15 15.13 -116.72 -57.81 +250 -91.78 11.89 -116.99 -70.79 -90.08 16.02 -121.78 -58.85 +251 -94.31 12.64 -121.22 -71.6 -90.51 17.42 -127.21 -57.26 +252 -94.5 13.98 -124.4 -69.21 -90.18 19.46 -132.35 -53.3 +253 -95.65 15.37 -125.79 -66.56 -90.12 21.7 -132.18 -45.17 +254 -91.97 15.42 -125.08 -65 -87.6 21.92 -131.21 -43.51 +255 -86.9 15 -122.85 -62.25 -80.55 21.42 -129.54 -37.55 +256 -90.3 14.86 -120.89 -58.5 -85.9 19.95 -127.97 -47.41 +257 -93.53 13.45 -115.4 -63.22 -90.55 16.89 -122.98 -51.19 +258 -93.71 9.74 -110.67 -72.6 -92.35 12.38 -113.79 -65.83 +259 -89.89 8.38 -105.76 -73.2 -86.91 10.68 -106.28 -66.68 +260 -81.06 8.34 -102.07 -69.33 -76.07 10.53 -102.56 -61.99 +261 -78.3 8.1 -97.55 -64.74 -72.52 10.09 -96.21 -56.91 +262 -77.68 7.99 -95.22 -63.24 -72.1 10.12 -93.77 -54.43 +263 -77.5 7.75 -95.57 -64.72 -73.52 10.36 -93.86 -54.12 +264 -85.38 7.98 -96.3 -65.2 -80.85 10.72 -95.73 -53.74 +265 -84.54 8.57 -97.51 -63.91 -81.29 11.55 -95.76 -50.78 +266 -82.09 8.24 -100.42 -66.92 -76.74 11.11 -97.23 -56.07 +267 -82.77 8.23 -102.76 -69.7 -75.43 10.87 -99.1 -57.85 +268 -93.08 8.29 -105.22 -71.69 -88.1 9.91 -100.6 -62.83 +269 -97.2 8.13 -105.72 -74.37 -92.09 9.52 -102.3 -65.07 +270 -98.21 7.59 -106.96 -76.66 -93.27 9.7 -102.15 -64.23 +271 -89.95 8.74 -106.36 -72.7 -84.89 10.91 -101.86 -59.96 +272 -80.22 8.89 -103.98 -68.03 -77.94 11.06 -98.46 -56.41 +273 -76.12 9.05 -95.65 -60.21 -74.2 11.8 -92.3 -45.91 +274 -74.38 10.08 -90.81 -51.7 -70.83 13.74 -89.75 -36.9 +275 -67.56 10.91 -87.92 -45.78 -61.01 15.14 -86.5 -29.97 +276 -61.85 11.39 -85.09 -39.84 -54.32 15.7 -83.81 -23.75 +277 -56.75 11.7 -81.33 -35.27 -50.86 15.6 -79.97 -18.51 +278 -53.52 11.69 -76.99 -30.72 -48.23 15.21 -76.1 -15.97 +279 -50.13 11.32 -72.06 -28.17 -45.62 14.4 -72.86 -15.4 +280 -46.06 10.87 -68.1 -25.86 -42.44 13.22 -68.88 -16.69 +281 -39.89 10.49 -64.17 -24.11 -39.03 12.29 -65.78 -16.23 +282 -37.94 10.12 -60.7 -20.73 -38.63 11.58 -63.71 -17.49 +283 -36.69 9.61 -57.69 -19.92 -39.26 10.93 -62.69 -18.19 +284 -35.06 9.13 -57.35 -20.51 -39.35 10.18 -63.18 -21.63 +285 -35.22 8.91 -57.53 -22.68 -40.03 9.58 -63.33 -24.92 +286 -36.57 8.56 -57.52 -23.9 -43 9.18 -63.96 -27.26 +287 -37.85 8.06 -58.54 -27.87 -45.5 8.77 -64.89 -31.17 +288 -42.69 7.5 -61.7 -32.08 -48.56 8.25 -67.49 -35.4 +289 -51.85 6.73 -65.11 -38.34 -54.86 7.17 -69.01 -40.68 +290 -56.69 5.79 -67.24 -43.98 -58.27 6.37 -69.15 -44.34 +291 -58.53 5.45 -68.42 -45.73 -58.29 6.64 -69.35 -42.89 +292 -56.55 6.25 -69.2 -43.86 -53.8 7.61 -69.33 -39.12 +293 -54.88 7.04 -69.64 -41.51 -50.77 8.51 -68.73 -35.49 +294 -53.23 7.88 -69.59 -38.94 -49.26 10.07 -68.33 -29.28 +295 -52.4 8.67 -69.62 -36.37 -48.22 11.43 -70.16 -25.2 +296 -48.95 9.48 -69.27 -31.55 -43.51 12.71 -71.22 -22.87 +297 -48.35 10.18 -68.92 -29.19 -44.77 13.56 -72.96 -19.97 +298 -47.6 10.68 -68.21 -26.13 -44.88 14.31 -72.45 -17.57 +299 -45.33 10.85 -67.89 -23.81 -42.38 14.66 -70.7 -15.6 +300 -42.88 10.97 -65.95 -22.3 -40.16 14.79 -68.55 -13.22 +301 -39.59 11.07 -62.9 -19.17 -38.64 14.99 -65.8 -8.2 +302 -38.01 11.11 -61.01 -16.17 -36.2 15 -64.75 -5.66 +303 -33.06 11.36 -59.05 -13.66 -33 15.53 -64.41 -4.3 +304 -35.35 11.39 -57.74 -13.53 -36.19 15.79 -64.09 -2.71 +305 -39.42 11.35 -56.45 -11.93 -38.96 16.14 -63.8 -1.27 +306 -35.78 11.62 -56.32 -10.9 -35.29 16.31 -63.06 0.38 +307 -30.55 11.97 -56.58 -9.17 -31.22 16.45 -62.2 3.47 +308 -31.07 11.69 -53.72 -6.86 -31.05 16.25 -58.96 5.36 +309 -27.9 11.35 -49.42 -4.7 -27.33 15.97 -54.88 7.8 +310 -24.1 11.5 -47.32 -2.16 -22.67 15.82 -52.42 10.75 +311 -22.22 11.34 -44.13 -0.47 -20.87 15.62 -48.7 13.8 +312 -21.88 11.5 -41.69 2.81 -19.67 15.83 -46.37 15.84 +313 -18.42 11.79 -39.75 5.31 -16.66 16.13 -44.64 18.48 +314 -12.39 11.84 -37.87 8.08 -9.95 16.16 -43.45 20.33 +315 -12.12 11.74 -36.81 9.2 -7.03 15.91 -41.04 21.39 +316 -9.85 11.38 -34.64 11.03 -7.3 15.51 -38.73 22.64 +317 -10.45 11.21 -33.84 10.57 -6.47 15.27 -38.2 20.8 +318 -10.88 10.65 -33.02 9.32 -7.02 14.76 -39.23 19.62 +319 -11.31 10.57 -32.95 8.94 -8.25 14.65 -39.2 17.7 +320 -8.44 10.89 -32.93 9.94 -6.17 15.06 -39.38 19.7 +321 -6.92 11.43 -32.43 12.01 -5.29 15.78 -39.44 21.68 +322 -2.51 11.42 -31.39 14.09 -2.38 15.81 -39.6 22.18 +323 -0.71 11.56 -30.6 14.09 -0.59 15.91 -39.57 22.22 +324 -2.6 11.63 -31.24 15.55 -4.09 15.51 -40.71 18.78 +325 -7.77 11.33 -31.62 13.45 -11.39 14.64 -40.16 17.48 +326 -7.75 10.74 -32.07 12.16 -11.59 14.28 -40.27 16.13 +327 -3.06 10.95 -31.6 12.43 -5.54 15.04 -38.72 18.4 +328 -0.61 11.34 -31.93 13.74 -1.95 15.97 -40.51 22.29 +329 -1.75 12.28 -36.17 13.26 -1.78 17.14 -46.5 20.83 +330 -6.91 14.31 -43.22 11.35 -9.32 18.55 -55.34 17.37 +331 -16.42 14.71 -50.72 7.66 -25.22 18.8 -61.73 12.48 +332 -34.02 15.01 -59.96 -2.48 -37.73 18.5 -69.61 1.97 +333 -36.93 14.93 -70.56 -12.17 -41.34 18.79 -78.2 -4.6 +334 -48.06 14.72 -81.97 -22.33 -44.91 19.88 -87.17 -8.58 +335 -58.42 15.56 -91.03 -29.64 -54.11 20.9 -97.73 -14.71 +336 -74.42 15.43 -99.04 -37.25 -72.67 19.53 -105.3 -26.54 +337 -85.7 13.57 -105.56 -50.24 -86.27 16.71 -110.62 -46.11 +338 -91.22 10.66 -111.45 -70.11 -88.48 13.35 -113.9 -63.25 +339 -93.28 9.94 -115.29 -76.44 -89.68 12.52 -116.17 -68.84 +340 -96.85 9.92 -118.92 -80.68 -91.34 12.4 -119.5 -70.68 +341 -103.88 10.14 -122.21 -82.82 -99.06 12.01 -120.61 -75.12 +342 -108.11 10.24 -124.95 -84.19 -102.83 11.89 -121.45 -76.22 +343 -108.58 9.81 -126.14 -87.27 -99.93 11.34 -121.8 -80 +344 -108.8 9.8 -126.25 -88.11 -99.95 11.26 -121.92 -79.42 +345 -109.04 9.73 -126.09 -88.15 -99.99 11.02 -120.2 -79.13 +346 -105.84 9.4 -124.52 -87.98 -97.26 10.46 -118.82 -79.68 +347 -103.3 8.87 -122.26 -87.03 -95.41 9.65 -116.51 -80.37 +348 -102.66 7.97 -119.25 -86.87 -95.79 8.51 -113.63 -81.78 +349 -101.03 7.71 -116.23 -85.74 -95.19 8.33 -110.48 -79.19 +350 -97.04 8.01 -113.59 -81.57 -93.87 9.05 -107.9 -73.29 +351 -89.97 7.9 -109.5 -78.18 -87.03 9.39 -104.83 -69.31 +352 -85.13 6.99 -103.99 -76.67 -83.3 8.86 -101.82 -66.44 +353 -84.01 6.34 -100.74 -74.97 -83.38 7.97 -98.82 -66.93 +354 -86.49 6.59 -101.15 -74.89 -86.1 7.73 -99.83 -68.96 +355 -91.12 6.18 -102.67 -77.23 -90.32 6.86 -101.59 -72.8 +356 -94.94 5.36 -104.3 -82.64 -92.82 5.9 -103.79 -80.73 +357 -92.98 5.05 -105.54 -85.04 -92.4 5.44 -104.48 -83.2 +358 -91.88 5.71 -105.08 -82.6 -92.14 6.1 -105.27 -81.54 +359 -88.63 6.18 -102.37 -77.46 -89.06 7.2 -103.98 -75.29 +360 -84.77 7.21 -99.94 -70.5 -85.53 8.75 -102.06 -66.8 +361 -78.88 8.03 -94.43 -62.55 -78.35 9.88 -95.82 -56.31 +362 -71.15 7.99 -89.74 -57.9 -69.37 9.75 -89.75 -50.33 +363 -66.07 7.2 -85.09 -56.4 -63.03 9.4 -84.54 -46.44 +364 -66.4 8.01 -81.76 -50.81 -63.89 11.56 -83.55 -37.49 +365 -65.1 9.52 -79.82 -43.21 -64.07 13.55 -83.85 -30.26 +366 -57.26 10.39 -78.6 -38.53 -54.84 14.55 -80.2 -25.58 +367 -50.45 10.52 -75.97 -35.61 -48.23 14.69 -78.17 -20.58 +368 -49.22 10.33 -72.75 -32.44 -45.47 13.84 -74.41 -19.19 +369 -48 9.97 -69.29 -30.39 -44.13 12.9 -70.09 -17.66 +370 -49.3 9.38 -67.21 -30.36 -44.26 11.59 -67.52 -21.63 +371 -49.22 8.48 -65.93 -32.84 -45.09 10.02 -65.48 -25.36 +372 -46.86 7.41 -63.79 -35.17 -45.15 8.41 -63.78 -31.1 +373 -48.47 6.48 -62.66 -37.38 -47.15 7.63 -63.73 -34.77 +374 -47.49 5.99 -61.34 -38.47 -48.95 7.26 -64 -37.24 +375 -50.2 5.87 -62.1 -39.49 -50.8 7.15 -65.41 -37.71 +376 -48.25 6.18 -62.7 -38.45 -51.26 7.77 -66.76 -36.86 +377 -50.22 7.72 -62.63 -31.42 -52.15 10.45 -66.32 -25.72 +378 -49.56 10.45 -61 -20.34 -51.2 14.67 -64.82 -7.79 +379 -37.79 12.3 -60.15 -11.74 -37.02 17.08 -63.02 1.64 +380 -26.52 12.52 -58.06 -9.37 -23.08 17.27 -59.39 7.96 +381 -24 12.06 -52.83 -5.55 -19.11 16.4 -54.93 11.46 +382 -28.9 12.2 -49.81 -3.72 -22.54 15.73 -50.98 8.75 +383 -27.84 11.58 -47.87 -4.59 -21.71 14.8 -49.84 7.23 +384 -27.28 10.54 -47.83 -7.63 -21.71 13.54 -49.19 2.43 +385 -25.07 10.36 -45.95 -6.55 -20.54 13.03 -47.5 2.14 +386 -22.2 9.68 -44.24 -7.77 -18.5 11.99 -45.42 -0.06 +387 -19.07 8.52 -41.12 -8.93 -15.47 10.75 -44.66 -1.33 +388 -21.65 7.86 -40.12 -10.57 -18.8 10.09 -43.89 -4.09 +389 -26.23 7.65 -40.02 -11.02 -27.18 9.71 -43.71 -5.36 +390 -28.4 7.96 -41.1 -9.4 -28.92 10.03 -44.27 -4.15 +391 -23.4 8.89 -39.74 -5.45 -23.33 11.17 -43.51 1.64 +392 -17.91 10.18 -38.09 2.42 -18.28 12.84 -40.71 9.46 +393 -9.74 10.75 -33.46 8.84 -10.19 14 -37.11 17.04 +394 -6.53 11.1 -29.88 11.66 -4.18 14.76 -34.25 21.37 +395 -4.22 10.89 -26.82 15.57 -3.31 15 -32.94 25.47 +396 -3.16 11.27 -25.75 18.29 -3.48 15.62 -32.73 27.79 +397 -1.02 12.18 -24.75 24 -1.81 16.86 -32.44 34.04 +398 3.18 13.07 -23.35 28 4.9 18.16 -30.71 39.73 +399 10.24 13.31 -22.27 32.48 12.47 18.54 -27.6 44.73 +400 14.59 13.4 -19.35 34.17 18.54 18.36 -24.64 45.33 +401 14.05 13.42 -16 35.96 17.75 17.77 -21.78 46.84 +402 13.01 12.88 -13.46 36.1 16.3 16.79 -19.33 47.05 +403 14.56 12.01 -12.24 34.72 17.86 15.81 -17.01 44.67 +404 15.96 11.51 -12.5 33 19.02 15.41 -17.28 43.52 +405 12.86 11.57 -13.54 33.47 16.07 15.29 -18.94 41.83 +406 11.17 11.44 -14.26 30.78 13.25 15.09 -19.87 39.11 +407 10.25 10.94 -16.91 27.24 12.61 14.8 -22.55 35.28 +408 7.79 10.99 -19.62 24.12 10.54 14.92 -27.51 30.69 +409 5.44 11.27 -24.25 21.21 5.67 15.32 -33.06 28.51 +410 -3.39 11.33 -27.75 16.63 -4.34 15.03 -38.72 20.63 +411 -7.72 11.08 -33.95 10.75 -11.41 14.82 -42.48 15.08 +412 -11.95 10.7 -38.67 3.83 -13.32 14.32 -46.11 8.41 +413 -12.45 10.63 -42.22 0.57 -14.63 14.15 -50.6 4.93 +414 -17.47 10.52 -45.35 -2.75 -19.34 13.78 -52.65 1.42 +415 -25.15 10.43 -48.72 -7.67 -27.13 13.3 -57.04 -5.39 +416 -31.74 11.41 -56.93 -13.09 -34.82 15.08 -69.57 -9.06 +417 -35.59 12.48 -66.53 -19.72 -36.4 17.32 -76.83 -11.5 +418 -46.88 13.08 -73.37 -24.06 -50.54 18.88 -85.12 -12.2 +419 -51.43 13.42 -80.07 -26.95 -53.85 19.07 -91.09 -14.9 +420 -58.11 13.93 -84.58 -27.29 -61.18 18.69 -98.22 -21.36 +421 -63.52 13.71 -89.57 -36.64 -68.48 17.65 -103.69 -33.45 +422 -66.31 12.29 -94.51 -47.72 -75.22 16.24 -109.29 -44.9 +423 -77.44 12.55 -103.53 -54.59 -81.07 15.95 -115.92 -54.15 +424 -78.65 13.81 -117.38 -63.16 -85.93 18.13 -131.11 -62.04 +425 -95.55 14.58 -127.97 -71.58 -97.74 19.75 -142.89 -70.69 +426 -109.94 14.7 -135.51 -78.84 -114.91 19.96 -153.15 -76.59 +427 -116.49 13.76 -143.17 -89.19 -122.93 18.99 -158.6 -86.09 +428 -118.26 13.87 -148.56 -94.4 -123.82 18.21 -161.3 -90.69 +429 -120.44 13.74 -150.2 -96.76 -124.4 17.39 -157.19 -93.27 +430 -119.42 12.81 -149.38 -97.73 -119.99 15.79 -152.28 -94.75 +431 NaN NaN NaN NaN -119.41 14.67 -150.37 -95.74 +432 NaN NaN NaN NaN -120.06 14.12 -148.76 -95.47 +433 NaN NaN NaN NaN -121.15 13.75 -145.59 -94.41 +434 NaN NaN NaN NaN -119.52 13.43 -142.99 -93.02 +435 NaN NaN NaN NaN -115.07 13.44 -141.72 -92.12 +436 NaN NaN NaN NaN -113.91 13.59 -140.13 -89.18 +437 NaN NaN NaN NaN -113.26 13.88 -137.59 -86.1 +438 NaN NaN NaN NaN -110.74 14.33 -135.79 -82.22 +439 NaN NaN NaN NaN -105.38 14.5 -132.91 -78.82 +440 NaN NaN NaN NaN -99.91 14.46 -129.35 -76 +441 NaN NaN NaN NaN -98.54 14.31 -127.64 -74.87 +442 NaN NaN NaN NaN -100.55 14.1 -126.65 -74.57 +443 NaN NaN NaN NaN -101.78 13.66 -125.9 -75.24 +444 NaN NaN NaN NaN -99.69 12.91 -124 -75.56 +445 NaN NaN NaN NaN -96.28 11.88 -121.22 -76.64 +446 NaN NaN NaN NaN -95.52 10.55 -117.85 -78.42 +447 NaN NaN NaN NaN -95.02 9.39 -115.18 -80 +448 NaN NaN NaN NaN -96.95 8.66 -114.45 -82.02 +449 NaN NaN NaN NaN -98.28 8.65 -114.6 -82 +450 NaN NaN NaN NaN -97.77 9.22 -117.04 -80.19 +451 NaN NaN NaN NaN -97.82 10.04 -118.6 -77.63 +452 NaN NaN NaN NaN -96.21 10.55 -118.14 -75.34 +453 NaN NaN NaN NaN -94.59 10.62 -115.48 -73.63 +454 NaN NaN NaN NaN -92.94 10.48 -112.57 -72.38 +455 NaN NaN NaN NaN -90.9 10.35 -111.16 -70.77 +456 NaN NaN NaN NaN -89.86 10.2 -109.39 -69.75 +457 NaN NaN NaN NaN -88.33 9.96 -107.48 -68.55 +458 NaN NaN NaN NaN -85.94 9.51 -105.95 -67.9 +459 NaN NaN NaN NaN -81.84 9.04 -102.72 -66.4 +460 NaN NaN NaN NaN -81.43 8.85 -99.88 -65.26 +461 NaN NaN NaN NaN -79.68 8.89 -97.25 -62.77 +462 NaN NaN NaN NaN -78.29 9.26 -95.54 -60.63 +463 NaN NaN NaN NaN -75.46 10.02 -95.82 -58.26 +464 NaN NaN NaN NaN -73.88 12 -99.84 -53.37 +465 NaN NaN NaN NaN -74.83 13.88 -98.79 -47.1 +466 NaN NaN NaN NaN -71.39 15.8 -98.39 -35.63 +467 NaN NaN NaN NaN -62.89 16.6 -94.17 -27.85 +468 NaN NaN NaN NaN -52 17.1 -89.89 -22.12 +469 NaN NaN NaN NaN -51.21 17.12 -86.79 -18.9 +470 NaN NaN NaN NaN -51.75 17.35 -83.43 -15.39 +471 NaN NaN NaN NaN -49.63 17.46 -80.63 -13.96 +472 NaN NaN NaN NaN -41.58 17.18 -75.91 -11.84 +473 NaN NaN NaN NaN -36.84 16.45 -71.05 -10.09 +474 NaN NaN NaN NaN -34.5 15.35 -66.49 -7.86 +475 NaN NaN NaN NaN -32.09 14.63 -62.85 -6.72 +476 NaN NaN NaN NaN -29.84 13.61 -60.19 -7.39 +477 NaN NaN NaN NaN -27.61 12.41 -56.85 -8.81 +478 NaN NaN NaN NaN -28.34 11.09 -53.28 -10.06 +479 NaN NaN NaN NaN -31.41 9.69 -51.47 -12.73 +480 NaN NaN NaN NaN -32.77 7.94 -49.46 -17.53 +481 NaN NaN NaN NaN -32.41 6.45 -46.88 -21.14 +482 NaN NaN NaN NaN -30.53 5.98 -45.58 -21.15 +483 NaN NaN NaN NaN -28.2 6.29 -43.54 -17.6 +484 NaN NaN NaN NaN -24.91 6.75 -41.12 -14.13 +485 NaN NaN NaN NaN -21.12 7.02 -39.32 -11.37 +486 NaN NaN NaN NaN -17.44 7.68 -37.89 -8.61 +487 NaN NaN NaN NaN -17.62 8.78 -38.84 -5.35 +488 NaN NaN NaN NaN -17.2 10.06 -40.79 -2.45 +489 NaN NaN NaN NaN -18.07 11.25 -42.05 1.07 +490 NaN NaN NaN NaN -15.29 12.28 -43.15 4.63 +491 NaN NaN NaN NaN -12.74 13.15 -42.7 8.03 +492 NaN NaN NaN NaN -10.85 13.84 -43.11 10.47 +493 NaN NaN NaN NaN -12.44 14.77 -45.4 11.61 +494 NaN NaN NaN NaN -14.59 15.6 -48.38 12.74 +495 NaN NaN NaN NaN -17.71 16.32 -50.36 12.84 +496 NaN NaN NaN NaN -18.44 16.74 -51.49 12.41 +497 NaN NaN NaN NaN -15.39 16.94 -51.59 12.71 +498 NaN NaN NaN NaN -14.05 17.08 -52.54 12.79 +499 NaN NaN NaN NaN -17.99 17.16 -54.27 13.1 +500 NaN NaN NaN NaN -22.56 17.17 -55.52 11.07 +501 NaN NaN NaN NaN -23.33 16.97 -56.84 8.47 +502 NaN NaN NaN NaN -24.04 16.91 -59.08 7.26 +503 NaN NaN NaN NaN -27.37 16.94 -61.16 5.31 +504 NaN NaN NaN NaN -30.58 17.04 -64.95 1.93 +505 NaN NaN NaN NaN -33.44 17.12 -68.67 -0.82 +506 NaN NaN NaN NaN -36.11 17.25 -72.35 -5.48 +507 NaN NaN NaN NaN -42.61 17.86 -78.27 -10.12 +508 NaN NaN NaN NaN -47.62 17.94 -81.58 -14.77 +509 NaN NaN NaN NaN -55.32 17.38 -83.66 -19.05 +510 NaN NaN NaN NaN -55.45 16.9 -85.22 -20.86 +511 NaN NaN NaN NaN -53.4 16.62 -84.89 -20.68 +512 NaN NaN NaN NaN -52.81 16.26 -84.36 -21.21 +513 NaN NaN NaN NaN -53.28 15.78 -83.35 -22.35 +514 NaN NaN NaN NaN -51.5 15.18 -81.72 -21.56 +515 NaN NaN NaN NaN -50.33 14.4 -78.1 -21.74 +516 NaN NaN NaN NaN -47.55 13.41 -75.04 -21.92 +517 NaN NaN NaN NaN -44.78 12.68 -72.88 -22.92 +518 NaN NaN NaN NaN -45.35 12.07 -71.99 -22.62 +519 NaN NaN NaN NaN -46.68 11.8 -71.44 -23.66 +520 NaN NaN NaN NaN -45.1 11.66 -71.34 -25 +521 NaN NaN NaN NaN -44.99 11.73 -72.63 -26.42 +522 NaN NaN NaN NaN -46.82 11.83 -74.23 -27.7 +523 NaN NaN NaN NaN -49.7 11.84 -75.33 -28.53 +524 NaN NaN NaN NaN -50.48 11.75 -75.95 -29.38 +525 NaN NaN NaN NaN -49.96 11.64 -76.05 -29.94 +526 NaN NaN NaN NaN -49.68 11.41 -75.52 -30.65 +527 NaN NaN NaN NaN -48.46 11.09 -74.84 -31.41 +528 NaN NaN NaN NaN -48.5 10.75 -75.34 -33.08 +529 NaN NaN NaN NaN -50.66 10.42 -76.18 -34.86 +530 NaN NaN NaN NaN -52.1 10.05 -76.21 -36.67 +531 NaN NaN NaN NaN -53.67 9.63 -75.14 -38.35 +532 NaN NaN NaN NaN -53.71 9.36 -75.64 -40.12 +533 NaN NaN NaN NaN -53.01 9.38 -77.81 -40.28 +534 NaN NaN NaN NaN -56.16 9.55 -79.35 -41.9 +535 NaN NaN NaN NaN -61.14 10.17 -82.56 -43.19 +536 NaN NaN NaN NaN -64.07 10.45 -84.64 -45.4 +537 NaN NaN NaN NaN -67.39 11.01 -86.45 -45.18 +538 NaN NaN NaN NaN -64.18 12.32 -87.22 -41.16 +539 NaN NaN NaN NaN -59.91 13.34 -87.92 -35.08 +540 NaN NaN NaN NaN -58.99 14.07 -85.4 -30.45 +541 NaN NaN NaN NaN -55.16 14.86 -85.45 -27.24 +542 NaN NaN NaN NaN -51.73 15.46 -83.84 -25.01 +543 NaN NaN NaN NaN -53.72 15.58 -83.27 -24.02 +544 NaN NaN NaN NaN -53.89 15.28 -83.09 -24.64 +545 NaN NaN NaN NaN -53.73 14.52 -84.05 -28.41 +546 NaN NaN NaN NaN -55.03 13.33 -83.9 -31.42 +547 NaN NaN NaN NaN -57.35 12.1 -84.49 -36.55 +548 NaN NaN NaN NaN -59.46 11.01 -84.45 -41.25 +549 NaN NaN NaN NaN -62.11 10.18 -83.64 -44.83 +550 NaN NaN NaN NaN -62.75 9.64 -82.71 -45.13 +551 NaN NaN NaN NaN -60.01 9.24 -81.35 -46.41 +552 NaN NaN NaN NaN -58.3 9.21 -80.96 -45.72 +553 NaN NaN NaN NaN -59.76 9.27 -79.75 -44.16 +554 NaN NaN NaN NaN -61.1 9.65 -78.66 -41.3 +555 NaN NaN NaN NaN -58.37 10.29 -76.36 -37.06 +556 NaN NaN NaN NaN -52.38 11.22 -74.15 -31.7 +557 NaN NaN NaN NaN -46.51 11.64 -70.67 -26.21 +558 NaN NaN NaN NaN -40.41 11.62 -66.42 -21.99 +559 NaN NaN NaN NaN -37.88 11.51 -62.85 -18.68 +560 NaN NaN NaN NaN -36.07 11.42 -60.2 -16.62 +561 NaN NaN NaN NaN -35.39 11.34 -58.34 -15.68 +562 NaN NaN NaN NaN -34.82 11.11 -56.09 -14.39 +563 NaN NaN NaN NaN -33.39 10.8 -54.09 -13.27 +564 NaN NaN NaN NaN -30.12 10.65 -50.98 -9.15 +565 NaN NaN NaN NaN -26.73 10.89 -47.13 -5.38 +566 NaN NaN NaN NaN -19.58 10.5 -43.65 -2.77 +567 NaN NaN NaN NaN -13.9 10.21 -39.04 -0.25 +568 NaN NaN NaN NaN -13.27 9.88 -36.33 2.58 +569 NaN NaN NaN NaN -11.65 9.95 -34.8 4.61 +570 NaN NaN NaN NaN -9.06 10.38 -33.45 6.64 +571 NaN NaN NaN NaN -8.18 11.52 -35 9.06 +572 NaN NaN NaN NaN -6.66 12.45 -37.55 10.31 +573 NaN NaN NaN NaN -8.42 13.12 -39.76 11.13 +574 NaN NaN NaN NaN -8.88 13.44 -40.32 10.88 +575 NaN NaN NaN NaN -12.1 12.95 -42.6 8.98 +576 NaN NaN NaN NaN -12.36 12.53 -40.77 8.12 +577 NaN NaN NaN NaN -11.71 12.99 -44.14 6.36 +578 NaN NaN NaN NaN -13.91 13.84 -48.25 5 +579 NaN NaN NaN NaN -23.45 14.43 -54.55 0.93 +580 NaN NaN NaN NaN -32.03 14.48 -61.05 -4.55 +581 NaN NaN NaN NaN -38.35 13.45 -65.38 -14.27 +582 NaN NaN NaN NaN -44.03 12.21 -67.95 -22.38 +583 NaN NaN NaN NaN -50.08 11.77 -70.2 -27.45 +584 NaN NaN NaN NaN -53.33 11.51 -71.59 -29.23 +585 NaN NaN NaN NaN -54.4 11.56 -72.45 -28.93 +586 NaN NaN NaN NaN -49.95 11.65 -72.05 -28.28 +587 NaN NaN NaN NaN -47.15 12 -71.22 -25.37 +588 NaN NaN NaN NaN -45.53 12.39 -67.41 -20.2 +589 NaN NaN NaN NaN -39.1 12.82 -64.07 -16.26 +590 NaN NaN NaN NaN -33.2 13.07 -61.9 -12.85 +591 NaN NaN NaN NaN -30.1 12.8 -58.59 -10 +592 NaN NaN NaN NaN -28.97 12.71 -57.08 -8.64 +593 NaN NaN NaN NaN -30.38 12.59 -55.47 -7.65 +594 NaN NaN NaN NaN -29.81 12.4 -53.81 -7.17 +595 NaN NaN NaN NaN -26.35 12.24 -52.89 -6.36 +596 NaN NaN NaN NaN -23.46 12.31 -52.63 -5.54 +597 NaN NaN NaN NaN -24.04 13.01 -55.45 -5.64 +598 NaN NaN NaN NaN -27.53 14.98 -63.57 -5.36 +599 NaN NaN NaN NaN -33.05 16.15 -70.08 -7.06 +600 NaN NaN NaN NaN -41.35 16.78 -73.57 -8.57 +601 NaN NaN NaN NaN -41.23 16.95 -74.09 -9.11 +602 NaN NaN NaN NaN -39.41 16.81 -73 -9.43 +603 NaN NaN NaN NaN -37.95 16.28 -68.81 -6.89 +604 NaN NaN NaN NaN -33.99 15.84 -64.22 -3.89 +605 NaN NaN NaN NaN -24.09 15.68 -59.74 1.52 +606 NaN NaN NaN NaN -16.31 15.58 -54.45 5.39 +607 NaN NaN NaN NaN -14.29 16.12 -51.81 9.76 +608 NaN NaN NaN NaN -15.19 16.8 -53.77 11.59 +609 NaN NaN NaN NaN -17.77 17.28 -55.56 11.14 +610 NaN NaN NaN NaN -17.66 17.15 -55.27 11.62 +611 NaN NaN NaN NaN -18.6 16.77 -54.79 11.2 +612 NaN NaN NaN NaN -18.19 16.47 -50.73 12.23 +613 NaN NaN NaN NaN -12.57 15.51 -47.95 14.36 +614 NaN NaN NaN NaN -9.02 15.23 -45.9 13.27 +615 NaN NaN NaN NaN -11.31 15.61 -49.26 11.9 +616 NaN NaN NaN NaN -16.78 15.93 -52.51 11.02 +617 NaN NaN NaN NaN -29.38 15.95 -63.77 -1.98 +618 NaN NaN NaN NaN -43.34 16.58 -80.29 -15.26 +619 NaN NaN NaN NaN -65.34 15.37 -91.09 -29.53 +620 NaN NaN NaN NaN -78.36 13.46 -102.94 -50.42 +621 NaN NaN NaN NaN -86.36 12.08 -112.6 -65.02 +622 NaN NaN NaN NaN -93 12.48 -120.27 -72.53 +623 NaN NaN NaN NaN -100.28 13.93 -127.93 -75.59 +624 NaN NaN NaN NaN -103.58 15.27 -135.2 -76.75 +625 NaN NaN NaN NaN -105.54 16.51 -141.8 -78.3 +626 NaN NaN NaN NaN -110.96 17.1 -145.08 -79.51 +627 NaN NaN NaN NaN -114.62 17.5 -145.85 -78.39 +628 NaN NaN NaN NaN -111.96 17.31 -144.64 -79.49 +629 NaN NaN NaN NaN -109.41 17 -142.4 -78.67 +630 NaN NaN NaN NaN -108.5 16.3 -139.23 -77.27 +631 NaN NaN NaN NaN -105.76 15.43 -135.73 -76.97 +632 NaN NaN NaN NaN -103.04 14.5 -132.62 -77.72 +633 NaN NaN NaN NaN -102.54 13.89 -130.58 -78.76 +634 NaN NaN NaN NaN -105.6 13.89 -131.68 -80.24 +635 NaN NaN NaN NaN -109.52 13.46 -131.5 -81.89 +636 NaN NaN NaN NaN -111.27 13.21 -130.66 -82.25 +637 NaN NaN NaN NaN -105.13 13.06 -128.74 -80.26 +638 NaN NaN NaN NaN -101.37 13.05 -126.54 -76.84 +639 NaN NaN NaN NaN -99.09 12.66 -122.27 -74.11 +640 NaN NaN NaN NaN -93.77 12.56 -118.89 -71.38 +641 NaN NaN NaN NaN -92.11 12.31 -117.12 -70.11 +642 NaN NaN NaN NaN -89.12 11.82 -113.29 -69.06 +643 NaN NaN NaN NaN -85.33 11.21 -109.57 -67.71 +644 NaN NaN NaN NaN -82.43 10.92 -107.94 -66.86 +645 NaN NaN NaN NaN -82.73 11.36 -108.46 -66.01 +646 NaN NaN NaN NaN -86.64 11.91 -111.24 -65.26 +647 NaN NaN NaN NaN -88.13 12.12 -110.28 -64.36 +648 NaN NaN NaN NaN -86.44 12 -109.73 -64.12 +649 NaN NaN NaN NaN -80.26 11.49 -107.42 -63.97 +650 NaN NaN NaN NaN -79.87 10.7 -104.18 -64.27 +651 NaN NaN NaN NaN -82.42 10.02 -101.78 -64.56 +652 NaN NaN NaN NaN -85.15 9.95 -102.03 -64.95 +653 NaN NaN NaN NaN -84.29 9.68 -101.24 -65.36 +654 NaN NaN NaN NaN -78.18 9.34 -100.85 -64.37 +655 NaN NaN NaN NaN -77.24 9.44 -101.75 -64.69 +656 NaN NaN NaN NaN -82.73 9.32 -100.19 -65.37 +657 NaN NaN NaN NaN -85.16 9.56 -101.08 -65.49 +658 NaN NaN NaN NaN -83.48 10.22 -101.13 -62.83 +659 NaN NaN NaN NaN -78.4 10.39 -100.7 -61.79 +660 NaN NaN NaN NaN -75.27 10.06 -99.68 -59.23 +661 NaN NaN NaN NaN -77.61 9.81 -98.33 -60.36 +662 NaN NaN NaN NaN -79.27 9.9 -98.78 -60.7 +663 NaN NaN NaN NaN -80.2 9.8 -98.23 -61.26 +664 NaN NaN NaN NaN -79.29 10.52 -98.1 -58.05 +665 NaN NaN NaN NaN -75.05 11 -96.27 -54.91 +666 NaN NaN NaN NaN -72.45 11.2 -94.27 -52.32 +667 NaN NaN NaN NaN -69.86 11.13 -91.93 -49.63 +668 NaN NaN NaN NaN -66.7 10.94 -88.32 -47.26 +669 NaN NaN NaN NaN -62.58 10.29 -84.49 -45.49 +670 NaN NaN NaN NaN -61.52 9.72 -81.92 -44.03 +671 NaN NaN NaN NaN -61.93 9.59 -82.02 -44.05 +672 NaN NaN NaN NaN -65.68 9.57 -81.74 -46.24 +673 NaN NaN NaN NaN -67.22 9.74 -81.36 -44.54 +674 NaN NaN NaN NaN -62.65 10.04 -80.52 -42.32 +675 NaN NaN NaN NaN -56.98 10.72 -78.97 -37.17 +676 NaN NaN NaN NaN -53.47 11.36 -75.68 -31.91 +677 NaN NaN NaN NaN -50.13 11.92 -72.88 -28.58 +678 NaN NaN NaN NaN -45.5 12.69 -71.16 -23.07 +679 NaN NaN NaN NaN -42.18 13.85 -69.92 -17.32 +680 NaN NaN NaN NaN -38.49 14.87 -68.34 -11.34 +681 NaN NaN NaN NaN -34.08 15.65 -65.6 -7.72 +682 NaN NaN NaN NaN -28.89 15.92 -62.78 -3 +683 NaN NaN NaN NaN -24.49 15.71 -58.91 0.28 +684 NaN NaN NaN NaN -21.33 15.09 -54.18 2.3 +685 NaN NaN NaN NaN -17.8 14.34 -48.48 5.69 +686 NaN NaN NaN NaN -12.64 13.03 -43.42 7.27 +687 NaN NaN NaN NaN -9.14 11.55 -38.51 8.08 +688 NaN NaN NaN NaN -11.45 10.67 -35.65 7.06 +689 NaN NaN NaN NaN -13.04 10.51 -35.26 6.05 +690 NaN NaN NaN NaN -15.63 10.79 -38.45 5.46 +691 NaN NaN NaN NaN -15.7 11.37 -39.48 4.6 +692 NaN NaN NaN NaN -13.48 11.83 -40.7 4.74 +693 NaN NaN NaN NaN -12.46 12.18 -40.23 7.16 +694 NaN NaN NaN NaN -12.35 12.52 -40.33 9.32 +695 NaN NaN NaN NaN -10.64 12.74 -40.06 11.94 +696 NaN NaN NaN NaN -9.93 12.54 -39.79 11.44 +697 NaN NaN NaN NaN -11.83 12.35 -39.88 10.96 +698 NaN NaN NaN NaN -15.58 12.29 -41.55 9.53 +699 NaN NaN NaN NaN -19.13 12.33 -43.08 7.21 +700 NaN NaN NaN NaN -21.36 12.4 -45.84 5.95 +701 NaN NaN NaN NaN -23.27 12.41 -48.71 1.3 +702 NaN NaN NaN NaN -26.99 12.34 -51.37 -1.27 +703 NaN NaN NaN NaN -30.02 11.87 -53.21 -6.94 +704 NaN NaN NaN NaN -31.23 11.56 -55.74 -10.96 +705 NaN NaN NaN NaN -31.93 11.63 -60.16 -14.17 +706 NaN NaN NaN NaN -36.72 12.53 -67.85 -18.26 +707 NaN NaN NaN NaN -48.33 12.46 -73.27 -22.56 +708 NaN NaN NaN NaN -57.75 11.99 -77.85 -30.29 +709 NaN NaN NaN NaN -56.95 11.61 -83.5 -39.31 +710 NaN NaN NaN NaN -58.02 12.96 -89.66 -39.49 +711 NaN NaN NaN NaN -64.8 14.19 -95.64 -41.34 +712 NaN NaN NaN NaN -68.05 15.76 -106.24 -43.3 +713 NaN NaN NaN NaN -71.56 16.02 -108.95 -45.37 +714 NaN NaN NaN NaN -80.14 15.47 -109 -49.16 +715 NaN NaN NaN NaN -82.33 14.27 -110.18 -56.13 +716 NaN NaN NaN NaN -83.25 12.71 -108.96 -61.86 +717 NaN NaN NaN NaN -82.13 11.03 -106.72 -65.65 +718 NaN NaN NaN NaN -86.11 10.15 -105.52 -68.33 +719 NaN NaN NaN NaN -90.18 9.81 -105.46 -68.74 +720 NaN NaN NaN NaN -88.93 9.81 -104.74 -67.32 +721 NaN NaN NaN NaN -82.33 10.29 -102.44 -64.18 +722 NaN NaN NaN NaN -76.68 9.87 -99.27 -61.05 +723 NaN NaN NaN NaN -70.14 8.63 -92.39 -58.22 +724 NaN NaN NaN NaN -66.7 8.33 -87.2 -54.27 +725 NaN NaN NaN NaN -65.99 9.44 -83.16 -45.6 +726 NaN NaN NaN NaN -63.32 10.97 -79.63 -36.97 +727 NaN NaN NaN NaN -52.01 11.39 -76.64 -32.54 +728 NaN NaN NaN NaN -44.27 12.38 -73.99 -26.47 +729 NaN NaN NaN NaN -43.98 14.11 -75.58 -20.83 +730 NaN NaN NaN NaN -44.3 15.77 -76.73 -16.93 +731 NaN NaN NaN NaN -43.81 14.96 -76.78 -18.13 +732 NaN NaN NaN NaN -41.74 14.34 -76.91 -19.73 +733 NaN NaN NaN NaN -40.02 14.07 -77.77 -20.78 +734 NaN NaN NaN NaN -42.07 12.88 -76 -23.41 +735 NaN NaN NaN NaN -49.78 10.91 -70.43 -26.15 +736 NaN NaN NaN NaN -50.09 10.21 -69.99 -30.18 +737 NaN NaN NaN NaN -48.25 9.49 -70.58 -33.25 +738 NaN NaN NaN NaN -47.66 8 -68.08 -35.58 +739 NaN NaN NaN NaN -52.7 7.47 -68.42 -38.4 +740 NaN NaN NaN NaN -56.43 7.56 -71.27 -40.99 +741 NaN NaN NaN NaN -58.79 7.9 -75.6 -43.71 +742 NaN NaN NaN NaN -61.79 8.35 -79.93 -47.53 +743 NaN NaN NaN NaN -64.82 8.95 -83.65 -49.84 +744 NaN NaN NaN NaN -67.33 9.53 -87.32 -50.84 +745 NaN NaN NaN NaN -69.88 10.21 -90.82 -52.07 +746 NaN NaN NaN NaN -71.14 10.81 -92.85 -52.48 +747 NaN NaN NaN NaN -73.88 11.09 -94.39 -52.67 +748 NaN NaN NaN NaN -73.75 11.21 -94.79 -52.95 +749 NaN NaN NaN NaN -74.38 11.27 -93.77 -51.82 +750 NaN NaN NaN NaN -74.08 11.12 -92.75 -50.6 +751 NaN NaN NaN NaN -68.3 10.7 -90.54 -50.33 +752 NaN NaN NaN NaN -65.75 10.14 -88.45 -49.68 +753 NaN NaN NaN NaN -65.13 9.74 -85.12 -48.78 +754 NaN NaN NaN NaN -63.7 9.99 -83.39 -45.28 +755 NaN NaN NaN NaN -61.85 9.74 -81.81 -42.6 +756 NaN NaN NaN NaN -59.1 9.15 -80.41 -43.32 +757 NaN NaN NaN NaN -58.67 8.65 -78.2 -43.29 +758 NaN NaN NaN NaN -57.34 8.29 -74.9 -42.26 +759 NaN NaN NaN NaN -53.97 7.98 -72.19 -40.67 +760 NaN NaN NaN NaN -50.83 8.28 -69.9 -38.3 +761 NaN NaN NaN NaN -49.19 9.39 -68.65 -31.34 +762 NaN NaN NaN NaN -47.72 10.18 -66.67 -26.67 +763 NaN NaN NaN NaN -41.61 10.55 -65.02 -22.64 +764 NaN NaN NaN NaN -39.17 10.6 -62.98 -21.61 +765 NaN NaN NaN NaN -39.26 10.2 -60.15 -21.5 +766 NaN NaN NaN NaN -36.3 9.78 -57.3 -18.89 +767 NaN NaN NaN NaN -32.18 9.25 -53.96 -17.48 +768 NaN NaN NaN NaN -27.3 8.83 -49.14 -14.2 +769 NaN NaN NaN NaN -23.7 8.72 -44.96 -10.41 +770 NaN NaN NaN NaN -20.71 8.85 -40.62 -5.68 +771 NaN NaN NaN NaN -16.21 9.36 -36.7 0.45 +772 NaN NaN NaN NaN -12.24 9.65 -33.34 4.81 +773 NaN NaN NaN NaN -8 9.32 -29.97 5.74 +774 NaN NaN NaN NaN -6.3 9.02 -28.85 5.77 +775 NaN NaN NaN NaN -8.56 9.14 -29.26 5.33 +776 NaN NaN NaN NaN -9.1 9.35 -30.76 5.17 +777 NaN NaN NaN NaN -12.76 9.52 -33.06 4.17 +778 NaN NaN NaN NaN -13.68 9.66 -34.57 3.18 +779 NaN NaN NaN NaN -14.49 9.66 -36.23 1.96 +780 NaN NaN NaN NaN -13.01 10.2 -38.78 1.15 +781 NaN NaN NaN NaN -15.3 10.96 -42.45 0.43 +782 NaN NaN NaN NaN -20.86 11.62 -46.82 0.01 +783 NaN NaN NaN NaN -23.36 11.87 -48.82 -2.96 +784 NaN NaN NaN NaN -22.74 11.74 -50.84 -5.59 +785 NaN NaN NaN NaN -26.25 11.63 -54.36 -10.44 +786 NaN NaN NaN NaN -31.59 11.87 -61.27 -15.69 +787 NaN NaN NaN NaN -41.56 12.46 -72.15 -23.61 +788 NaN NaN NaN NaN -54.67 13.48 -87.77 -33.61 +789 NaN NaN NaN NaN -67.49 13.35 -96.99 -44.85 +790 NaN NaN NaN NaN -79.84 12.08 -102.8 -56.52 +791 NaN NaN NaN NaN -86.47 10.82 -106.83 -64.92 +792 NaN NaN NaN NaN -87.48 9.95 -107.39 -69.51 +793 NaN NaN NaN NaN -86.61 10.48 -112.01 -71.38 +794 NaN NaN NaN NaN -88.16 11.22 -116.26 -72.14 +795 NaN NaN NaN NaN -93.19 11.18 -118.5 -73.3 +796 NaN NaN NaN NaN -95.67 11.11 -119.16 -74.88 +797 NaN NaN NaN NaN -93.05 10.78 -117.79 -74.96 +798 NaN NaN NaN NaN -92.37 10.08 -114.68 -75.73 diff --git a/inst/rawdata_scripts/create_example_dataset.sh b/inst/rawdata_scripts/create_example_dataset.sh index 4e08a890..8bec652f 100755 --- a/inst/rawdata_scripts/create_example_dataset.sh +++ b/inst/rawdata_scripts/create_example_dataset.sh @@ -4,3 +4,10 @@ ncks -O -d time,51,71,5 example_climate_all_time.nc example_climate.nc rm example_climate_all_time.nc ncatted -O -a description,global,m,c,"Sample dataset to be used in pastclim, a subset of Beyer2020" -h example_climate.nc ncatted -a command_line,global,c,c,"./inst/rawdata_scripts/created_example_dataset.sh" -h example_climate.nc + +# create small example file +cdo("gridboxmean,2,2 example_climate.nc example_climate_small.nc") +cdo("gridboxmax,2,2 example_climate.nc example_climate_small2.nc") +cdo("select,name=BIO1,BIO10,BIO12 example_climate_small.nc example_climate_small3.nc") +cdo("select,name=biome example_climate_small2.nc example_climate_small4.nc") +cdo("-z zip_9 merge example_climate_small3.nc example_climate_small4.nc example_climate_small5.nc") \ No newline at end of file diff --git a/inst/rawdata_scripts/create_files_by_dataset.R b/inst/rawdata_scripts/create_files_by_dataset.R index 72873550..d8a294d4 100644 --- a/inst/rawdata_scripts/create_files_by_dataset.R +++ b/inst/rawdata_scripts/create_files_by_dataset.R @@ -1,6 +1,6 @@ # Run this script from the package root to update the internal dataset # of filenames for each variable, based on the variable_table.csv files_by_dataset <- - read.csv("./inst/rawdata_scripts/variable_table.csv") + read.csv("./inst/rawdata_scripts/data_files/variable_table.csv") files_by_dataset$dataset <- as.factor(files_by_dataset$dataset) usethis::use_data(files_by_dataset, internal = TRUE, overwrite = TRUE) diff --git a/inst/rawdata_scripts/create_region_outlines.R b/inst/rawdata_scripts/create_region_outlines.R index 51ccbf05..57c7a96a 100644 --- a/inst/rawdata_scripts/create_region_outlines.R +++ b/inst/rawdata_scripts/create_region_outlines.R @@ -15,14 +15,28 @@ for (i in 1:nlevels(outlines$id)) { this_coords <- as.matrix(this_outline[, c("X", "Y")]) outlines_df$geometry[i] <- sf::st_sfc(sf::st_polygon(list(this_coords))) } +europe<-data.frame(name="Europe", geometry = "POLYGON ((60 32.58, 33.79 32.58, 32.45 34.02, +30.47 35.15, 28.93 35.65, 27.19 34.88, 24.84 34.02, 22.93 34.43, 21.99 35.73, +16.16 36.25, 14.25 35.21, 13.14 36.06, 11.97 37.46, 11.13 38.1, 9.32 38.49, +7.91 38.2, 6.67 40.08, 3.69 38.81, 1.58 37.88, -0.50 36.95, -1.61 36.38, +-3.05 36, -4.29 35.92, -6.93 35.95, -9.08 36.41, -11.29 38.02, -11.06 41.41, +-9.88 44.27, -8.44 46.9, -6.63 48.4, -8.01 49.54, -9.72 50.64, -12.40 51.36, +-15.21 55.45, -25.00 62.07, -27.15 66.09, -22.45 67.46, -16.82 68.47, +-9.58 69.22, -9.65 72.43, -0.80 77.05, 13.68 80.95, 34.59 81.68, 60 81.68, +60 32.58 ))") +europe <- sf::st_as_sf(europe, wkt="geometry") +outlines_df <- rbind(outlines_df, europe) outlines_df <- sf::st_sf(outlines_df, sf_column_name = "geometry", crs = "+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0" ) region_outline_union <- outlines_df +region_outline_union<-as.list(outlines_df$geometry) +names(region_outline_union)<-outlines_df$name usethis::use_data(region_outline_union, overwrite = TRUE) # wrap_around_the antimeridian outlines_df <- sf::st_wrap_dateline(outlines_df, options = c("WRAPDATELINE=YES", "DATELINEOFFSET=180")) -region_outline <- outlines_df +region_outline<-as.list(outlines_df$geometry) +names(region_outline)<-outlines_df$name usethis::use_data(region_outline, overwrite = TRUE) diff --git a/inst/rawdata_scripts/data_files/continent_outlines.csv b/inst/rawdata_scripts/data_files/continent_outlines.csv index c6e81382..dc5d946b 100644 --- a/inst/rawdata_scripts/data_files/continent_outlines.csv +++ b/inst/rawdata_scripts/data_files/continent_outlines.csv @@ -171,73 +171,73 @@ "170",152.984312,18.00388929,"Oceania" "171",147.3753974,12.21718114,"Oceania" "172",133.1778324,2.517728627,"Oceania" -"173",-169.2375125,72.06624603,"North_America" -"174",-168.3588131,66.15203343,"North_America" -"175",-174.3339693,63.61805263,"North_America" -"176",-178.0245069,55.27018553,"North_America" -"177",-179.0789462,52.04363826,"North_America" -"178",-178.5517266,49.71573481,"North_America" -"179",-166.7771541,50.50464092,"North_America" -"180",-154.8268417,54.76642246,"North_America" -"181",-147.0942866,58.06895194,"North_America" -"182",-143.228009,58.62230185,"North_America" -"183",-136.7256332,54.46111913,"North_America" -"184",-123.1936617,32.83579276,"North_America" -"185",-112.6492684,17.13687743,"North_America" -"186",-98.76581726,9.09997301,"North_America" -"187",-82.24626776,4.213953146,"North_America" -"188",-78.73146999,6.139115429,"North_America" -"189",-75.21667222,12.55165668,"North_America" -"190",-60.27878171,18.97472345,"North_America" -"191",-77.14981099,32.83579276,"North_America" -"192",-71.87761434,37.98853503,"North_America" -"193",-66.95689747,40.70599217,"North_America" -"194",-56.23676428,43.44466117,"North_America" -"195",-46.92255019,46.79150795,"North_America" -"196",-37.08111645,60.05596395,"North_America" -"197",-28.46986192,66.85267778,"North_America" -"198",-15.46511018,70.60470413,"North_America" -"199",-14.05919107,75.40187132,"North_America" -"200",-12.30179219,78.34319466,"North_America" -"201",-6.240867294,80.91159765,"North_America" -"202",-7.216888709,82.74239632,"North_America" -"203",-23.32124207,84.32786011,"North_America" -"204",-49.91782566,84.2550488,"North_America" -"205",-74.0743557,83.77178617,"North_America" -"206",-105.307041,81.13995985,"North_America" -"207",-169.2375125,72.06624603,"North_America" -"208",-60.41005588,19.12174303,"South_America" -"209",-75.05037711,12.55312276,"South_America" -"210",-78.95446278,6.176633666,"South_America" -"211",-82.24853506,3.989356581,"South_America" -"212",-90.91072512,1.430379058,"South_America" -"213",-93.35077866,-1.98515,"South_America" -"214",-87.25064481,-4.542836261,"South_America" -"215",-81.39451632,-9.986768169,"South_America" -"216",-76.02639853,-18.14478504,"South_America" -"217",-73.70834767,-20.6760312,"South_America" -"218",-73.09833428,-32.32833242,"South_America" -"219",-77.00241995,-41.01951466,"South_America" -"220",-78.58845475,-51.74207956,"South_America" -"221",-73.34233964,-56.59185339,"South_America" -"222",-62.85010942,-57.45507806,"South_America" -"223",-57.1159836,-55.91411735,"South_America" -"224",-55.5299488,-49.97099653,"South_America" -"225",-65.16816028,-49.73501319,"South_America" -"226",-60.89806658,-43.28041932,"South_America" -"227",-51.13785243,-35.76439207,"South_America" -"228",-45.76973464,-29.29016747,"South_America" -"229",-42.47566236,-25.72004023,"South_America" -"230",-35.76551512,-21.35934081,"South_America" -"231",-34.42348568,-12.73754958,"South_America" -"232",-31.00741072,-8.421204609,"South_America" -"233",-30.76340537,-2.960250822,"South_America" -"234",-38.93758473,-0.033504462,"South_America" -"235",-43.57368645,0.698494296,"South_America" -"236",-50.16183101,7.388099362,"South_America" -"237",-55.40794612,10.76090708,"South_America" -"238",-60.16605052,18.89104049,"South_America" -"239",-60.41005588,19.12174303,"South_America" +"173",-169.2375125,72.06624603,"N_America" +"174",-168.3588131,66.15203343,"N_America" +"175",-174.3339693,63.61805263,"N_America" +"176",-178.0245069,55.27018553,"N_America" +"177",-179.0789462,52.04363826,"N_America" +"178",-178.5517266,49.71573481,"N_America" +"179",-166.7771541,50.50464092,"N_America" +"180",-154.8268417,54.76642246,"N_America" +"181",-147.0942866,58.06895194,"N_America" +"182",-143.228009,58.62230185,"N_America" +"183",-136.7256332,54.46111913,"N_America" +"184",-123.1936617,32.83579276,"N_America" +"185",-112.6492684,17.13687743,"N_America" +"186",-98.76581726,9.09997301,"N_America" +"187",-82.24626776,4.213953146,"N_America" +"188",-78.73146999,6.139115429,"N_America" +"189",-75.21667222,12.55165668,"N_America" +"190",-60.27878171,18.97472345,"N_America" +"191",-77.14981099,32.83579276,"N_America" +"192",-71.87761434,37.98853503,"N_America" +"193",-66.95689747,40.70599217,"N_America" +"194",-56.23676428,43.44466117,"N_America" +"195",-46.92255019,46.79150795,"N_America" +"196",-37.08111645,60.05596395,"N_America" +"197",-28.46986192,66.85267778,"N_America" +"198",-15.46511018,70.60470413,"N_America" +"199",-14.05919107,75.40187132,"N_America" +"200",-12.30179219,78.34319466,"N_America" +"201",-6.240867294,80.91159765,"N_America" +"202",-7.216888709,82.74239632,"N_America" +"203",-23.32124207,84.32786011,"N_America" +"204",-49.91782566,84.2550488,"N_America" +"205",-74.0743557,83.77178617,"N_America" +"206",-105.307041,81.13995985,"N_America" +"207",-169.2375125,72.06624603,"N_America" +"208",-60.41005588,19.12174303,"S_America" +"209",-75.05037711,12.55312276,"S_America" +"210",-78.95446278,6.176633666,"S_America" +"211",-82.24853506,3.989356581,"S_America" +"212",-90.91072512,1.430379058,"S_America" +"213",-93.35077866,-1.98515,"S_America" +"214",-87.25064481,-4.542836261,"S_America" +"215",-81.39451632,-9.986768169,"S_America" +"216",-76.02639853,-18.14478504,"S_America" +"217",-73.70834767,-20.6760312,"S_America" +"218",-73.09833428,-32.32833242,"S_America" +"219",-77.00241995,-41.01951466,"S_America" +"220",-78.58845475,-51.74207956,"S_America" +"221",-73.34233964,-56.59185339,"S_America" +"222",-62.85010942,-57.45507806,"S_America" +"223",-57.1159836,-55.91411735,"S_America" +"224",-55.5299488,-49.97099653,"S_America" +"225",-65.16816028,-49.73501319,"S_America" +"226",-60.89806658,-43.28041932,"S_America" +"227",-51.13785243,-35.76439207,"S_America" +"228",-45.76973464,-29.29016747,"S_America" +"229",-42.47566236,-25.72004023,"S_America" +"230",-35.76551512,-21.35934081,"S_America" +"231",-34.42348568,-12.73754958,"S_America" +"232",-31.00741072,-8.421204609,"S_America" +"233",-30.76340537,-2.960250822,"S_America" +"234",-38.93758473,-0.033504462,"S_America" +"235",-43.57368645,0.698494296,"S_America" +"236",-50.16183101,7.388099362,"S_America" +"237",-55.40794612,10.76090708,"S_America" +"238",-60.16605052,18.89104049,"S_America" +"239",-60.41005588,19.12174303,"S_America" "240",-51.16271286,-58.47354888,"Antarctica" "241",-16.53432006,-62.12205239,"Antarctica" "242",14.26720727,-63.02137336,"Antarctica" diff --git a/inst/rawdata_scripts/data_files/continent_outlines_old.csv b/inst/rawdata_scripts/data_files/continent_outlines_old.csv new file mode 100644 index 00000000..c6e81382 --- /dev/null +++ b/inst/rawdata_scripts/data_files/continent_outlines_old.csv @@ -0,0 +1,256 @@ +"","X","Y","id" +"1",-7.728916699,35.75749984,"Africa" +"2",-19.63925002,28.8315056,"Africa" +"3",-28.40345756,11.62358331,"Africa" +"4",-13.90880663,-4.023174849,"Africa" +"5",15.6423034,-33.32085102,"Africa" +"6",17.44008956,-34.9022564,"Africa" +"7",25.41776566,-34.99435575,"Africa" +"8",52.04747318,-31.5188504,"Africa" +"9",66.76684738,-19.27079578,"Africa" +"10",56.31721531,2.714197406,"Africa" +"11",55.6430455,7.747766172,"Africa" +"12",57.5531933,13.70638396,"Africa" +"13",53.62053607,14.14262173,"Africa" +"14",48.56426249,12.83149768,"Africa" +"15",46.09230652,11.73361887,"Africa" +"16",44.32261076,11.70611408,"Africa" +"17",43.59226014,12.58487736,"Africa" +"18",42.60909583,13.54258428,"Africa" +"19",42.38437256,14.27877584,"Africa" +"20",40.81130967,15.55450435,"Africa" +"21",40.36186313,17.11791495,"Africa" +"22",38.78880023,19.43828313,"Africa" +"23",37.86181675,21.77814068,"Africa" +"24",36.96292366,23.30877505,"Africa" +"25",36.28875385,25.559135,"Africa" +"26",35.05277587,27.36959643,"Africa" +"27",35.61458404,29.54268907,"Africa" +"28",34.37860606,33.09333114,"Africa" +"29",29.65941738,32.99914618,"Africa" +"30",25.27731361,33.28139852,"Africa" +"31",22.24354947,34.21564788,"Africa" +"32",17.74908406,34.77128817,"Africa" +"33",14.60295828,33.84317011,"Africa" +"34",12.91753375,34.40127253,"Africa" +"35",11.90627904,35.59777287,"Africa" +"36",12.24336394,36.68659855,"Africa" +"37",11.00738595,38.02623664,"Africa" +"38",10.22085451,38.46745083,"Africa" +"39",8.310706712,37.9376727,"Africa" +"40",3.928602943,37.76022437,"Africa" +"41",0.445392255,37.04617106,"Africa" +"42",-1.801840448,36.14407479,"Africa" +"43",-4.217615602,36.09869362,"Africa" +"44",-5.334209351,35.99080826,"Africa" +"45",-7.728916699,35.75749984,"Africa" +"46",131.0533088,1.551031471,"Eurasia" +"47",130.1148409,-1.822724663,"Eurasia" +"48",131.723643,-4.248552451,"Eurasia" +"49",129.5785735,-8.539341122,"Eurasia" +"50",121.8026963,-12.38676709,"Eurasia" +"51",114.4290196,-11.85908318,"Eurasia" +"52",102.7652038,-11.06562912,"Eurasia" +"53",92.17392282,-2.901541833,"Eurasia" +"54",85.60464726,3.977449268,"Eurasia" +"55",79.43757224,4.515826813,"Eurasia" +"56",71.66169505,8.003299219,"Eurasia" +"57",70.18695972,15.39691416,"Eurasia" +"58",67.50562275,21.40868962,"Eurasia" +"59",64.0198847,23.40310822,"Eurasia" +"60",60.4000798,20.27442485,"Eurasia" +"61",57.31654229,16.17579914,"Eurasia" +"62",52.6242026,14.61506582,"Eurasia" +"63",48.87033086,12.91154816,"Eurasia" +"64",45.6527265,11.8572516,"Eurasia" +"65",44.21150788,11.98927227,"Eurasia" +"66",43.37359008,12.77999937,"Eurasia" +"67",42.70325584,13.60101413,"Eurasia" +"68",41.99940489,15.16917516,"Eurasia" +"69",41.36258736,16.8547876,"Eurasia" +"70",39.78730189,19.48174302,"Eurasia" +"71",38.84883395,21.22024904,"Eurasia" +"72",37.47464876,23.31027338,"Eurasia" +"73",36.36859726,25.15424906,"Eurasia" +"74",35.43012933,26.7299678,"Eurasia" +"75",34.59221152,27.77835323,"Eurasia" +"76",34.62572824,28.19488984,"Eurasia" +"77",34.96089536,29.55192537,"Eurasia" +"78",33.78781043,32.58070814,"Eurasia" +"79",32.44714195,34.01607995,"Eurasia" +"80",30.46965594,35.15256676,"Eurasia" +"81",28.92788719,35.64653581,"Eurasia" +"82",27.18501816,34.87682284,"Eurasia" +"83",24.83884832,34.01607995,"Eurasia" +"84",22.92839573,34.43368602,"Eurasia" +"85",21.98992779,35.72856674,"Eurasia" +"86",16.1580199,36.24611565,"Eurasia" +"87",14.24756731,35.20760288,"Eurasia" +"88",13.14151581,36.05583829,"Eurasia" +"89",11.96843089,37.45815749,"Eurasia" +"90",11.13051309,38.09662315,"Eurasia" +"91",9.320610642,38.49283488,"Eurasia" +"92",7.912908736,38.20249284,"Eurasia" +"93",6.67279039,40.08152489,"Eurasia" +"94",3.689803018,38.80823163,"Eurasia" +"95",1.578250159,37.88441928,"Eurasia" +"96",-0.499785988,36.94877154,"Eurasia" +"97",-1.605837485,36.38174269,"Eurasia" +"98",-3.047056103,36.00138785,"Eurasia" +"99",-4.287174449,35.91964102,"Eurasia" +"100",-6.9349947,35.94689944,"Eurasia" +"101",-9.080064271,36.40883953,"Eurasia" +"102",-11.29216727,38.01711924,"Eurasia" +"103",-11.05755028,41.40700958,"Eurasia" +"104",-9.88446536,44.26750716,"Eurasia" +"105",-8.443246742,46.90260549,"Eurasia" +"106",-6.633344292,48.39722099,"Eurasia" +"107",-8.007529486,49.54456656,"Eurasia" +"108",-9.7168818,50.64413548,"Eurasia" +"109",-12.39821876,51.36312742,"Eurasia" +"110",-15.21362258,55.44511615,"Eurasia" +"111",-25.00050249,62.07343674,"Eurasia" +"112",-27.14557206,66.08519512,"Eurasia" +"113",-22.45323238,67.46092799,"Eurasia" +"114",-16.82242475,68.46770566,"Eurasia" +"115",-9.582814952,69.21830159,"Eurasia" +"116",-9.649848376,72.42807978,"Eurasia" +"117",-0.801436396,77.05247682,"Eurasia" +"118",13.67778321,80.95096821,"Eurasia" +"119",34.59221152,81.67943461,"Eurasia" +"120",63.55065073,82.31383995,"Eurasia" +"121",89.02335189,82.13241232,"Eurasia" +"122",101.3575019,81.44332427,"Eurasia" +"123",114.2279193,78.94477182,"Eurasia" +"124",121.4675291,76.56281086,"Eurasia" +"125",130.8522085,75.5283069,"Eurasia" +"126",142.3819575,77.58238968,"Eurasia" +"127",153.375439,77.46650798,"Eurasia" +"128",158.7381129,74.27112725,"Eurasia" +"129",172.6810652,72.50889902,"Eurasia" +"130",-176.3254533,72.6694572,"Eurasia" +"131",-170.9627794,72.0185236,"Eurasia" +"132",-169.0858435,69.82845954,"Eurasia" +"133",-168.0133087,66.22085054,"Eurasia" +"134",-174.4485174,63.48557852,"Eurasia" +"135",175.0942684,52.64552296,"Eurasia" +"136",156.8611771,43.7109501,"Eurasia" +"137",145.5995618,31.8398415,"Eurasia" +"138",138.0918183,16.40239644,"Eurasia" +"139",131.0533088,1.551031471,"Eurasia" +"140",133.1778324,2.517728627,"Oceania" +"141",129.5846215,0.136341765,"Oceania" +"142",129.3217036,-2.245283764,"Oceania" +"143",128.0947535,-3.21468509,"Oceania" +"144",127.5689178,-7.080182778,"Oceania" +"145",128.6205893,-11.17287652,"Oceania" +"146",123.9757069,-11.95061794,"Oceania" +"147",118.9802673,-14.44063864,"Oceania" +"148",114.5106635,-17.32413555,"Oceania" +"149",111.7062062,-20.90553906,"Oceania" +"150",109.6905026,-24.32221983,"Oceania" +"151",109.6905026,-27.17901997,"Oceania" +"152",110.742174,-29.04383456,"Oceania" +"153",113.1960742,-36.15717671,"Oceania" +"154",118.279153,-41.36789215,"Oceania" +"155",128.7958678,-41.49979978,"Oceania" +"156",140.013697,-44.70943587,"Oceania" +"157",148.0765117,-48.91803085,"Oceania" +"158",155.0876549,-54.4646137,"Oceania" +"159",164.3774197,-58.62313073,"Oceania" +"160",-171.9599719,-54.97194565,"Oceania" +"161",-153.2051638,-40.43698723,"Oceania" +"162",-119.3763978,-31.47802392,"Oceania" +"163",-119.0258406,-17.74453115,"Oceania" +"164",-134.4503557,-1.451639527,"Oceania" +"165",-146.1940206,14.10649746,"Oceania" +"166",-154.2568353,25.36904166,"Oceania" +"167",-167.5780074,32.45599756,"Oceania" +"168",178.9255419,34.22134176,"Oceania" +"169",162.4493553,25.05012385,"Oceania" +"170",152.984312,18.00388929,"Oceania" +"171",147.3753974,12.21718114,"Oceania" +"172",133.1778324,2.517728627,"Oceania" +"173",-169.2375125,72.06624603,"North_America" +"174",-168.3588131,66.15203343,"North_America" +"175",-174.3339693,63.61805263,"North_America" +"176",-178.0245069,55.27018553,"North_America" +"177",-179.0789462,52.04363826,"North_America" +"178",-178.5517266,49.71573481,"North_America" +"179",-166.7771541,50.50464092,"North_America" +"180",-154.8268417,54.76642246,"North_America" +"181",-147.0942866,58.06895194,"North_America" +"182",-143.228009,58.62230185,"North_America" +"183",-136.7256332,54.46111913,"North_America" +"184",-123.1936617,32.83579276,"North_America" +"185",-112.6492684,17.13687743,"North_America" +"186",-98.76581726,9.09997301,"North_America" +"187",-82.24626776,4.213953146,"North_America" +"188",-78.73146999,6.139115429,"North_America" +"189",-75.21667222,12.55165668,"North_America" +"190",-60.27878171,18.97472345,"North_America" +"191",-77.14981099,32.83579276,"North_America" +"192",-71.87761434,37.98853503,"North_America" +"193",-66.95689747,40.70599217,"North_America" +"194",-56.23676428,43.44466117,"North_America" +"195",-46.92255019,46.79150795,"North_America" +"196",-37.08111645,60.05596395,"North_America" +"197",-28.46986192,66.85267778,"North_America" +"198",-15.46511018,70.60470413,"North_America" +"199",-14.05919107,75.40187132,"North_America" +"200",-12.30179219,78.34319466,"North_America" +"201",-6.240867294,80.91159765,"North_America" +"202",-7.216888709,82.74239632,"North_America" +"203",-23.32124207,84.32786011,"North_America" +"204",-49.91782566,84.2550488,"North_America" +"205",-74.0743557,83.77178617,"North_America" +"206",-105.307041,81.13995985,"North_America" +"207",-169.2375125,72.06624603,"North_America" +"208",-60.41005588,19.12174303,"South_America" +"209",-75.05037711,12.55312276,"South_America" +"210",-78.95446278,6.176633666,"South_America" +"211",-82.24853506,3.989356581,"South_America" +"212",-90.91072512,1.430379058,"South_America" +"213",-93.35077866,-1.98515,"South_America" +"214",-87.25064481,-4.542836261,"South_America" +"215",-81.39451632,-9.986768169,"South_America" +"216",-76.02639853,-18.14478504,"South_America" +"217",-73.70834767,-20.6760312,"South_America" +"218",-73.09833428,-32.32833242,"South_America" +"219",-77.00241995,-41.01951466,"South_America" +"220",-78.58845475,-51.74207956,"South_America" +"221",-73.34233964,-56.59185339,"South_America" +"222",-62.85010942,-57.45507806,"South_America" +"223",-57.1159836,-55.91411735,"South_America" +"224",-55.5299488,-49.97099653,"South_America" +"225",-65.16816028,-49.73501319,"South_America" +"226",-60.89806658,-43.28041932,"South_America" +"227",-51.13785243,-35.76439207,"South_America" +"228",-45.76973464,-29.29016747,"South_America" +"229",-42.47566236,-25.72004023,"South_America" +"230",-35.76551512,-21.35934081,"South_America" +"231",-34.42348568,-12.73754958,"South_America" +"232",-31.00741072,-8.421204609,"South_America" +"233",-30.76340537,-2.960250822,"South_America" +"234",-38.93758473,-0.033504462,"South_America" +"235",-43.57368645,0.698494296,"South_America" +"236",-50.16183101,7.388099362,"South_America" +"237",-55.40794612,10.76090708,"South_America" +"238",-60.16605052,18.89104049,"South_America" +"239",-60.41005588,19.12174303,"South_America" +"240",-51.16271286,-58.47354888,"Antarctica" +"241",-16.53432006,-62.12205239,"Antarctica" +"242",14.26720727,-63.02137336,"Antarctica" +"243",46.5254681,-56.71525771,"Antarctica" +"244",64.64163131,-46.59967474,"Antarctica" +"245",80.30178161,-45.53388212,"Antarctica" +"246",93.59834157,-45.81185804,"Antarctica" +"247",112.0159225,-44.51043451,"Antarctica" +"248",125.6953594,-47.72554527,"Antarctica" +"249",144.5563952,-57.60632014,"Antarctica" +"250",167.7885321,-62.53291394,"Antarctica" +"251",-158.10228,-60.41364332,"Antarctica" +"252",-117.9455721,-57.72169203,"Antarctica" +"253",-73.74975348,-58.56243805,"Antarctica" +"254",-55.83710031,-59.32406517,"Antarctica" +"255",-51.16271286,-58.47354888,"Antarctica" diff --git a/inst/rawdata_scripts/data_files/spratt2016.txt b/inst/rawdata_scripts/data_files/spratt2016.txt new file mode 100644 index 00000000..ae8fef42 --- /dev/null +++ b/inst/rawdata_scripts/data_files/spratt2016.txt @@ -0,0 +1,895 @@ +# Global Sea Level Reconstruction using Stacked Records from 0-800 ka +#----------------------------------------------------------------------- +# World Data Center for Paleoclimatology, Boulder +# and +# NOAA Paleoclimatology Program +#----------------------------------------------------------------------- +# NOTE: Please cite original publication, online resource and date accessed when using this data. +# If there is no publication information, please cite Investigator, title, online resource and date accessed. +# +# Description/Documentation lines begin with # +# Data lines have no # +# +# Online_Resource: http://www.ncdc.noaa.gov/paleo/study/19982 +# Online_Resource: http://www1.ncdc.noaa.gov/pub/data/paleo/paleocean/by_contributor/spratt2016/spratt2016.txt +# +# Archive: Paleoceanography +# +# Parameter_Keywords: reconstruction +#--------------------------------------- +# Contribution_Date +# Date: 2016-04-12 +#--------------------------------------- +# Title +# Study_Name: Global Sea Level Reconstruction using Stacked Records from 0-800 ka +#--------------------------------------- +# Investigators +# Investigators: Spratt, Rachel M.; Lisiecki, Lorraine E. +#--------------------------------------- +# Description and Notes +# Description: Late Pleistocene sea level stack based on marine sediment core data (foraminiferal carbonate d18O) as estimated by several different techniques in seven different studies. Sea level stack is a compilation data from the following published sea level reconstructions: Bintanja, R., Roderik, S.W., van de Wal, O. J.: Modeled atmospheric temperatures and global sea levels over the past million years, Nature, 437, 125-128 doi:10.1038/nature03975, 2005. ; Elderfield, H., Ferretti, P., Greaves, M., Crowhurst, S.J., McCave, I.N., Hodell, D.A., Piotrowski, A.M.: Evolution of ocean temperature and ice volume through the Mid-Pleistocene Climate Transition, Science, 337,6095, 704-709, doi:10.1126/science.1221294, 2012.; Rohling, E.J., Grant, K., Bolshaw, M., Roberts, A.P., Siddall, M., Hemleben, C., Kucera, M.: Antarctic temperature and global sea level closely coupled over the past five glacial cycles. Nat. Geosci., 2, 500-504, 2009.; Rohling, E.J., Grant, K.M., Bolshaw, M., Roberts, A. P., Siddall, M., Hemleben C. Kucera, M., Foster, G.L., Marino, G., Roberts, A.P., Tamisiea, M.E., and Williams, F.: Sea-level and deep-sea-temperature variability over the past 5.3 million years, Nature, 508, 477-482, 2014.; Shakun, J.D., Lea, D.W., Lisiecki, L.E., Raymo, M.E.: An 800-kyr record of global surface ocean d18O and implications for ice volume-temperature coupling, Earth. Planet. Sc. Lett., 426, 58-68, 2015.; Sosdian S., Rosenthal Y.: Deep-Sea Temperature and Ice Volume Changes Across the Pliocene-Pleistocene Climate Transitions, Science, 17, 325, 5938, 306-310, doi: 10.1126/science.1169938, 2009.; Waelbroeck, C., Labeyrie, L., Michel, E., Duplessy J.C., McManus J.: Sea-level and deep water temperature changes derived from benthic foraminifera isotopic records, Quaternary Sci. Rev., 21, 295-305, 2002. +# Provided Keywords: sea level, Pleistocene +#--------------------------------------- +# Publication +# Authors: Spratt, Rachel M. and Lorraine E. Lisiecki +# Published_Date_or_Year: 2016 +# Published_Title: A Late Pleistocene sea level stack +# Journal_Name: Climate of the Past +# Volume: in press +# Edition: +# Issue: +# Pages: +# Report Number: +# DOI: 10.5194/cp-12-1-2016 +# Online_Resource: +# Full_Citation: +# Abstract: Late Pleistocene sea level has been reconstructed from ocean sediment core data using a wide variety of proxies and models. However, the accuracy of individual reconstructions is limited by measurement error, local variations in salinity and temperature, and assumptions particular to each technique. Here we present a sea level stack (average) which increases the signal-to-noise ratio of individual reconstructions. Specifically, we perform principal component analysis (PCA) on seven records from 0-430 ka and five records from 0-798 ka. The first principal component, which we use as the stack, describes ~80% of the variance in the data and is similar using either five or seven records. After scaling the stack based on Holocene and Last Glacial Maximum (LGM) sea level estimates, the stack agrees to within 5 m with isostatically adjusted coral sea level estimates for Marine Isotope Stages 5e and 11 (125 and 400 ka, respectively). Bootstrapping and random sampling yield mean uncertainty estimates of 9-12 m (1s) for the scaled stack. Sea level change accounts for about 45% of the total orbital-band variance in benthic d18O, compared to a 65% contribution during the LGM-to-Holocene transition. Additionally, the second and third principal components of our analyses reflect differences between proxy records associated with spatial variations in the d18O of seawater. +#--------------------------------------- +# Funding_Agency +# Funding_Agency_Name: +# Grant: +#--------------------------------------- +# Site Information +# Site_Name: Global 61.5N to 41S +# Location: +# Country: +# Northernmost_Latitude: 61.425 +# Southernmost_Latitude: -40.937 +# Easternmost_Longitude: 180 +# Westernmost_Longitude: -180 +# Elevation: +#--------------------------------------- +# Data_Collection +# Collection_Name: global_sealevel_stack Spratt16 +# First_Year: -798000 +# Last_Year: 0 +# Time_Unit: cal yr BP +# Core_Length: +# Notes: Sea level stack is a compilation data from the following published sea level reconstructions: Bintanja, R., Roderik, S.W., van de Wal, O. J.: Modeled atmospheric temperatures and global sea levels over the past million years, Nature, 437, 125-128 doi:10.1038/nature03975, 2005. ; Elderfield, H., Ferretti, P., Greaves, M., Crowhurst, S. J., McCave, I.N., Hodell, D. A., Piotrowski, A. M.: Evolution of ocean temperature and ice volume through the Mid-Pleistocene Climate Transition, Science, 337,6095, 704-709, doi:10.1126/science.1221294, 2012.; Rohling, E.J., Grant, K., Bolshaw, M., Roberts, A.P., Siddall, M., Hemleben, C., Kucera, M.: Antarctic temperature and global sea level closely coupled over the past five glacial cycles. Nat. Geosci., 2, 500–504, 2009.; Rohling, E. J., Grant, K.M., Bolshaw, M., Roberts, A. P., Siddall, M., Hemleben C. Kucera, M., Foster, G.L., Marino, G., Roberts, A.P., Tamisiea, M.E., and Williams, F.: Sea-level and deep-sea-temperature variability over the past 5.3 million years, Nature, 508, 477–482, 2014.; Shakun, J. D., Lea, D. W., Lisiecki, L. E., Raymo, M. E.: An 800-kyr record of global surface ocean d18O and implications for ice volume-temperature coupling, Earth. Planet. Sc. Lett., 426, 58–68, 2015.; Sosdian S., Rosenthal Y.: Deep-Sea Temperature and Ice Volume Changes Across the Pliocene-Pleistocene Climate Transitions, Science, 17, 325, 5938, 306-310, doi: 10.1126/science.1169938, 2009.; Waelbroeck, C., Labeyrie, L., Michel, E., Duplessy J.C., McManus J.: Sea-level and deep water temperature changes derived from benthic foraminifera isotopic records, Quaternary Sci. Rev., 21, 295–305, 2002. +#--------------------------------------- +# Species +# Species_Name: Any additional species should be entered in Columns C,D, etc. +# Common_Name: +# Tree_Species_Code: +#--------------------------------------- +# Chronology_Information +# Chronology: +# For cores with benthic foraminiferal carbonate d18O, age models were developed by aligning the carbonate d18O to the "LR04" benthic d18O stack (Lisiecki and Raymo, Paleoceanography, 2005). In most cases, this was the published timescale of the original record. For cores which lacked benthic carbonate d18O, their sea level estimates were aligned to the sea level estimates of the records that were already on the LR04 age model. +#--------------------------------------- +# Variables +# Data variables follow that are preceded by "##" in columns one and two. +# Variables list, one per line, shortname-tab-longname components (9 components: what, material, error, units, seasonality, archive, detail, method, C or N for Character or Numeric data) +## age_calkaBP Age,,,calendar ka BP,,,,,N +## SeaLev_shortPC1 Sea Level,,,meters above present day,,climate reconstructions,,Scaled first principal component of seven sea level reconstructions (0-430 ka),N +## SeaLev_shortPC1_err_sig Sea Level,,standard deviation from bootstrap,meters,,climate reconstructions,,Scaled first principal component of seven sea level reconstructions (0-430 ka),N +## SeaLev_shortPC1_err_lo Sea Level,,95% confidence interval, lower bound,meters,,climate reconstructions,,Scaled first principal component of seven sea level reconstructions (0-430 ka),N +## SeaLev_shortPC1_err_up Sea Level,,95% confidence interval, upper bound,meters,,climate reconstructions,,Scaled first principal component of seven sea level reconstructions (0-430 ka),N +## SeaLev_longPC1 Sea Level,,,meters above present day,,climate reconstructions,,Scaled first principal component of five sea level reconstructions (0-798 ka),N +## SeaLev_longPC1_err_sig Sea Level,,standard deviation from bootstrap,meters,,climate reconstructions,,Scaled first principal component of five sea level reconstructions (0-798 ka),N +## SeaLev_longPC1_err_lo Sea Level,,95% confidence interval, lower bound,meters,,climate reconstructions,,Scaled first principal component of five sea level reconstructions (0-798 ka),N +## SeaLev_longPC1_err_up Sea Level,,95% confidence interval, upper bound,meters,,climate reconstructions,,Scaled first principal component of five sea level reconstructions (0-798 ka),N +#------------------------ +# Data +# Data lines follow (have no #) +# Data line format - tab-delimited text, variable short name as header +# Missing Value: NaN +age_calkaBP SeaLev_shortPC1 SeaLev_shortPC1_err_sig SeaLev_shortPC1_err_lo SeaLev_shortPC1_err_up SeaLev_longPC1 SeaLev_longPC1_err_sig SeaLev_longPC1_err_lo SeaLev_longPC1_err_up +0 8.49 5.23 -1.72 17.93 8.96 5.72 -1.21 20.38 +1 7.63 4.87 -2.9 16.39 7.72 5.13 -2.77 17.1 +2 4.01 4.83 -4.51 13.59 5.96 4.69 -5.01 14.21 +3 4.35 4.72 -6.93 12.08 3.54 4.42 -7.28 10.9 +4 3.13 4.74 -10.43 8.41 1.88 4.39 -10.54 7.63 +5 0 4.57 -12.34 5.12 0 4.54 -13.3 4.37 +6 -4.01 5.04 -16.88 0.62 -2 5.43 -17.74 2.26 +7 -6.11 5.9 -22.41 -0.39 -5.38 6.89 -23.29 3.65 +8 -9.09 6.79 -28.86 -2.96 -7.12 8.66 -31.66 4.08 +9 -15.83 8.3 -37.35 -5.22 -11.6 10.87 -43.21 2.56 +10 -24.59 10.3 -50.17 -9.89 -23.18 13.05 -56.03 -3.78 +11 -35.85 11.93 -63.99 -17.59 -36.19 14.92 -70.95 -11.27 +12 -51.05 12.3 -76.8 -28.6 -49.72 15.38 -83.72 -23.99 +13 -66.3 12.38 -89.53 -39.9 -64.58 15.65 -96.11 -34.83 +14 -76.64 12.35 -100.98 -53.14 -75.97 16.08 -107.68 -44.5 +15 -86.57 12.34 -111.08 -61.67 -86.08 16.33 -117.47 -53.8 +16 -98.06 12.28 -119.52 -70.64 -98.43 16.26 -125.37 -61.94 +17 -107.3 11.96 -125.43 -77.7 -108.23 15.9 -129.99 -68.78 +18 -113.01 11.16 -129.44 -84.14 -113.85 15.05 -131.8 -73.18 +19 -116.68 10.61 -131.87 -89.61 -117 14.4 -133.08 -77.34 +20 -117.56 10.08 -134.08 -95.64 -116.4 13.9 -134.48 -81.87 +21 -120.01 9.14 -134.42 -99.63 -118.61 12.14 -134.47 -91.28 +22 -125.82 7.66 -134.52 -106.07 -125.91 9.97 -134.42 -98.21 +23 -128.72 5.27 -134.73 -113.3 -128.71 6.49 -134.95 -107.99 +24 -130 4.38 -134.58 -118.09 -130 5.48 -134.67 -113.97 +25 -126.89 4.5 -134.18 -116.35 -124.87 5.87 -133.38 -110.94 +26 -122.4 5.15 -133.23 -113.54 -119.21 6.84 -132.58 -106.41 +27 -118.28 5.44 -130.83 -109.88 -114.93 6.7 -128.15 -102.77 +28 -115.19 5.74 -126.93 -105.25 -112.19 6.88 -123.71 -97.4 +29 -110.87 5.64 -123.11 -100.95 -107.65 6.6 -119.34 -94.56 +30 -105.78 5.72 -119.56 -97.59 -102.07 6.62 -116.2 -90.66 +31 -103.5 5.81 -115.83 -93.16 -99.97 6.49 -112.82 -87.56 +32 -100.63 6.14 -113.45 -89.89 -96.01 6.64 -109.99 -83.39 +33 -97.48 6.4 -112.63 -87.9 -93.69 7.04 -110.23 -81.11 +34 -97.37 6.64 -113.54 -87.15 -93.5 7.22 -109.73 -81.26 +35 -98.83 6.67 -112.65 -85.72 -97.21 7.47 -110.41 -80.66 +36 -99.39 6.81 -112.85 -85.29 -97.2 7.4 -110.04 -81.44 +37 -95.27 6.54 -112.21 -85.74 -93.4 6.97 -110.08 -82.41 +38 -93.1 6.16 -109.47 -84.17 -91.82 6.34 -105.63 -80.62 +39 -90.3 5.66 -102.83 -81.14 -88.47 6.05 -100.13 -76.35 +40 -85.9 5.74 -98.89 -76.15 -83.13 6.16 -96.46 -72.62 +41 -79.76 5.67 -94.67 -72.62 -78.15 5.79 -91.91 -69.35 +42 -75.76 5.2 -90.5 -70.82 -74.61 5.18 -87.44 -67.59 +43 -73.91 4.72 -86.67 -68.74 -73.02 4.9 -84.37 -65.65 +44 -76.18 4.8 -86.65 -67.68 -72.61 4.81 -82.85 -64.04 +45 -74.49 4.75 -85.47 -67.24 -71.01 5.04 -82.81 -63.31 +46 -75.78 5.1 -87.56 -67.52 -70.25 5.33 -83.46 -63.27 +47 -73.7 5.05 -87.1 -67.3 -71.4 5.51 -83.75 -62.55 +48 -76.71 5.49 -86.89 -65.61 -72.53 5.81 -83.47 -60.96 +49 -73.75 6.04 -84.42 -61.64 -70.54 6.08 -82.85 -58.88 +50 -68.3 6.49 -84.91 -58.55 -66.69 6.4 -82.6 -56.45 +51 -63.11 6.1 -82.32 -58.02 -65.99 7.09 -83.41 -54.32 +52 -67.88 6.37 -81.7 -57.24 -68.05 8.26 -86.9 -52.81 +53 -68.85 6.73 -82.99 -55.98 -69.87 8.81 -90.39 -53.31 +54 -70.05 7.18 -87.88 -58.82 -71.66 8.88 -91.32 -56.22 +55 -72.26 7.5 -91.66 -60.95 -74.43 8.82 -93.18 -58.04 +56 -78.03 7.9 -95.37 -63.04 -78.68 8.6 -95.38 -61.12 +57 -82.74 7.91 -96.96 -65.22 -81.58 8.51 -96.03 -62.47 +58 -85.71 8.31 -99.32 -66.11 -81.85 9.41 -96.26 -60.6 +59 -82.94 8.97 -101.54 -65.19 -76.51 10.52 -96.88 -56.87 +60 -84.73 8.89 -101.4 -66 -77.47 10.88 -96.11 -53.14 +61 -86.56 8.68 -100.68 -63.69 -78.58 10.85 -94.61 -52.59 +62 -84.32 8.77 -101.28 -65.01 -79.92 10.8 -95.35 -52.06 +63 -84.75 8.15 -100.11 -66.5 -79.92 9.73 -94.29 -57.7 +64 -83.48 7.06 -97.89 -69.28 -77.22 8.38 -94.13 -62.19 +65 -82.72 6.97 -97.61 -70.76 -78.75 7.52 -93.97 -65.09 +66 -82.47 7.09 -95.62 -68.69 -80.56 8.15 -92.94 -61.24 +67 -79.37 6.84 -92.04 -64.64 -80.05 8.98 -91.88 -56.91 +68 -71.06 7.3 -88.56 -60.46 -68.37 10.11 -89.84 -50.72 +69 -68.11 8.84 -85.22 -51.15 -64.56 11.75 -87.23 -40.67 +70 -65.39 9.4 -79.2 -42.67 -60.11 12.01 -79.15 -31.38 +71 -51.43 10.04 -75 -35.42 -50.56 12.81 -74.57 -24.32 +72 -46.71 10.17 -69.63 -29.21 -43.6 12.96 -69.85 -18.74 +73 -43.84 9.97 -63.09 -23.31 -38.44 12.79 -63.57 -14.2 +74 -36.18 9.68 -58.1 -21.24 -33.23 12.02 -57.33 -11.56 +75 -33.06 9.11 -54.25 -18.43 -27.81 10.95 -52.9 -10.46 +76 -31.58 8.27 -48.54 -16.13 -26.3 9.82 -48.48 -10.78 +77 -27.69 8.14 -47.93 -16.5 -26.85 9.73 -49.32 -10.95 +78 -28.8 7.77 -47.08 -16.64 -27.39 9.61 -50.73 -12.8 +79 -32.95 7.26 -46.29 -18.08 -32.53 9.36 -51.9 -14.88 +80 -30.85 6.98 -46.3 -19.38 -32.48 8.55 -51.28 -16.91 +81 -31.36 7.63 -47.64 -17.23 -32.68 9.9 -50.7 -10.68 +82 -29.64 8.01 -47.38 -15.87 -31.47 10.85 -49.49 -8.32 +83 -25.57 8.5 -47.98 -14.51 -24.15 11.71 -50.32 -6.17 +84 -30.66 8.78 -49.34 -14.48 -27.87 11.41 -48.53 -4.67 +85 -29.99 9.31 -51.51 -15.62 -29.96 11.38 -49.44 -5.73 +86 -38.77 9.49 -56.47 -18.08 -33.19 11.17 -52.56 -9.52 +87 -43.09 9.38 -58.24 -20.89 -36.68 10.74 -53.59 -11.63 +88 -46.6 8.91 -59.96 -25.72 -41.15 10.33 -54.29 -16.12 +89 -43.44 8.46 -60.47 -28.6 -40.65 10.16 -55.53 -17.01 +90 -43.63 7.86 -59.49 -28.89 -38.17 9.71 -55.64 -17.34 +91 -40.3 7.57 -57.19 -27.2 -35.91 9.1 -54.7 -17.93 +92 -41.67 7.59 -56.66 -26.28 -39.37 8.27 -53.95 -21.94 +93 -42.16 6.86 -53.77 -27.85 -41.76 7.38 -53.51 -25.78 +94 -40.52 6.68 -52.39 -26.54 -41.82 7.82 -53.09 -22.36 +95 -34.24 7.47 -50.8 -21.52 -34.94 8.88 -51.46 -16.76 +96 -27.74 7.82 -47.5 -16.22 -25.61 9.35 -48.3 -12.73 +97 -22.19 7.77 -42.02 -11.02 -20.95 8.82 -42.96 -9.02 +98 -21.19 7.38 -38.21 -9.82 -19.34 8.28 -39.79 -7.23 +99 -17.26 6.77 -35.67 -9.34 -16.97 8.25 -38.04 -5.59 +100 -19.49 7.09 -36.28 -9.29 -17 8.92 -40.14 -6.04 +101 -17.72 7.5 -37.95 -9.32 -16.69 9.75 -42.09 -4.56 +102 -25.03 7.58 -40.61 -10.86 -28.14 9.47 -44.78 -8.59 +103 -29.47 7.36 -43.31 -14.15 -31.04 8.95 -46.35 -11.46 +104 -31.71 6.23 -47.08 -22.42 -32.55 7.02 -48.84 -21.83 +105 -34.36 6.23 -51.67 -27 -35.22 6.72 -51.35 -24.85 +106 -40.33 5.91 -53.53 -30.24 -38.48 6.43 -53.04 -28.33 +107 -45.01 5.84 -56.12 -33.4 -41.37 6.19 -54.64 -30.54 +108 -44.48 5.71 -58.2 -36.24 -42.91 6.04 -56.07 -32.59 +109 -45.95 5.85 -59.78 -37.21 -45.17 6.4 -58.64 -32.84 +110 -46.36 5.75 -58.82 -35.63 -45.58 6.92 -59.89 -32.75 +111 -47.08 6.09 -57.92 -34.02 -47.87 7.55 -60.36 -30.63 +112 -43.18 6.7 -57.09 -29.37 -44.12 8.36 -60.54 -26.62 +113 -38.93 7.92 -55.23 -23.47 -39.03 9.4 -59.03 -21.34 +114 -33.84 8.71 -52.11 -17.24 -33.75 10.23 -56.93 -15.3 +115 -26.17 9.45 -48.38 -10.53 -29.37 10.8 -52.47 -8.99 +116 -22.5 9.57 -44.07 -4.55 -24.99 11.12 -49.38 -4.85 +117 -14.09 9.32 -38.52 -0.28 -17.04 11.13 -44.01 -0.79 +118 -7.56 9.65 -33.23 5.2 -9.18 11.01 -37.21 5.05 +119 -4 9.15 -25.34 11.96 -4.89 10.4 -30.7 10.75 +120 2.68 8.61 -20.11 13.96 -0.63 9.71 -25.06 12.85 +121 3.13 8.04 -16.66 14.85 0.38 9.35 -23.45 14.03 +122 2.27 7.48 -16.48 14.31 -2.96 9.3 -24.67 12.96 +123 1.2 7.72 -18.3 11.66 -2.86 9.73 -27.07 12.16 +124 -1.18 7.99 -23.61 7.96 -5.42 10.15 -31.36 8.15 +125 -6.65 9.21 -32.76 3.82 -9.84 11.39 -41.73 3.22 +126 -12.72 10.54 -42.73 -1.38 -16.25 13.48 -53.24 0.31 +127 -27.1 12.33 -57.04 -8.26 -26.94 16.01 -68.7 -5.1 +128 -36.13 14.35 -73.57 -15.92 -37.21 18.44 -84.72 -13.24 +129 -52.95 15.22 -87.96 -27.15 -54.53 19.9 -101.68 -23.06 +130 -73.72 16.05 -103.29 -40.2 -73.85 20.5 -117.67 -36.29 +131 -82.93 15.15 -117.04 -58.22 -90.07 19.13 -129.13 -54.68 +132 -102.14 13.62 -126.92 -75.11 -105.22 16.88 -134.27 -70.2 +133 -114.38 11.96 -132.62 -86.55 -115.02 14.67 -139.11 -83.56 +134 -120.26 9.69 -137.19 -98.98 -119.82 12.29 -142.25 -95.78 +135 -123.76 8.33 -139.42 -106.97 -123.64 10.54 -144.19 -104.37 +136 -123.95 7.89 -140.25 -109.67 -124.5 9.81 -144.28 -107.08 +137 -123.61 7.89 -140.8 -109.74 -123.8 9.73 -143.23 -106.28 +138 -122.72 7.99 -140.44 -108.75 -124.64 9.91 -142.56 -104.96 +139 -120.94 8.16 -138.39 -106.21 -122.69 10.13 -140.76 -102.04 +140 -118.88 8.2 -135.75 -103.44 -120.22 10.39 -139.53 -99.63 +141 -113.45 8.21 -131.84 -100.51 -114.5 10.42 -136.21 -96.44 +142 -110.78 8.29 -128.79 -96.54 -110.49 10.55 -133.45 -93.15 +143 -106.75 8.15 -124.16 -93.07 -107.59 10.45 -128.06 -88.82 +144 -102.4 8.25 -122.01 -89.94 -103.3 10.48 -123.89 -85.28 +145 -100.34 8.37 -119.96 -87.28 -98.2 10.5 -120.57 -81.37 +146 -100.71 8.59 -118.42 -84.49 -94.8 10.41 -116.9 -77.74 +147 -99.52 8.79 -117.05 -83.15 -93.03 10.43 -114.75 -75.88 +148 -99.18 9.39 -116.17 -80.07 -92.8 11.32 -112.58 -71.73 +149 -96.94 9.97 -115.26 -76.2 -91.47 12.4 -111.92 -66.16 +150 -90.79 10.67 -113.37 -71.82 -83.71 13.48 -111.56 -61.09 +151 -86.92 11.06 -111.4 -68.1 -81.41 14.21 -111.89 -57.3 +152 -85.9 11.34 -110.22 -66.06 -80.76 14.82 -111.28 -55.56 +153 -85.22 11.65 -110.45 -64.99 -81.58 15.31 -112.57 -54.96 +154 -86.91 11.83 -111.48 -65.21 -83.01 15.55 -114.78 -55.48 +155 -89.71 11.76 -112.73 -66.29 -85.36 15.51 -115.89 -57.6 +156 -92.51 11.48 -113.12 -67.92 -88.64 15.35 -115.36 -58.52 +157 -92.67 11.16 -113.7 -69.1 -87.48 14.99 -115.47 -58.14 +158 -88.91 10.91 -113.41 -69.99 -85.64 14.56 -114.52 -57.37 +159 -87.94 10.66 -111.3 -69.84 -86.43 14.05 -112.27 -57.92 +160 -86.95 10.45 -107.26 -68.12 -85.83 13.94 -110.13 -57.24 +161 -85.29 10.52 -105.8 -65.74 -81.01 14.14 -108.09 -54.07 +162 -78.74 10.6 -102.72 -61.83 -75.82 14.17 -104.53 -49.52 +163 -77.08 10.76 -99.81 -58.32 -72.41 14.06 -101.04 -46.87 +164 -74.42 10.78 -95.44 -53.52 -71.32 13.88 -97.6 -45.39 +165 -71.66 10.86 -93.59 -49.49 -68.5 13.58 -93.71 -42.36 +166 -65.29 10.33 -89.4 -48.42 -64.42 13.09 -90.94 -41.53 +167 -61.69 9.94 -85.89 -46.43 -60.97 12.81 -87.29 -39.12 +168 -61.52 9.69 -81.74 -43.66 -60.17 12.67 -84.25 -36.2 +169 -58.16 9.47 -79.33 -42.17 -58.35 12.29 -81.7 -35.58 +170 -55.34 9.17 -78.42 -41.44 -55.7 12.05 -80.82 -34.96 +171 -57.68 8.82 -77.29 -42.28 -56.66 11.73 -80.34 -35.67 +172 -64.45 8.71 -77.05 -43.49 -62.17 11.36 -78.98 -36.67 +173 -63.15 8.51 -78.23 -45.47 -59.51 11.03 -78.52 -36.88 +174 -62.14 8.69 -80.7 -46.37 -57.15 11.12 -78.87 -37 +175 -61.42 8.85 -80.24 -45.66 -56.68 11.45 -79.48 -35.8 +176 -63.68 9.14 -82.02 -45.79 -56.38 11.68 -80.39 -36.03 +177 -62.61 9.6 -83.68 -46.73 -57.08 11.92 -81.64 -36.64 +178 -66.03 9.64 -85.56 -48.19 -60.21 11.96 -83.15 -38.56 +179 -68.55 9.63 -86.44 -49.27 -61.56 11.86 -84.55 -40.33 +180 -68.12 9.68 -88.3 -50.86 -62.88 11.79 -85.81 -42.16 +181 -68.54 9.97 -89.62 -51.12 -63.81 12.12 -87.17 -41.85 +182 -68.59 9.78 -89.92 -51.76 -61.87 12.28 -88.1 -40.23 +183 -68.86 9.53 -90.08 -52.43 -61.47 12.18 -88.54 -40.34 +184 -70.31 9.51 -89.26 -52.66 -63.82 12.05 -88.8 -41.42 +185 -71.5 9.33 -87.58 -52.5 -66.14 11.78 -87.06 -42.63 +186 -67.51 8.85 -84.5 -51.87 -63.1 11.35 -86.29 -41.78 +187 -64.13 8.55 -82.3 -50.01 -58.35 11.01 -84.66 -39.31 +188 -58.98 8.27 -77.78 -46.09 -54.36 10.12 -79.21 -38.24 +189 -55.74 8.01 -72.75 -42.15 -49.67 9.03 -72.46 -35.38 +190 -50.97 8.16 -67.22 -35.52 -47.83 8.39 -66.65 -32.68 +191 -44.91 8.28 -63.42 -30.9 -43.67 8.09 -61.02 -28.97 +192 -37.3 7.61 -57.51 -27.61 -38.93 8.06 -57.07 -26.77 +193 -32.83 7.39 -52.64 -22.84 -34.32 8.22 -54.47 -22.57 +194 -32.43 7.44 -47.73 -18.33 -31.73 8.37 -51.01 -17.98 +195 -26.14 8.12 -43.23 -11.59 -27.93 8.44 -46.1 -11.87 +196 -21.7 8.7 -40.12 -5.12 -22.54 9.06 -41.46 -4.62 +197 -13.48 8.23 -33.94 -1.05 -16.51 9.31 -36.75 1.28 +198 -10.09 7.57 -29.94 -1.05 -10.22 9.21 -33.71 3.2 +199 -7.72 7.42 -30.57 -1.53 -8.16 9.04 -32.73 3.63 +200 -11.24 7.13 -31.15 -2.01 -10.01 8.93 -32.19 3.34 +201 -19.54 7.77 -34.84 -3.75 -14.6 9.21 -35.18 1.86 +202 -21.5 7.83 -37.32 -6.2 -19.64 9.19 -37.44 -0.26 +203 -26.54 8.11 -38.42 -6.62 -23.23 9.66 -38.41 0.28 +204 -23.73 8.69 -36.98 -3.55 -21.01 10.82 -38.56 3.78 +205 -14.39 9.93 -37.8 1.82 -10.72 11.8 -38.25 6.84 +206 -9.84 10.21 -36.75 4.99 -5.44 12.5 -36.92 11.27 +207 -14.1 10.51 -33.07 6.94 -8.14 13.15 -37.01 13.6 +208 -10.13 11.06 -33.91 8.75 -8.33 13.92 -37.17 15.02 +209 -10.6 11.02 -36.1 8.31 -9.22 13.92 -36.96 16.32 +210 -11.47 10.71 -32.76 9.33 -7.95 14.09 -36.16 17.17 +211 -9.45 10.92 -32.57 10.22 -4.98 14.07 -36.25 18.64 +212 -7.38 10.99 -32.48 11.61 -3.69 13.86 -35.44 19.02 +213 -6.78 10.76 -31.36 10.74 -4.4 13.52 -34.5 18.84 +214 -7.05 10.24 -31.51 9.5 -5.98 13.15 -35.33 16.19 +215 -9.18 10.12 -34.08 5.23 -6.5 13.16 -38.46 12.26 +216 -13.1 10 -38.83 0.74 -10.74 13.28 -43.41 7.3 +217 -23.51 10.25 -45.06 -3.7 -21.54 13.72 -51.94 1.35 +218 -29.26 10.72 -53.69 -11.56 -29.58 14.19 -61.91 -7.44 +219 -36.81 11.23 -64.27 -20.7 -39.16 14.14 -69.02 -16.17 +220 -49.33 11.33 -71.72 -28.9 -49.6 14.5 -80.09 -24.51 +221 -61.75 11.26 -80.17 -37.15 -57.84 14.11 -85.81 -32.27 +222 -67.03 9.92 -84.7 -45.94 -67.09 12.99 -89.46 -38.6 +223 -73.68 9.27 -88.74 -51.96 -69.51 12.08 -90.25 -44.46 +224 -72.15 8.69 -89.32 -55.76 -68.74 11.13 -89.71 -47.8 +225 -74.35 8.04 -89.03 -57.44 -69.26 10.04 -88.17 -50.63 +226 -70.68 7.46 -86.16 -56.76 -66.5 8.93 -85.06 -51.88 +227 -66.88 7.29 -84.73 -56.14 -65.16 8.43 -83.75 -51.78 +228 -65.45 6.79 -80.39 -53.85 -65.57 8.34 -81.38 -49.85 +229 -65.06 6.97 -76.6 -48.78 -62.94 8.9 -78.86 -44.16 +230 -59.11 8.12 -73.94 -43 -57.47 10.2 -75.76 -36.81 +231 -51.45 9.5 -71.41 -34.05 -49.89 11.19 -71.31 -27.67 +232 -41.76 9.78 -64.11 -25.49 -39.44 11.15 -65.33 -23.22 +233 -31.59 9.65 -55.79 -18.92 -31.3 10.86 -58.33 -16.43 +234 -26.47 9.23 -48.17 -12.27 -27.81 10.54 -51.57 -11.15 +235 -21.38 9.05 -41.7 -6.3 -22.9 10.31 -46.25 -6.4 +236 -15.03 8.65 -38.02 -3.4 -15.91 9.65 -43.15 -4.8 +237 -9.44 7.89 -36.19 -4.69 -12.93 9.15 -41.15 -4.99 +238 -14.82 7.64 -36.23 -6.94 -16.93 9.56 -43.28 -5.43 +239 -21.09 8.31 -42.1 -9.7 -21.86 10.97 -50.39 -8.26 +240 -26.31 9.54 -51.68 -14.84 -26.82 13.23 -61.67 -11.52 +241 -35.14 11.06 -62.85 -19.38 -35.26 14.85 -70.07 -14.17 +242 -44.9 11.35 -70.17 -25.03 -45.72 15.45 -78.36 -19.18 +243 -53.72 13.94 -78.84 -22.33 -51.2 20.06 -85.62 -3.09 +244 -58.16 14.8 -86.18 -28.82 -56.73 20.96 -91.1 -8.29 +245 -54.47 15.51 -94.02 -31.75 -47.88 22.01 -99.39 -4.83 +246 -73.1 15.29 -99.84 -33.85 -71.87 19.58 -102 -27.57 +247 -80.67 15.9 -103.93 -44.67 -80.64 19.05 -106.73 -31.42 +248 -86.71 11.84 -108.53 -63.57 -84.39 14.97 -112.95 -53.49 +249 -88.3 11.47 -113.32 -67.55 -87.15 15.13 -116.72 -57.81 +250 -91.78 11.89 -116.99 -70.79 -90.08 16.02 -121.78 -58.85 +251 -94.31 12.64 -121.22 -71.6 -90.51 17.42 -127.21 -57.26 +252 -94.5 13.98 -124.4 -69.21 -90.18 19.46 -132.35 -53.3 +253 -95.65 15.37 -125.79 -66.56 -90.12 21.7 -132.18 -45.17 +254 -91.97 15.42 -125.08 -65 -87.6 21.92 -131.21 -43.51 +255 -86.9 15 -122.85 -62.25 -80.55 21.42 -129.54 -37.55 +256 -90.3 14.86 -120.89 -58.5 -85.9 19.95 -127.97 -47.41 +257 -93.53 13.45 -115.4 -63.22 -90.55 16.89 -122.98 -51.19 +258 -93.71 9.74 -110.67 -72.6 -92.35 12.38 -113.79 -65.83 +259 -89.89 8.38 -105.76 -73.2 -86.91 10.68 -106.28 -66.68 +260 -81.06 8.34 -102.07 -69.33 -76.07 10.53 -102.56 -61.99 +261 -78.3 8.1 -97.55 -64.74 -72.52 10.09 -96.21 -56.91 +262 -77.68 7.99 -95.22 -63.24 -72.1 10.12 -93.77 -54.43 +263 -77.5 7.75 -95.57 -64.72 -73.52 10.36 -93.86 -54.12 +264 -85.38 7.98 -96.3 -65.2 -80.85 10.72 -95.73 -53.74 +265 -84.54 8.57 -97.51 -63.91 -81.29 11.55 -95.76 -50.78 +266 -82.09 8.24 -100.42 -66.92 -76.74 11.11 -97.23 -56.07 +267 -82.77 8.23 -102.76 -69.7 -75.43 10.87 -99.1 -57.85 +268 -93.08 8.29 -105.22 -71.69 -88.1 9.91 -100.6 -62.83 +269 -97.2 8.13 -105.72 -74.37 -92.09 9.52 -102.3 -65.07 +270 -98.21 7.59 -106.96 -76.66 -93.27 9.7 -102.15 -64.23 +271 -89.95 8.74 -106.36 -72.7 -84.89 10.91 -101.86 -59.96 +272 -80.22 8.89 -103.98 -68.03 -77.94 11.06 -98.46 -56.41 +273 -76.12 9.05 -95.65 -60.21 -74.2 11.8 -92.3 -45.91 +274 -74.38 10.08 -90.81 -51.7 -70.83 13.74 -89.75 -36.9 +275 -67.56 10.91 -87.92 -45.78 -61.01 15.14 -86.5 -29.97 +276 -61.85 11.39 -85.09 -39.84 -54.32 15.7 -83.81 -23.75 +277 -56.75 11.7 -81.33 -35.27 -50.86 15.6 -79.97 -18.51 +278 -53.52 11.69 -76.99 -30.72 -48.23 15.21 -76.1 -15.97 +279 -50.13 11.32 -72.06 -28.17 -45.62 14.4 -72.86 -15.4 +280 -46.06 10.87 -68.1 -25.86 -42.44 13.22 -68.88 -16.69 +281 -39.89 10.49 -64.17 -24.11 -39.03 12.29 -65.78 -16.23 +282 -37.94 10.12 -60.7 -20.73 -38.63 11.58 -63.71 -17.49 +283 -36.69 9.61 -57.69 -19.92 -39.26 10.93 -62.69 -18.19 +284 -35.06 9.13 -57.35 -20.51 -39.35 10.18 -63.18 -21.63 +285 -35.22 8.91 -57.53 -22.68 -40.03 9.58 -63.33 -24.92 +286 -36.57 8.56 -57.52 -23.9 -43 9.18 -63.96 -27.26 +287 -37.85 8.06 -58.54 -27.87 -45.5 8.77 -64.89 -31.17 +288 -42.69 7.5 -61.7 -32.08 -48.56 8.25 -67.49 -35.4 +289 -51.85 6.73 -65.11 -38.34 -54.86 7.17 -69.01 -40.68 +290 -56.69 5.79 -67.24 -43.98 -58.27 6.37 -69.15 -44.34 +291 -58.53 5.45 -68.42 -45.73 -58.29 6.64 -69.35 -42.89 +292 -56.55 6.25 -69.2 -43.86 -53.8 7.61 -69.33 -39.12 +293 -54.88 7.04 -69.64 -41.51 -50.77 8.51 -68.73 -35.49 +294 -53.23 7.88 -69.59 -38.94 -49.26 10.07 -68.33 -29.28 +295 -52.4 8.67 -69.62 -36.37 -48.22 11.43 -70.16 -25.2 +296 -48.95 9.48 -69.27 -31.55 -43.51 12.71 -71.22 -22.87 +297 -48.35 10.18 -68.92 -29.19 -44.77 13.56 -72.96 -19.97 +298 -47.6 10.68 -68.21 -26.13 -44.88 14.31 -72.45 -17.57 +299 -45.33 10.85 -67.89 -23.81 -42.38 14.66 -70.7 -15.6 +300 -42.88 10.97 -65.95 -22.3 -40.16 14.79 -68.55 -13.22 +301 -39.59 11.07 -62.9 -19.17 -38.64 14.99 -65.8 -8.2 +302 -38.01 11.11 -61.01 -16.17 -36.2 15 -64.75 -5.66 +303 -33.06 11.36 -59.05 -13.66 -33 15.53 -64.41 -4.3 +304 -35.35 11.39 -57.74 -13.53 -36.19 15.79 -64.09 -2.71 +305 -39.42 11.35 -56.45 -11.93 -38.96 16.14 -63.8 -1.27 +306 -35.78 11.62 -56.32 -10.9 -35.29 16.31 -63.06 0.38 +307 -30.55 11.97 -56.58 -9.17 -31.22 16.45 -62.2 3.47 +308 -31.07 11.69 -53.72 -6.86 -31.05 16.25 -58.96 5.36 +309 -27.9 11.35 -49.42 -4.7 -27.33 15.97 -54.88 7.8 +310 -24.1 11.5 -47.32 -2.16 -22.67 15.82 -52.42 10.75 +311 -22.22 11.34 -44.13 -0.47 -20.87 15.62 -48.7 13.8 +312 -21.88 11.5 -41.69 2.81 -19.67 15.83 -46.37 15.84 +313 -18.42 11.79 -39.75 5.31 -16.66 16.13 -44.64 18.48 +314 -12.39 11.84 -37.87 8.08 -9.95 16.16 -43.45 20.33 +315 -12.12 11.74 -36.81 9.2 -7.03 15.91 -41.04 21.39 +316 -9.85 11.38 -34.64 11.03 -7.3 15.51 -38.73 22.64 +317 -10.45 11.21 -33.84 10.57 -6.47 15.27 -38.2 20.8 +318 -10.88 10.65 -33.02 9.32 -7.02 14.76 -39.23 19.62 +319 -11.31 10.57 -32.95 8.94 -8.25 14.65 -39.2 17.7 +320 -8.44 10.89 -32.93 9.94 -6.17 15.06 -39.38 19.7 +321 -6.92 11.43 -32.43 12.01 -5.29 15.78 -39.44 21.68 +322 -2.51 11.42 -31.39 14.09 -2.38 15.81 -39.6 22.18 +323 -0.71 11.56 -30.6 14.09 -0.59 15.91 -39.57 22.22 +324 -2.6 11.63 -31.24 15.55 -4.09 15.51 -40.71 18.78 +325 -7.77 11.33 -31.62 13.45 -11.39 14.64 -40.16 17.48 +326 -7.75 10.74 -32.07 12.16 -11.59 14.28 -40.27 16.13 +327 -3.06 10.95 -31.6 12.43 -5.54 15.04 -38.72 18.4 +328 -0.61 11.34 -31.93 13.74 -1.95 15.97 -40.51 22.29 +329 -1.75 12.28 -36.17 13.26 -1.78 17.14 -46.5 20.83 +330 -6.91 14.31 -43.22 11.35 -9.32 18.55 -55.34 17.37 +331 -16.42 14.71 -50.72 7.66 -25.22 18.8 -61.73 12.48 +332 -34.02 15.01 -59.96 -2.48 -37.73 18.5 -69.61 1.97 +333 -36.93 14.93 -70.56 -12.17 -41.34 18.79 -78.2 -4.6 +334 -48.06 14.72 -81.97 -22.33 -44.91 19.88 -87.17 -8.58 +335 -58.42 15.56 -91.03 -29.64 -54.11 20.9 -97.73 -14.71 +336 -74.42 15.43 -99.04 -37.25 -72.67 19.53 -105.3 -26.54 +337 -85.7 13.57 -105.56 -50.24 -86.27 16.71 -110.62 -46.11 +338 -91.22 10.66 -111.45 -70.11 -88.48 13.35 -113.9 -63.25 +339 -93.28 9.94 -115.29 -76.44 -89.68 12.52 -116.17 -68.84 +340 -96.85 9.92 -118.92 -80.68 -91.34 12.4 -119.5 -70.68 +341 -103.88 10.14 -122.21 -82.82 -99.06 12.01 -120.61 -75.12 +342 -108.11 10.24 -124.95 -84.19 -102.83 11.89 -121.45 -76.22 +343 -108.58 9.81 -126.14 -87.27 -99.93 11.34 -121.8 -80 +344 -108.8 9.8 -126.25 -88.11 -99.95 11.26 -121.92 -79.42 +345 -109.04 9.73 -126.09 -88.15 -99.99 11.02 -120.2 -79.13 +346 -105.84 9.4 -124.52 -87.98 -97.26 10.46 -118.82 -79.68 +347 -103.3 8.87 -122.26 -87.03 -95.41 9.65 -116.51 -80.37 +348 -102.66 7.97 -119.25 -86.87 -95.79 8.51 -113.63 -81.78 +349 -101.03 7.71 -116.23 -85.74 -95.19 8.33 -110.48 -79.19 +350 -97.04 8.01 -113.59 -81.57 -93.87 9.05 -107.9 -73.29 +351 -89.97 7.9 -109.5 -78.18 -87.03 9.39 -104.83 -69.31 +352 -85.13 6.99 -103.99 -76.67 -83.3 8.86 -101.82 -66.44 +353 -84.01 6.34 -100.74 -74.97 -83.38 7.97 -98.82 -66.93 +354 -86.49 6.59 -101.15 -74.89 -86.1 7.73 -99.83 -68.96 +355 -91.12 6.18 -102.67 -77.23 -90.32 6.86 -101.59 -72.8 +356 -94.94 5.36 -104.3 -82.64 -92.82 5.9 -103.79 -80.73 +357 -92.98 5.05 -105.54 -85.04 -92.4 5.44 -104.48 -83.2 +358 -91.88 5.71 -105.08 -82.6 -92.14 6.1 -105.27 -81.54 +359 -88.63 6.18 -102.37 -77.46 -89.06 7.2 -103.98 -75.29 +360 -84.77 7.21 -99.94 -70.5 -85.53 8.75 -102.06 -66.8 +361 -78.88 8.03 -94.43 -62.55 -78.35 9.88 -95.82 -56.31 +362 -71.15 7.99 -89.74 -57.9 -69.37 9.75 -89.75 -50.33 +363 -66.07 7.2 -85.09 -56.4 -63.03 9.4 -84.54 -46.44 +364 -66.4 8.01 -81.76 -50.81 -63.89 11.56 -83.55 -37.49 +365 -65.1 9.52 -79.82 -43.21 -64.07 13.55 -83.85 -30.26 +366 -57.26 10.39 -78.6 -38.53 -54.84 14.55 -80.2 -25.58 +367 -50.45 10.52 -75.97 -35.61 -48.23 14.69 -78.17 -20.58 +368 -49.22 10.33 -72.75 -32.44 -45.47 13.84 -74.41 -19.19 +369 -48 9.97 -69.29 -30.39 -44.13 12.9 -70.09 -17.66 +370 -49.3 9.38 -67.21 -30.36 -44.26 11.59 -67.52 -21.63 +371 -49.22 8.48 -65.93 -32.84 -45.09 10.02 -65.48 -25.36 +372 -46.86 7.41 -63.79 -35.17 -45.15 8.41 -63.78 -31.1 +373 -48.47 6.48 -62.66 -37.38 -47.15 7.63 -63.73 -34.77 +374 -47.49 5.99 -61.34 -38.47 -48.95 7.26 -64 -37.24 +375 -50.2 5.87 -62.1 -39.49 -50.8 7.15 -65.41 -37.71 +376 -48.25 6.18 -62.7 -38.45 -51.26 7.77 -66.76 -36.86 +377 -50.22 7.72 -62.63 -31.42 -52.15 10.45 -66.32 -25.72 +378 -49.56 10.45 -61 -20.34 -51.2 14.67 -64.82 -7.79 +379 -37.79 12.3 -60.15 -11.74 -37.02 17.08 -63.02 1.64 +380 -26.52 12.52 -58.06 -9.37 -23.08 17.27 -59.39 7.96 +381 -24 12.06 -52.83 -5.55 -19.11 16.4 -54.93 11.46 +382 -28.9 12.2 -49.81 -3.72 -22.54 15.73 -50.98 8.75 +383 -27.84 11.58 -47.87 -4.59 -21.71 14.8 -49.84 7.23 +384 -27.28 10.54 -47.83 -7.63 -21.71 13.54 -49.19 2.43 +385 -25.07 10.36 -45.95 -6.55 -20.54 13.03 -47.5 2.14 +386 -22.2 9.68 -44.24 -7.77 -18.5 11.99 -45.42 -0.06 +387 -19.07 8.52 -41.12 -8.93 -15.47 10.75 -44.66 -1.33 +388 -21.65 7.86 -40.12 -10.57 -18.8 10.09 -43.89 -4.09 +389 -26.23 7.65 -40.02 -11.02 -27.18 9.71 -43.71 -5.36 +390 -28.4 7.96 -41.1 -9.4 -28.92 10.03 -44.27 -4.15 +391 -23.4 8.89 -39.74 -5.45 -23.33 11.17 -43.51 1.64 +392 -17.91 10.18 -38.09 2.42 -18.28 12.84 -40.71 9.46 +393 -9.74 10.75 -33.46 8.84 -10.19 14 -37.11 17.04 +394 -6.53 11.1 -29.88 11.66 -4.18 14.76 -34.25 21.37 +395 -4.22 10.89 -26.82 15.57 -3.31 15 -32.94 25.47 +396 -3.16 11.27 -25.75 18.29 -3.48 15.62 -32.73 27.79 +397 -1.02 12.18 -24.75 24 -1.81 16.86 -32.44 34.04 +398 3.18 13.07 -23.35 28 4.9 18.16 -30.71 39.73 +399 10.24 13.31 -22.27 32.48 12.47 18.54 -27.6 44.73 +400 14.59 13.4 -19.35 34.17 18.54 18.36 -24.64 45.33 +401 14.05 13.42 -16 35.96 17.75 17.77 -21.78 46.84 +402 13.01 12.88 -13.46 36.1 16.3 16.79 -19.33 47.05 +403 14.56 12.01 -12.24 34.72 17.86 15.81 -17.01 44.67 +404 15.96 11.51 -12.5 33 19.02 15.41 -17.28 43.52 +405 12.86 11.57 -13.54 33.47 16.07 15.29 -18.94 41.83 +406 11.17 11.44 -14.26 30.78 13.25 15.09 -19.87 39.11 +407 10.25 10.94 -16.91 27.24 12.61 14.8 -22.55 35.28 +408 7.79 10.99 -19.62 24.12 10.54 14.92 -27.51 30.69 +409 5.44 11.27 -24.25 21.21 5.67 15.32 -33.06 28.51 +410 -3.39 11.33 -27.75 16.63 -4.34 15.03 -38.72 20.63 +411 -7.72 11.08 -33.95 10.75 -11.41 14.82 -42.48 15.08 +412 -11.95 10.7 -38.67 3.83 -13.32 14.32 -46.11 8.41 +413 -12.45 10.63 -42.22 0.57 -14.63 14.15 -50.6 4.93 +414 -17.47 10.52 -45.35 -2.75 -19.34 13.78 -52.65 1.42 +415 -25.15 10.43 -48.72 -7.67 -27.13 13.3 -57.04 -5.39 +416 -31.74 11.41 -56.93 -13.09 -34.82 15.08 -69.57 -9.06 +417 -35.59 12.48 -66.53 -19.72 -36.4 17.32 -76.83 -11.5 +418 -46.88 13.08 -73.37 -24.06 -50.54 18.88 -85.12 -12.2 +419 -51.43 13.42 -80.07 -26.95 -53.85 19.07 -91.09 -14.9 +420 -58.11 13.93 -84.58 -27.29 -61.18 18.69 -98.22 -21.36 +421 -63.52 13.71 -89.57 -36.64 -68.48 17.65 -103.69 -33.45 +422 -66.31 12.29 -94.51 -47.72 -75.22 16.24 -109.29 -44.9 +423 -77.44 12.55 -103.53 -54.59 -81.07 15.95 -115.92 -54.15 +424 -78.65 13.81 -117.38 -63.16 -85.93 18.13 -131.11 -62.04 +425 -95.55 14.58 -127.97 -71.58 -97.74 19.75 -142.89 -70.69 +426 -109.94 14.7 -135.51 -78.84 -114.91 19.96 -153.15 -76.59 +427 -116.49 13.76 -143.17 -89.19 -122.93 18.99 -158.6 -86.09 +428 -118.26 13.87 -148.56 -94.4 -123.82 18.21 -161.3 -90.69 +429 -120.44 13.74 -150.2 -96.76 -124.4 17.39 -157.19 -93.27 +430 -119.42 12.81 -149.38 -97.73 -119.99 15.79 -152.28 -94.75 +431 NaN NaN NaN NaN -119.41 14.67 -150.37 -95.74 +432 NaN NaN NaN NaN -120.06 14.12 -148.76 -95.47 +433 NaN NaN NaN NaN -121.15 13.75 -145.59 -94.41 +434 NaN NaN NaN NaN -119.52 13.43 -142.99 -93.02 +435 NaN NaN NaN NaN -115.07 13.44 -141.72 -92.12 +436 NaN NaN NaN NaN -113.91 13.59 -140.13 -89.18 +437 NaN NaN NaN NaN -113.26 13.88 -137.59 -86.1 +438 NaN NaN NaN NaN -110.74 14.33 -135.79 -82.22 +439 NaN NaN NaN NaN -105.38 14.5 -132.91 -78.82 +440 NaN NaN NaN NaN -99.91 14.46 -129.35 -76 +441 NaN NaN NaN NaN -98.54 14.31 -127.64 -74.87 +442 NaN NaN NaN NaN -100.55 14.1 -126.65 -74.57 +443 NaN NaN NaN NaN -101.78 13.66 -125.9 -75.24 +444 NaN NaN NaN NaN -99.69 12.91 -124 -75.56 +445 NaN NaN NaN NaN -96.28 11.88 -121.22 -76.64 +446 NaN NaN NaN NaN -95.52 10.55 -117.85 -78.42 +447 NaN NaN NaN NaN -95.02 9.39 -115.18 -80 +448 NaN NaN NaN NaN -96.95 8.66 -114.45 -82.02 +449 NaN NaN NaN NaN -98.28 8.65 -114.6 -82 +450 NaN NaN NaN NaN -97.77 9.22 -117.04 -80.19 +451 NaN NaN NaN NaN -97.82 10.04 -118.6 -77.63 +452 NaN NaN NaN NaN -96.21 10.55 -118.14 -75.34 +453 NaN NaN NaN NaN -94.59 10.62 -115.48 -73.63 +454 NaN NaN NaN NaN -92.94 10.48 -112.57 -72.38 +455 NaN NaN NaN NaN -90.9 10.35 -111.16 -70.77 +456 NaN NaN NaN NaN -89.86 10.2 -109.39 -69.75 +457 NaN NaN NaN NaN -88.33 9.96 -107.48 -68.55 +458 NaN NaN NaN NaN -85.94 9.51 -105.95 -67.9 +459 NaN NaN NaN NaN -81.84 9.04 -102.72 -66.4 +460 NaN NaN NaN NaN -81.43 8.85 -99.88 -65.26 +461 NaN NaN NaN NaN -79.68 8.89 -97.25 -62.77 +462 NaN NaN NaN NaN -78.29 9.26 -95.54 -60.63 +463 NaN NaN NaN NaN -75.46 10.02 -95.82 -58.26 +464 NaN NaN NaN NaN -73.88 12 -99.84 -53.37 +465 NaN NaN NaN NaN -74.83 13.88 -98.79 -47.1 +466 NaN NaN NaN NaN -71.39 15.8 -98.39 -35.63 +467 NaN NaN NaN NaN -62.89 16.6 -94.17 -27.85 +468 NaN NaN NaN NaN -52 17.1 -89.89 -22.12 +469 NaN NaN NaN NaN -51.21 17.12 -86.79 -18.9 +470 NaN NaN NaN NaN -51.75 17.35 -83.43 -15.39 +471 NaN NaN NaN NaN -49.63 17.46 -80.63 -13.96 +472 NaN NaN NaN NaN -41.58 17.18 -75.91 -11.84 +473 NaN NaN NaN NaN -36.84 16.45 -71.05 -10.09 +474 NaN NaN NaN NaN -34.5 15.35 -66.49 -7.86 +475 NaN NaN NaN NaN -32.09 14.63 -62.85 -6.72 +476 NaN NaN NaN NaN -29.84 13.61 -60.19 -7.39 +477 NaN NaN NaN NaN -27.61 12.41 -56.85 -8.81 +478 NaN NaN NaN NaN -28.34 11.09 -53.28 -10.06 +479 NaN NaN NaN NaN -31.41 9.69 -51.47 -12.73 +480 NaN NaN NaN NaN -32.77 7.94 -49.46 -17.53 +481 NaN NaN NaN NaN -32.41 6.45 -46.88 -21.14 +482 NaN NaN NaN NaN -30.53 5.98 -45.58 -21.15 +483 NaN NaN NaN NaN -28.2 6.29 -43.54 -17.6 +484 NaN NaN NaN NaN -24.91 6.75 -41.12 -14.13 +485 NaN NaN NaN NaN -21.12 7.02 -39.32 -11.37 +486 NaN NaN NaN NaN -17.44 7.68 -37.89 -8.61 +487 NaN NaN NaN NaN -17.62 8.78 -38.84 -5.35 +488 NaN NaN NaN NaN -17.2 10.06 -40.79 -2.45 +489 NaN NaN NaN NaN -18.07 11.25 -42.05 1.07 +490 NaN NaN NaN NaN -15.29 12.28 -43.15 4.63 +491 NaN NaN NaN NaN -12.74 13.15 -42.7 8.03 +492 NaN NaN NaN NaN -10.85 13.84 -43.11 10.47 +493 NaN NaN NaN NaN -12.44 14.77 -45.4 11.61 +494 NaN NaN NaN NaN -14.59 15.6 -48.38 12.74 +495 NaN NaN NaN NaN -17.71 16.32 -50.36 12.84 +496 NaN NaN NaN NaN -18.44 16.74 -51.49 12.41 +497 NaN NaN NaN NaN -15.39 16.94 -51.59 12.71 +498 NaN NaN NaN NaN -14.05 17.08 -52.54 12.79 +499 NaN NaN NaN NaN -17.99 17.16 -54.27 13.1 +500 NaN NaN NaN NaN -22.56 17.17 -55.52 11.07 +501 NaN NaN NaN NaN -23.33 16.97 -56.84 8.47 +502 NaN NaN NaN NaN -24.04 16.91 -59.08 7.26 +503 NaN NaN NaN NaN -27.37 16.94 -61.16 5.31 +504 NaN NaN NaN NaN -30.58 17.04 -64.95 1.93 +505 NaN NaN NaN NaN -33.44 17.12 -68.67 -0.82 +506 NaN NaN NaN NaN -36.11 17.25 -72.35 -5.48 +507 NaN NaN NaN NaN -42.61 17.86 -78.27 -10.12 +508 NaN NaN NaN NaN -47.62 17.94 -81.58 -14.77 +509 NaN NaN NaN NaN -55.32 17.38 -83.66 -19.05 +510 NaN NaN NaN NaN -55.45 16.9 -85.22 -20.86 +511 NaN NaN NaN NaN -53.4 16.62 -84.89 -20.68 +512 NaN NaN NaN NaN -52.81 16.26 -84.36 -21.21 +513 NaN NaN NaN NaN -53.28 15.78 -83.35 -22.35 +514 NaN NaN NaN NaN -51.5 15.18 -81.72 -21.56 +515 NaN NaN NaN NaN -50.33 14.4 -78.1 -21.74 +516 NaN NaN NaN NaN -47.55 13.41 -75.04 -21.92 +517 NaN NaN NaN NaN -44.78 12.68 -72.88 -22.92 +518 NaN NaN NaN NaN -45.35 12.07 -71.99 -22.62 +519 NaN NaN NaN NaN -46.68 11.8 -71.44 -23.66 +520 NaN NaN NaN NaN -45.1 11.66 -71.34 -25 +521 NaN NaN NaN NaN -44.99 11.73 -72.63 -26.42 +522 NaN NaN NaN NaN -46.82 11.83 -74.23 -27.7 +523 NaN NaN NaN NaN -49.7 11.84 -75.33 -28.53 +524 NaN NaN NaN NaN -50.48 11.75 -75.95 -29.38 +525 NaN NaN NaN NaN -49.96 11.64 -76.05 -29.94 +526 NaN NaN NaN NaN -49.68 11.41 -75.52 -30.65 +527 NaN NaN NaN NaN -48.46 11.09 -74.84 -31.41 +528 NaN NaN NaN NaN -48.5 10.75 -75.34 -33.08 +529 NaN NaN NaN NaN -50.66 10.42 -76.18 -34.86 +530 NaN NaN NaN NaN -52.1 10.05 -76.21 -36.67 +531 NaN NaN NaN NaN -53.67 9.63 -75.14 -38.35 +532 NaN NaN NaN NaN -53.71 9.36 -75.64 -40.12 +533 NaN NaN NaN NaN -53.01 9.38 -77.81 -40.28 +534 NaN NaN NaN NaN -56.16 9.55 -79.35 -41.9 +535 NaN NaN NaN NaN -61.14 10.17 -82.56 -43.19 +536 NaN NaN NaN NaN -64.07 10.45 -84.64 -45.4 +537 NaN NaN NaN NaN -67.39 11.01 -86.45 -45.18 +538 NaN NaN NaN NaN -64.18 12.32 -87.22 -41.16 +539 NaN NaN NaN NaN -59.91 13.34 -87.92 -35.08 +540 NaN NaN NaN NaN -58.99 14.07 -85.4 -30.45 +541 NaN NaN NaN NaN -55.16 14.86 -85.45 -27.24 +542 NaN NaN NaN NaN -51.73 15.46 -83.84 -25.01 +543 NaN NaN NaN NaN -53.72 15.58 -83.27 -24.02 +544 NaN NaN NaN NaN -53.89 15.28 -83.09 -24.64 +545 NaN NaN NaN NaN -53.73 14.52 -84.05 -28.41 +546 NaN NaN NaN NaN -55.03 13.33 -83.9 -31.42 +547 NaN NaN NaN NaN -57.35 12.1 -84.49 -36.55 +548 NaN NaN NaN NaN -59.46 11.01 -84.45 -41.25 +549 NaN NaN NaN NaN -62.11 10.18 -83.64 -44.83 +550 NaN NaN NaN NaN -62.75 9.64 -82.71 -45.13 +551 NaN NaN NaN NaN -60.01 9.24 -81.35 -46.41 +552 NaN NaN NaN NaN -58.3 9.21 -80.96 -45.72 +553 NaN NaN NaN NaN -59.76 9.27 -79.75 -44.16 +554 NaN NaN NaN NaN -61.1 9.65 -78.66 -41.3 +555 NaN NaN NaN NaN -58.37 10.29 -76.36 -37.06 +556 NaN NaN NaN NaN -52.38 11.22 -74.15 -31.7 +557 NaN NaN NaN NaN -46.51 11.64 -70.67 -26.21 +558 NaN NaN NaN NaN -40.41 11.62 -66.42 -21.99 +559 NaN NaN NaN NaN -37.88 11.51 -62.85 -18.68 +560 NaN NaN NaN NaN -36.07 11.42 -60.2 -16.62 +561 NaN NaN NaN NaN -35.39 11.34 -58.34 -15.68 +562 NaN NaN NaN NaN -34.82 11.11 -56.09 -14.39 +563 NaN NaN NaN NaN -33.39 10.8 -54.09 -13.27 +564 NaN NaN NaN NaN -30.12 10.65 -50.98 -9.15 +565 NaN NaN NaN NaN -26.73 10.89 -47.13 -5.38 +566 NaN NaN NaN NaN -19.58 10.5 -43.65 -2.77 +567 NaN NaN NaN NaN -13.9 10.21 -39.04 -0.25 +568 NaN NaN NaN NaN -13.27 9.88 -36.33 2.58 +569 NaN NaN NaN NaN -11.65 9.95 -34.8 4.61 +570 NaN NaN NaN NaN -9.06 10.38 -33.45 6.64 +571 NaN NaN NaN NaN -8.18 11.52 -35 9.06 +572 NaN NaN NaN NaN -6.66 12.45 -37.55 10.31 +573 NaN NaN NaN NaN -8.42 13.12 -39.76 11.13 +574 NaN NaN NaN NaN -8.88 13.44 -40.32 10.88 +575 NaN NaN NaN NaN -12.1 12.95 -42.6 8.98 +576 NaN NaN NaN NaN -12.36 12.53 -40.77 8.12 +577 NaN NaN NaN NaN -11.71 12.99 -44.14 6.36 +578 NaN NaN NaN NaN -13.91 13.84 -48.25 5 +579 NaN NaN NaN NaN -23.45 14.43 -54.55 0.93 +580 NaN NaN NaN NaN -32.03 14.48 -61.05 -4.55 +581 NaN NaN NaN NaN -38.35 13.45 -65.38 -14.27 +582 NaN NaN NaN NaN -44.03 12.21 -67.95 -22.38 +583 NaN NaN NaN NaN -50.08 11.77 -70.2 -27.45 +584 NaN NaN NaN NaN -53.33 11.51 -71.59 -29.23 +585 NaN NaN NaN NaN -54.4 11.56 -72.45 -28.93 +586 NaN NaN NaN NaN -49.95 11.65 -72.05 -28.28 +587 NaN NaN NaN NaN -47.15 12 -71.22 -25.37 +588 NaN NaN NaN NaN -45.53 12.39 -67.41 -20.2 +589 NaN NaN NaN NaN -39.1 12.82 -64.07 -16.26 +590 NaN NaN NaN NaN -33.2 13.07 -61.9 -12.85 +591 NaN NaN NaN NaN -30.1 12.8 -58.59 -10 +592 NaN NaN NaN NaN -28.97 12.71 -57.08 -8.64 +593 NaN NaN NaN NaN -30.38 12.59 -55.47 -7.65 +594 NaN NaN NaN NaN -29.81 12.4 -53.81 -7.17 +595 NaN NaN NaN NaN -26.35 12.24 -52.89 -6.36 +596 NaN NaN NaN NaN -23.46 12.31 -52.63 -5.54 +597 NaN NaN NaN NaN -24.04 13.01 -55.45 -5.64 +598 NaN NaN NaN NaN -27.53 14.98 -63.57 -5.36 +599 NaN NaN NaN NaN -33.05 16.15 -70.08 -7.06 +600 NaN NaN NaN NaN -41.35 16.78 -73.57 -8.57 +601 NaN NaN NaN NaN -41.23 16.95 -74.09 -9.11 +602 NaN NaN NaN NaN -39.41 16.81 -73 -9.43 +603 NaN NaN NaN NaN -37.95 16.28 -68.81 -6.89 +604 NaN NaN NaN NaN -33.99 15.84 -64.22 -3.89 +605 NaN NaN NaN NaN -24.09 15.68 -59.74 1.52 +606 NaN NaN NaN NaN -16.31 15.58 -54.45 5.39 +607 NaN NaN NaN NaN -14.29 16.12 -51.81 9.76 +608 NaN NaN NaN NaN -15.19 16.8 -53.77 11.59 +609 NaN NaN NaN NaN -17.77 17.28 -55.56 11.14 +610 NaN NaN NaN NaN -17.66 17.15 -55.27 11.62 +611 NaN NaN NaN NaN -18.6 16.77 -54.79 11.2 +612 NaN NaN NaN NaN -18.19 16.47 -50.73 12.23 +613 NaN NaN NaN NaN -12.57 15.51 -47.95 14.36 +614 NaN NaN NaN NaN -9.02 15.23 -45.9 13.27 +615 NaN NaN NaN NaN -11.31 15.61 -49.26 11.9 +616 NaN NaN NaN NaN -16.78 15.93 -52.51 11.02 +617 NaN NaN NaN NaN -29.38 15.95 -63.77 -1.98 +618 NaN NaN NaN NaN -43.34 16.58 -80.29 -15.26 +619 NaN NaN NaN NaN -65.34 15.37 -91.09 -29.53 +620 NaN NaN NaN NaN -78.36 13.46 -102.94 -50.42 +621 NaN NaN NaN NaN -86.36 12.08 -112.6 -65.02 +622 NaN NaN NaN NaN -93 12.48 -120.27 -72.53 +623 NaN NaN NaN NaN -100.28 13.93 -127.93 -75.59 +624 NaN NaN NaN NaN -103.58 15.27 -135.2 -76.75 +625 NaN NaN NaN NaN -105.54 16.51 -141.8 -78.3 +626 NaN NaN NaN NaN -110.96 17.1 -145.08 -79.51 +627 NaN NaN NaN NaN -114.62 17.5 -145.85 -78.39 +628 NaN NaN NaN NaN -111.96 17.31 -144.64 -79.49 +629 NaN NaN NaN NaN -109.41 17 -142.4 -78.67 +630 NaN NaN NaN NaN -108.5 16.3 -139.23 -77.27 +631 NaN NaN NaN NaN -105.76 15.43 -135.73 -76.97 +632 NaN NaN NaN NaN -103.04 14.5 -132.62 -77.72 +633 NaN NaN NaN NaN -102.54 13.89 -130.58 -78.76 +634 NaN NaN NaN NaN -105.6 13.89 -131.68 -80.24 +635 NaN NaN NaN NaN -109.52 13.46 -131.5 -81.89 +636 NaN NaN NaN NaN -111.27 13.21 -130.66 -82.25 +637 NaN NaN NaN NaN -105.13 13.06 -128.74 -80.26 +638 NaN NaN NaN NaN -101.37 13.05 -126.54 -76.84 +639 NaN NaN NaN NaN -99.09 12.66 -122.27 -74.11 +640 NaN NaN NaN NaN -93.77 12.56 -118.89 -71.38 +641 NaN NaN NaN NaN -92.11 12.31 -117.12 -70.11 +642 NaN NaN NaN NaN -89.12 11.82 -113.29 -69.06 +643 NaN NaN NaN NaN -85.33 11.21 -109.57 -67.71 +644 NaN NaN NaN NaN -82.43 10.92 -107.94 -66.86 +645 NaN NaN NaN NaN -82.73 11.36 -108.46 -66.01 +646 NaN NaN NaN NaN -86.64 11.91 -111.24 -65.26 +647 NaN NaN NaN NaN -88.13 12.12 -110.28 -64.36 +648 NaN NaN NaN NaN -86.44 12 -109.73 -64.12 +649 NaN NaN NaN NaN -80.26 11.49 -107.42 -63.97 +650 NaN NaN NaN NaN -79.87 10.7 -104.18 -64.27 +651 NaN NaN NaN NaN -82.42 10.02 -101.78 -64.56 +652 NaN NaN NaN NaN -85.15 9.95 -102.03 -64.95 +653 NaN NaN NaN NaN -84.29 9.68 -101.24 -65.36 +654 NaN NaN NaN NaN -78.18 9.34 -100.85 -64.37 +655 NaN NaN NaN NaN -77.24 9.44 -101.75 -64.69 +656 NaN NaN NaN NaN -82.73 9.32 -100.19 -65.37 +657 NaN NaN NaN NaN -85.16 9.56 -101.08 -65.49 +658 NaN NaN NaN NaN -83.48 10.22 -101.13 -62.83 +659 NaN NaN NaN NaN -78.4 10.39 -100.7 -61.79 +660 NaN NaN NaN NaN -75.27 10.06 -99.68 -59.23 +661 NaN NaN NaN NaN -77.61 9.81 -98.33 -60.36 +662 NaN NaN NaN NaN -79.27 9.9 -98.78 -60.7 +663 NaN NaN NaN NaN -80.2 9.8 -98.23 -61.26 +664 NaN NaN NaN NaN -79.29 10.52 -98.1 -58.05 +665 NaN NaN NaN NaN -75.05 11 -96.27 -54.91 +666 NaN NaN NaN NaN -72.45 11.2 -94.27 -52.32 +667 NaN NaN NaN NaN -69.86 11.13 -91.93 -49.63 +668 NaN NaN NaN NaN -66.7 10.94 -88.32 -47.26 +669 NaN NaN NaN NaN -62.58 10.29 -84.49 -45.49 +670 NaN NaN NaN NaN -61.52 9.72 -81.92 -44.03 +671 NaN NaN NaN NaN -61.93 9.59 -82.02 -44.05 +672 NaN NaN NaN NaN -65.68 9.57 -81.74 -46.24 +673 NaN NaN NaN NaN -67.22 9.74 -81.36 -44.54 +674 NaN NaN NaN NaN -62.65 10.04 -80.52 -42.32 +675 NaN NaN NaN NaN -56.98 10.72 -78.97 -37.17 +676 NaN NaN NaN NaN -53.47 11.36 -75.68 -31.91 +677 NaN NaN NaN NaN -50.13 11.92 -72.88 -28.58 +678 NaN NaN NaN NaN -45.5 12.69 -71.16 -23.07 +679 NaN NaN NaN NaN -42.18 13.85 -69.92 -17.32 +680 NaN NaN NaN NaN -38.49 14.87 -68.34 -11.34 +681 NaN NaN NaN NaN -34.08 15.65 -65.6 -7.72 +682 NaN NaN NaN NaN -28.89 15.92 -62.78 -3 +683 NaN NaN NaN NaN -24.49 15.71 -58.91 0.28 +684 NaN NaN NaN NaN -21.33 15.09 -54.18 2.3 +685 NaN NaN NaN NaN -17.8 14.34 -48.48 5.69 +686 NaN NaN NaN NaN -12.64 13.03 -43.42 7.27 +687 NaN NaN NaN NaN -9.14 11.55 -38.51 8.08 +688 NaN NaN NaN NaN -11.45 10.67 -35.65 7.06 +689 NaN NaN NaN NaN -13.04 10.51 -35.26 6.05 +690 NaN NaN NaN NaN -15.63 10.79 -38.45 5.46 +691 NaN NaN NaN NaN -15.7 11.37 -39.48 4.6 +692 NaN NaN NaN NaN -13.48 11.83 -40.7 4.74 +693 NaN NaN NaN NaN -12.46 12.18 -40.23 7.16 +694 NaN NaN NaN NaN -12.35 12.52 -40.33 9.32 +695 NaN NaN NaN NaN -10.64 12.74 -40.06 11.94 +696 NaN NaN NaN NaN -9.93 12.54 -39.79 11.44 +697 NaN NaN NaN NaN -11.83 12.35 -39.88 10.96 +698 NaN NaN NaN NaN -15.58 12.29 -41.55 9.53 +699 NaN NaN NaN NaN -19.13 12.33 -43.08 7.21 +700 NaN NaN NaN NaN -21.36 12.4 -45.84 5.95 +701 NaN NaN NaN NaN -23.27 12.41 -48.71 1.3 +702 NaN NaN NaN NaN -26.99 12.34 -51.37 -1.27 +703 NaN NaN NaN NaN -30.02 11.87 -53.21 -6.94 +704 NaN NaN NaN NaN -31.23 11.56 -55.74 -10.96 +705 NaN NaN NaN NaN -31.93 11.63 -60.16 -14.17 +706 NaN NaN NaN NaN -36.72 12.53 -67.85 -18.26 +707 NaN NaN NaN NaN -48.33 12.46 -73.27 -22.56 +708 NaN NaN NaN NaN -57.75 11.99 -77.85 -30.29 +709 NaN NaN NaN NaN -56.95 11.61 -83.5 -39.31 +710 NaN NaN NaN NaN -58.02 12.96 -89.66 -39.49 +711 NaN NaN NaN NaN -64.8 14.19 -95.64 -41.34 +712 NaN NaN NaN NaN -68.05 15.76 -106.24 -43.3 +713 NaN NaN NaN NaN -71.56 16.02 -108.95 -45.37 +714 NaN NaN NaN NaN -80.14 15.47 -109 -49.16 +715 NaN NaN NaN NaN -82.33 14.27 -110.18 -56.13 +716 NaN NaN NaN NaN -83.25 12.71 -108.96 -61.86 +717 NaN NaN NaN NaN -82.13 11.03 -106.72 -65.65 +718 NaN NaN NaN NaN -86.11 10.15 -105.52 -68.33 +719 NaN NaN NaN NaN -90.18 9.81 -105.46 -68.74 +720 NaN NaN NaN NaN -88.93 9.81 -104.74 -67.32 +721 NaN NaN NaN NaN -82.33 10.29 -102.44 -64.18 +722 NaN NaN NaN NaN -76.68 9.87 -99.27 -61.05 +723 NaN NaN NaN NaN -70.14 8.63 -92.39 -58.22 +724 NaN NaN NaN NaN -66.7 8.33 -87.2 -54.27 +725 NaN NaN NaN NaN -65.99 9.44 -83.16 -45.6 +726 NaN NaN NaN NaN -63.32 10.97 -79.63 -36.97 +727 NaN NaN NaN NaN -52.01 11.39 -76.64 -32.54 +728 NaN NaN NaN NaN -44.27 12.38 -73.99 -26.47 +729 NaN NaN NaN NaN -43.98 14.11 -75.58 -20.83 +730 NaN NaN NaN NaN -44.3 15.77 -76.73 -16.93 +731 NaN NaN NaN NaN -43.81 14.96 -76.78 -18.13 +732 NaN NaN NaN NaN -41.74 14.34 -76.91 -19.73 +733 NaN NaN NaN NaN -40.02 14.07 -77.77 -20.78 +734 NaN NaN NaN NaN -42.07 12.88 -76 -23.41 +735 NaN NaN NaN NaN -49.78 10.91 -70.43 -26.15 +736 NaN NaN NaN NaN -50.09 10.21 -69.99 -30.18 +737 NaN NaN NaN NaN -48.25 9.49 -70.58 -33.25 +738 NaN NaN NaN NaN -47.66 8 -68.08 -35.58 +739 NaN NaN NaN NaN -52.7 7.47 -68.42 -38.4 +740 NaN NaN NaN NaN -56.43 7.56 -71.27 -40.99 +741 NaN NaN NaN NaN -58.79 7.9 -75.6 -43.71 +742 NaN NaN NaN NaN -61.79 8.35 -79.93 -47.53 +743 NaN NaN NaN NaN -64.82 8.95 -83.65 -49.84 +744 NaN NaN NaN NaN -67.33 9.53 -87.32 -50.84 +745 NaN NaN NaN NaN -69.88 10.21 -90.82 -52.07 +746 NaN NaN NaN NaN -71.14 10.81 -92.85 -52.48 +747 NaN NaN NaN NaN -73.88 11.09 -94.39 -52.67 +748 NaN NaN NaN NaN -73.75 11.21 -94.79 -52.95 +749 NaN NaN NaN NaN -74.38 11.27 -93.77 -51.82 +750 NaN NaN NaN NaN -74.08 11.12 -92.75 -50.6 +751 NaN NaN NaN NaN -68.3 10.7 -90.54 -50.33 +752 NaN NaN NaN NaN -65.75 10.14 -88.45 -49.68 +753 NaN NaN NaN NaN -65.13 9.74 -85.12 -48.78 +754 NaN NaN NaN NaN -63.7 9.99 -83.39 -45.28 +755 NaN NaN NaN NaN -61.85 9.74 -81.81 -42.6 +756 NaN NaN NaN NaN -59.1 9.15 -80.41 -43.32 +757 NaN NaN NaN NaN -58.67 8.65 -78.2 -43.29 +758 NaN NaN NaN NaN -57.34 8.29 -74.9 -42.26 +759 NaN NaN NaN NaN -53.97 7.98 -72.19 -40.67 +760 NaN NaN NaN NaN -50.83 8.28 -69.9 -38.3 +761 NaN NaN NaN NaN -49.19 9.39 -68.65 -31.34 +762 NaN NaN NaN NaN -47.72 10.18 -66.67 -26.67 +763 NaN NaN NaN NaN -41.61 10.55 -65.02 -22.64 +764 NaN NaN NaN NaN -39.17 10.6 -62.98 -21.61 +765 NaN NaN NaN NaN -39.26 10.2 -60.15 -21.5 +766 NaN NaN NaN NaN -36.3 9.78 -57.3 -18.89 +767 NaN NaN NaN NaN -32.18 9.25 -53.96 -17.48 +768 NaN NaN NaN NaN -27.3 8.83 -49.14 -14.2 +769 NaN NaN NaN NaN -23.7 8.72 -44.96 -10.41 +770 NaN NaN NaN NaN -20.71 8.85 -40.62 -5.68 +771 NaN NaN NaN NaN -16.21 9.36 -36.7 0.45 +772 NaN NaN NaN NaN -12.24 9.65 -33.34 4.81 +773 NaN NaN NaN NaN -8 9.32 -29.97 5.74 +774 NaN NaN NaN NaN -6.3 9.02 -28.85 5.77 +775 NaN NaN NaN NaN -8.56 9.14 -29.26 5.33 +776 NaN NaN NaN NaN -9.1 9.35 -30.76 5.17 +777 NaN NaN NaN NaN -12.76 9.52 -33.06 4.17 +778 NaN NaN NaN NaN -13.68 9.66 -34.57 3.18 +779 NaN NaN NaN NaN -14.49 9.66 -36.23 1.96 +780 NaN NaN NaN NaN -13.01 10.2 -38.78 1.15 +781 NaN NaN NaN NaN -15.3 10.96 -42.45 0.43 +782 NaN NaN NaN NaN -20.86 11.62 -46.82 0.01 +783 NaN NaN NaN NaN -23.36 11.87 -48.82 -2.96 +784 NaN NaN NaN NaN -22.74 11.74 -50.84 -5.59 +785 NaN NaN NaN NaN -26.25 11.63 -54.36 -10.44 +786 NaN NaN NaN NaN -31.59 11.87 -61.27 -15.69 +787 NaN NaN NaN NaN -41.56 12.46 -72.15 -23.61 +788 NaN NaN NaN NaN -54.67 13.48 -87.77 -33.61 +789 NaN NaN NaN NaN -67.49 13.35 -96.99 -44.85 +790 NaN NaN NaN NaN -79.84 12.08 -102.8 -56.52 +791 NaN NaN NaN NaN -86.47 10.82 -106.83 -64.92 +792 NaN NaN NaN NaN -87.48 9.95 -107.39 -69.51 +793 NaN NaN NaN NaN -86.61 10.48 -112.01 -71.38 +794 NaN NaN NaN NaN -88.16 11.22 -116.26 -72.14 +795 NaN NaN NaN NaN -93.19 11.18 -118.5 -73.3 +796 NaN NaN NaN NaN -95.67 11.11 -119.16 -74.88 +797 NaN NaN NaN NaN -93.05 10.78 -117.79 -74.96 +798 NaN NaN NaN NaN -92.37 10.08 -114.68 -75.73 diff --git a/inst/rawdata_scripts/data_files/variable_table.csv b/inst/rawdata_scripts/data_files/variable_table.csv index 12791c64..ca1cbf4b 100644 --- a/inst/rawdata_scripts/data_files/variable_table.csv +++ b/inst/rawdata_scripts/data_files/variable_table.csv @@ -1,48 +1,168 @@ -variable,ncvar,dataset,monthly,file_name,download_path,file_name_orig,download_path_orig -bio01,BIO1,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio04,BIO4,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio05,BIO5,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio06,BIO6,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio07,BIO7,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio08,BIO8,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio09,BIO9,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio10,BIO10,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio11,BIO11,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio12,BIO12,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio13,BIO13,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio14,BIO14,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio15,BIO15,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio16,BIO16,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio17,BIO17,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio18,BIO18,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio19,BIO19,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -npp,npp,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -lai,lai,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -biome,biome,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -altitude,altitude,Beyer2020,FALSE,Beyer2020_topography_v1.0.0.nc,https://figshare.com/ndownloader/files/35059984,, -rugosity,rugosity,Beyer2020,FALSE,Beyer2020_topography_v1.0.0.nc,https://figshare.com/ndownloader/files/35059984,, -bio01,bio01,Krapp2021,FALSE,Krapp2021_bio01_v1.0.0.nc,https://figshare.com/ndownloader/files/35076685,bio01_800ka.nc,https://osf.io/a39gh/?action=download -bio04,bio04,Krapp2021,FALSE,Krapp2021_bio04_v1.0.0.nc,https://figshare.com/ndownloader/files/35076688,bio04_800ka.nc,https://osf.io/p82ue/?action=download -bio05,bio05,Krapp2021,FALSE,Krapp2021_bio05_v1.0.0.nc,https://figshare.com/ndownloader/files/35076691,bio05_800ka.nc,https://osf.io/emhp9/?action=download -bio06,bio06,Krapp2021,FALSE,Krapp2021_bio06_v1.0.0.nc,https://figshare.com/ndownloader/files/35076694,bio06_800ka.nc,https://osf.io/cm923/?action=download -bio07,bio07,Krapp2021,FALSE,Krapp2021_bio07_v1.0.0.nc,https://figshare.com/ndownloader/files/35076697,bio07_800ka.nc,https://osf.io/prq8n/?action=download -bio08,bio08,Krapp2021,FALSE,Krapp2021_bio08_v1.0.0.nc,https://figshare.com/ndownloader/files/35076700,bio08_800ka.nc,https://osf.io/7jsa8/?action=download -bio09,bio09,Krapp2021,FALSE,Krapp2021_bio09_v1.0.0.nc,https://figshare.com/ndownloader/files/35127502,bio09_800ka.nc,https://osf.io/zaxku/?action=download -bio10,bio10,Krapp2021,FALSE,Krapp2021_bio10_v1.0.0.nc,https://figshare.com/ndownloader/files/35127403,bio10_800ka.nc,https://osf.io/b3kx8/?action=download -bio11,bio11,Krapp2021,FALSE,Krapp2021_bio11_v1.0.0.nc,https://figshare.com/ndownloader/files/35127406,bio11_800ka.nc,https://osf.io/vaune/?action=download -bio12,bio12,Krapp2021,FALSE,Krapp2021_bio12_v1.0.0.nc,https://figshare.com/ndownloader/files/35127412,bio12_800ka.nc,https://osf.io/kg9v6/?action=download -bio13,bio13,Krapp2021,FALSE,Krapp2021_bio13_v1.0.0.nc,https://figshare.com/ndownloader/files/35127415,bio13_800ka.nc,https://osf.io/2u5c6/?action=download -bio14,bio14,Krapp2021,FALSE,Krapp2021_bio14_v1.0.0.nc,https://figshare.com/ndownloader/files/35127421,bio14_800ka.nc,https://osf.io/z2ewu/?action=download -bio15,bio15,Krapp2021,FALSE,Krapp2021_bio15_v1.0.0.nc,https://figshare.com/ndownloader/files/35127463,bio15_800ka.nc,https://osf.io/z52xr/?action=download -bio16,bio16,Krapp2021,FALSE,Krapp2021_bio16_v1.0.0.nc,https://figshare.com/ndownloader/files/35127466,bio16_800ka.nc,https://osf.io/kn8ma/?action=download -bio17,bio17,Krapp2021,FALSE,Krapp2021_bio17_v1.0.0.nc,https://figshare.com/ndownloader/files/35127469,bio17_800ka.nc,https://osf.io/2z8ej/?action=download -bio18,bio18,Krapp2021,FALSE,Krapp2021_bio18_v1.0.0.nc,https://figshare.com/ndownloader/files/35127481,bio18_800ka.nc,https://osf.io/a2uhm/?action=download -bio19,bio19,Krapp2021,FALSE,Krapp2021_bio19_v1.0.0.nc,https://figshare.com/ndownloader/files/35127487,bio19_800ka.nc,https://osf.io/3mbd9/?action=download -npp,npp,Krapp2021,FALSE,Krapp2021_npp_v1.0.0.nc,https://figshare.com/ndownloader/files/35127493,biome4output_800ka.nc,https://osf.io/cf5zp/?action=download -biome,biome,Krapp2021,FALSE,Krapp2021_biome_v1.0.0.nc,https://figshare.com/ndownloader/files/35127490,biome4output_800ka.nc,https://osf.io/cf5zp/?action=download -altitude,altitude,Krapp2021,FALSE,Krapp2021_topography_v1.0.0.nc,https://figshare.com/ndownloader/files/35127499,, -rugosity,rugosity,Krapp2021,FALSE,Krapp2021_topography_v1.0.0.nc,https://figshare.com/ndownloader/files/35127499,, -bio01,BIO1,Example,FALSE,example_climate.nc,,, -bio10,BIO10,Example,FALSE,example_climate.nc,,, -bio12,BIO12,Example,FALSE,example_climate.nc,,, -biome,biome,Example,FALSE,example_climate.nc,,, +variable,ncvar,dataset,monthly,file_name,download_path,file_name_orig,download_path_orig,version +bio01,BIO1,Example,FALSE,example_climate.nc,,,,1.1.0 +bio10,BIO10,Example,FALSE,example_climate.nc,,,,1.1.0 +bio12,BIO12,Example,FALSE,example_climate.nc,,,,1.1.0 +biome,biome,Example,FALSE,example_climate.nc,,,,1.1.0 +bio01,bio01,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio04,bio04,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio05,bio05,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio06,bio06,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio07,bio07,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio08,bio08,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio09,bio09,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio10,bio10,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio11,bio11,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio12,bio12,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio13,bio13,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio14,bio14,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio15,bio15,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio16,bio16,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio17,bio17,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio18,bio18,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio19,bio19,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +npp,npp,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +lai,lai,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +biome,biome,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +altitude,altitude,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,,,1.1.0 +rugosity,rugosity,Beyer2020,FALSE,Beyer2020_annual_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_annual_vars_v1.1.0.nc?download=1,,,1.1.0 +temperature_01,temperature_01,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_02,temperature_02,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_03,temperature_03,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_04,temperature_04,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_05,temperature_05,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_06,temperature_06,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_07,temperature_07,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_08,temperature_08,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_09,temperature_09,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_10,temperature_10,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_11,temperature_11,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +temperature_12,temperature_12,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_01,precipitation_01,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_02,precipitation_02,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_03,precipitation_03,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_04,precipitation_04,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_05,precipitation_05,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_06,precipitation_06,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_07,precipitation_07,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_08,precipitation_08,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_09,precipitation_09,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_10,precipitation_10,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_11,precipitation_11,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +precipitation_12,precipitation_12,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_01,cloudiness_01,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_02,cloudiness_02,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_03,cloudiness_03,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_04,cloudiness_04,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_05,cloudiness_05,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_06,cloudiness_06,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_07,cloudiness_07,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_08,cloudiness_08,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_09,cloudiness_09,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_10,cloudiness_10,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_11,cloudiness_11,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +cloudiness_12,cloudiness_12,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_01,relative_humidity_01,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_02,relative_humidity_02,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_03,relative_humidity_03,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_04,relative_humidity_04,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_05,relative_humidity_05,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_06,relative_humidity_06,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_07,relative_humidity_07,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_08,relative_humidity_08,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_09,relative_humidity_09,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_10,relative_humidity_10,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_11,relative_humidity_11,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +relative_humidity_12,relative_humidity_12,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_01,wind_speed_01,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_02,wind_speed_02,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_03,wind_speed_03,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_04,wind_speed_04,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_05,wind_speed_05,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_06,wind_speed_06,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_07,wind_speed_07,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_08,wind_speed_08,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_09,wind_speed_09,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_10,wind_speed_10,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_11,wind_speed_11,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +wind_speed_12,wind_speed_12,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_01,mo_npp_01,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_02,mo_npp_02,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_03,mo_npp_03,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_04,mo_npp_04,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_05,mo_npp_05,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_06,mo_npp_06,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_07,mo_npp_07,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_08,mo_npp_08,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_09,mo_npp_09,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_10,mo_npp_10,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_11,mo_npp_11,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +mo_npp_12,mo_npp_12,Beyer2020,TRUE,Beyer2020_monthly_vars_v1.1.0.nc,https://zenodo.org/record/7062281/files/Beyer2020_monthly_vars_v1.1.0.nc?download=1,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026,1.1.0 +bio01,bio01,Krapp2021,FALSE,Krapp2021_bio01_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio01_v1.0.0.nc?download=1,bio01_800ka.nc,https://osf.io/a39gh/?action=download,1.1.0 +bio04,bio04,Krapp2021,FALSE,Krapp2021_bio04_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio04_v1.0.0.nc?download=1,bio04_800ka.nc,https://osf.io/p82ue/?action=download,1.1.0 +bio05,bio05,Krapp2021,FALSE,Krapp2021_bio05_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio05_v1.0.0.nc?download=1,bio05_800ka.nc,https://osf.io/emhp9/?action=download,1.1.0 +bio06,bio06,Krapp2021,FALSE,Krapp2021_bio06_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio06_v1.0.0.nc?download=1,bio06_800ka.nc,https://osf.io/cm923/?action=download,1.1.0 +bio07,bio07,Krapp2021,FALSE,Krapp2021_bio07_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio07_v1.0.0.nc?download=1,bio07_800ka.nc,https://osf.io/prq8n/?action=download,1.1.0 +bio08,bio08,Krapp2021,FALSE,Krapp2021_bio08_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio08_v1.0.0.nc?download=1,bio08_800ka.nc,https://osf.io/7jsa8/?action=download,1.1.0 +bio09,bio09,Krapp2021,FALSE,Krapp2021_bio09_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio09_v1.0.0.nc?download=1,bio09_800ka.nc,https://osf.io/zaxku/?action=download,1.1.0 +bio10,bio10,Krapp2021,FALSE,Krapp2021_bio10_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio10_v1.0.0.nc?download=1,bio10_800ka.nc,https://osf.io/b3kx8/?action=download,1.1.0 +bio11,bio11,Krapp2021,FALSE,Krapp2021_bio11_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio11_v1.0.0.nc?download=1,bio11_800ka.nc,https://osf.io/vaune/?action=download,1.1.0 +bio12,bio12,Krapp2021,FALSE,Krapp2021_bio12_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio12_v1.0.0.nc?download=1,bio12_800ka.nc,https://osf.io/kg9v6/?action=download,1.1.0 +bio13,bio13,Krapp2021,FALSE,Krapp2021_bio13_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio13_v1.0.0.nc?download=1,bio13_800ka.nc,https://osf.io/2u5c6/?action=download,1.1.0 +bio14,bio14,Krapp2021,FALSE,Krapp2021_bio14_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio14_v1.0.0.nc?download=1,bio14_800ka.nc,https://osf.io/z2ewu/?action=download,1.1.0 +bio15,bio15,Krapp2021,FALSE,Krapp2021_bio15_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio15_v1.0.0.nc?download=1,bio15_800ka.nc,https://osf.io/z52xr/?action=download,1.1.0 +bio16,bio16,Krapp2021,FALSE,Krapp2021_bio16_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio16_v1.0.0.nc?download=1,bio16_800ka.nc,https://osf.io/kn8ma/?action=download,1.1.0 +bio17,bio17,Krapp2021,FALSE,Krapp2021_bio17_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio17_v1.0.0.nc?download=1,bio17_800ka.nc,https://osf.io/2z8ej/?action=download,1.1.0 +bio18,bio18,Krapp2021,FALSE,Krapp2021_bio18_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio18_v1.0.0.nc?download=1,bio18_800ka.nc,https://osf.io/a2uhm/?action=download,1.1.0 +bio19,bio19,Krapp2021,FALSE,Krapp2021_bio19_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_bio19_v1.0.0.nc?download=1,bio19_800ka.nc,https://osf.io/3mbd9/?action=download,1.1.0 +npp,npp,Krapp2021,FALSE,Krapp2021_npp_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_biome_v1.0.0.nc?download=1,biome4output_800ka.nc,https://osf.io/cf5zp/?action=download,1.1.0 +biome,biome,Krapp2021,FALSE,Krapp2021_biome_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_biome_v1.0.0.nc?download=1,biome4output_800ka.nc,https://osf.io/cf5zp/?action=download,1.1.0 +altitude,altitude,Krapp2021,FALSE,Krapp2021_topography_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_topography_v1.0.0.nc?download=1,,,1.1.0 +rugosity,rugosity,Krapp2021,FALSE,Krapp2021_topography_v1.0.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_topography_v1.0.0.nc?download=1,,,1.1.0 +temperature_01,temp_01,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_02,temp_02,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_03,temp_03,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_04,temp_04,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_05,temp_05,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_06,temp_06,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_07,temp_07,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_08,temp_08,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_09,temp_09,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_10,temp_10,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_11,temp_11,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +temperature_12,temp_12,Krapp2021,TRUE,Krapp2021_temp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_temp_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_01,prec_01,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_02,prec_02,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_03,prec_03,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_04,prec_04,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_05,prec_05,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_06,prec_06,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_07,prec_07,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_08,prec_08,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_09,prec_09,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_10,prec_10,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_11,prec_11,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +precipitation_12,prec_12,Krapp2021,TRUE,Krapp2021_prec_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_prec_monthly_v1.1.0.nc?download=1,,,1.1.0 +mo_npp_01,mo_npp_01,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_02,mo_npp_02,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_03,mo_npp_03,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_04,mo_npp_04,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_05,mo_npp_05,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_06,mo_npp_06,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_07,mo_npp_07,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_08,mo_npp_08,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_09,mo_npp_09,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_10,mo_npp_10,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_11,mo_npp_11,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +mo_npp_12,mo_npp_12,Krapp2021,TRUE,Krapp2021_npp_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_npp_v1.0.0.nc?download=1,,,1.1.0 +cloudiness_01,tcc_01,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_02,tcc_02,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_03,tcc_03,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_04,tcc_04,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_05,tcc_05,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_06,tcc_06,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_07,tcc_07,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_08,tcc_08,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_09,tcc_09,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_10,tcc_10,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_11,tcc_11,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 +cloudiness_12,tcc_12,Krapp2021,TRUE,Krapp2021_tcc_monthly_v1.1.0.nc,https://zenodo.org/record/7065055/files/Krapp2021_tcc_monthly_v1.1.0.nc?download=1,,,1.1.0 diff --git a/inst/rawdata_scripts/data_files/variable_table_old.csv b/inst/rawdata_scripts/data_files/variable_table_old.csv index 6a95b06f..12791c64 100644 --- a/inst/rawdata_scripts/data_files/variable_table_old.csv +++ b/inst/rawdata_scripts/data_files/variable_table_old.csv @@ -1,55 +1,48 @@ variable,ncvar,dataset,monthly,file_name,download_path,file_name_orig,download_path_orig -bio01,BIO1,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio04,BIO4,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio05,BIO5,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio06,BIO6,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio07,BIO7,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio08,BIO8,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio09,BIO9,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio10,BIO10,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio11,BIO11,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio12,BIO12,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio13,BIO13,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio14,BIO14,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio15,BIO15,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio16,BIO16,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio17,BIO17,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio18,BIO18,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -bio19,BIO19,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -npp,npp,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -lai,lai,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -temperature_monthly,temperature,Beyer2020,TRUE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -precipitation_monthly,precipitation,Beyer2020,TRUE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -cloudiness_monthly,cloudiness,Beyer2020,TRUE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -relative_humidity_monthly,relative_humidity,Beyer2020,TRUE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -wind_speed_monthly,wind_speed,Beyer2020,TRUE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -temperature_min,min_temperature,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -temperature_max,max_temperature,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -biome,biome,Beyer2020,FALSE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 -npp_monthly,mo_npp,Beyer2020,TRUE,LateQuaternary_Environment_rm_ice_int_seas.nc,https://figshare.com/ndownloader/files/33981851?private_link=d2cd87524fa0237f3cc7,LateQuaternary_MonthlyNPP.nc,https://ndownloader.figshare.com/files/28567032 -bio01,bio01,Krapp2021,FALSE,bio01_800ka.nc,https://osf.io/a39gh/?action=download,, -bio04,bio04,Krapp2021,FALSE,bio04_800ka.nc,https://osf.io/p82ue/?action=download,, -bio05,bio05,Krapp2021,FALSE,bio05_800ka.nc,https://osf.io/emhp9/?action=download,, -bio06,bio06,Krapp2021,FALSE,bio06_800ka.nc,https://osf.io/cm923/?action=download,, -bio07,bio07,Krapp2021,FALSE,bio07_800ka.nc,https://osf.io/prq8n/?action=download,, -bio08,bio08,Krapp2021,FALSE,bio08_800ka.nc,https://osf.io/7jsa8/?action=download,, -bio09,bio09,Krapp2021,FALSE,bio09_800ka.nc,https://osf.io/zaxku/?action=download,, -bio10,bio10,Krapp2021,FALSE,bio10_800ka.nc,https://osf.io/b3kx8/?action=download,, -bio11,bio11,Krapp2021,FALSE,bio11_800ka.nc,https://osf.io/vaune/?action=download,, -bio12,bio12,Krapp2021,FALSE,bio12_800ka.nc,https://osf.io/kg9v6/?action=download,, -bio13,bio13,Krapp2021,FALSE,bio13_800ka.nc,https://osf.io/2u5c6/?action=download,, -bio14,bio14,Krapp2021,FALSE,bio14_800ka.nc,https://osf.io/z2ewu/?action=download,, -bio15,bio15,Krapp2021,FALSE,bio15_800ka.nc,https://osf.io/z52xr/?action=download,, -bio16,bio16,Krapp2021,FALSE,bio16_800ka.nc,https://osf.io/kn8ma/?action=download,, -bio17,bio17,Krapp2021,FALSE,bio17_800ka.nc,https://osf.io/2z8ej/?action=download,, -bio18,bio18,Krapp2021,FALSE,bio18_800ka.nc,https://osf.io/a2uhm/?action=download,, -bio19,bio19,Krapp2021,FALSE,bio19_800ka.nc,https://osf.io/3mbd9/?action=download,, +bio01,BIO1,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio04,BIO4,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio05,BIO5,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio06,BIO6,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio07,BIO7,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio08,BIO8,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio09,BIO9,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio10,BIO10,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio11,BIO11,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio12,BIO12,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio13,BIO13,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio14,BIO14,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio15,BIO15,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio16,BIO16,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio17,BIO17,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio18,BIO18,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +bio19,BIO19,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +npp,npp,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +lai,lai,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +biome,biome,Beyer2020,FALSE,Beyer2020_all_vars_v1.0.0.nc,https://figshare.com/ndownloader/files/35116444,LateQuaternary_Environment.nc,https://ndownloader.figshare.com/files/22659026 +altitude,altitude,Beyer2020,FALSE,Beyer2020_topography_v1.0.0.nc,https://figshare.com/ndownloader/files/35059984,, +rugosity,rugosity,Beyer2020,FALSE,Beyer2020_topography_v1.0.0.nc,https://figshare.com/ndownloader/files/35059984,, +bio01,bio01,Krapp2021,FALSE,Krapp2021_bio01_v1.0.0.nc,https://figshare.com/ndownloader/files/35076685,bio01_800ka.nc,https://osf.io/a39gh/?action=download +bio04,bio04,Krapp2021,FALSE,Krapp2021_bio04_v1.0.0.nc,https://figshare.com/ndownloader/files/35076688,bio04_800ka.nc,https://osf.io/p82ue/?action=download +bio05,bio05,Krapp2021,FALSE,Krapp2021_bio05_v1.0.0.nc,https://figshare.com/ndownloader/files/35076691,bio05_800ka.nc,https://osf.io/emhp9/?action=download +bio06,bio06,Krapp2021,FALSE,Krapp2021_bio06_v1.0.0.nc,https://figshare.com/ndownloader/files/35076694,bio06_800ka.nc,https://osf.io/cm923/?action=download +bio07,bio07,Krapp2021,FALSE,Krapp2021_bio07_v1.0.0.nc,https://figshare.com/ndownloader/files/35076697,bio07_800ka.nc,https://osf.io/prq8n/?action=download +bio08,bio08,Krapp2021,FALSE,Krapp2021_bio08_v1.0.0.nc,https://figshare.com/ndownloader/files/35076700,bio08_800ka.nc,https://osf.io/7jsa8/?action=download +bio09,bio09,Krapp2021,FALSE,Krapp2021_bio09_v1.0.0.nc,https://figshare.com/ndownloader/files/35127502,bio09_800ka.nc,https://osf.io/zaxku/?action=download +bio10,bio10,Krapp2021,FALSE,Krapp2021_bio10_v1.0.0.nc,https://figshare.com/ndownloader/files/35127403,bio10_800ka.nc,https://osf.io/b3kx8/?action=download +bio11,bio11,Krapp2021,FALSE,Krapp2021_bio11_v1.0.0.nc,https://figshare.com/ndownloader/files/35127406,bio11_800ka.nc,https://osf.io/vaune/?action=download +bio12,bio12,Krapp2021,FALSE,Krapp2021_bio12_v1.0.0.nc,https://figshare.com/ndownloader/files/35127412,bio12_800ka.nc,https://osf.io/kg9v6/?action=download +bio13,bio13,Krapp2021,FALSE,Krapp2021_bio13_v1.0.0.nc,https://figshare.com/ndownloader/files/35127415,bio13_800ka.nc,https://osf.io/2u5c6/?action=download +bio14,bio14,Krapp2021,FALSE,Krapp2021_bio14_v1.0.0.nc,https://figshare.com/ndownloader/files/35127421,bio14_800ka.nc,https://osf.io/z2ewu/?action=download +bio15,bio15,Krapp2021,FALSE,Krapp2021_bio15_v1.0.0.nc,https://figshare.com/ndownloader/files/35127463,bio15_800ka.nc,https://osf.io/z52xr/?action=download +bio16,bio16,Krapp2021,FALSE,Krapp2021_bio16_v1.0.0.nc,https://figshare.com/ndownloader/files/35127466,bio16_800ka.nc,https://osf.io/kn8ma/?action=download +bio17,bio17,Krapp2021,FALSE,Krapp2021_bio17_v1.0.0.nc,https://figshare.com/ndownloader/files/35127469,bio17_800ka.nc,https://osf.io/2z8ej/?action=download +bio18,bio18,Krapp2021,FALSE,Krapp2021_bio18_v1.0.0.nc,https://figshare.com/ndownloader/files/35127481,bio18_800ka.nc,https://osf.io/a2uhm/?action=download +bio19,bio19,Krapp2021,FALSE,Krapp2021_bio19_v1.0.0.nc,https://figshare.com/ndownloader/files/35127487,bio19_800ka.nc,https://osf.io/3mbd9/?action=download +npp,npp,Krapp2021,FALSE,Krapp2021_npp_v1.0.0.nc,https://figshare.com/ndownloader/files/35127493,biome4output_800ka.nc,https://osf.io/cf5zp/?action=download +biome,biome,Krapp2021,FALSE,Krapp2021_biome_v1.0.0.nc,https://figshare.com/ndownloader/files/35127490,biome4output_800ka.nc,https://osf.io/cf5zp/?action=download +altitude,altitude,Krapp2021,FALSE,Krapp2021_topography_v1.0.0.nc,https://figshare.com/ndownloader/files/35127499,, +rugosity,rugosity,Krapp2021,FALSE,Krapp2021_topography_v1.0.0.nc,https://figshare.com/ndownloader/files/35127499,, bio01,BIO1,Example,FALSE,example_climate.nc,,, bio10,BIO10,Example,FALSE,example_climate.nc,,, bio12,BIO12,Example,FALSE,example_climate.nc,,, biome,biome,Example,FALSE,example_climate.nc,,, -npp,npp,Krapp2021,FALSE,biome4output_800ka.nc,https://osf.io/cf5zp/?action=download,, -pc02,pco2,Krapp2021,FALSE,biome4output_800ka.nc,https://osf.io/cf5zp/?action=download,, -biome,biome,Krapp2021,FALSE,biome4output_800ka.nc,https://osf.io/cf5zp/?action=download,, -precipitation,prec,Krapp2021,FALSE,prec_800ka_ann.nc,https://osf.io/g7sb5/?action=download,, -temperature,temp,Krapp2021,FALSE,temp_800ka_ann.nc,https://osf.io/7m94u/?action=download,, diff --git a/inst/rawdata_scripts/extract_topography_for_beyer2020_part1.R b/inst/rawdata_scripts/extract_topography_for_beyer2020_part1.R index 041bd1e8..471b0afe 100644 --- a/inst/rawdata_scripts/extract_topography_for_beyer2020_part1.R +++ b/inst/rawdata_scripts/extract_topography_for_beyer2020_part1.R @@ -25,7 +25,7 @@ problematic_cells <- list() library(terra) for (i in time_steps_bp) { - time_step_row <- -(i / 1000) + 1 + time_step_row <- - (i / 1000) + 1 # now check neighbours of each boundary cell, and expand out if < sea level sea_level_now <- sea_level$SeaLev_longPC1[time_step_row] diff --git a/inst/rawdata_scripts/extract_topography_for_krapp2021_part1.R b/inst/rawdata_scripts/extract_topography_for_krapp2021_part1.R index 15631e82..5e3de64b 100644 --- a/inst/rawdata_scripts/extract_topography_for_krapp2021_part1.R +++ b/inst/rawdata_scripts/extract_topography_for_krapp2021_part1.R @@ -47,7 +47,7 @@ time_steps_bp <- time_steps_bp[!is.na(time_steps_bp)] for (i in time_steps_bp) { cat(i) - time_step_row <- -(i / 1000) + 1 + time_step_row <- - (i / 1000) + 1 # now check neighbours of each boundary cell, and expand out if < sea level sea_level_now <- sea_level$SeaLev_longPC1[time_step_row] diff --git a/inst/rawdata_scripts/readme.md b/inst/rawdata_scripts/readme.md index 959c9861..691cd74e 100644 --- a/inst/rawdata_scripts/readme.md +++ b/inst/rawdata_scripts/readme.md @@ -4,7 +4,9 @@ This files provides an overivew of the scripts used to generate the data used in 1. `create_internal_seas_raster.R` generates a mask for internal seas (Caspian and Black sea) which are not removed in some reconstructions. We use a fix outline over time, as there are no good reconstructions through time of their depth levels. Based on `shapefiles_internal_seas.zip` This is used when editing the `beyer2020` dataset. -2. `repackage_beyer2020.sh` script to repackage the `beyer2020` data for use in `pastclim` (it needs the internal sea file created by 1.). +2. `repackage_beyer2020.sh` script to repackage the `beyer2020` data for use in `pastclim` (it needs the internal sea file created by 1.). This script calls +`repackage_beyer2020_split_annual_monthly.R`, which splits the annual and monthly +variables into two separate files. 3. `create_example_dataset.sh` script to create an example dataset by subsetting `beyer2020` (it needs the file created by 2.). diff --git a/inst/rawdata_scripts/repackage_beyer2020.sh b/inst/rawdata_scripts/repackage_beyer2020.sh index d3fda527..2756b14c 100755 --- a/inst/rawdata_scripts/repackage_beyer2020.sh +++ b/inst/rawdata_scripts/repackage_beyer2020.sh @@ -3,9 +3,6 @@ # first download the two nc files into the directory `/temp_files/beyer` # then create internal_seas.nc with `create_internal_seas_raster.R` # then run this shell script from `/temp_files/beyer` -# -# note that we add the monthly npp data into the main file, even though -# we don't use it right now ## fix units ncatted -a units,longitude,m,c,"degrees_east" -a units,latitude,m,c,"degrees_north" LateQuaternary_Environment.nc LateQuaternary_Environment_u.nc @@ -45,3 +42,5 @@ ncatted -a Contact,global,d,, -a Citation,global,d,, -a Title,global,d,, -h Beye ncatted -a command_line,global,c,c,"./inst/rawdata_scripts/repackage_beyer2020.sh" -h Beyer2020_all_vars_v1.0.0.nc rm Beyer2020_all_vars.nc + +Rscript ../../repackage_beyer2020_split_annual_monthly.R diff --git a/inst/rawdata_scripts/repackage_beyer2020_split_annual_monthly.R b/inst/rawdata_scripts/repackage_beyer2020_split_annual_monthly.R new file mode 100644 index 00000000..ca3ddc79 --- /dev/null +++ b/inst/rawdata_scripts/repackage_beyer2020_split_annual_monthly.R @@ -0,0 +1,72 @@ +library(ClimateOperators) +library(ncdf4) +# annual variables +select_string <- "-select,name=biome,npp,lai,BIO1,BIO4,BIO5,BIO6,BIO7,BIO8,BIO9,BIO10,BIO11,BIO12,BIO13,BIO14,BIO15,BIO16,BIO17,BIO18,BIO19" +cdo("-z zip_9",select_string,"Beyer2020_all_vars_v1.0.0.nc","Beyer2020_annual_vars_v1.1.0_temp.nc") +nc_in<-ncdf4::nc_open("Beyer2020_annual_vars_v1.1.0_temp.nc",write=TRUE) +ncdf4::ncatt_put(nc_in,varid="time", attname = "units",attval = "years since 1950-01-01 00:00:00.0") +ncdf4::ncatt_put(nc_in,varid="time", attname = "long_name",attval = "years BP") +ncdf4::nc_close(nc_in) + +nc_in<-ncdf4::nc_open("Beyer2020_topography_v1.0.0.nc",write=TRUE) +ncdf4::ncvar_put(nc_in,varid="time",vals=get_time_steps("custom","Beyer2020_annual_vars_v1.1.0_temp.nc")) +ncdf4::ncatt_put(nc_in,varid="time", attname = "units",attval = "years since 1950-01-01 00:00:00.0") +ncdf4::ncatt_put(nc_in,varid="time", attname = "long_name",attval = "years BP") +ncdf4::nc_close(nc_in) + +cdo("-z zip_9 merge Beyer2020_annual_vars_v1.1.0_temp.nc Beyer2020_topography_v1.0.0.nc Beyer2020_annual_vars_v1.1.0.nc") +nc_in<-ncdf4::nc_open("Beyer2020_annual_vars_v1.1.0.nc",write=TRUE) +old_vars<-c('BIO1','BIO4','BIO5','BIO6','BIO7','BIO8','BIO9','BIO10','BIO11','BIO12','BIO13','BIO14','BIO15','BIO16','BIO17','BIO18','BIO19') +new_vars<-c('bio01','bio04','bio05','bio06','bio07','bio08','bio09','bio10','bio11','bio12','bio13','bio14','bio15','bio16','bio17','bio18','bio19') +nc_in<-ncdf4::nc_open("Beyer2020_annual_vars_v1.1.0.nc",write=TRUE) +for (i in 1:length(old_vars)){ + nc_in<-ncdf4::ncvar_rename(nc_in, old_varname = old_vars[i], + new_varname = new_vars[i]) +} +ncdf4::ncatt_put(nc_in, varid = 0, attname = "description", + attval = "Annual variables from Beyer et al 2020, with icesheets and internal seas removed, to be used by the R library pastclim") +ncdf4::ncatt_put(nc_in, varid = 0, attname = "pastclim_version", + attval="1.1.0") +ncdf4::ncatt_put(nc_in, varid = 0, attname = "history", + attval="") +ncdf4::nc_close(nc_in) + +###################################### +# monthly variables +select_string <- "-select,name=temperature,precipitation,cloudiness,relative_humidity,wind_speed,mo_npp" +cdo("-z zip_9",select_string,"Beyer2020_all_vars_v1.0.0.nc","Beyer2020_monthly_vars_temp.nc") +cdo("splitlevel","Beyer2020_monthly_vars_temp.nc","Beyer2020_monthly") +for (i in 1:12){ + if (i<10){ + month_id<-paste0("0",i) + } else { + month_id<-i + } + file_name<-paste0("Beyer2020_monthly","0000",month_id) + cdo("vertsum",paste0(file_name,".nc"),paste0(file_name,"s.nc")) + nc_in<-ncdf4::nc_open(paste0(file_name,"s.nc"),write=TRUE) + var_names <- names(nc_in$var) + for (this_var in var_names){ + this_var_long <- paste(month.name[i], + ncdf4::ncatt_get(nc_in, this_var, attname="long_name")$value) + ncdf4::ncatt_put(nc_in, this_var, attname="long_name",attval=this_var_long, + prec="text") + nc_in<-ncdf4::ncvar_rename(nc_in,this_var,paste0(this_var,"_",month_id)) + } + ncdf4::nc_close(nc_in) +} + +cdo ("-z zip_9", "merge","*s.nc","Beyer2020_monthly_vars_v1.1.0.nc") + +nc_in<-ncdf4::nc_open("Beyer2020_monthly_vars_v1.1.0.nc",write=TRUE) +ncdf4::ncatt_put(nc_in, varid = 0, attname = "description", + attval = "Monthly variables from Beyer et al 2020, with icesheets and internal seas removed, to be used by the R library pastclim") +ncdf4::ncatt_put(nc_in, varid = 0, attname = "pastclim_version", + attval="1.1.0") +ncdf4::ncatt_put(nc_in, varid = 0, attname = "history", + attval="") +ncdf4::ncatt_put(nc_in,varid="time", attname = "units",attval = "years since 1950-01-01 00:00:00.0") +ncdf4::ncatt_put(nc_in,varid="time", attname = "long_name",attval = "years BP") +ncdf4::nc_close(nc_in) +unlink("Beyer2020_monthly0*") +unlink("Beyer2020_monthly_vars_temp.nc") diff --git a/inst/rawdata_scripts/verify_completeness_of_variables.R b/inst/rawdata_scripts/verify_completeness_of_variables.R index c7c7fb41..bc80a64b 100644 --- a/inst/rawdata_scripts/verify_completeness_of_variables.R +++ b/inst/rawdata_scripts/verify_completeness_of_variables.R @@ -1,8 +1,10 @@ # this script check that we have values for the same cells across all variables dataset <- "Krapp2021" library(pastclim) -this_path <- pastclim::get_pastclimdata_path() -vars_for_dataset <- pastclim:::get_file_for_dataset(get_vars_for_dataset(dataset), dataset) +download_dataset(dataset=dataset) +this_path <- pastclim::get_data_path() +vars_for_dataset <- pastclim:::get_file_for_dataset( + get_vars_for_dataset(dataset), dataset) file1 <- ncdf4::nc_open(paste0(this_path, "/", vars_for_dataset$file_name[1])) n_steps <- file1$dim$time$len @@ -26,4 +28,19 @@ for (i in seq_len(nrow(vars_for_dataset))) { n_uniques <- function(x) { length(unique(x)) } +# expect this to generate all 1s apply(n_nas, 2, n_uniques) + +# check time vars +time_steps<-get_time_steps("custom",paste0(this_path, "/", vars_for_dataset$file_name[1])) +# check that the time steps are what we expect +time_steps +# and now check that all files have the same steps +for (i in seq.int(from=2, to=nrow(vars_for_dataset))) { + time_steps_2<-get_time_steps("custom",paste0(this_path, "/", vars_for_dataset$file_name[i])) + if(!all(time_steps==time_steps_2)){ + stop("file ", i, "is problematic") + } +} + + \ No newline at end of file diff --git a/inst/temp/_delta_downscale.R b/inst/temp/_delta_downscale.R new file mode 100644 index 00000000..3ebf184a --- /dev/null +++ b/inst/temp/_delta_downscale.R @@ -0,0 +1,79 @@ +# x_modern the modern climate reconstruction +# high_res_obs the observed high resolution data used to create the delta + +delta_compute <- function(x_modern, high_res_obs) { + if (terra::ext(high_res_obs)!=terra::ext(x_modern)){ + stop("x_modern and high_res_obs don't have the same extent") + } + # disaggregate the x_modern SpatRaster to the resolution of + # the high res with "near" + x_modern_high<-disagg(x_modern, fact = terra::res( x_modern)/terra::res(high_res_obs), + method="near") + # compute anomalies against the modern + delta <- x_modern_high - high_res_obs + return(delta) +} + + +# steps for delta downscaling in areas without info +# check Roberts or Mario's paper + + + +delta_downscale <- function(x, delta_rast, time_point, sea_level_path, x_ice, x_landmask_high) { + # check that extent and resolutions are compatible + + # create a land mask and remove the ice + + # sea level https://www.ncdc.noaa.gov/paleo-search/study/19982 + etopo1 <- terra::rast("ETOPO1_Ice_c_gmt4.grd") + sea_level <- read.table("spratt2016.txt", header = TRUE, row.names = 1) + + #system.file("extdata/sea_level_spratt2016.txt",data="package") + + # downscale x with near + x_high<-disagg(x, fact = terra::res( x)/terra::res(delta_rast), + method="near") + + # adjust the land area based on sea level + + # expand with bilinear for areas without information for both x and delta_rast + + # apply the delta_rast to x +} + +# create mask for sea level +sea_level_mask <- function(topography_rast, sea_level) { + + +} + + + + + +eaf <- extent(30, 55, -15, 20) +r <- rast() +e <- ext(r) +as.vector(e) +as.character(e) + +ext(r) <- c(0, 2.5, 0, 1.5) +af_precip <- crop(bio12_rasterbrick, eaf) # crop to africa + + +eaf <- terra::ext(30, 55, -15, 20) + +etopo1 <- terra::rast("ETOPO1_Ice_c_gmt4.grd") +etopo30 <- terra::agg(etopo1, fact = 30) + + +bi <- terra::boundaries(land_mask) +bi_up <- terra::disagg(bi, fact = 30) + + +## create a sea level mask (ideally on full data), setting +## land to a recogniseable value (e.g. -99999) +## first mask the raster based based on sea level mask +## the cover the raster based on sea level mask +## now find values that were covered (i.e. -99999) and interpolate them \ No newline at end of file diff --git a/inst/temp/_delta_downscale_2.R b/inst/temp/_delta_downscale_2.R new file mode 100644 index 00000000..ea17f51b --- /dev/null +++ b/inst/temp/_delta_downscale_2.R @@ -0,0 +1,153 @@ +# x a spatraster of the variable we want to downscale, with all the relevant time steps +# ref_time the time slice in x used to create the delta (usually the present) +# high_res_obs the observed high resolution data used to create the delta + +delta_compute <- function(x, ref_time, high_res_obs) { + ref_index <- which(time(x)==ref_time) + if(length(ref_index)!=1){ + stop("ref_time should be a time in x") + } + x_modern<-x[[ref_index]] + if (terra::ext(high_res_obs)!=terra::ext(x_modern)){ + stop("x_modern and high_res_obs don't have the same extent") + } + # disaggregate the x_modern SpatRaster to the resolution of + # the high res with "bilinear" interpolation + x_modern_high<-disagg(x_modern, fact = terra::res( x_modern)/terra::res(high_res_obs), + method="bilinear") + # compute anomalies against the modern + delta <- x_modern_high - high_res_obs + # binary mask for delta + delta_binary <- make_binary_mask(delta) + # binary mask for maximum land extent + max_land_binary<-make_binary_mask(max(x,na.rm=TRUE)) + max_land_binary<-disagg(max_land_binary, fact = terra::res( x_modern)/terra::res(high_res_obs), + method="near") + # reset this mask to having NAs + max_land_binary[max_land_binary==0] <- NA + # delta gap (pixels for which we don't have a delta values) + delta_gap <- max_land_binary - delta_binary + delta_gap[delta_gap==0]<-NA + delta_df <- as.data.frame(delta,xy=TRUE,na.rm=TRUE) + delta_gap_df <- as.data.frame(delta_gap, xy=TRUE, na.rm=TRUE) + names(delta_df)[3] <-"this_var" + names(delta_gap_df)[3] <-"this_var" + # interpolate those gaps with idw (time consuming...) + # add ... to the function to be able to take additional params to gstat + idw_obj <- gstat(formula = this_var~1, locations = ~x+y, data = delta_df, nmax=7, + set=list(idp = .5)) + idw_pred <- predict(foo, newdata = delta_gap_df)[,-4] # remove the last column + delta_gap_vals <- terra::rast(idw_pred,type="xyz") + delta_gap_vals <- terra::extend(delta_gap_vals, delta) + delta_extended < - merge(delta, delta_gap_vals) + return(delta_extended) +} + + +# generate a SpatRaster of land masks at high resolution to feed to the downscale +# sea level https://www.ncdc.noaa.gov/paleo-search/study/19982 +etopo1 <- terra::rast("ETOPO1_Ice_c_gmt4.grd") +sea_level <- read.table("spratt2016.txt", header = TRUE, row.names = 1) + +# create a land mask and remove the ice + +# sea level https://www.ncdc.noaa.gov/paleo-search/study/19982 +etopo1 <- terra::rast("ETOPO1_Ice_c_gmt4.grd") +sea_level <- read.table("spratt2016.txt", header = TRUE, row.names = 1) + +#system.file("extdata/sea_level_spratt2016.txt",data="package") + + +# downscaling: +# disaggregate the model predictions (bilinear interpolation) +# apply the delta +# cut by the land mask +# idw any remaining points on the coast + + + + +delta_downscale <- function(x, delta_rast, x_landmask_high=NULL) { + # check that extent and resolutions are compatible + if (terra::ext(delta_rast)!=terra::ext(x)){ + stop("x and delta_rast don't have the same extent") + } + + # downscale x with bilinear + x_high <- disagg(x, fact = terra::res( x)/terra::res(delta_rast), + method="bilinear") + # apply the delta_rast to x + x_high <- x + delta_rast + + if(!is.null(x_landmask_high)){ + #refine the landmask in x_high + + + # fill in any gaps that resulted from this step with idw + } + + +} + +# create mask for sea level +sea_level_mask <- function(topography_rast, sea_level) { + + +} + +# create a binary mask where NAs are 0 and values are 1 +make_binary_mask <- function (x){ + x[!is.na(x)]<-1 + x[is.na(x)]<-0 + return(x) +} + +# fill in x for the values missing in y. +idw_gap <- function(x, y, ...){ + # first mask x with y + x<-terra::mask(x,y) + x_bin <- make_binary_mask(x) + y_bin <- make_binary_mask(y) + # delta gap (pixels for which we don't have a delta values) + x_gap <- y_bin - x_bin + x_gap[x_gap==0]<-NA + x_df <- terra::as.data.frame(x,xy=TRUE,na.rm=TRUE) + x_gap_df <- terra::as.data.frame(x_gap, xy=TRUE, na.rm=TRUE) + names(x_df)[3] <-"this_var" + names(x_gap_df)[3] <-"this_var" + # interpolate those gaps with idw (time consuming...) + # add ... to the function to be able to take additional params to gstat + idw_obj <- gstat::gstat(formula = this_var~1, locations = ~x+y, data = x_df, nmax=7, + set=list(idp = .5)) + idw_pred <- gstat::predict(foo, newdata = x_gap_df)[,-4] # remove the last column + x_gap_vals <- terra::rast(idw_pred,type="xyz") + x_gap_vals <- terra::extend(x_gap_vals, x) + x_extended < - merge(x, x_gap_vals) + return(x_extended) +} + +eaf <- extent(30, 55, -15, 20) +r <- rast() +e <- ext(r) +as.vector(e) +as.character(e) + +ext(r) <- c(0, 2.5, 0, 1.5) +af_precip <- crop(bio12_rasterbrick, eaf) # crop to africa + + +eaf <- terra::ext(30, 55, -15, 20) + +etopo1 <- terra::rast("ETOPO1_Ice_c_gmt4.grd") +etopo30 <- terra::agg(etopo1, fact = 30) + + +bi <- terra::boundaries(land_mask) +bi_up <- terra::disagg(bi, fact = 30) + + +## create a sea level mask (ideally on full data), setting +## land to a recogniseable value (e.g. -99999) +## first mask the raster based based on sea level mask +## the cover the raster based on sea level mask +## now find values that were covered (i.e. -99999) and interpolate them \ No newline at end of file diff --git a/inst/temp/_delta_downscale_3.R b/inst/temp/_delta_downscale_3.R new file mode 100644 index 00000000..28edf8d7 --- /dev/null +++ b/inst/temp/_delta_downscale_3.R @@ -0,0 +1,130 @@ +#' Compute a delta raster. +#' +#' This function generates a delta (difference) raster, computed as the difference between +#' model estimates (`x`) and some observations (`high_res_obs`). `x` is a +#' \code{terra::SpatRaster} of the variable we want to downscale, and it +#' can contain multiple time steps. `ref_time` sets the time slice for which +#' the delta should be computed. +#' +#' If `obs` has a higher +#' resolution than `x`, the latter is interpolated using a bilinear algorithm. +#' For areas that are present in some time slices, but not in the observations +#' (e.g. due to sea level change), the delta map is extended to cover the maximum +#' cumulative land mask (over all time steps) using idw. +#' +#' @param x a \code{terra::SpatRaster} for the variable of interest, with all +#' time steps of interest +#' @param ref_time the time of the slice that is used to compute the delta +#' @param obs the observations +#' +#' @export + +delta_compute <- function(x, ref_time, obs) { + ref_index <- which(time(x)==ref_time) + if(length(ref_index)!=1){ + stop("ref_time should be a time in x") + } + x_modern<-x[[ref_index]] + if (terra::ext(obs)!=terra::ext(x_modern)){ + stop("x_modern and high_res_obs don't have the same extent") + } + # disaggregate the x_modern SpatRaster to the resolution of + # the high res with "bilinear" interpolation + x_modern_high<-disagg(x_modern, fact = terra::res( x_modern)/terra::res(obs), + method="bilinear") + # compute anomalies against the modern + delta <- x_modern_high - obs + # mask for maximum land extent + max_land <- max(x,na.rm=TRUE) + max_land <- disagg(max_land, fact = terra::res( x)/terra::res(obs), + method="near") + delta_interp <- idw_interp(delta,max_land) + return(delta_interp) +} + + +delta_downscale <- function(x, delta_rast, x_landmask_high=NULL) { + # check that extent and resolutions are compatible + if (terra::ext(delta_rast)!=terra::ext(x)){ + stop("x and delta_rast don't have the same extent") + } + + # downscale x with bilinear + x_high <- disagg(x, fact = terra::res( x)/terra::res(delta_rast), + method="bilinear") + # apply the delta_rast to x + x_high <- x_high + delta_rast + + ##TODO + ## Now loop over each layer of x_high, and run idw_gap + + if(!is.null(x_landmask_high)){ + #refine the landmask in x_high + + + # fill in any gaps that resulted from this step with idw + } + + +} + +#' Create a land mask +#' +#' Create a land mask for a given time step +#' +#' @param topo_rast a \code{terra::SpatRaster} with topography +#' @param sea_level a vector of sea levels for each time step of interest +#' +#' @keywords internal + +make_land_mask <- function(topo_rast, sea_level) { + + +} + +#' Create a binary mask +#' +#' Create a binary mask where NAs are 0 and values are 1 +#' +#' @param x a \code{terra::SpatRaster} +#' +#' @keywords internal + +make_binary_mask <- function (x){ + x[!is.na(x)]<-1 + x[is.na(x)]<-0 + return(x) +} + +#' Interpolate x to match mask y +#' +#' Fill in x to match cells in y, using iwd interpolation +#' +#' @param x the \code{terra::SpatRaster} of the variable of interest +#' @param x the \code{terra::SpatRaster} giving the land mask +#' +#' @keywords internal + +idw_interp <- function(x, y, ...){ + # first mask x with y + x<-terra::mask(x,y) + x_bin <- make_binary_mask(x) + y_bin <- make_binary_mask(y) + # delta gap (pixels for which we don't have a delta values) + x_gap <- y_bin - x_bin + x_gap[x_gap==0]<-NA + x_df <- terra::as.data.frame(x,xy=TRUE,na.rm=TRUE) + x_gap_df <- terra::as.data.frame(x_gap, xy=TRUE, na.rm=TRUE) + names(x_df)[3] <-"this_var" + names(x_gap_df)[3] <-"this_var" + # interpolate those gaps with idw (time consuming...) + # add ... to the function to be able to take additional params to gstat + idw_obj <- gstat::gstat(formula = this_var~1, locations = ~x+y, data = x_df, nmax=7, + set=list(idp = .5)) + idw_pred <- predict(idw_obj, newdata = x_gap_df)[,-4] # remove the last column + x_gap_vals <- terra::rast(idw_pred,type="xyz") + x_gap_vals <- terra::extend(x_gap_vals, x) + browser() + x_extended <- terra::merge(x, x_gap_vals) + return(x_extended) +} diff --git a/inst/temp/_is_region_series.R b/inst/temp/_is_region_series.R new file mode 100644 index 00000000..5c07791e --- /dev/null +++ b/inst/temp/_is_region_series.R @@ -0,0 +1,7 @@ +time_d<-c() +for (i in seq_len(length(x))){ + time_d[i]<-length(time(x[i])) +} +if (length(unique(time_d))!=1){ + stop("the variables differ in the number of time steps") +} \ No newline at end of file diff --git a/man/Beyer2020.Rd b/man/Beyer2020.Rd index a07aff0d..35de5901 100644 --- a/man/Beyer2020.Rd +++ b/man/Beyer2020.Rd @@ -4,33 +4,37 @@ \alias{Beyer2020} \title{Documentation for the Beyer2020 dataset} \description{ -This dataset covers the last 120k years, at intervals of 1/2 k years. +This dataset covers the last 120k years, at intervals of 1/2 k years, and a +resolution of 0.5 degrees in latitude and longitude. } \details{ -This dataset can be downloaded with \code{\link{download_dataset}}. The -files can be found at +If you use this dataset, make sure to cite the original publication: -Manica, Andrea (2022): pastclim_beyer2020_v1.0.0. figshare. Dataset. -\url{https://doi.org/10.6084/m9.figshare.19723405.v1} - -based on +Beyer, R.M., +Krapp, M. & Manica, A. High-resolution terrestrial climate, bioclimate and +vegetation for the last 120,000 years. Sci Data 7, 236 (2020). +\doi{doi.org/10.1038/s41597-020-0552-1} -Beyer, R.M., -Krapp, M. & Manica, A. High-resolution terrestrial climate, bioclimate and -vegetation for the last 120,000 years. Sci Data 7, 236 (2020). -\url{https://doi.org/10.1038/s41597-020-0552-1} - -The version included in `pastclim` has the icesheets masked, as well as +The version included in `pastclim` has the ice sheets masked, as well as internal seas (Black and Caspian Sea) removed. The latter are based on: \url{https://www.marineregions.org/gazetteer.php?p=details&id=4278} \url{https://www.marineregions.org/gazetteer.php?p=details&id=4282} -As there is no reconstruction of their depth throught time, modern outlines -were used for all time steps. +As there is no reconstruction of their depth through time, modern outlines +were used for all time steps. Also, for bio15, the coefficient of variation was computed after adding one to monthly estimates, and it was multiplied by 100 following \url{https://pubs.usgs.gov/ds/691/ds691.pdf} + +Changelog + +v1.1.0 Added monthly variables. Files can be downloaded from: +\url{https://zenodo.org/deposit/7062281} + +v1.0.0 Remove icesheets and internal seas, and use correct formula for bio15. +Files can be downloaded from: +\doi{doi.org/10.6084/m9.figshare.19723405.v1} } diff --git a/man/Example.Rd b/man/Example.Rd new file mode 100644 index 00000000..860ec5c1 --- /dev/null +++ b/man/Example.Rd @@ -0,0 +1,10 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/datasets_docs.R +\name{Example} +\alias{Example} +\title{Documentation for the Example dataset} +\description{ +This dataset is a subset of Beyer2020, used for the vignette of pastclim. +Do not use this dataset for any real work, as it might not reflect the most +up-to-date version of Beyer2020. +} diff --git a/man/Krapp2021.Rd b/man/Krapp2021.Rd index 7ad7733b..7deac2dd 100644 --- a/man/Krapp2021.Rd +++ b/man/Krapp2021.Rd @@ -4,24 +4,28 @@ \alias{Krapp2021} \title{Documentation for the Krapp2021 dataset} \description{ -This dataset covers the last 800k years, at intervals of 1k years. +This dataset covers the last 800k years, at intervals of 1k years, and a +resolution of 0.5 degrees in latitude and longitude. } \details{ -This dataset can be downloaded with \code{\link{download_dataset}}. The -files can be found at +If you use this dataset, make sure to cite the original publication: -Manica, Andrea (2022): pastclim_krapp2021_v1.0.0. figshare. Dataset. -\url{https://doi.org/10.6084/m9.figshare.19733680.v1} - -based on +Krapp, M., Beyer, R.M., Edmundson, S.L. et al. A statistics-based +reconstruction of high-resolution global terrestrial climate for the last +800,000 years. Sci Data 8, 228 (2021). +\doi{doi.org/10.1038/s41597-021-01009-3} -Krapp, M., Beyer, R.M., Edmundson, S.L. et al. A statistics-based -reconstruction of high-resolution global terrestrial climate for the last -800,000 years. Sci Data 8, 228 (2021). -\url{https://doi.org/10.1038/s41597-021-01009-3} +The version included in `pastclim` has the ice sheets masked. -The version included in `pastclim` has the icesheets masked. - -Note that, for bio15, we use the corrected version, which follows +Note that, for bio15, we use the corrected version, which follows \url{https://pubs.usgs.gov/ds/691/ds691.pdf} + +Changelog + +v1.1.0 Added monthly variables. Files can be downloaded from: +\url{https://zenodo.org/record/7065055} + +v1.0.0 Remove ice sheets and use correct formula for bio15. +Files can be downloaded from: +\doi{doi.org/10.6084/m9.figshare.19733680.v1} } diff --git a/man/check_available_dataset.Rd b/man/check_available_dataset.Rd index a8b832bb..b48004ad 100644 --- a/man/check_available_dataset.Rd +++ b/man/check_available_dataset.Rd @@ -1,13 +1,15 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/get_available_datasets.R +% Please edit documentation in R/check_available_datasets.R \name{check_available_dataset} \alias{check_available_dataset} \title{Check if dataset is available.} \usage{ -check_available_dataset(dataset) +check_available_dataset(dataset, include_custom = FALSE) } \arguments{ \item{dataset}{string defining dataset} + +\item{include_custom}{boolean whether a 'custom' dataset is allowed} } \description{ Internal getter function diff --git a/man/check_dataset_path.Rd b/man/check_dataset_path.Rd new file mode 100644 index 00000000..66796845 --- /dev/null +++ b/man/check_dataset_path.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/check_dataset_path.R +\name{check_dataset_path} +\alias{check_dataset_path} +\title{Check dataset and path_to_nc params.} +\usage{ +check_dataset_path(dataset, path_to_nc) +} +\arguments{ +\item{dataset}{string defining the dataset to use. If set to "custom", +then a single nc file is used from "path_to_nc"} + +\item{path_to_nc}{the path to the custom nc file containing the paleoclimate +reconstructions. All the variables of interest need to be included in +this file.} +} +\description{ +Check that the dataset and path_to_nc parameters are valid +} diff --git a/man/check_var_downloaded.Rd b/man/check_var_downloaded.Rd index 15e68513..7147ccc2 100644 --- a/man/check_var_downloaded.Rd +++ b/man/check_var_downloaded.Rd @@ -1,19 +1,19 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/get_downloaded_datasets.R +% Please edit documentation in R/check_var_downloaded.R \name{check_var_downloaded} \alias{check_var_downloaded} -\title{Internal functions to check whether we have downloaded a given variable for a dataset} +\title{Internal functions to check whether we have downloaded a given variable +for a dataset} \usage{ -check_var_downloaded(variable, dataset, path_to_nc = NULL) +check_var_downloaded(variable, dataset) } \arguments{ \item{variable}{a vector of names of the variables of interest} \item{dataset}{dataset of interest} - -\item{path_to_nc}{path to the netcdf datasets} } \description{ -Internal functions to check whether we have downloaded a given variable for a dataset +Internal functions to check whether we have downloaded a given variable +for a dataset } \keyword{internal} diff --git a/man/check_var_in_nc.Rd b/man/check_var_in_nc.Rd index cee46010..69fc7c07 100644 --- a/man/check_var_in_nc.Rd +++ b/man/check_var_in_nc.Rd @@ -9,7 +9,8 @@ check_var_in_nc(bio_variables, path_to_nc) \arguments{ \item{bio_variables}{vector of names of variables to be extracted} -\item{path_to_nc}{the path to the file that contains the downloaded resonstructions.} +\item{path_to_nc}{the path to the custom nc file containing the paleoclimate +reconstructions.} } \description{ Internal function to test a custom nc file. diff --git a/man/climate_for_locations.Rd b/man/climate_for_locations.Rd index 8fb15d5b..2fe3b355 100644 --- a/man/climate_for_locations.Rd +++ b/man/climate_for_locations.Rd @@ -1,38 +1,14 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/climate_for_location.R +% Please edit documentation in R/location_slice.R \name{climate_for_locations} \alias{climate_for_locations} -\title{Extract local climate for one or more locations.} +\title{Extract local climate for one or more locations for a given time slice.} \usage{ -climate_for_locations( - x, - time_bp, - bio_variables, - dataset, - path_to_nc = NULL, - nn_interpol = TRUE -) +climate_for_locations(...) } \arguments{ -\item{x}{a 2 column matrix (with columns `longitude`, ranging --180 to 180, and `latitude`, from -90 to 90), or a vector of cell numbers.} - -\item{time_bp}{vector of ages, in years before present (negative).} - -\item{bio_variables}{vector of names of variables to be extracted.} - -\item{dataset}{string defining the dataset to use (one of Beyer2020, Krapp2021 or custom).} - -\item{path_to_nc}{the path to the directory containing the downloaded resonstructions. -Leave it unset if you are using the companion `pastclimData` to store datasets.} - -\item{nn_interpol}{boolean determining whether nearest neighbour interpolation is -used to estimate climate for cells that lack such information (i.e. they are -under water or ice). Interpolation is only performed from the first ring of -nearest neighbours; if climate is not available, NA will be returned for -that location. Defaults to TRUE.} +\item{...}{arguments to be passed to \code{location_slice}} } \description{ -This function extract local climate from Beyer et al for a set of locations -at the appropriate times +Deprecated version of \code{location_slice} } diff --git a/man/climate_for_time_slice.Rd b/man/climate_for_time_slice.Rd index 219f14e4..701b8315 100644 --- a/man/climate_for_time_slice.Rd +++ b/man/climate_for_time_slice.Rd @@ -1,21 +1,14 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/climate_for_time_slice.R +% Please edit documentation in R/region_slice.R \name{climate_for_time_slice} \alias{climate_for_time_slice} -\title{Extract a raster brick for a given time slice} +\title{Extract a climate slice for a region} \usage{ -climate_for_time_slice(time_bp, bio_variables, dataset, path_to_nc = NULL) +climate_for_time_slice(...) } \arguments{ -\item{time_bp}{time slice in years before present (negative)} - -\item{bio_variables}{vector of names of variables to be extracted} - -\item{dataset}{string defining the dataset to use} - -\item{path_to_nc}{the path to the directory containing the downloaded resonstructions. -Leave it unset if you are using the companion `pastclimData` to store datasets.} +\item{...}{arguments to be passed to \code{region_slice}} } \description{ -This function extracts a raster brick for a given time slice. +Deprecated version of \code{region_slice} } diff --git a/man/copy_example_data.Rd b/man/copy_example_data.Rd new file mode 100644 index 00000000..0acecaa1 --- /dev/null +++ b/man/copy_example_data.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_data_path.R +\name{copy_example_data} +\alias{copy_example_data} +\title{Internal function to copy the example dataset when a new data path is set} +\usage{ +copy_example_data() +} +\description{ +Copy example dataset +} +\keyword{internal} diff --git a/man/df_from_region_series.Rd b/man/df_from_region_series.Rd new file mode 100644 index 00000000..320982cc --- /dev/null +++ b/man/df_from_region_series.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/df_from_region_series.R +\name{df_from_region_series} +\alias{df_from_region_series} +\title{Extract data frame from a region series} +\usage{ +df_from_region_series(x, xy = TRUE) +} +\arguments{ +\item{x}{climate time series generated with \code{region_series}} + +\item{xy}{a boolean whether x and y coordinates should be added +to the dataframe (default to TRUE)} +} +\description{ +Extract the climatic information from a region series and organise them as +a data frame. +} +\details{ +To extract a data frame from a region slice, see \code{df_from_region_slice}. +} diff --git a/man/df_from_region_slice.Rd b/man/df_from_region_slice.Rd new file mode 100644 index 00000000..ff11fc57 --- /dev/null +++ b/man/df_from_region_slice.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/df_from_region_slice.R +\name{df_from_region_slice} +\alias{df_from_region_slice} +\title{Extract data frame from a region slice} +\usage{ +df_from_region_slice(x, xy = TRUE) +} +\arguments{ +\item{x}{climate time slice (i.e. a \code{terra::SpatRaster}) +generated with \code{region_slice}} + +\item{xy}{a boolean whether x and y coordinates should be added +to the dataframe (default to TRUE)} +} +\description{ +Extract the climatic information from a region slice and organise it as +a data frame. This is just a wrapper around \code{terra::as.data.frame}. +} +\details{ +To extract a data frame from a region series, see \code{df_from_region_series}. +} diff --git a/man/download_dataset.Rd b/man/download_dataset.Rd index 8dfe8716..cb5c2a4c 100644 --- a/man/download_dataset.Rd +++ b/man/download_dataset.Rd @@ -4,19 +4,18 @@ \alias{download_dataset} \title{Download paeloclimate reconstructions.} \usage{ -download_dataset(dataset, bio_variables = NULL, path_to_nc = NULL) +download_dataset(dataset, bio_variables = NULL) } \arguments{ -\item{dataset}{string defining dataset to be downloaded (currently only -"Beyer" is available)} +\item{dataset}{string defining dataset to be downloaded (a list of possible +values can be obtained with \code{get_available_datasets}). This function +will not work on custom datasets.} -\item{bio_variables}{one or more variable names to be downloaded. If left to NULL, -all variables available for this dataset will be downloaded} - -\item{path_to_nc}{directory where the files will be saved. If not set, the data will -be downloaded into the storage package pastclimData; an error will be -returned if this package is not installed.} +\item{bio_variables}{one or more variable names to be downloaded. If left +to NULL, all variables available for this dataset will be downloaded} } \description{ -This function downloads paleoclimate reconstructions +This function downloads paleoclimate reconstructions. Files will be stored +in the data path of `pastclim`, which can be inspected with +\code{get_data_path} and changed with \code{set_data_path} } diff --git a/man/get_available_datasets.Rd b/man/get_available_datasets.Rd index 32b7d5a1..2c0f0e9b 100644 --- a/man/get_available_datasets.Rd +++ b/man/get_available_datasets.Rd @@ -7,5 +7,6 @@ get_available_datasets() } \description{ -List the available datasets +List the datasets available in pastclim. Most functions can also be +used on custom datasets by setting `dataset="custom"` } diff --git a/man/get_biome_classes.Rd b/man/get_biome_classes.Rd index 6cfc7e90..b97cb397 100644 --- a/man/get_biome_classes.Rd +++ b/man/get_biome_classes.Rd @@ -4,14 +4,12 @@ \alias{get_biome_classes} \title{Get the biome classes for a dataset.} \usage{ -get_biome_classes(dataset, path_to_nc = NULL) +get_biome_classes(dataset) } \arguments{ -\item{dataset}{string defining dataset to be downloaded (currently only -"Beyer2020" or "Krapp2021" are available)} - -\item{path_to_nc}{the path to the directory containing the downloaded resonstructions. -Leave it unset if you are using the companion `pastclimData` to store datasets.} +\item{dataset}{string defining dataset to be downloaded (a list of possible +values can be obtained with \code{get_available_datasets}). This function +will not work on custom datasets.} } \description{ Get a full list of biomes and how their id as coded in the biome variable diff --git a/man/get_data_path.Rd b/man/get_data_path.Rd new file mode 100644 index 00000000..7b7fe7f7 --- /dev/null +++ b/man/get_data_path.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_data_path.R +\name{get_data_path} +\alias{get_data_path} +\title{Get the data path where climate reconstructions are stored} +\usage{ +get_data_path() +} +\description{ +This function returns the path where climate reconstructions will be stored. +When `pastclim` is installed, the data path defaults to the directory +returned by `tools::R_user_dir("pastclim","data")` (i.e. the data directory +for the package in R>=4.0). The data path can be changed with +\code{set_data_path}. Once changed, `pastclim` will remember the new data +path in the future. +} +\details{ +The data path is stored in a file named "pastclim_data.txt", which +is found in the directory returned by +`tools::R_user_dir("pastclim","config")` (i.e. +the default configuration directory for the package as set in R >= 4.0). +} diff --git a/man/get_dataset_info.Rd b/man/get_dataset_info.Rd new file mode 100644 index 00000000..66769182 --- /dev/null +++ b/man/get_dataset_info.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/get_dataset_info.R +\name{get_dataset_info} +\alias{get_dataset_info} +\title{Get the information about a dataset} +\usage{ +get_dataset_info(dataset) +} +\arguments{ +\item{dataset}{A dataset in pastclim} +} +\description{ +This function provides full information about a given dataset. A full +list of datasets available in pastclim can be obtained with +\code{get_available_datasets} +} +\keyword{internal} diff --git a/man/get_downloaded_datasets.Rd b/man/get_downloaded_datasets.Rd index dac48a2a..122537e6 100644 --- a/man/get_downloaded_datasets.Rd +++ b/man/get_downloaded_datasets.Rd @@ -4,10 +4,10 @@ \alias{get_downloaded_datasets} \title{Get the variables downloaded for each dataset.} \usage{ -get_downloaded_datasets(path_to_nc = NULL) +get_downloaded_datasets(data_path = NULL) } \arguments{ -\item{path_to_nc}{path to the netcdf datasets} +\item{data_path}{leave it to NULL to use the default datapath} } \description{ List the downloaded variable for each dataset. diff --git a/man/get_file_for_dataset.Rd b/man/get_file_for_dataset.Rd index 94834ebd..9a216d8f 100644 --- a/man/get_file_for_dataset.Rd +++ b/man/get_file_for_dataset.Rd @@ -9,8 +9,9 @@ get_file_for_dataset(variable, dataset) \arguments{ \item{variable}{one or more variable names to be downloaded} -\item{dataset}{string defining dataset to be downloaded (currently only -"Beyer" or "Krapp" are available)} +\item{dataset}{string defining dataset to be downloaded (a list of possible +values can be obtained with \code{get_available_datasets}). This function +will not work on custom datasets.} } \description{ Internal getter function diff --git a/man/get_ice_mask.Rd b/man/get_ice_mask.Rd index 860440d9..9a1acc29 100644 --- a/man/get_ice_mask.Rd +++ b/man/get_ice_mask.Rd @@ -4,17 +4,14 @@ \alias{get_ice_mask} \title{Get the ice mask for a dataset.} \usage{ -get_ice_mask(time_bp, dataset, path_to_nc = NULL) +get_ice_mask(time_bp, dataset) } \arguments{ \item{time_bp}{time slice in years before present (negative)} -\item{dataset}{string defining dataset to be downloaded (currently only -"Beyer2020" or "Krapp2021" are available). Note that this function will not work -on an custom dataset.} - -\item{path_to_nc}{the path to the directory containing the downloaded resonstructions. -Leave it unset if you are using the companion `pastclimData` to store datasets.} +\item{dataset}{string defining dataset to be downloaded (a list of possible +values can be obtained with \code{get_available_datasets}). This function +will not work on custom datasets.} } \description{ Get the ice mask for a dataset at a given timepoint. diff --git a/man/get_land_mask.Rd b/man/get_land_mask.Rd index 2c1923c1..c12f2af1 100644 --- a/man/get_land_mask.Rd +++ b/man/get_land_mask.Rd @@ -4,17 +4,14 @@ \alias{get_land_mask} \title{Get the land mask for a dataset.} \usage{ -get_land_mask(time_bp, dataset, path_to_nc = NULL) +get_land_mask(time_bp, dataset) } \arguments{ \item{time_bp}{time slice in years before present (negative)} -\item{dataset}{string defining dataset to be downloaded (currently only -"Beyer2020" or "Krapp2021" are available). Note that this function will not work -on an custom dataset.} - -\item{path_to_nc}{the path to the directory containing the downloaded resonstructions. -Leave it unset if you are using the companion `pastclimData` to store datasets.} +\item{dataset}{string defining dataset to be downloaded (a list of possible +values can be obtained with \code{get_available_datasets}). This function +will not work on custom datasets.} } \description{ Get the land mask for a dataset at a given timepoint. diff --git a/man/get_mis_time_steps.Rd b/man/get_mis_time_steps.Rd index bb0a6a79..e5d85287 100644 --- a/man/get_mis_time_steps.Rd +++ b/man/get_mis_time_steps.Rd @@ -10,11 +10,13 @@ get_mis_time_steps(mis, dataset, path_to_nc = NULL) \item{mis}{string giving the mis; it must use the same spelling as used in /code{mis_boundaries}} -\item{dataset}{string defining dataset to be downloaded (currently only -"Beyer2020" or "Krapp2021" are available)} +\item{dataset}{string defining dataset to be downloaded (a list of possible +values can be obtained with \code{get_available_datasets}). If set to +"custom", then a single nc file is used from "path_to_nc"} -\item{path_to_nc}{the path to the directory containing the downloaded resonstructions. -Leave it unset if you are using the companion `pastclimData` to store datasets.} +\item{path_to_nc}{the path to the custom nc file containing the paleoclimate +reconstructions. All the variables of interest need to be included in +this file.} } \description{ Get the time steps available in a given dataset for a MIS. diff --git a/man/get_pastclimdata_path.Rd b/man/get_pastclimdata_path.Rd deleted file mode 100644 index 59438e1c..00000000 --- a/man/get_pastclimdata_path.Rd +++ /dev/null @@ -1,12 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/get_pastclimdata_path.R -\name{get_pastclimdata_path} -\alias{get_pastclimdata_path} -\title{Get the path for pastclimdata.} -\usage{ -get_pastclimdata_path() -} -\description{ -This function returns the path for pastclimData where reconstructions -are stored. -} diff --git a/man/get_time_steps.Rd b/man/get_time_steps.Rd new file mode 100644 index 00000000..96665737 --- /dev/null +++ b/man/get_time_steps.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/get_time_steps.R +\name{get_time_steps} +\alias{get_time_steps} +\title{Get time steps for a given dataset} +\usage{ +get_time_steps(dataset, path_to_nc = NULL) +} +\arguments{ +\item{dataset}{string defining dataset to be downloaded (a list of possible +values can be obtained with \code{get_available_datasets}). If set to +"custom", then a single nc file is used from "path_to_nc"} + +\item{path_to_nc}{the path to the custom nc file containing the paleoclimate +reconstructions. All the variables of interest need to be included in +this file.} +} +\description{ +Get the time steps available in a given dataset. +} diff --git a/man/get_vars_for_dataset.Rd b/man/get_vars_for_dataset.Rd index daf35683..31479ca3 100644 --- a/man/get_vars_for_dataset.Rd +++ b/man/get_vars_for_dataset.Rd @@ -7,12 +7,13 @@ get_vars_for_dataset(dataset) } \arguments{ -\item{dataset}{string defining dataset to for which variables are given. It can take the value -"Beyer2020", "Krapp2021" or "Example"} +\item{dataset}{string defining dataset to be downloaded (a list of possible +values can be obtained with \code{get_available_datasets}). This function +will not work on custom datasets.} } \description{ This function lists the variables available for a given dataset. Note that the spelling and use of capitals in names might differ from the original -publications, as `pastclim` harmonises the names of variables across different -reconstructions. +publications, as `pastclim` harmonises the names of variables across +different reconstructions. } diff --git a/man/help_console.Rd b/man/help_console.Rd new file mode 100644 index 00000000..bcd2be3f --- /dev/null +++ b/man/help_console.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/get_dataset_info.R +\name{help_console} +\alias{help_console} +\title{Print help to console} +\usage{ +help_console( + topic, + format = c("text", "html", "latex"), + lines = NULL, + before = NULL, + after = NULL +) +} +\arguments{ +\item{topic}{The topic of the help} + +\item{format}{how the output should be formatted} + +\item{before}{string to be printed before the output} + +\item{after}{string to be printed after the output} + +\item{which}{lines should be printed} +} +\description{ +This function prints a help file to console. It is based on a function published on +R-bloggers: +from https://www.r-bloggers.com/2013/06/printing-r-help-files-in-the-console-or-in-knitr-documents/ +} +\keyword{internal} diff --git a/man/is_region_series.Rd b/man/is_region_series.Rd new file mode 100644 index 00000000..c98100c0 --- /dev/null +++ b/man/is_region_series.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/is_region_slice.R +\name{is_region_series} +\alias{is_region_series} +\title{Check the object is a valid region series} +\usage{ +is_region_series(x, strict = FALSE) +} +\arguments{ +\item{x}{a \code{terra::SpatRasterDataset} representing a time series of +regional reconstructions obtained from \code{region_series}.} + +\item{strict}{a boolean defining whether to preform a thorough test (see +description above for details).} +} +\description{ +A region series is a \code{terra::SpatRasterDataset} for which each +subdataset is a variable, and all variables have the same number of +time steps. +} +\details{ +The standard test only checks that each SpatRaster has the same number of +layers. The more thorough test (obtaned with strict=TRUE) actually checks +that all time steps are identical by comparing the result of +\code{terra::time} applied to each variable +} diff --git a/man/location_series.Rd b/man/location_series.Rd new file mode 100644 index 00000000..d7630c0b --- /dev/null +++ b/man/location_series.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/location_series.R +\name{location_series} +\alias{location_series} +\title{Extract a time series of bioclimatic variables for one or more locations.} +\usage{ +location_series(x, time_bp = NULL, bio_variables, dataset, path_to_nc = NULL) +} +\arguments{ +\item{x}{a 2 column data.frame (with columns `longitude`, ranging +-180 to 180, and `latitude`, from -90 to 90), or a vector of cell numbers.} + +\item{time_bp}{time slices in years before present (negative values represent +time before present, positive values time in the future). This parameter can +be a vector of times (the slices need +to exist in the dataset), a list with a min and max element setting the +range of values, or left to NULL to retrieve all time steps. +To check which slices are available, you can use +\code{get_time_steps}.} + +\item{bio_variables}{vector of names of variables to be extracted.} + +\item{dataset}{string defining the dataset to use. If set to "custom", +then a single nc file is used from "path_to_nc"} + +\item{path_to_nc}{the path to the custom nc file containing the paleoclimate +reconstructions. All the variables of interest need to be included in +this file.} +} +\description{ +This function extract a time series of local climate for + a set of locations +} diff --git a/man/location_slice.Rd b/man/location_slice.Rd new file mode 100644 index 00000000..aafd6b65 --- /dev/null +++ b/man/location_slice.Rd @@ -0,0 +1,43 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/location_slice.R +\name{location_slice} +\alias{location_slice} +\title{Extract local climate for one or more locations for a given time slice.} +\usage{ +location_slice( + x, + time_bp, + bio_variables, + dataset, + path_to_nc = NULL, + nn_interpol = TRUE +) +} +\arguments{ +\item{x}{a 2 column matrix (with columns `longitude`, ranging +-180 to 180, and `latitude`, from -90 to 90), or a vector of cell numbers.} + +\item{time_bp}{the dates in years before present (negative +values represent time before present, i.e. 1950, positive values time in the future) +for each location.} + +\item{bio_variables}{vector of names of variables to be extracted.} + +\item{dataset}{string defining the dataset to use. If set to "custom", +then a single nc file is used from "path_to_nc"} + +\item{path_to_nc}{the path to the custom nc file containing the paleoclimate +reconstructions. All the variables of interest need to be included in +this file.} + +\item{nn_interpol}{boolean determining whether nearest neighbour +interpolation is used to estimate climate for cells that lack such +information (i.e. they are under water or ice). Interpolation is only +performed from the first ring of nearest neighbours; if climate is not +available, NA will be returned for that location. Defaults to TRUE.} +} +\description{ +This function extract local climate for a set of locations +at the appropriate times (selecting the closest time slice available for the +specific date associated with each location). +} diff --git a/man/region_outline_union.Rd b/man/region_outline_union.Rd index b9c7409a..cd666352 100644 --- a/man/region_outline_union.Rd +++ b/man/region_outline_union.Rd @@ -15,6 +15,7 @@ region_outline_union } \description{ An \code{sf} object containing outlines for major regions. Each outline is -represented as a single polygon. If you want multiple polygons, use \link{region_outline}. +represented as a single polygon. If you want multiple polygons, use +\link{region_outline}. } \keyword{datasets} diff --git a/man/region_series.Rd b/man/region_series.Rd new file mode 100644 index 00000000..24a94223 --- /dev/null +++ b/man/region_series.Rd @@ -0,0 +1,48 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/region_series.R +\name{region_series} +\alias{region_series} +\title{Extract a time series of climate variables for a region} +\usage{ +region_series( + time_bp = NULL, + bio_variables, + dataset, + path_to_nc = NULL, + ext = NULL, + crop = NULL +) +} +\arguments{ +\item{time_bp}{time slices in years before present (negative values represent +time before present, positive values time in the future). This parameter can +be a vector of times (the slices need +to exist in the dataset), a list with a min and max element setting the +range of values, or left to NULL to retrieve all time steps. +To check which slices are available, you can use +\code{get_time_steps}.} + +\item{bio_variables}{vector of names of variables to be extracted} + +\item{dataset}{string defining the dataset to use. If set to "custom", +then a single nc file is used from "path_to_nc"} + +\item{path_to_nc}{the path to the custom nc file containing the paleoclimate +reconstructions. All the variables of interest need to be included in +this file.} + +\item{ext}{an extent, coded as numberic vector (length=4; +order= xmin, xmax, ymin, ymax) or a \code{terra::SpatExtent} object. If NULL, +the full extent of the reconstruction is given.} + +\item{crop}{a polygon used to crop the reconstructions (e.g. the outline +of a continental mass). A \code{sf:sfg} or a \code{terra::SpatVector} object +is used to define the polygon.} +} +\description{ +This function extracts a time series of one or more climate variables for +a given +dataset covering a region (or the whole world). The function returns a +SpatRasterDataset \code{terra::sds} object, with +each variable as a sub-dataset. +} diff --git a/man/region_slice.Rd b/man/region_slice.Rd new file mode 100644 index 00000000..f68c93d5 --- /dev/null +++ b/man/region_slice.Rd @@ -0,0 +1,45 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/region_slice.R +\name{region_slice} +\alias{region_slice} +\title{Extract a climate slice for a region} +\usage{ +region_slice( + time_bp, + bio_variables, + dataset, + path_to_nc = NULL, + ext = NULL, + crop = NULL +) +} +\arguments{ +\item{time_bp}{the time slice in years before present (negative +values represent +time before present, positive values time in the future). The slice needs +to exist in the dataset. To check which slices are available, you can use +\code{get_time_steps}.} + +\item{bio_variables}{vector of names of variables to be extracted} + +\item{dataset}{string defining the dataset to use. If set to "custom", +then a single nc file is used from "path_to_nc"} + +\item{path_to_nc}{the path to the custom nc file containing the paleoclimate +reconstructions. All the variables of interest need to be included +in this file.} + +\item{ext}{an extent, coded as numberic vector (length=4; +order= xmin, xmax, ymin, ymax) or a \code{terra::SpatExtent} object. If NULL, +the full extent of the reconstruction is given.} + +\item{crop}{a polygon used to crop the reconstructions (e.g. the outline +of a continental mass). A \code{sf:sfg} or a \code{terra::SpatVector} object +is used to define the polygon.} +} +\description{ +This function extracts a slice of one or more climate variables for a given +dataset covering a region (or the whole world). The function returns a +SpatRaster \code{terra::SpatRaster} object, with +each variable as a layer. +} diff --git a/man/sample_region_series.Rd b/man/sample_region_series.Rd new file mode 100644 index 00000000..7c391f3d --- /dev/null +++ b/man/sample_region_series.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/sample_region_series.R +\name{sample_region_series} +\alias{sample_region_series} +\title{Sample points from a region time series} +\usage{ +sample_region_series(x, size, method = "random", replace = FALSE, na.rm = TRUE) +} +\arguments{ +\item{x}{a \code{terra::SpatRasterDataset} returned +by \code{region_series}} + +\item{size}{number of points sampled. A single value is used to sample the same +locations across all time steps, a vector of values to sample different locations +at each time step.} + +\item{method}{one of the sampling methods from \code{terra::spatSample}. It +defaults to "random"} + +\item{replace}{boolean determining whether we sample with replacement} + +\item{na.rm}{boolean determining whether NAs are removed} +} +\description{ +This function samples points from a region time series. Sampling can either be +performed for the same locations at all time steps (if only one value is given +for `size`), or for different locations for each time step (if `size` is a +vector of lenght equal to the number of time steps). To sample the same +number of points, but different locations, for each time step, provide a vector +repeating the same value for each time step. +} +\details{ +This function wraps \code{terra::spatSample} to appropriate sample the +\code{terra::SpatRaster}s in the \code{terra::SpatRasterDataset} returned +by \code{region_series}. +} diff --git a/man/sample_region_slice.Rd b/man/sample_region_slice.Rd new file mode 100644 index 00000000..2d2b4457 --- /dev/null +++ b/man/sample_region_slice.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/sample_region_slice.R +\name{sample_region_slice} +\alias{sample_region_slice} +\title{Sample points from a region time slice} +\usage{ +sample_region_slice(x, size, method = "random", replace = FALSE, na.rm = TRUE) +} +\arguments{ +\item{x}{a \code{terra::SpatRaster} returned +by \code{region_slice}} + +\item{size}{number of points sampled.} + +\item{method}{one of the sampling methods from \code{terra::spatSample}. It +defaults to "random"} + +\item{replace}{boolean determining whether we sample with replacement} + +\item{na.rm}{boolean determining whether NAs are removed} +} +\description{ +This function samples points from a region time slice (i.e. a timepoint). +} +\details{ +This function wraps \code{terra::spatSample} to appropriate sample the +\code{terra::SpatRaster} returned +by \code{region_slice}. You can also use \code{terra::spatSample} directly +on a slice (which is a standard \code{terra::SpatRaster}). +} diff --git a/man/sample_rs_fixed.Rd b/man/sample_rs_fixed.Rd new file mode 100644 index 00000000..b34782ab --- /dev/null +++ b/man/sample_rs_fixed.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/sample_region_series.R +\name{sample_rs_fixed} +\alias{sample_rs_fixed} +\title{Sample the same locations from a region time series} +\usage{ +sample_rs_fixed(x, size, method = "random", replace = FALSE, na.rm = TRUE) +} +\arguments{ +\item{x}{a \code{terra::SpatRasterDataset} returned +by \code{region_series}} + +\item{size}{number of points sampled; the same +locations across all time steps} + +\item{method}{one of the sampling methods from \code{terra::spatSample}. It +defaults to "random"} + +\item{replace}{boolean determining whether we sample with replacement} + +\item{na.rm}{boolean determining whether NAs are removed} +} +\description{ +Internal function for fixed sampling from \code{sample_region_series}, +used when a single size is given. +} +\keyword{internal} diff --git a/man/sample_rs_variable.Rd b/man/sample_rs_variable.Rd new file mode 100644 index 00000000..e95eed39 --- /dev/null +++ b/man/sample_rs_variable.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/sample_region_series.R +\name{sample_rs_variable} +\alias{sample_rs_variable} +\title{Sample the different number of points from a region time series} +\usage{ +sample_rs_variable(x, size, method = "random", replace = FALSE, na.rm = TRUE) +} +\arguments{ +\item{x}{a \code{terra::SpatRasterDataset} returned +by \code{region_series}} + +\item{size}{a vector of the number of points sampled for each time step} + +\item{method}{one of the sampling methods from \code{terra::spatSample}. It +defaults to "random"} + +\item{replace}{boolean determining whether we sample with replacement} + +\item{na.rm}{boolean determining whether NAs are removed} +} +\description{ +Internal function for sampling different number of points for each +timestep of a region series from \code{sample_region_series}, +used when size is a vector of values. +} +\keyword{internal} diff --git a/man/set_data_path.Rd b/man/set_data_path.Rd new file mode 100644 index 00000000..113240a6 --- /dev/null +++ b/man/set_data_path.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/set_data_path.R +\name{set_data_path} +\alias{set_data_path} +\title{Set the data path where climate reconstructions will be stored} +\usage{ +set_data_path(path_to_nc = NULL) +} +\arguments{ +\item{path_to_nc}{the path to the file that contains the downloaded +resonstructions. If left unset, the default location returned by +`tools::R_user_dir("pastclim","data")` will be used} +} +\description{ +This function sets the path where climate reconstructions will be stored. +This +information is stored in a file names "pastclim_data.txt", which is found +in the directory returned by `tools::R_user_dir("pastclim","config")` (i.e. +the default configuration directory for the package as set in R >= 4.0). +} diff --git a/man/slice_region_series.Rd b/man/slice_region_series.Rd new file mode 100644 index 00000000..f2fe3253 --- /dev/null +++ b/man/slice_region_series.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/slice_region_series.R +\name{slice_region_series} +\alias{slice_region_series} +\title{Extract a slice for a time series of climate variables for a region} +\usage{ +slice_region_series(x, time_bp) +} +\arguments{ +\item{x}{climate time series generated with \code{region_series}} + +\item{time_bp}{time slices in years before present (i.e. 1950, negative integers +for values in the past). The slices +need to exist in the dataset. To check which slices are available, you +can use \code{terra::time(x[[1]])} (note that you have to use +the `time` function on the first element of the 'sds' object, i.e. on one +of the 'SpatRaster' objects)} +} +\description{ +This function extracts a time slice from time series of one or more climate +variables for a given dataset covering a region (or the whole world). +} diff --git a/man/time_bp_series.Rd b/man/time_bp_series.Rd new file mode 100644 index 00000000..93a49836 --- /dev/null +++ b/man/time_bp_series.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/time_bp_series.R +\name{time_bp_series} +\alias{time_bp_series} +\title{Convert a time BP to indexes for a series} +\usage{ +time_bp_series(time_bp, time_steps) +} +\arguments{ +\item{time_bp}{vector of times BP} + +\item{time_steps}{time steps for which reconstructions are available} +} +\description{ +Internal function +} +\keyword{internal} diff --git a/man/time_bp_to_index.Rd b/man/time_bp_to_index.Rd index 56a0bf22..a960330d 100644 --- a/man/time_bp_to_index.Rd +++ b/man/time_bp_to_index.Rd @@ -2,15 +2,16 @@ % Please edit documentation in R/time_bp_to_index.R \name{time_bp_to_index} \alias{time_bp_to_index} -\title{Convert a time BP to indeces in a netcdf file.} +\title{Convert a time BP to indexes in a netcdf file.} \usage{ -time_bp_to_index(time_bp, path_to_nc) +time_bp_to_index(time_bp, time_steps) } \arguments{ \item{time_bp}{vector of times BP} -\item{path_to_nc}{path to nc file} +\item{time_steps}{time steps for which reconstructions are available} } \description{ Internal function } +\keyword{internal} diff --git a/man/time_series_for_locations.Rd b/man/time_series_for_locations.Rd index b43c19c2..96e60414 100644 --- a/man/time_series_for_locations.Rd +++ b/man/time_series_for_locations.Rd @@ -1,23 +1,14 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/time_series_for_location.R +% Please edit documentation in R/location_series.R \name{time_series_for_locations} \alias{time_series_for_locations} \title{Extract a time series of bioclimatic variables for one or more locations.} \usage{ -time_series_for_locations(x, bio_variables, dataset, path_to_nc = NULL) +time_series_for_locations(...) } \arguments{ -\item{x}{a 2 column matrix (with columns `longitude`, ranging --180 to 180, and `latitude`, from -90 to 90), or a vector of cell numbers.} - -\item{bio_variables}{vector of names of variables to be extracted.} - -\item{dataset}{string defining the dataset to use.} - -\item{path_to_nc}{the path to the directory containing the downloaded resonstructions. -Leave it unset if you are using the companion `pastclimData` to store datasets.} +\item{...}{arguments to be passed to \code{series}} } \description{ -This function extract a time series of local climate for - a set of locations +Deprecated version of \code{location_series} } diff --git a/pkgdown/assets/pastclim_cheatsheet.pdf b/pkgdown/assets/pastclim_cheatsheet.pdf new file mode 100644 index 00000000..f46ae15a Binary files /dev/null and b/pkgdown/assets/pastclim_cheatsheet.pdf differ diff --git a/tests/testthat/test_check_dataset_path.R b/tests/testthat/test_check_dataset_path.R new file mode 100644 index 00000000..60f73482 --- /dev/null +++ b/tests/testthat/test_check_dataset_path.R @@ -0,0 +1,28 @@ +test_that("check_dataset_path errors", { + expect_true(check_dataset_path("Example", NULL)) + expect_error( + check_dataset_path("foo", NULL), + "'dataset' must be one of " + ) + expect_error( + check_dataset_path("custom", NULL), + "you need to set path_to_nc if dataset='custom'" + ) + expect_true(check_dataset_path( + "custom", + file.path( + get_data_path(), + "example_climate.nc" + ) + )) + expect_error( + check_dataset_path( + "custom", + file.path( + get_data_path(), + "foo.nc" + ) + ), + "path_to_nc does not point to a file" + ) +}) diff --git a/tests/testthat/test_climate_for_slice.R b/tests/testthat/test_climate_for_slice.R deleted file mode 100644 index b9944328..00000000 --- a/tests/testthat/test_climate_for_slice.R +++ /dev/null @@ -1,32 +0,0 @@ -test_that("climate_for_time_slice", { - # using standard dataset - path_to_example_nc <- system.file("/extdata/", package = "pastclim") - expect_true(inherits(climate_for_time_slice(-20000, c("bio01", "bio12"), - "Example", - path_to_nc = path_to_example_nc - ), "SpatRaster")) - # if we try to use a variable that does not exist - expect_error(climate_for_time_slice(-20000, c("bio01", "bio19"), "Example", - path_to_nc = path_to_example_nc - ), "bio19 not available") - # if we try to use a variable that we have not downloaded yet - expect_error(climate_for_time_slice(-20000, c("bio01", "bio19"), "Krapp2021", - path_to_nc = path_to_example_nc - ), "^variable \\(bio01, bio19\\) not yet downloaded") - - # now treat it as if it was a custom dataset - path_to_example_nc <- system.file("/extdata/example_climate.nc", - package = "pastclim") - expect_true(inherits(climate_for_time_slice(-20000, c("BIO1", "BIO12"), - "custom", - path_to_nc = path_to_example_nc - ), "SpatRaster")) - # if we try to use a variable that does not exist - expect_error(climate_for_time_slice(-20000, c("BIO01", "lai"), "custom", - path_to_nc = path_to_example_nc - ), "variable \\(BIO01, lai\\) not present in the file") - # if we try to use a file that does not exist - expect_error(climate_for_time_slice(-20000, c("BIO1", "BIO12"), "custom", - path_to_nc = "./foo" - ), "file ./foo does not exist") -}) diff --git a/tests/testthat/test_df_from_region_series.R b/tests/testthat/test_df_from_region_series.R new file mode 100644 index 00000000..8cd6ce68 --- /dev/null +++ b/tests/testthat/test_df_from_region_series.R @@ -0,0 +1,8 @@ +test_that("get df from region series", { + x <- region_series( + time_bp = list(min=-15000,max=0), c("bio01", "bio10", "bio12"), + "Example" + ) + df_series <- df_from_region_series(x ,xy=TRUE) + expect_true(length(unique(df_series$time_bp))==4) +}) \ No newline at end of file diff --git a/tests/testthat/test_df_from_region_slice.R b/tests/testthat/test_df_from_region_slice.R new file mode 100644 index 00000000..3693e529 --- /dev/null +++ b/tests/testthat/test_df_from_region_slice.R @@ -0,0 +1,12 @@ +test_that("get df from region slice", { + x <- region_slice( + time_bp = -10000, c("bio01", "bio10", "bio12"), + "Example" + ) + df_slice <- df_from_region_slice(x) + expect_true(all(c("x","y") %in% names(df_slice))) + df_slice <- df_from_region_slice(x, xy=FALSE) + expect_false(all(c("x","y") %in% names(df_slice))) + expect_error(df_from_region_slice("foo", xy=FALSE), + "x is not a valid SpatRaster ") +}) \ No newline at end of file diff --git a/tests/testthat/test_download_dataset.R b/tests/testthat/test_download_dataset.R index 51e12910..92ce699f 100644 --- a/tests/testthat/test_download_dataset.R +++ b/tests/testthat/test_download_dataset.R @@ -1,20 +1,16 @@ test_that("download_dataset", { - path_to_example_nc <- system.file("/extdata/", package = "pastclim") expect_error( - download_dataset("Beyer", path_to_nc = path_to_example_nc), - "'dataset' must be one of Beyer2020, Krapp2021, Example" + download_dataset("Beyer"), + "'dataset' must be one of " ) expect_error( download_dataset("Beyer2020", - bio_variables = "foo", - path_to_nc = path_to_example_nc + bio_variables = "foo" ), "^foo not available " ) # check that only the example climate is in the data directory - expect_true(list.files(path_to_example_nc) == "example_climate.nc") + expect_true("example_climate.nc" %in% list.files(get_data_path())) # expect no error as the dataset exists - expect_error(download_dataset("Example", path_to_nc = path_to_example_nc), NA) - # but we should not have downloaded anything, as we already have the file - expect_true(list.files(path_to_example_nc) == "example_climate.nc") + expect_error(download_dataset("Example"), NA) }) diff --git a/tests/testthat/test_get_available_dataset.R b/tests/testthat/test_get_available_dataset.R index 8f07c6ea..9f9b4e08 100644 --- a/tests/testthat/test_get_available_dataset.R +++ b/tests/testthat/test_get_available_dataset.R @@ -1,10 +1,18 @@ testthat::test_that("get_and_check_available_datasets", { - testthat::expect_true(all(get_available_datasets() == c("Beyer2020", - "Krapp2021", - "Example"))) + testthat::expect_true(all(get_available_datasets() %in% c( + "Beyer2020", + "Krapp2021", + "Example" + ))) testthat::expect_true(check_available_dataset("Example")) testthat::expect_error( check_available_dataset("foo"), - "'dataset' must be one of Beyer2020, Krapp2021, Example" + "'dataset' must be one of " + ) + testthat::expect_true(check_available_dataset("custom", + include_custom = TRUE)) + testthat::expect_error( + check_available_dataset("custom"), + "'dataset' must be one of " ) }) diff --git a/tests/testthat/test_get_biome_classes.R b/tests/testthat/test_get_biome_classes.R index 93b872e5..e45774f8 100644 --- a/tests/testthat/test_get_biome_classes.R +++ b/tests/testthat/test_get_biome_classes.R @@ -1,13 +1,4 @@ testthat::test_that("get biome classes", { - path_to_example_nc <- system.file("/extdata/", package = "pastclim") # check that we have 29 classes as expected - expect_true(nrow(get_biome_classes("Example", - path_to_nc = path_to_example_nc - )) == 29) - # give error if we do the same but give the wrong path - expect_error( - get_biome_classes("Example", - path_to_nc = "/foo" - ), "^variable" - ) + expect_true(nrow(get_biome_classes("Example")) == 29) }) diff --git a/tests/testthat/test_get_downloaded_datasets.R b/tests/testthat/test_get_downloaded_datasets.R index 98a26ae2..aa62d795 100644 --- a/tests/testthat/test_get_downloaded_datasets.R +++ b/tests/testthat/test_get_downloaded_datasets.R @@ -1,20 +1,19 @@ testthat::test_that("get_downloaded_datasets", { path_to_example_nc <- system.file("/extdata/", package = "pastclim") # there is only the Example dataset available - expect_true(length(get_downloaded_datasets(path_to_nc = path_to_example_nc)) - == 1) + expect_true(length(get_downloaded_datasets(data_path = path_to_example_nc)) + == 1) # return an empty list if there are no files - expect_true(length(get_downloaded_datasets(path_to_nc = "./foo")) == 0) + expect_true(length(get_downloaded_datasets(data_path = "./foo")) == 0) # check that we have downloaded a variable - expect_true(check_var_downloaded("bio01", "Example", - path_to_nc = path_to_example_nc)) + expect_true(check_var_downloaded("bio01", "Example")) # raise error if the variable is not available expect_error( - check_var_downloaded("npp", "Example", path_to_nc = path_to_example_nc), + check_var_downloaded("npp", "Example"), "^npp not available" ) expect_error( - check_var_downloaded("npp", "Krapp2021", path_to_nc = path_to_example_nc), + check_var_downloaded("npp", "Krapp2021"), "^variable" ) }) diff --git a/tests/testthat/test_get_mis_time_steps.R b/tests/testthat/test_get_mis_time_steps.R new file mode 100644 index 00000000..d261c9dd --- /dev/null +++ b/tests/testthat/test_get_mis_time_steps.R @@ -0,0 +1,29 @@ +test_that("get_mis_time_steps for standard dataset", { + expect_equal(get_mis_time_steps(mis = "2", dataset = "Example"), + c(-20000, -15000), + ignore_attr = TRUE + ) +}) + +test_that("get_mis_time_steps for local file", { + path_to_example_nc <- system.file("/extdata/", "example_climate.nc", + package = "pastclim" + ) + expect_equal(get_mis_time_steps( + mis = "2", dataset = "custom", + path_to_nc = path_to_example_nc + ), + c(-20000, -15000), + ignore_attr = TRUE + ) +}) + +test_that("get_mis_time_steps requires correct variables", { + expect_error( + get_mis_time_steps( + mis = "blah", dataset = "custom", + path_to_nc = path_to_example_nc + ), + "'mis' should be one of" + ) +}) diff --git a/tests/testthat/test_get_pastclimdata_path.R b/tests/testthat/test_get_pastclimdata_path.R deleted file mode 100644 index 72076379..00000000 --- a/tests/testthat/test_get_pastclimdata_path.R +++ /dev/null @@ -1,12 +0,0 @@ -test_that("get_pastclimdata_path without pastclimData", { - skip_if(requireNamespace("pastclimData")) - expect_error( - get_pastclimdata_path(), - "^the parameter path_to_nc" - ) -}) - -test_that("get_pastclimdata_path with pastclimData", { - skip_if(!requireNamespace("pastclimData")) - expect_true(is.character(get_pastclimdata_path())) -}) diff --git a/tests/testthat/test_get_set_data_path.R b/tests/testthat/test_get_set_data_path.R new file mode 100644 index 00000000..8a7bc781 --- /dev/null +++ b/tests/testthat/test_get_set_data_path.R @@ -0,0 +1,8 @@ +test_that("set and get data path", { + set_data_path() + expect_true(file.exists(file.path( + tools::R_user_dir("pastclim", "config"), + "pastclim_data.txt" + ))) + expect_equal(get_data_path(), tools::R_user_dir("pastclim", "data")) +}) diff --git a/tests/testthat/test_get_time_steps.R b/tests/testthat/test_get_time_steps.R new file mode 100644 index 00000000..19375d82 --- /dev/null +++ b/tests/testthat/test_get_time_steps.R @@ -0,0 +1,37 @@ +test_that("get_time_steps requires correct variables", { + expect_error( + get_time_steps(dataset = "blah"), + "'dataset' must be one of " + ) + expect_error( + get_time_steps(dataset = "Example", path_to_nc = "blah"), + "path_to_nc can only be set if" + ) +}) + +test_that("get_time_steps for standard dataset", { + expect_equal(get_time_steps(dataset = "Example"), + c(-20000, -15000, -10000, -5000, 0), + ignore_attr = TRUE + ) +}) + +test_that("get_time_steps for local file", { + path_to_example_nc <- system.file("/extdata/", "example_climate.nc", + package = "pastclim" + ) + expect_equal(get_time_steps( + dataset = "custom", + path_to_nc = path_to_example_nc + ), + c(-20000, -15000, -10000, -5000, 0), + ignore_attr = TRUE + ) + expect_equal(get_mis_time_steps( + mis = "2", dataset = "custom", + path_to_nc = path_to_example_nc + ), + c(-20000, -15000), + ignore_attr = TRUE + ) +}) diff --git a/tests/testthat/test_is_region_series.R b/tests/testthat/test_is_region_series.R new file mode 100644 index 00000000..849705f1 --- /dev/null +++ b/tests/testthat/test_is_region_series.R @@ -0,0 +1,33 @@ +test_that("is_region_series returns correct values", { + climate_region <- region_series( + time_bp = list(min=-15000,max=0), c("bio01", "bio10", "bio12"), + "Example" + ) + expect_true(is_region_series(climate_region)) + expect_true(is_region_series(climate_region, strict = TRUE)) + + # change the time for one variable + time(climate_region[1])<-c(1,2,3,4) + # the simple test should still pass, but the strict test should not + expect_true(is_region_series(climate_region)) + expect_false(is_region_series(climate_region, strict = TRUE)) + + # now remove a time step (all tests should fail) + time(climate_region[1])<-time(climate_region[2])# reinstate correct times + climate_region[1] <- climate_region[1][[1:3]] + expect_false(is_region_series(climate_region)) + expect_false(is_region_series(climate_region, strict = TRUE)) + + # now give it a slice + europe_climate_20k <- region_slice( + time_bp = -20000, + c("bio01", "bio10", "bio12"), + dataset = "Example", + ext = region_extent$Europe + ) + expect_error(is_region_series(europe_climate_20k), + "x should be a SpatRasterDataset") + + + +}) \ No newline at end of file diff --git a/tests/testthat/test_time_series_for_location.R b/tests/testthat/test_location_series.R similarity index 61% rename from tests/testthat/test_time_series_for_location.R rename to tests/testthat/test_location_series.R index 703cadfb..be7afec6 100644 --- a/tests/testthat/test_time_series_for_location.R +++ b/tests/testthat/test_location_series.R @@ -1,49 +1,71 @@ test_that("time_series_for_location", { # using standard dataset - path_to_example_nc <- system.file("/extdata/", package = "pastclim") locations <- data.frame( - longitude = c(0, 90, -120, -7), latitude = c(20, 45, 60, 37), - time_bp = c(0, -10000, -20000, -10000) + longitude = c(0, 90, -120, -7), latitude = c(20, 45, 60, 37) ) - locations_ts <- time_series_for_locations( + locations_ts <- location_series( x = locations[, c("longitude", "latitude")], bio_variables = c("bio01", "bio12"), - dataset = "Example", path_to_nc = path_to_example_nc + dataset = "Example" ) expect_true(nrow(locations_ts) == 20) + + locations_ts <- location_series( + x = locations[, c("longitude", "latitude")], + time_bp = c(-20000,-10000,-5000), + bio_variables = c("bio01", "bio12"), + dataset = "Example" + ) + expect_true(nrow(locations_ts) == 12) + + locations_ts <- location_series( + x = locations[, c("longitude", "latitude")], + time_bp = list(min = -10000, max = -5000), + bio_variables = c("bio01", "bio12"), + dataset = "Example" + ) + expect_true(nrow(locations_ts) == 8) + + # test one location only + locations_ts <- location_series( + x = locations[1, c("longitude", "latitude")], + bio_variables = c("bio01"), + dataset = "Example" + ) # now test if we try a variable that is not available expect_error( - time_series_for_locations( + location_series( x = locations[, c("longitude", "latitude")], bio_variables = c("bio01", "bio19"), - dataset = "Example", path_to_nc = path_to_example_nc + dataset = "Example" ), "bio19 not available" ) expect_error( - time_series_for_locations( + location_series( x = locations[, c("longitude", "latitude")], bio_variables = c("bio01", "bio19", "bio20"), - dataset = "Example", path_to_nc = path_to_example_nc + dataset = "Example" ), "bio19, bio20 not available" ) # now test if we try to use a variable that we have not downloaded yet expect_error( - time_series_for_locations( + location_series( x = locations[, c("longitude", "latitude")], bio_variables = c("bio01", "bio12"), - dataset = "Krapp2021", path_to_nc = path_to_example_nc + dataset = "Krapp2021" ), "variable \\(bio01, bio12\\) not yet downloaded" ) - # now treat it as if it was a custom dataset + # now use a custom dataset path_to_example_nc <- system.file("/extdata/example_climate.nc", - package = "pastclim") - locations_ts <- time_series_for_locations( + package = "pastclim" + ) + locations_ts <- location_series( x = locations[, c("longitude", "latitude")], bio_variables = c("BIO1", "BIO12"), dataset = "custom", path_to_nc = path_to_example_nc @@ -51,7 +73,7 @@ test_that("time_series_for_location", { expect_true(nrow(locations_ts) == 20) # if we try to use a variable that does not exist expect_error( - time_series_for_locations( + location_series( x = locations[, c("longitude", "latitude")], bio_variables = c("BIO1", "BIO22"), dataset = "custom", path_to_nc = path_to_example_nc @@ -60,11 +82,11 @@ test_that("time_series_for_location", { ) # if we try to use a file that does not exist expect_error( - time_series_for_locations( + location_series( x = locations[, c("longitude", "latitude")], bio_variables = c("BIO1", "BIO22"), dataset = "custom", path_to_nc = "/foo" ), - "file /foo does not exist" + "path_to_nc does not point to a file" ) }) diff --git a/tests/testthat/test_climate_for_location.R b/tests/testthat/test_location_slice.R similarity index 62% rename from tests/testthat/test_climate_for_location.R rename to tests/testthat/test_location_slice.R index 24c8e28d..d64e1740 100644 --- a/tests/testthat/test_climate_for_location.R +++ b/tests/testthat/test_location_slice.R @@ -1,24 +1,23 @@ -test_that("climate_for_time_slice", { +test_that("location_slice", { # using standard dataset - path_to_example_nc <- system.file("/extdata/", package = "pastclim") locations <- data.frame( - longitude = c(0, 90, -120, -7), latitude = c(20, 45, 60, 37), + longitude = c(0, 90, -120, -9), latitude = c(20, 45, 60, 37), time_bp = c(0, -10000, -20000, -10000) ) - this_climate <- climate_for_locations( + this_climate <- location_slice( x = locations[, c("longitude", "latitude")], time_bp = locations$time_bp, bio_variables = c("bio01", "bio12"), - dataset = "Example", nn_interpol = FALSE, path_to_nc = path_to_example_nc + dataset = "Example", nn_interpol = FALSE ) expect_false(is.na(this_climate[1, "bio01"])) expect_true(is.na(this_climate[3, "bio01"])) expect_true(is.na(this_climate[4, "bio01"])) # test nn_interpolation - this_climate <- climate_for_locations( + this_climate <- location_slice( x = locations[, c("longitude", "latitude")], time_bp = locations$time_bp, bio_variables = c("bio01", "bio12"), - dataset = "Example", nn_interpol = TRUE, path_to_nc = path_to_example_nc + dataset = "Example", nn_interpol = TRUE ) expect_false(is.na(this_climate[1, "bio01"])) expect_true(is.na(this_climate[3, "bio01"])) @@ -26,37 +25,37 @@ test_that("climate_for_time_slice", { # now test if we try a variable that is not available expect_error( - climate_for_locations( + location_slice( x = locations[, c("longitude", "latitude")], time_bp = locations$time_bp, bio_variables = c("bio01", "bio19"), - dataset = "Example", nn_interpol = FALSE, path_to_nc = path_to_example_nc + dataset = "Example", nn_interpol = FALSE ), "bio19 not available" ) expect_error( - climate_for_locations( + location_slice( x = locations[, c("longitude", "latitude")], time_bp = locations$time_bp, bio_variables = c("bio01", "bio19", "bio20"), - dataset = "Example", nn_interpol = FALSE, path_to_nc = path_to_example_nc + dataset = "Example", nn_interpol = FALSE ), "bio19, bio20 not available" ) # now test if we try to use a variable that we have not downloaded yet expect_error( - climate_for_locations( + location_slice( x = locations[, c("longitude", "latitude")], time_bp = locations$time_bp, bio_variables = c("bio01", "bio12"), - dataset = "Krapp2021", nn_interpol = FALSE, - path_to_nc = path_to_example_nc + dataset = "Krapp2021", nn_interpol = FALSE ), "variable \\(bio01, bio12\\) not yet downloaded" ) - # now treat it as if it was a custom dataset + # now test a custom dataset path_to_example_nc <- system.file("/extdata/example_climate.nc", - package = "pastclim") - this_climate <- climate_for_locations( + package = "pastclim" + ) + this_climate <- location_slice( x = locations[, c("longitude", "latitude")], time_bp = locations$time_bp, bio_variables = c("BIO1", "BIO12"), dataset = "custom", nn_interpol = FALSE, path_to_nc = path_to_example_nc @@ -66,7 +65,7 @@ test_that("climate_for_time_slice", { expect_true(is.na(this_climate[4, "BIO1"])) # if we try to use a variable that does not exist expect_error( - climate_for_locations( + location_slice( x = locations[, c("longitude", "latitude")], time_bp = locations$time_bp, bio_variables = c("BIO1", "BIO22"), dataset = "custom", nn_interpol = FALSE, path_to_nc = path_to_example_nc @@ -75,11 +74,30 @@ test_that("climate_for_time_slice", { ) # if we try to use a file that does not exist expect_error( - climate_for_locations( + location_slice( x = locations[, c("longitude", "latitude")], time_bp = locations$time_bp, bio_variables = c("BIO1", "BIO22"), dataset = "custom", nn_interpol = FALSE, path_to_nc = "/foo" ), - "file /foo does not exist" + "path_to_nc does not point to a file" + ) + + # now use times which are not the exact timesteps + locations_timeoff <- data.frame( + longitude = c(0, 90, -120, -9), latitude = c(20, 45, 60, 37), + time_bp = c(0, -9750, -20375, -10475) + ) + this_climate_timeoff <- location_slice( + x = locations_timeoff[, c("longitude", "latitude")], + time_bp = locations_timeoff$time_bp, bio_variables = c("bio01", "bio12"), + dataset = "Example", nn_interpol = TRUE + ) + # and compare it to the estimates from exact times (they should be the same!) + this_climate <- location_slice( + x = locations[, c("longitude", "latitude")], + time_bp = locations$time_bp, bio_variables = c("bio01", "bio12"), + dataset = "Example", nn_interpol = TRUE ) + expect_true(identical(this_climate[, -c(1:3)], + this_climate_timeoff[, -c(1:3)])) }) diff --git a/tests/testthat/test_region_series.R b/tests/testthat/test_region_series.R new file mode 100644 index 00000000..5de20369 --- /dev/null +++ b/tests/testthat/test_region_series.R @@ -0,0 +1,132 @@ +test_that("region series", { + # using standard dataset + climate_region <- region_series( + c(-20000, -10000), c("bio01", "bio12"), + "Example" + ) + expect_true(inherits(climate_region, "SpatRasterDataset")) + expect_true(all(names(climate_region) == c("bio01", "bio12"))) + expect_true(all(terra::nlyr(climate_region) == c(2, 2))) + + # do the same for a custom dataset + path_to_example_nc <- system.file("/extdata/example_climate.nc", + package = "pastclim") + climate_region <- region_series(c(-20000, -10000), c("BIO1", "BIO10"), + "custom", + path_to_nc = path_to_example_nc + ) + expect_true(inherits(climate_region, "SpatRasterDataset")) + expect_true(all(names(climate_region) == c("BIO1", "BIO10"))) + expect_true(all(terra::nlyr(climate_region) == c(2, 2))) + + # if we try to use a variable that does not exist + expect_error( + region_series(c(-20000, -10000), c("bio01", "bio19"), "Example"), + "bio19 not available" + ) + expect_error( + region_series(c(-20000, -10000), c("BIO1", "bio19"), "custom", + path_to_nc = path_to_example_nc + ), + "variable \\(bio19\\) not" + ) + + # if we try to use a variable that we have not downloaded yet + expect_error(region_series(c(-20000, -10000), + c("bio01", "bio19"), + "Krapp2021"), + "^variable \\(bio01, bio19\\) not yet downloaded") + + # if we try to use a file that does not exist + expect_error(region_series(c(-20000, -10000), c("BIO1", "BIO12"), "custom", + path_to_nc = "./foo" + ), "path_to_nc does not point to a file") + + # if we use time steps that do not exist + expect_error( + region_series( + c(-19000, -10000), c("bio01", "bio12"), + "Example" + ), + "time_bp should only include time steps available in the dataset" + ) + + # get all values + climate_region <- region_series(bio_variables = c("bio01", "bio12"), + dataset = "Example" + ) + expect_true(all(terra::nlyr(climate_region) == c(5, 5))) + + # get all values + climate_region <- region_series( + time_bp = list(min=-13000,max=0), c("bio01", "bio12"), + "Example" + ) + expect_true(all(terra::nlyr(climate_region) == c(3, 3))) +}) + +test_that("ext on region series", { + # this should work + expect_error(region_series( + time_bp = -20000, + c("bio01", "bio10", "bio12"), + dataset = "Example", + ext = terra::ext(region_extent$Europe) + ),NA) + + # this should raise an error + expect_error(region_series( + time_bp = -20000, + c("bio01", "bio10", "bio12"), + dataset = "Example", + ext = "foo" + ), "ext should be a ") + + # not enough elements + ext<-c(-15, 70, 33) + expect_error(region_series( + time_bp = -20000, + c("bio01", "bio10", "bio12"), + dataset = "Example", + ext = ext + ), "ext should be a ") + + # but this works as it is long enough + ext<-c(-15, 70, 33, 75) + expect_error(region_series( + time_bp = -20000, + c("bio01", "bio10", "bio12"), + dataset = "Example", + ext = ext + ), NA) + + test_that("crop on region series", { + + # this should work + expect_error(region_series( + time_bp = -20000, + c("bio01", "bio10", "bio12"), + dataset = "Example", + crop = terra::vect(region_outline$Eurasia) + ),NA) + + # this should raise an error + expect_error(region_series( + time_bp = -20000, + c("bio01", "bio10", "bio12"), + dataset = "Example", + crop = "foo" + ), "crop should be a ") + + # this should work + expect_error(region_series( + time_bp = -20000, + c("bio01", "bio10", "bio12"), + dataset = "Example", + crop = region_outline$Eurasia),NA) + + }) + + +}) + \ No newline at end of file diff --git a/tests/testthat/test_region_slice.R b/tests/testthat/test_region_slice.R new file mode 100644 index 00000000..44b8bf30 --- /dev/null +++ b/tests/testthat/test_region_slice.R @@ -0,0 +1,29 @@ +test_that("region slice", { + # using standard dataset + climate_slice <- region_slice( + c(-10000), c("bio01", "bio12"), + "Example" + ) + expect_true(inherits(climate_slice, "SpatRaster")) + expect_true(all(varnames(climate_slice) == c("bio01", "bio12"))) + expect_true(terra::nlyr(climate_slice) == c(2)) + + # do the same for a custom dataset + path_to_example_nc <- system.file("/extdata/example_climate.nc", + package = "pastclim") + climate_slice <- region_slice(c(-10000), c("BIO1", "BIO10"), + "custom", + path_to_nc = path_to_example_nc + ) + expect_true(inherits(climate_slice, "SpatRaster")) + expect_true(all(varnames(climate_slice) == c("BIO1", "BIO10"))) + expect_true(terra::nlyr(climate_slice) == c(2)) + + expect_error( + region_slice( + c(-10000, -20000), c("bio01", "bio12"), + "Example" + ), + "time_bp should be a single time step" + ) +}) diff --git a/tests/testthat/test_sample_region_series.R b/tests/testthat/test_sample_region_series.R new file mode 100644 index 00000000..f61bcf73 --- /dev/null +++ b/tests/testthat/test_sample_region_series.R @@ -0,0 +1,31 @@ +test_that("sample_region_series works correctly", { + set.seed(123) + # sample series + t_steps <- c(-20000,-10000) + vars <- c("bio01", "bio10", "bio12") + climate_ts <- region_series( + time_bp = t_steps, + vars, + dataset = "Example", + ext = terra::ext(region_extent$Europe) + ) + n_points <- c(10, 15) + sampled_var <- sample_region_series(climate_ts, size = n_points) + expect_true(nrow(sampled_var) == sum(n_points)) + # give wrong vector length + n_points <- c(10, 15, 20) + expect_error( + sampled_var <- sample_region_series(climate_ts, size = n_points), + "size should be the same length as the number of time steps in x" + ) + n_points <- 10 + sampled_fixed <- sample_region_series(climate_ts, size = n_points) + expect_true(nrow(sampled_fixed) == n_points * length(t_steps)) + expect_true(sum(is.na(sampled_fixed)) == 0) + sampled_fixed <- sample_region_series(climate_ts, size = n_points, + na.rm = FALSE) + expect_true(sum(is.na(sampled_fixed)) > 0) + climate_ts[1] <- climate_ts[1][[1]] + expect_error(sample_region_series(climate_ts, size = n_points), + "x is not a valid object generated by region_series") +}) diff --git a/tests/testthat/test_sample_region_slice.R b/tests/testthat/test_sample_region_slice.R new file mode 100644 index 00000000..5b3eb3f2 --- /dev/null +++ b/tests/testthat/test_sample_region_slice.R @@ -0,0 +1,17 @@ +test_that("sample_region_slice samples correctly", { + climate_20k <- region_slice( + time_bp = -20000, + bio_variables = c("bio01", "bio10"), + dataset = "Example" + ) + set.seed(123) + this_sample<-sample_region_slice(climate_20k,10) + expect_true(nrow(this_sample)==10) + expect_true(sum(is.na(this_sample))==0) + this_sample<-sample_region_slice(climate_20k,10, na.rm=FALSE) + expect_true(sum(is.na(this_sample))>0) + # error if we give more than one size (as we do for sample_region_series) + expect_error(sample_region_slice(climate_20k,c(10,10)), + "size should be a single value") +}) + \ No newline at end of file diff --git a/tests/testthat/test_slice_region_series.R b/tests/testthat/test_slice_region_series.R new file mode 100644 index 00000000..26a604e2 --- /dev/null +++ b/tests/testthat/test_slice_region_series.R @@ -0,0 +1,25 @@ +test_that("climate_for_time_slice", { + climate_region <- region_series( + c(-20000, -10000), c("bio01", "bio12"), + "Example" + ) + my_slice <- slice_region_series(climate_region, time_bp = -10000) + expect_true(inherits(my_slice, "SpatRaster")) + expect_true(length(my_slice) == 1) + expect_true(terra::nlyr(my_slice) == 2) + expect_true(all(varnames(my_slice) == c("bio01", "bio12"))) + # use a time step that does not exist + expect_error( + slice_region_series(climate_region, time_bp = -19000), + "time_bp is not a time slice within the region series x" + ) + # use too many timesteps + expect_error( + slice_region_series(climate_region, time_bp = c(-10000, -20000)), + "time_bp should be a single time step" + ) + # pass an object that is not valid + climate_region[1] <- climate_region[1][[1]] + expect_error(slice_region_series(climate_region, time_bp = -10000), + "x is not a valid object generated by region_series") +}) diff --git a/tests/testthat/test_time_bp_series.R b/tests/testthat/test_time_bp_series.R new file mode 100644 index 00000000..f69e40cb --- /dev/null +++ b/tests/testthat/test_time_bp_series.R @@ -0,0 +1,30 @@ +test_that("time_bp_series returns correct values", { + time_bp <- c(-10000,-20000) + time_steps <- sort(-seq(0,20000,by = 5000)) + ##################################################### + # if time_bp is a vector + ##################################################### + # correctly working + expect_true(all(time_bp_series(time_bp,time_steps)==c(3,1))) + # incorrect values + time_bp <- c(-9000,-20000) + expect_error(time_bp_series(time_bp,time_steps), + "time_bp should only include time steps available in the dataset") + ##################################################### + # if time_bp is a list + ##################################################### + time_bp <- list(min=-15000, max=-3000) + expect_true(all(time_bp_series(time_bp,time_steps)==c(2,3,4))) + time_bp <- list(min=-3000, max=-15000) + expect_error(time_bp_series(time_bp,time_steps), + "in time_bp, min should be less than max") + ##################################################### + # if time_bp is null + ##################################################### + expect_true(is.null(time_bp_series(NULL,time_steps))) + ##################################################### + # if time_bp is nonsense + ##################################################### + expect_error(time_bp_series("blah",time_steps), + "time_bp can only be") +}) \ No newline at end of file diff --git a/vignettes/a0_pastclim_overview.Rmd b/vignettes/a0_pastclim_overview.Rmd new file mode 100644 index 00000000..f08aa30a --- /dev/null +++ b/vignettes/a0_pastclim_overview.Rmd @@ -0,0 +1,513 @@ +--- +title: "pastclim overview" +# output: rmarkdown::pdf_document +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{pastclim overview} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +# Install the library + +You will need to install the library from Github. For this step, you will need to +use `devtools` (if you haven't done so already, install it from CRAN with `install.packages("devtools")`. +Once you have `devtools`, simply use: +```{r install, eval=FALSE} +devtools::install_github("EvolEcolGroup/pastclim") +``` + +There is a vignette with detailed step by step examples on how to use the library. You can +find it on the website for the package. Or, if needed, you can build it when installing +`pastclim` : +```{r install_vignette, eval=FALSE} +devtools::install_github("EvolEcolGroup/pastclim", build_vignettes = TRUE) +``` + +And read it directly in R with: +```{r vignette, eval=FALSE} +vignette("pastclim_overview", package = "pastclim") +``` +Depending on the operating system you use, you might need additional packages to build +a vignette. + +--- + +NOTE: `pastclim` relies on `terra` to process rasters. There is a known bug in +`terra` that leads to the occasional message: +``` +"Error in x$.self$finalize() : attempt to apply non-function" +``` + +being reported. This is an error related to garbage collection, which does not +affect the script being correctly executed, so it can be ignored. More discussion +of this issue can be found on [stack**overflow**](https://stackoverflow.com/questions/61598340/why-does-rastertopoints-generate-an-error-on-first-call-but-not-second) + + +# Download the data +You will need to download climatic reconstructions before being able to do any +work with `pastclim`. Currently the library contains two datasets: +*Beyer2020* which covers the last 120k years; and, for project that go further back in time, *Krapp2021* which goes back to 800kya. It is possible to add additional, custom datasets, but +you will need some familiarity with handling `netcdf` files (see the vignette on +'custom dataset'). + +```{r eval=FALSE} +vignette("custom_datasets", package = "pastclim") +``` + +A list of all datasets available can be obtained by typing + +```{r eval=FALSE} +vignette("available_datasets", package = "pastclim") +``` + +Please be aware that using any dataset made available to pastclim will require to cite both pastclim and the original publication presenting the dataset. The reference to cite for pastclim can be obtained by typing + +```{r} +citation("pastclim") +``` + +while the reference associated to any dataset of choice (in this case "Beyer2020") is displayed together with the general information on it through the command: + +```{r eval=FALSE} +help("Beyer2020") +``` + +```{r echo=FALSE} +pastclim:::get_dataset_info(dataset="Beyer2020") +``` + +For the datasets available in `pastclim`, there are functions that help you download the data +and choose the variables. + +Datasets will stored in the package data path, which can be obtained with: + +```{r} +library(pastclim) +get_data_path() +``` + +If you prefer using a custom path (e.g. in "~/my_reconstructions"), it can be set with: + +```{r eval=FALSE} +set_data_path(path_to_nc = "~/my_reconstructions") +``` + +`pastclim` will remember this new path in the future, even after closing and restarting +R. + +The package includes a small dataset, *Example*, that we will use in this vignette but is not suitable for running analyses; +the real datasets are large (from 100s of Mb to a few Gb), and you will need to specify +what you want to download (see below). + +Let us start by inspecting the *Example* dataset. We can get a list of variables +available for this dataset with: + +```{r} +get_vars_for_dataset(dataset = "Example") +``` + +and the available time steps can be obtained with: + +```{r} +get_time_steps(dataset = "Example") +``` + +For *Beyer2020* and *Krapp2021*, you can get a list +of available variables for each dataset with: +```{r} +get_vars_for_dataset(dataset = "Beyer2020") +``` + +and + +```{r} +get_vars_for_dataset(dataset = "Krapp2021") +``` + +For monthly variables, months are coded as "_xx" at the end of the variable names; e.g. "temperature_02" is the +mean monthly temperature for February. + +You will not be able to get the available time steps until you download the data. `pastclim` offers an interface +to download the necessary files into your data path. + +To inspect which datasets and variables have already been downloaded in the data path, +we can use: +```{r} +get_downloaded_datasets() +``` + +Let's now download *bio01* and *bio05* for the *Beyer2020* dataset (this operation might take several minutes, as the datasets are large; `R` will pause until +the download is complete): + +```{r eval=FALSE} +download_dataset(dataset = "Beyer2020", bio_variables = c("bio01", "bio05")) +``` + +Note that multiple variables can be packed together into a single file, so +`get_downloaded_datasets()` might list more variables than the ones that we chose to download (it depends on the dataset). + +We have found that on some installations of R (mostly on macOS), the default data path +chosen by R can lead to an error when downloading datasets (this is due to incorrect +writing permission for +that path). If you get an error when downloading data stating "Failed to open file ...", +set the path with `set_data_path` to a directory in +your user area, and the error should disappear when you issue again the `download_dataset` command. + +# Get climate for locations + +Often we want to get the climate for specific locations. We can do so by using +the function `location_slice`. With this function, we will get slices of climate +for the times relevant to the locations of interest. + +Let us create some fictitious locations: + +```{r} +locations <- data.frame( + longitude = c(0, 90, -120, -9), latitude = c(20, 45, 60, 37), + time_bp = c(0, -9753, -18738, -11849) +) +locations +``` + +And extract their climatic conditions for *bio01* and *bio12*: +```{r} +location_slice( + x = locations[, c("longitude", "latitude")], + time_bp = locations$time_bp, bio_variables = c("bio01", "bio12"), + dataset = "Example", nn_interpol = FALSE +) +``` +`pastclim` finds the closest time steps (slices) available for a given date, and outputs +the slice used in column `time_bp_slice` (the *Example* dataset that we use in this vignette has a temporal resolution of only 5k years). + +Note that the last two locations, for the appropriate time steps, are not available (either under water or ice), and so `pastclim` does not return a climate reconstruction. In some instances, this is due to the discretisation of space in the raster. We can interpolate climate among the nearest neighbours, thus using climate reconstructions for neighbouring pixels if the location is just off one or more land pixels: +```{r} +location_slice( + x = locations[, c("longitude", "latitude")], + time_bp = locations$time_bp, bio_variables = c("bio01", "bio12"), + dataset = "Example", nn_interpol = TRUE) +``` +In this case, the last location is indeed just off the coast, and so we can reconstruct some appropriate climate by interpolating. Note that `nn_interpol = TRUE` is the default for this function. + +Sometimes, we want to get a time series of climatic reconstructions, thus allowing us to +see how climate changed over time: +```{r} +locations_ts <- location_series( + x = locations[, c("longitude", "latitude")], + bio_variables = c("bio01", "bio12"), + dataset = "Example") +``` + +The resulting dataframe can be subsetted to get the time series for each location +(the small *Example* dataset only contains 5 time slices): +```{r} +subset(locations_ts, id == 1) +``` +Also note that for some locations, climate can be available only for certain time steps, depending on sea level and ice sheet extent. This is the case for location 3: +```{r} +subset(locations_ts, id == 3) +``` + +# Get climate for a region + +Instead of focussing on specific locations, we might want to look at a whole region. +For a given time step, we can extract a slice of climate with + +```{r} +climate_20k <- region_slice( + time_bp = -20000, + bio_variables = c("bio01", "bio10", "bio12"), + dataset = "Example" +) +``` + +This returns a raster (technically a `spatRaster` object as defined in the `terra` +library, meaning that we can perform all standard `terra` raster operations +on this object). To interact with `spatRaster` objects, it is best to load the +`terra` library (otherwise you might get errors as the correct method is not found, e.g. +when plotting); we can then get a summary of this object: +```{r} +library(terra) +climate_20k +``` + +and plot these three variables (the layers of the raster): +```{r, fig.width=6, fig.height=5} +terra::plot(climate_20k, main = names(climate_20k)) +``` + +It is possible to also load a time series of rasters with the function `region_series`. In this case, the function returns a `spatRasterDataset`, with each variable as a sub-dataset: + +```{r} +climate_region <- region_series( + time_bp = list(min = -15000, max = 0), + bio_variables = c("bio01", "bio10", "bio12"), + dataset = "Example") +climate_region +``` + +Each of these sub-dataset is a `spatRaster`, with time steps as layers: + +```{r} +climate_region$bio01 +``` + +We can then plot the time series of a given variable: +```{r, fig.width=6, fig.height=5} +terra::plot(climate_region$bio01) +``` + +To plot all climate variables for a given time step, we can slice the time series: +```{r, fig.width=6, fig.height=5} +slice_10k <- slice_region_series(climate_region, time_bp = -10000) +terra::plot(slice_10k, main = names(slice_10k)) +``` + +Instead of giving a minimum and maximum time step, you can also provide +specific time steps to `region_series`. Note that `pastclim` has a function to get a vector +of the time steps for a given MIS in a dataset. For example, for MIS 1, we get: +```{r} +mis1_steps <- get_mis_time_steps(mis = 1, dataset = "Example") +mis1_steps +``` + +Which we can then use: +```{r} +climate_mis1 <- region_series( + time_bp = mis1_steps, + bio_variables = c("bio01", "bio10", "bio12"), + dataset = "Example" +) +climate_mis1 +``` + +# Cropping + +Often we want to focus a given region. There are a number of preset rectangular extents in +`pastclim`: +```{r} +names(region_extent) +``` + +We can get the corners of the European extent: +```{r} +region_extent$Europe +``` + +And then we can extract climate only for Europe by setting `ext` in `region_slice`: + +```{r, fig.width=6, fig.height=5} +europe_climate_20k <- region_slice( + time_bp = -20000, + bio_variables = c("bio01", "bio10", "bio12"), + dataset = "Example", + ext = region_extent$Europe +) +terra::plot(europe_climate_20k, + main = names(europe_climate_20k)) +``` + +As we can see in the plot, cutting Europe using a rectangular shape keeps a portion of Northern Africa in the map. `pastclim` includes a number of pre-generated masks for the main continental masses, stored in the dataset `region_outline` in an `sf::sfc` object. We can get a list with: + +```{r} +names(region_outline) +``` +We can then use the function `crop` within `region_slice` to only keep the area within the desired outline. + +```{r, fig.width=6, fig.height=5} +europe_climate_20k <- region_slice( + time_bp = -20000, + c("bio01", "bio10", "bio12"), + dataset = "Example", + crop = region_outline$Europe +) +terra::plot(europe_climate_20k, + main = names(europe_climate_20k)) +``` + +We can combine multiple regions together. For example, we can cropt to Afircan and Eurasia by unioning the two indiviudal outlines: + +```{r, fig.width=6, fig.height=5} +library(sf) +afr_eurasia <- sf::st_union(region_outline$Africa, region_outline$Eurasia) +climate_20k_afr_eurasia <- region_slice( + time_bp = -20000, + bio_variables = c("bio01", "bio10", "bio12"), + dataset = "Example", + crop = afr_eurasia) +terra::plot(climate_20k_afr_eurasia, + main = names(climate_20k_afr_eurasia)) +``` + +Note that outlines that cross the antimeridian are split into multiple polygons (so that they can be used without projecting the rasters). For Eurasia, we have the eastern end of Siberia on the left hand side of the plot. `continent_outlines_union` provides the same outlines as single polygons (in case you want to use a projection). + +You can also use your own custom outline (i.e. a polygon, coded as a `terra::vect` +object) as a mask to limit +the area covered by the raster. Note that you need to +reuse the first vertex as the last vertex, to close the polygon: + +```{r, fig.width=6, fig.height=5} +custom_vec <- terra::vect("POLYGON ((0 70, 25 70, 50 80, 170 80, 170 10, + 119 2.4, 119 0.8, 116 -7.6, 114 -12, 100 -40, + -25 -40, -25 64, 0 70))") +climate_20k_custom <- region_slice( + time_bp = -20000, + bio_variables = c("bio01", "bio10", "bio12"), + dataset = "Example", + crop = custom_vec) +terra::plot(climate_20k_custom, + main = names(climate_20k_custom)) +``` + +`region_series` takes the same `ext` and `crop` options as `region_slice` to limit +the extent of the climatic reconstructions. + +# Working with biomes and ice sheets + +The Beyer2020 and Krapp2021 datasets include a categorical variable detailing the extension of biomes. + +```{r} +get_biome_classes("Example") +``` + +If we need to plot the extent of a specific biome, for example the desert, we first extract the variable and then subset it to just the class we are interested in using its ID (21, in this case): + +```{r, fig.width=6, fig.height=5} +climate_20k <- region_slice( + time_bp = -20000, + bio_variables = c("bio01", "bio10", "biome"), + dataset = "Example" +) +climate_20k$desert <- climate_20k$biome +climate_20k$desert[climate_20k$desert != 21] <- FALSE +climate_20k$desert[climate_20k$desert == 21] <- TRUE +terra::plot(climate_20k, main = names(climate_20k)) +``` + +The climate reconstructions do not show areas under permanent ice. Ice sheets are stored as class 28 in the "biome" variable: + +To plot it, we use functions designed to get ice and land masks. +```{r, fig.width=6, fig.height=5} +climate_20k <- region_slice( + time_bp = -20000, + bio_variables = c("bio01", "bio10"), + dataset = "Example" +) +climate_20k$ice_mask <- get_ice_mask(-20000, dataset = "Example") +climate_20k$land_mask <- get_land_mask(-20000, dataset = "Example") +terra::plot(climate_20k, main = names(climate_20k)) +``` + +# Set the samples within the background + +In many studies, we want to set the environmental conditions at a given set of +location within the background for that time period. Let us start by +visualising the background for the time step of interest with a PCA: + +```{r, fig.width=4, fig.height=4} +bio_vars <- c("bio01", "bio10", "bio12") +climate_10k <- region_slice(-10000, + bio_variables = bio_vars, + dataset = "Example" +) +climate_values_10k <- df_from_region_slice(climate_10k) +climate_10k_pca <- prcomp(climate_values_10k[, bio_vars], + scale = TRUE, center = TRUE) +plot(climate_10k_pca$x[, 2] ~ climate_10k_pca$x[, 1], + pch = 20, col = "lightgray", + xlab = "PC1", ylab = "PC2" +) +``` + +We can now get the climatic conditions for the locations at this time step and compute the PCA scores based on the axes we defined on the background: +```{r} +locations_10k <- data.frame( + longitude = c(0, 90, 20, 5), latitude = c(20, 45, 50, 47), + time_bp = c(-9932, -9753, -10084, -10249) +) +climate_loc_10k <- location_slice( + x = locations_10k[, c("longitude", "latitude")], + time_bp = locations_10k$time_bp, bio_variables = bio_vars, + dataset = "Example" +) +locations_10k_pca_scores <- predict(climate_10k_pca, + newdata = climate_loc_10k[, bio_vars]) +``` + +And now we can plot the points on top of the background +```{r, fig.width=4, fig.height=4} +plot(climate_10k_pca$x[, 2] ~ climate_10k_pca$x[, 1], + pch = 20, col = "lightgray", + xlab = "PC1", ylab = "PC2" +) +points(locations_10k_pca_scores, pch = 20, col = "red") +``` + +If we want to pool the background from multiple time steps, we can simple use +`region_series` to get a series, and then transform it into a data frame with +`df_from_region_series`. + +# Random sampling of background + +NOTE: there is a bug in terra 1.6.17 that prevents this section from +working; you will get a "negative probability" error when sampling +if you use that version. + +For a number of species distribution models, rather than using the complete +background, we need to subsample background points to our presences. +If we are interested in a single time step, we can simply generate the +raster for the time slice of interest, and use `sample_region_slice`: + +```{r} +climate_20k <- region_slice( + time_bp = -20000, + bio_variables = c("bio01", "bio10"), + dataset = "Example" +) +this_sample <- sample_region_slice(climate_20k, size = 100) +head(this_sample) +``` + +We can also sample the background for multiple time steps (e.g. if we want to +match the background to the number of samples based on their radiocarbon dates). +So, for example, if +we wanted 3 samples from 20k years ago and 5 samples from 10k years ago: + +```{r} +climate_ts <- region_series( + time_bp = c(-20000,-10000), + bio_variables = c("bio01", "bio10", "bio12"), + dataset = "Example", + ext = terra::ext(region_extent$Europe) +) +sampled_climate <- sample_region_series(climate_ts, size = c(3,5)) +sampled_climate +``` + +# Downscaling + +`pastclim` does not contain built-in code to change the spatial resolution of the climatic reconstructions, but it is possible to downscale the data by using the relevant function from the `terra` package. + +At first we will need to extract a region and time of choice, in this case Northern America 10,000 years ago + +```{r, fig.width=6, fig.height=4} +Namerica_10k <- region_slice(dataset="Example", c("bio01"), + time_bp=-10000, ext=region_extent$N_America) +terra::plot(Namerica_10k) +``` + +We can then downscale using the `disagg()` function from the `terra` package, requiring an aggregation factor expressed as number of cells in each direction (horizontally, vertically, and, if needed, over layers). In the example below we used 25 both horizontally and vertically, using bilinear interpolation. + +```{r, fig.width=6, fig.height=4} +Namerica_ds <- terra::disagg(Namerica_10k, fact=25, method='bilinear') +terra::plot(Namerica_ds) + +``` diff --git a/vignettes/a1_available_datasets.Rmd b/vignettes/a1_available_datasets.Rmd new file mode 100644 index 00000000..03525a48 --- /dev/null +++ b/vignettes/a1_available_datasets.Rmd @@ -0,0 +1,45 @@ +--- +title: "available datasets" +# output: rmarkdown::pdf_document +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{available datasets} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +## Overview of datasets available in `pastclim` + +A number of datasets are available in pastclim. It is possible to use custom datasets as long as they are properly formatted (look at the article on how to format custom datasets if you are interested). It is possible to get a list of all available datasets with: + +```{r} +library(pastclim) +get_available_datasets() +``` + +For each dataset, you can get detailed information using the +help function: + +```{r eval=FALSE} +help("Example") +``` + +```{r echo=FALSE} +pastclim:::get_dataset_info(dataset="Example") +``` + +Here we provide the full documentation for each dataset (sorted in alphabetical order): +```{r echo=FALSE} +for (i in sort(get_available_datasets())){ + pastclim:::get_dataset_info(i) + cat("\n#######################################################\n") +} +``` + diff --git a/vignettes/a2_custom_datasets.Rmd b/vignettes/a2_custom_datasets.Rmd new file mode 100644 index 00000000..4858c535 --- /dev/null +++ b/vignettes/a2_custom_datasets.Rmd @@ -0,0 +1,132 @@ +--- +title: "custom dataset" +#output: rmarkdown::pdf_document +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{custom dataset} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +## Formatting a custom dataset for `pastclim` + +This guide is aimed at formatting data in such a way that they can be used with `pastclim`. `pastclim` is designed to extract data from `netcdf` files, a format commonly used for storing climate reconstructions. `netcdf` files have a number of advantages, as they can store compressed information, as well as allowing access to only the data required (e.g. extracting only the time steps or location of interest without reading all the data in memory). The expected format for `pastclim` requires that all time steps of a given variable be stored within a single netcdf file. How variables are combined (or not) is then flexible: you can have a separate file for each variable, collate everything within a single file, or create multiple files each including a number of variables. The time variable should be in years since 1950 (i.e. with negative integers indicating the past). There are a number of command line tools as well as R libraries (e.g. `cdo`, `gdal`, `terra`) that can help creating and editing netcdf files. + +## An example: the Trace21k-CHELSEA + +Here we provide a simple example of how to format such a dataset in R. We will use a version of the Trace21k dataset, downscaled to 30 arcsecs using the CHELSEA algorithm(available from [this website](https://chelsa-climate.org/chelsa-trace21k/)). The data are stored as geoTIFF files, one file per timestep per variable. First, we need to collate all the files for a given variable (we will use *bio01* as an example) within a single `netcdf` file. As the original files are large, we will illustrate here how do to that for only a few timesteps which were aggregated to 3x3 degrees to keep files sizes small. + +We start by translating each geoTIFF into a `netcdf` file. The files have the prefix *CHELSA_TraCE21k_bio01_-**xxx**_V1.0.small.tif*, where **xxx** is the number of the time step. +We will only use 3 time step for illustrative purposes. + +We store all the files in a single directory, and create a `spatRaster` from a list of the files +in that directory: + +```{r} +tiffs_path <- system.file("extdata/CHELSA_bio01",package="pastclim") +list_of_tiffs <- file.path(tiffs_path,dir(tiffs_path)) +bio01 <- terra::rast(list_of_tiffs) +``` + +Now we need to set the time axis of the raster (in this case, reconstructions are every 100 years), and generate some userfriendly names to layers in the raster: + +```{r} +terra::time(bio01)<-c(0,-100,-200) +names(bio01)<-paste("bio01",terra::time(bio01),sep="_") +``` + +Now we save the data as a *nc* file (we will use the temporary directory) +```{r} +nc_name <- file.path(tempdir(),"CHELSA_TraCE21k_bio01.nc") +terra::writeCDF(bio01, filename = nc_name, varname = "bio01") +``` + +We also need to make sure that the *time* dimension has units and is labelled +as `axis="T"`, or `pastclim` will not +be able to read the data properly. + +```{r} +nc_in <- ncdf4::nc_open(nc_name, write=TRUE) +ncdf4::ncatt_put(nc_in, varid="time", attname="units", attval = "years since present") +ncdf4::ncatt_put(nc_in, varid="time", attname="axis", attval = "T") +ncdf4::nc_close(nc_in) + +``` + +We can now read in our custom netcdf file. +```{r} +library(pastclim) +custom_series <- region_series(bio_variables = "bio01", + dataset = "custom", + path_to_nc = nc_name +) +custom_series +``` +As expected, there is only one variable ("bio01") and +3 time steps (nlyr). We can get the times of those time steps with: +```{r} +get_time_steps(dataset="custom", path_to_nc = nc_name) +``` + +And we can slice the series and plot a give time point: +```{r} +climate_100<-slice_region_series(custom_series, time_bp = -100) +terra::plot(climate_100) +``` + +Note that these reconstructions include the ocean and the icesheets, and it would +be much better to remove them as they are not needed for most ecological/archaological studies (and +it allows for smaller files). + +# Making the data available to others + +Once you have created suitably fomatted netcdf files that can be used as custom datasets in +`pastclim`, you can add those data officially to the package, and thus make them available +to others. Here are the necessary steps: + +1) Put your files in a freely available repository. + +2) Update the table used by `pastclim` to +store information about available datasets. This table is found in +"./inst/rawdata_scripts/data_files/variable_table.csv". + +```{r} +head(read.csv(system.file("rawdata_scripts/data_files/variable_table.csv", + package="pastclim")), n=2) +``` + +This includes the following fields: + +`variable`: the variable name used by `pastclim` + +`ncvar`: the variable name within the *nc* file (it can be the same +as `variable`) + +`dataset`: the name of the dataset. + +`monthly`: boolean on whether the variable is monthly. + +`file_name`: the name of the file for that variable. + +`download_path`: the URL to download the file. + +`file_name_orig`: the name of the original file(s) used to create +the *nc* dataset. + +`download_path_orig`: the path of those original files. + +`version`: the version of the dataset that you created + +3) Once you have added lines detailing the variables in your dataset, run the script "./inst/rawdata_scripts/creat_files_by_dataset.R" to store +that information into the appropriate dataset in `pastclim`. + +4) Provide information on the new dataset in the file "./R/dataset_docs", using `roxygen2` notation. Make sure that you provide an appropriate reference for the original data, as it is important that users can refer back to the original source. + +4) Make a Pull Request on GitHub. \ No newline at end of file diff --git a/vignettes/pastclim_overview.Rmd b/vignettes/pastclim_overview.Rmd deleted file mode 100644 index f53e5d91..00000000 --- a/vignettes/pastclim_overview.Rmd +++ /dev/null @@ -1,338 +0,0 @@ ---- -title: "pastclim overview" -# output: rmarkdown::pdf_document -output: rmarkdown::html_vignette -vignette: > - %\VignetteIndexEntry{pastclim overview} - %\VignetteEngine{knitr::rmarkdown} - %\VignetteEncoding{UTF-8} ---- - -```{r, include = FALSE} -knitr::opts_chunk$set( - collapse = TRUE, - comment = "#>" -) -``` - -# Install the library - -You will need to install the library from Github. For this step, you will need to -use `devtools` (if you haven't done so already, install it from CRAN with `install.packages("devtools")`. -Once you have `devtools`, simply use: -```{r install, eval=FALSE} -devtools::install_github("EvolEcolGroup/pastclim") -``` - -There is a vignette with detailed step by step examples on how to use the library. You can -find it on the website for the package. Or, if when can build it when installing -`pastclim` : -```{r install_vignette, eval=FALSE} -devtools::install_github("EvolEcolGroup/pastclim", build_vignettes = TRUE) -``` -And read it directly in R with: -```{r vignette, eval=FALSE} -vignette("pastclim_overview",package="pastclim") -``` -The vignette also provides instructions on how to install the optional -companion package `pastclimData`, which simplifies the task of downloading and -storing the climate simulations. -Depending on the operating system you use, you might need additional packages to build -a vignette. ---- - -NOTE: `pastclim` relies on `terra` to process rasters. There is a known bug in -`terra` that leads to the occasional message: -``` -"Error in x$.self$finalize() : attempt to apply non-function" -``` - -being reported. This is an error related to garbage collection, which does not -affect the script being correctly executed, so it can be ignored. More discussion -of this issue can be found on [stack**overflow**](https://stackoverflow.com/questions/61598340/why-does-rastertopoints-generate-an-error-on-first-call-but-not-second) - - -# Download the data -You will need to download climatic reconstuctions before being able to do any -work with `pastclim`. The library focuses on two datasets: "Beyer2020" which covers the last 120k years; and, for project that go further back in time, "Krapp2021" which goes back to 800kya. For these to datasets, there are functions that help you download the data -and choose the variables. If you are familiar with handling `netcdf` files, you can also -use most functions in `pastclim` on custom datasets. - -For Beyer2020 and Krapp2021, you can get a list -of available variables for each dataset with: -```{r} -library(pastclim) -get_vars_for_dataset(dataset="Beyer2020") -``` - -and - -```{r} -get_vars_for_dataset(dataset="Krapp2021") -``` - -However, before being able to use these data you need to download the data files into -a directory of choice. Note that these data are large (from 100s of Mb to a few Gb). There is also a small -"Example" dataset that we will use in this vignette. This is included in the package when -you download it, and it is stored in the `/extdata` directory, which can be found in: - -```{r} -path_to_example_nc <- system.file("/extdata/", package="pastclim") -``` - -For Beyer2020 and Krapp20221, `pastclim` manages the files necessary for each variable. So, we can download data for `bio01` and `bio05` for the Beyer2020 dataset with (this operation might take several minutes, as the datasets are large; `R` will pause until -the download is complete): - -```{r eval=FALSE} -download_dataset(dataset="Beyer2020", bio_variables = c("bio01","bio05"), - path_to_nc = "~/paleoclimate_reconstructions") -``` - -Note that we need to provide `pastclim` with a local path where to store the reconstructions (in this case `~/paleoclimate_reconstructions`, but you probably want a different one on your machine). We will have to use that path again every time we use a command to manipulate the data. - -You can get a summary of variables already downloaded (and thus that can be used) -with: -```{r} -get_downloaded_datasets(path_to_nc = path_to_example_nc) -``` - -Note that for the example above, we used the directory containing the example dataset; use the path where you stored the data that you donwloaded. Note that multiple variables are packed together into a single file, so the command might list more variables than the ones that we downloaded originally. - -Having to set a path every time can be cumbersome; a simpler option to handle climate files is to install a companion package `pastclimData`: - -```{r eval=FALSE} -devtools::install_github("EvolEcolGroup/pastclimData", ref="master") -``` - -If `pastclimData` is installed, the paleoclimate reconstructions will be stored -within that package when you download them and they will then be found automatically by `pastclim` without the need to set a path). So, to download the Beyer2020 dataset, we -simply need: -```{r eval=FALSE} -download_dataset(dataset="Beyer2020", bio_variables = c("bio01","bio05")) -``` - -By not setting `path_to_nc` in the command above, the downloaded file will be stored in that companion library`pastclimData`. The downside of storing the data in `pastclimData` is that, if you reinstall or upgrade `R`, you will need to redownload the climate reconstructions. - -# Get climate for location - -Get climate for several locations at different times: - -```{r} -locations<-data.frame(longitude=c(0,90,-120,-7),latitude=c(20,45,60,37), - time_bp=c(0,-10000, -20000, -10000)) - -climate_for_locations (x= locations[,c("longitude", "latitude")], - time_bp = locations$time_bp, bio_variables=c("bio01","bio12"), - dataset="Example", nn_interpol = FALSE, path_to_nc = path_to_example_nc) -``` -Note that the last two locations, for the appropriate time steps, are not available (either under water or ice), and so `pastclim` does not return a climate reconstruction. In some instances, this is due to the discretisation of space in the raster. We can interpolate climate among the nearest neighbours, thus using climate reconstructions for neighbouring pixels if the location is just off one or more land pixels: -```{r} -climate_for_locations (x= locations[,c("longitude", "latitude")], - time_bp = locations$time_bp, bio_variables=c("bio01","bio12"), - dataset="Example", nn_interpol = TRUE, path_to_nc = path_to_example_nc) -``` -In this case, the last location is indeed just off the coast, and so we can reconstruct some appropriate climate by interpolating. Note that `nn_interpol = TRUE` is the default for this function. - -In both commands above, we used the local copy of the Example dataset. If `pastclimData` was installed, we could use the same commands without setting `path_to_nc`. - -Get time series for these locations: -```{r} -locations_ts <- time_series_for_locations(x= locations[,c("longitude", "latitude")], - bio_variables=c("bio01","bio12"), - dataset="Example", path_to_nc = path_to_example_nc) -``` - -The resulting dataframe can be subsetted to get the time series for each location -(the small example dataset only contains 5 time points): -```{r} -subset(locations_ts,id==1) -``` -Note that the last two locations do not return information for all time steps. That's due to the change in sea level and icesheet extent, and this function (as opposed to `climate_for_locations`) does not allow for interpolation. -```{r} -subset(locations_ts,id==3) -``` -```{r} -subset(locations_ts,id==4) -``` - -# Get climate for a given time step - -We can extract rasters for a given time step: -```{r} -climate_20k <- climate_for_time_slice(time_bp = -20000, - c("bio01","bio10","bio12"), - dataset="Example", path_to_nc = path_to_example_nc) -``` - -We can get a summary of this object: -```{r} -library(terra) -climate_20k -``` - -and plot these two layers: -```{r, fig.width=6, fig.height=5} -terra::plot(climate_20k) -``` - -Often we want to focus a given region. There are a number of preset extents in -`pastclim`: -```{r} -region_extent -``` -We can crop the raster to Europe: -```{r, fig.width=6, fig.height=5} -europe_climate_20k <- terra::crop(climate_20k,terra::ext(region_extent$Europe)) -terra::plot(europe_climate_20k) -``` - -We might want to use a more complex shape (i.e. a polygon, as a `terra::vect` -object) as a mask to limit -the area covered by the raster. For example, we might want to focus the 3 -continents Africa, Europe and Asia, but exclude the Americas and Oceania. We -need to create a polygon with the appropriate vertices (note that you need to -reuse the first vertex as the last vertex, to close the polygon). For the masking -operation to work correctly, the polygon will need to have the same projection -as the raster (all the dataset have a simple `lon/lat` projection, so we can -copy over the `crs` from the raster to the polygon). It is also helpful to crop -the extent of the raster to that of the polygon (to avoid having a large amount -of blank space). -```{r, fig.width=6, fig.height=5} -afr_eurasia_vec<- terra::vect("POLYGON ((0 70, 25 70, 50 80, 170 80, 170 10, - 119 2.4, 119 0.8, 116 -7.6, 114 -12, 100 -40, - -25 -40, -25 64, 0 70))") -terra::crs(afr_eurasia_vec)<-terra::crs(climate_20k) -climate_20k_afr_eurasia <- terra::mask(climate_20k, afr_eurasia_vec) -climate_20k_afr_eurasia <- terra::crop(climate_20k_afr_eurasia,afr_eurasia_vec) -terra::plot(climate_20k_afr_eurasia) -``` - -`pastclim` includes a number of pre-generated masks for the main continental masses, stored in the dataset `continent_outlines` in an `sf` object. Note that outlines that cross the antimeridian are split into multiple polygons (so that they can be used without projecting the rasters). `continent_outlines_union` provides the same outlines as single polygons (in case you want to use a projection). We can build the outline for Africa nad Eurasian by unioning the two individual outines: -```{r} -library(sf) -africa_outline<- subset(region_outline, region_outline$name=="Africa") -eurasia_outline<- subset(region_outline, region_outline$name=="Eurasia") -afr_eurasia_vec<-terra::vect(sf::st_union(africa_outline, eurasia_outline)) -climate_20k_afr_eurasia <- terra::mask(climate_20k, afr_eurasia_vec) -terra::plot(climate_20k_afr_eurasia) -``` -Note that the Eurasian outline is intersected by the antimeridian, and so we have a small amount of data on the left hand side of the plot (corresponding to the eastern end of Siberia). - -# Working with biomes and icesheets -The climate reconstructions do not show areas under permanent ice. Ice sheets are stored as class 28 in the "biome" variable: -```{r} -get_biome_classes("Example", path_to_nc = path_to_example_nc) -``` - -To plot it, we extract the biome and then subset it to just that class -```{r, fig.width=6, fig.height=5} -climate_20k <- climate_for_time_slice(-20000, - c("bio01","bio10","biome"), - dataset = "Example", path_to_nc = path_to_example_nc) -climate_20k$ice<-climate_20k$biome -climate_20k$ice[climate_20k$ice!=28]<-FALSE -climate_20k$ice[climate_20k$ice==28]<-TRUE -terra::plot(climate_20k) -``` - -Or more simply, we use functions designed to get ice and land masks. -```{r, fig.width=6, fig.height=5} -climate_20k <- climate_for_time_slice(-20000, - c("bio01","bio10"), - dataset="Example", path_to_nc = path_to_example_nc) -climate_20k$ice_mask<-get_ice_mask(-20000, dataset="Example", path_to_nc = path_to_example_nc) -climate_20k$land_mask <- get_land_mask(-20000, dataset="Example", path_to_nc = path_to_example_nc) -terra::plot(climate_20k) -``` - -# Set the samples within the background - -We can visualise the environment for this time step with a PCA: -```{r, fig.width=4, fig.height=4} -climate_10k <- climate_for_time_slice(-10000, - c("bio01","bio10","bio12"), - dataset="Example", path_to_nc = path_to_example_nc) -climate_values_10k <- values(climate_10k) -climate_values_10k <- climate_values_10k[!is.nan(climate_values_10k[,1]),] -climate_10k_pca<-prcomp(climate_values_10k,scale=TRUE, center=TRUE) -plot(climate_10k_pca$x[,2]~climate_10k_pca$x[,1],pch=20,col="lightgray", - xlab="PC1",ylab="PC2") -``` - -We can now get the climate variables for the locations at this time step, compute the PCA scores and plots the locations on top of the background climate: -```{r, fig.width=4, fig.height=4} -locations_10k <- locations[locations$time_bp==-10000,] -locations_10k_climate<- climate_for_locations (x= locations_10k[,c("longitude", "latitude")], - time_bp = locations_10k$time_bp, bio_variables=c("bio01","bio10","bio12"), - dataset="Example", path_to_nc = path_to_example_nc) -locations_10k_pca_scores <- predict(climate_10k_pca,newdata= locations_10k_climate[,-c(1:2)]) -plot(climate_10k_pca$x[,2]~climate_10k_pca$x[,1],pch=20,col="lightgray", - xlab="PC1",ylab="PC2") -points(locations_10k_pca_scores,pch=20,col="red") - -``` - -## Working with MIS -Sometimes we want to work with multiple time steps to represent a given MIS. -We can get a list of time steps available for a given mis with: -```{r} -mis_time_steps <- get_mis_time_steps(1,"Example", path_to_nc = path_to_example_nc) -mis_time_steps -``` - -And now cycle over those steps. First extract the climate into a list: -```{r} -mis_climate_list<-list() -for (this_step in mis_time_steps){ - this_step_climate <- climate_for_time_slice(this_step ,c("bio01","bio10","bio12"), - dataset="Example", path_to_nc = path_to_example_nc) -this_step_climate <- values(this_step_climate) -this_step_climate <- this_step_climate[!is.nan(this_step_climate[,1]),] - mis_climate_list[[as.character(this_step)]]<- this_step_climate -} -``` - -Then combine them into a single matrix: -```{r} -mis_climate <- do.call(rbind, mis_climate_list) -``` - -And finally plot it: -```{r, fig.width=4, fig.height=4} -mis_pca<-prcomp(mis_climate,scale=TRUE, center=TRUE) -plot(mis_pca$x[,2]~mis_pca$x[,1],pch=20,col="lightgray", - xlab="PC1",ylab="PC2") -``` - - -# Random sampling of background - -NOTE: there is a but in `terra` version 1.6.17 (the current CRAN version) that -leads to an error when sampling a raster ("Error: negative probability"). If you -encounter this error, you need to downgrade `terra` to 1.6.7 (or 1.6.3 on OSx). -See the README file. - -For a number of species distribution models, we need to subsample background points to our presences. We can simply do that by generating the raster for the time slice of interest, and using the appropriate function from `terra`: - -```{r eval=FALSE} -climate_20k <- climate_for_time_slice(-20000,c("bio01","bio10"), - dataset="Example", path_to_nc = path_to_example_nc) -this_sample<-terra::spatSample(climate_20k, 100,na.rm=TRUE,cells=TRUE,xy=TRUE) -``` - -If we needed to get other variables for those coordinates, we could simply: -```{r eval=FALSE} -additional_var <- climate_for_locations ( - x= data.frame(longitude = this_sample$x, latitude = this_sample$y), - time_bp = rep(-20000,nrow(this_sample)), - bio_variables=c("bio12"), - dataset="Example", path_to_nc = path_to_example_nc) -``` - -Alternatively, we could use the cell number: -```{r eval=FALSE} -additional_var <- climate_for_locations (x= this_sample$cell, - time_bp = rep(-20000,nrow(this_sample)), - bio_variables=c("bio12"), - dataset="Example", path_to_nc = path_to_example_nc) -```