diff --git a/DESCRIPTION b/DESCRIPTION index 6e2da7c71262178f99420c2c770505b5a73104b1..91808e713465fdf7cc36adee3846e2da781ef527 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -42,7 +42,7 @@ Suggests: knitr, testthat, usethis, rmarkdown VignetteBuilder: knitr SystemRequirements: Tested with at least 4 GB RAM. NeedsCompilation: no -Packaged: 2023-05-03 09:11:34 UTC; helge +Packaged: 2023-05-04 08:24:48 UTC; helge Author: Helge Jentsch [aut, cre], Maria Bobrowski [aut], Johannes Weidinger [aut], diff --git a/NAMESPACE b/NAMESPACE index e848dc2319e7f4906338beca32d9c5a921cf6cf9..6753522662b39ada7c5efa2c2581bacb8bab2bab 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -35,4 +35,5 @@ importFrom(utils,sessionInfo) importFrom(utils,setTxtProgressBar) importFrom(utils,txtProgressBar) importFrom(utils,unzip) +importFrom(utils,write.table) importFrom(utils,zip) diff --git a/R/Chelsa_new_download_functions.R b/R/Chelsa_new_download_functions.R index 3d0675ce111d939b9df7d2c32a26ecdd1c0f29ee..8ec635c3ff0a80b92b7e705aec31d88b2970144b 100644 --- a/R/Chelsa_new_download_functions.R +++ b/R/Chelsa_new_download_functions.R @@ -19,10 +19,10 @@ #'@return CHELSA climate datasets for the period of 1979 - 2013 #' #'@note Please note that the downloaded data for temperature and the therefore also the first eleven bioclim-variables are processed to °C with one significant decimal without offset and factor. Processing and conversion to other file-formats on a global dataset may take some time. -#'@note Citations not yet updated.Please check Chelsa Website for current citation! #' -#'@references D. N. Karger, O. Conrad, J. B{\"o}hner , et al. "Climatologies at high resolution for the earth's land surface areas". In: _Scientific Data_ 4.1 (Sep. 2017). DOI: 10.1038/sdata.2017.122. <URL: https://doi.org/10.1038/sdata.2017.122>. +#'@references D. N. Karger, O. Conrad, J. B{\"o}hner , et al. _Climatologies at high resolution for the earth's land surface areas_. In: _Scientific Data_ 4.1 (Sep. 2017). DOI: 10.1038/sdata.2017.122. <URL: https://doi.org/10.1038/sdata.2017.122>. #'@references D. N. Karger, O. Conrad, J. B{\"o}hner , et al. _Data from: Climatologies at high resolution for the earth's land surface areas_. En. 2018. DOI: 10.5061/DRYAD.KD1D4. <URL: http://datadryad.org/stash/dataset/doi:10.5061/dryad.kd1d4>. +#'@references D. N. Karger, O. Conrad, J. B{\"o}hner , et al. _Climatologies at high resolution for the earth’s land surface areas_ EnviDat. (2021) DOI: 10.16904/envidat.228. <URL: https://www.doi.org/10.16904/envidat.228>. #' #'@examples #' \dontrun{ @@ -36,7 +36,7 @@ #'@import RCurl #'@import ncdf4 #'@import terra -#'@importFrom utils unzip download.file txtProgressBar +#'@importFrom utils unzip download.file txtProgressBar write.table #' #' #'@export @@ -195,7 +195,7 @@ Chelsa.Clim.download <- function(save.location = "./", } write.table(x = dataDF, - file = normalizePath(paste0(save.location, "/", call.time, "_dataDF.csv"), winslash = "/"), + file = normalizePath(paste0(save.location, "/", call.time, "_downloadDataframe.csv"), winslash = "/"), sep = ";", dec = ".", row.names = F, @@ -495,7 +495,6 @@ Chelsa.Clim.download <- function(save.location = "./", #' #'@note Specifications: <URL: https://chelsa-climate.org/wp-admin/download-page/CHELSA_tech_specification_V2.pdf> #'@note More information on Shared Socioeconomic Pathways under <URL: https://www.dkrz.de/en/communication/climate-simulations/cmip6-en/the-ssp-scenarios?set_language=en> -#'@note Citations not yet updated.Please check Chelsa Website for current citation! #' #'@examples #' \dontrun{ diff --git a/R/auxiliary.R b/R/auxiliary.R index 262f69bd0b4492ea976b537bc50fd0c07bdc7ed6..2ffa22a1172c982cf6606367a5fd7d2822fcb8e4 100644 --- a/R/auxiliary.R +++ b/R/auxiliary.R @@ -385,24 +385,50 @@ save.citation <- function(save.location = "./", # citation_ <- RefManageR::ReadCrossRef("") citation_paper <- RefManageR::ReadCrossRef("10.1038/sdata.2017.122") + citation_CHELSA_cmip5_ts <- RefManageR::ReadCrossRef("10.1038/s41597-020-00587-y") citation_PBCOR <- RefManageR::ReadCrossRef("10.1175/JCLI-D-19-0332.1") + # citation_envidat.332 <- RefManageR::ReadCrossRef("10.16904/envidat.332") #doi.org/10.16904/envidat.332 + utils::download.file("https://www.envidat.ch/dataset/bioclim_plus/export/bibtex.bib", + destfile = paste0(tempdir(),"/bib_chelsa.bib"), quiet = T) + citation_envidat.332 <- RefManageR::ReadBib(paste0(tempdir(),"/bib_chelsa.bib")) + unlink(x = paste0(tempdir(),"/bib_chelsa.bib")) + + # citation_envidat.228.v2.1 <- RefManageR::ReadCrossRef("10.16904/envidat.228.v2.1") # doi.org/10.16904/envidat.228.v2.1 + utils::download.file("https://www.envidat.ch/dataset/chelsa-climatologies/export/bibtex.bib", + destfile = paste0(tempdir(),"/bib_chelsa.bib"), quiet = T) + citation_envidat.228.v2.1 <- RefManageR::ReadBib(paste0(tempdir(),"/bib_chelsa.bib")) + unlink(x = paste0(tempdir(),"/bib_chelsa.bib")) + + # citation_essd2022212 <- RefManageR::ReadCrossRef("10.5194/essd-2022-212") #doi.org/10.5194/essd-2022-212 + utils::download.file("https://essd.copernicus.org/articles/14/5573/2022/essd-14-5573-2022.bib", + destfile = paste0(tempdir(),"/bib_chelsa.bib"), quiet = T) + citation_essd2022212 <- RefManageR::ReadBib(paste0(tempdir(),"/bib_chelsa.bib")) + unlink(x = paste0(tempdir(),"/bib_chelsa.bib")) + + + citation_sdata.2017.122 <- RefManageR::ReadCrossRef("10.1038/sdata.2017.122") # 10.1038/sdata.2017.122 # Data citation_data <- RefManageR::ReadCrossRef("10.5061/dryad.kd1d4") + utils::download.file("https://www.envidat.ch/dataset/eur11/export/bibtex.bib", destfile = paste0(tempdir(),"/bib_chelsa.bib"), quiet = T) citation_EUR11 <- RefManageR::ReadBib(paste0(tempdir(),"/bib_chelsa.bib")) unlink(x = paste0(tempdir(),"/bib_chelsa.bib")) + utils::download.file("https://www.envidat.ch/dataset/chelsacruts/export/bibtex.bib", destfile = paste0(tempdir(),"/bib_chelsa.bib"), quiet = T) citation_CHELSAcruts_data <- RefManageR::ReadBib(paste0(tempdir(),"/bib_chelsa.bib")) unlink(x = paste0(tempdir(),"/bib_chelsa.bib")) + utils::download.file("https://www.envidat.ch/dataset/chelsa_cmip5_ts/export/bibtex.bib", destfile = paste0(tempdir(),"/bib_chelsa.bib"), quiet = T) citation_CHELSA_cmip5_ts_data <- RefManageR::ReadBib(paste0(tempdir(),"/bib_chelsa.bib")) unlink(x = paste0(tempdir(),"/bib_chelsa.bib")) + + # Old versions citation_Version1.0 <- RefManageR::ReadCrossRef("10.1594/WDCC/CHELSA_v1") citation_Version1.1 <- RefManageR::ReadCrossRef("10.1594/WDCC/CHELSA_v1_1") diff --git a/man/Chelsa.CMIP_6.download.Rd b/man/Chelsa.CMIP_6.download.Rd index c662fd228e58e34fa8bd34eb5704da72b22df6ed..8c82a57adc1eb822b6477f40f4d38d55b7d15590 100644 --- a/man/Chelsa.CMIP_6.download.Rd +++ b/man/Chelsa.CMIP_6.download.Rd @@ -72,8 +72,6 @@ Please note that the downloaded data for temperature and the therefore also the Specifications: <URL: https://chelsa-climate.org/wp-admin/download-page/CHELSA_tech_specification_V2.pdf> More information on Shared Socioeconomic Pathways under <URL: https://www.dkrz.de/en/communication/climate-simulations/cmip6-en/the-ssp-scenarios?set_language=en> - -Citations not yet updated.Please check Chelsa Website for current citation! } \examples{ \dontrun{ diff --git a/man/Chelsa.Clim.download.Rd b/man/Chelsa.Clim.download.Rd index a4ba783c1d5bdce0c3a84a44f9c5d0f5793b57f6..f7345862ed3052137204cd5f14a9623be0dc3137 100644 --- a/man/Chelsa.Clim.download.Rd +++ b/man/Chelsa.Clim.download.Rd @@ -58,8 +58,6 @@ This function supports the download, pre-processing and management of CHELSA cli } \note{ Please note that the downloaded data for temperature and the therefore also the first eleven bioclim-variables are processed to °C with one significant decimal without offset and factor. Processing and conversion to other file-formats on a global dataset may take some time. - -Citations not yet updated.Please check Chelsa Website for current citation! } \examples{ \dontrun{ @@ -71,9 +69,11 @@ Chelsa.Clim.download(parameter = "prec", month.var = c(1,12)) } \references{ -D. N. Karger, O. Conrad, J. B{\"o}hner , et al. "Climatologies at high resolution for the earth's land surface areas". In: _Scientific Data_ 4.1 (Sep. 2017). DOI: 10.1038/sdata.2017.122. <URL: https://doi.org/10.1038/sdata.2017.122>. +D. N. Karger, O. Conrad, J. B{\"o}hner , et al. _Climatologies at high resolution for the earth's land surface areas_. In: _Scientific Data_ 4.1 (Sep. 2017). DOI: 10.1038/sdata.2017.122. <URL: https://doi.org/10.1038/sdata.2017.122>. D. N. Karger, O. Conrad, J. B{\"o}hner , et al. _Data from: Climatologies at high resolution for the earth's land surface areas_. En. 2018. DOI: 10.5061/DRYAD.KD1D4. <URL: http://datadryad.org/stash/dataset/doi:10.5061/dryad.kd1d4>. + +D. N. Karger, O. Conrad, J. B{\"o}hner , et al. _Climatologies at high resolution for the earth’s land surface areas_ EnviDat. (2021) DOI: 10.16904/envidat.228. <URL: https://www.doi.org/10.16904/envidat.228>. } \author{ Helge Jentsch