diff --git a/pkgdown.yml b/pkgdown.yml index d1e058c..3a1377b 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: ag5Tools: ag5Tools.html extracing_data: extracing_data.html -last_built: 2023-10-03T12:19Z +last_built: 2023-10-03T19:56Z urls: reference: https://agrdatasci.github.io/ag5Tools/reference article: https://agrdatasci.github.io/ag5Tools/articles diff --git a/reference/ag5_extract.html b/reference/ag5_extract.html index 1d78990..5b690cd 100644 --- a/reference/ag5_extract.html +++ b/reference/ag5_extract.html @@ -76,6 +76,7 @@

Usage statistic = NULL, time = NULL, celsius = FALSE, + parallel = TRUE, ..., path ) @@ -133,6 +134,10 @@

Arguments +
parallel
+

logical Use parallel computation to speed-up data processing

+ +
lon

character Column name of longitude values in the case of data.frame

@@ -153,10 +158,6 @@

Arguments

Value

diff --git a/search.json b/search.json index f666dcb..c27bb4c 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement . complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2022 ag5Tools authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/articles/ag5Tools.html","id":"get-the-cds-api-key","dir":"Articles","previous_headings":"","what":"Get the CDS API-Key","title":"ag5Tools","text":"download AgERA5 data Copernicus Climate Data Store (CDS) first register get API Key CDS API Guide. API Key, create file named “.cdsapirc”. See details CDS API Guide need install Python ‘CDASPI’ client, ag5Tools required.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/articles/ag5Tools.html","id":"downloading-agera5-data","dir":"Articles","previous_headings":"","what":"Downloading AgERA5 data","title":"ag5Tools","text":"following example downloads variable “2m_temperature”. variable seven statistics available: 24_hour_maximum 24_hour_mean 24_hour_minimum day_time_maximum day_time_mean night_time_mean night_time_minimum case, download “night_time_minimum”. replace target path location computer want store downloaded data.","code":"library(ag5Tools) ag5_download(variable = \"2m_temperature\", statistic = \"night_time_minimum\", day = \"all\", month = \"all\", year = 2015, path = \"C:/custom_target_folder\")"},{"path":"https://agrdatasci.github.io/ag5Tools/articles/extracing_data.html","id":"why-a-extracting-function-for-agera5-data","dir":"Articles","previous_headings":"","what":"Why a extracting function for agERA5 data?","title":"Extracing AgERA5 data with ag5Tools","text":"agERA5 data downloaded Copernicus Climate Data Store NetCDF files format, file extension .nc. data provided daily observations file correspond day. instance, want precipitation data year 2010, 365 files (366 case leap year). case want use precipitation data model covariates, seek specific dates extract data corresponding locations trial established. Instead, can use ag5_extract function demostrated next section. Let’s say observations field trials trait interest (e.g., yield) want link rainfall data explore effect rainfall trait. know plating harvest dates trial plot. can extract time series daily rainfall starting plating date finishing harvest date. synthetic example data shows dates random locations Arusha, Tanzania. ag5_extract() function can extract required data, long downloaded already. Notice data.frame arusha_df already column names match default arguments function. match, indicate column names arguments function ag5_download(). example, data.frame location columns named x y dates named planting_date harvest_date, call function ag5_extract() look like: Notice need worry providing specific folder files located, root folder know files . instance, stored AgERA5 data files folder D:/agera5_data/, also sub-folders precipitation temperature data, required specify path argument. case, providing path D:/agera5_data/ suffice.","code":"data(\"arusha_df\", package = \"ag5Tools\") head(arusha_df) #> lon lat start_date end_date #> 1 35.72636 -2.197162 1991-04-22 1991-08-20 #> 2 36.10249 -2.850983 1990-01-24 1990-05-24 #> 3 35.46292 -3.602582 1991-03-06 1991-07-04 #> 4 36.29166 -3.855945 1990-10-10 1991-02-07 #> 5 35.45254 -3.616361 1990-01-22 1990-05-22 #> 6 35.40131 -3.216106 1990-10-19 1991-02-16 library(ag5Tools) arusha_rainfall <- ag5_extract(coords = arusha_df, variable = \"Precipitation-Flux\", path = \"D:/agera5_data/\") arusha_rainfall <- ag5_extract(coords = example_df, lon = \"x\", lat = \"y\", start_date = \"planting_date\", end_date = \"harvest_date\", variable = \"Precipitation-Flux\", path = \"D:/agera5_data/\")"},{"path":"https://agrdatasci.github.io/ag5Tools/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"David Brown. Author, maintainer. Kaue de Sousa. Contributor. Jacob van Etten. Thesis advisor. Sytze de Bruin. Thesis advisor.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Brown, D., de Sousa, K., & van Etten, J. (2023). ag5Tools: R package downloading extracting agrometeorological data AgERA5 database. SoftwareX (Vol. 21, p. 101267). https://doi.org/10.1016/j.softx.2022.101267","code":"@Article{, title = {{ag5Tools: An R package for downloading and extracting agrometeorological data from the AgERA5 database}}, author = {David Brown and Kauê {de Sousa} and Jacob {van Etten}}, year = {2023}, doi = {10.1016/j.softx.2022.101267}, journal = {SoftwareX}, publisher = {Elsevier BV}, volume = {21}, number = {2023}, pages = {101267}, url = {https://doi.org/10.1016/j.softx.2022.101267}, }"},{"path":[]},{"path":[]},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"description","dir":"","previous_headings":"","what":"Description","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"R package ag5Tools toolbox download extract data “Agrometeorological indicators 1979 present derived reanalysis” dataset (AgERA5). https://cds.climate.copernicus.eu/cdsapp#!/dataset/10.24381/cds.6c68c9bb?tab=overview download function provides programmatic access Copernicus Climate Data Store download AgERA5 data. detailed description can found companion paper: https://doi.org/10.1016/j.softx.2022.101267","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"data-license","dir":"","previous_headings":"","what":"Data license","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"ag5Tools package distribute data, provides access Climate Data Store python cdsapi. specific details license agreement downloading using data please check license : https://cds.climate.copernicus.eu/api/v2/terms/static/licence--use-copernicus-products.pdf","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"installation","dir":"","previous_headings":"Data license","what":"Installation","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"stable version ag5Tools can installed CRAN using development version installed using","code":"install.packages(\"ag5Tools\") devtools::install_github(\"agrdatasci/ag5Tools\", build_vignettes = TRUE)"},{"path":[]},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"install-python-and-the-cds-api","dir":"","previous_headings":"Data license > Downloading AgERA5 data","what":"Install Python and the CDS API","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"using ag5Tools package, need intall Python CDS API, please see details : https://cds.climate.copernicus.eu/api--.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"get-your-cds-api-key","dir":"","previous_headings":"Data license > Downloading AgERA5 data","what":"Get your CDS API-Key","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"download AgERA5 data first register Climate Data Store get API key. Please follow instructions : https://cds.climate.copernicus.eu/api--need create file store API key, following instructions : https://cds.climate.copernicus.eu/api--.","code":""},{"path":[]},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"downloading-data","dir":"","previous_headings":"Data license > Downloading AgERA5 data","what":"Downloading data","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"following example downloads daily ‘2m_temperature’ data year 2015","code":"ag5_download(variable = \"2m_temperature\", statistic = \"night_time_minimum\", day = \"all\", month = \"all\", year = 2015, path = \"C:/custom_target_folder\" )"},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"extracting-data","dir":"","previous_headings":"Data license > Downloading AgERA5 data","what":"Extracting data","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"extract maximum day temperature (“Max-Day-Time”) “2m_temperature”","code":"ag5_extract(coords = c(35.726364, -2.197162), dates = \"1995-01-23\", variable = \"2m_temperature\", statistic = \"Max-Day-Time\", path = \"C:/agera5_data\")"},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"ag5Tools package relies functionality available open source packages. Python cdsapi R package reticulate used access Python CDS API functions R. R package terra used extract data nc files. R package fs used efficiently search list files.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"Please aware ag5Tools released MIT license, please find details MIT license document","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"cite ag5Tools scientific publications please use: Brown, D., de Sousa, K., & van Etten, J. (2023). ag5Tools: R package downloading extracting agrometeorological data AgERA5 database. SoftwareX, 21, 101267. https://doi.org/https://doi.org/10.1016/j.softx.2022.101267","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"Please note ag5Tools project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":null,"dir":"Reference","previous_headings":"","what":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"data downloaded Copernicus Climate Change Service (C3S) using Copernicus Climate Data Store (CDSAPI) Python library https://github.com/ecmwf/cdsapi function provides programmatic access AgERA5 dataset. information data license, please visit: https://cds.climate.copernicus.eu/api/v2/terms/static/licence--use-copernicus-products.pdf download data valid CDS account, CDS API key. Please follow instructions : https://cds.climate.copernicus.eu/api--create file store API key. need install Python cdsapi, Ag5Tools required.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"","code":"ag5_download( variable, statistic = NULL, year, month, day, time = NULL, version = \"1_1\", path )"},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"variable character variable downloaded. See details statistic character required variables. See details options. year numeric (Integer) Year download. 1979 - 2022 month numeric Month requested. Use month = \"\" download months requested year. day numeric Days month requested data. Use day = \"\" download days requested month time Character required \"2m_relative_humidity\". version Character Version 1_1 currently default recommended See details available options. path Character Target folder local hardrive e.g. \"C:/agera5\". folder exist user write permission.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"return value, called side effects.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"agera-variables-available-for-download-","dir":"Reference","previous_headings":"","what":"AgERA5 variables available for download:","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"cloud_cover liquid_precipitation_duration_fraction snow_thickness_lwe solar_radiation_flux 2m_temperature 2m_dewpoint_temperature precipitation_flux solid_precipitation_duration_fraction snow_thickness vapour_pressure 10m_wind_speed 2m_relative_humidity","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"statistics-for-variable-m-temperature-","dir":"Reference","previous_headings":"","what":"Statistics for variable \"2m_temperature\"","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"Variable \"2m_temperature\" requires indicate least one following options statistic: 24_hour_maximum 24_hour_mean 24_hour_minimum day_time_maximum day_time_mean night_time_mean night_time_minimum","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"parameter-time-for-variable-m-relative-humidity-","dir":"Reference","previous_headings":"","what":"Parameter \"time\" for Variable \"2m_relative_humidity\"","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"Variable \"2m_relative_humidity\" requires indicate one following options time: 06_00 09_00 12_00 15_00 18_00","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"variables-that-require-statistic","dir":"Reference","previous_headings":"","what":"Variables that require statistic","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"following variables, \"24_hour_mean\" statistic available, explicitly indicated. cloud_cover snow_thickness_lwe 2m_dewpoint_temperature snow_thickness vapour_pressure 10m_wind_speed","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"","code":"if (FALSE) { ag5_download(variable = \"2m_temperature\", statistic = \"night_time_minimum\", day = \"all\", month = \"all\", year = 2015, path = \"C:/custom_target_folder\" ) }"},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract AgERA5 data stored in a local hard drive — ag5_extract","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"Extract data AgERA5 data files previously downloaded Copernicus Climate Data Store. functions use package 'terra' read *.nc files extract requested data given location dates. dates one value extracts single observation specified variable location. dates character vector length == 2, extract time series specified variable location, first dates value start date second end date.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"","code":"ag5_extract(coords, ..., path) # S3 method for numeric ag5_extract( coords, dates, variable, statistic = NULL, time = NULL, celsius = FALSE, ..., path ) # S3 method for data.frame ag5_extract( coords, lon = \"lon\", lat = \"lat\", start_date = \"start_date\", end_date = \"end_date\", variable, statistic = NULL, time = NULL, celsius = FALSE, ncores = NULL, ..., path )"},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"coords numeric vector length = 2 form (lon, lat), data.frame required columns ... parameters path character path folder containing AgERA5 files dates character dates extracting specified variable, vector length 1 extracts single date, vector length 2 indicates start end dates. column name case data.frame variable character AgERA5 variable extract, see details available options statistic character variables, see details valid options time variable Relative-Humidity-2m, see details valid options celsius logical variables \"Temperature-Air-2m\" \"2m_dewpoint_temperature\". lon character Column name longitude values case data.frame lat character Column name latitude values case data.frame start_date character Column name start_date values case coords data.frame end_date character Column name end_date values case coords data.frame ncores Number cores use parallel. NULL parallel , half available cores used. TRUE values converted Kelvin Celsius. Default FALSE parallel logical Use parallel computation speed-data processing","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"numeric vector length equal number dates first second date. returned vecter named vector, requested dates names. one date provided function returns numeric vector length = 1. coords data.frame, function returns list numeric vectors, one corresponding rows input data.frame","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"valid-variable-values","dir":"Reference","previous_headings":"","what":"Valid variable values","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"\"cloud_cover\" \"liquid_precipitation_duration_fraction\" \"snow_thickness_lwe\" \"Solar-Radiation-Flux\" \"Temperature-Air-2m\" \"2m_dewpoint_temperature\" \"Precipitation-Flux\" \"solid_precipitation_duration_fraction\" \"snow_thickness\" \"vapour_pressure\" \"10m_wind_speed\" \"Relative-Humidity-2m\"","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"valid-statistics-for-variable-temperature-air-m-","dir":"Reference","previous_headings":"","what":"Valid statistics for variable \"Temperature-Air-2m\"","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"Max-24h Mean-24h 24_hour_minimum Max-Day-Time Mean-Day-Time Mean-Night-Time Min-Night-Time","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"variables-that-require-statistic","dir":"Reference","previous_headings":"","what":"Variables that require statistic","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"following variables, \"24_hour_mean\" statistic available, explicitly indicated. cloud_cover snow_thickness_lwe 2m_dewpoint_temperature snow_thickness vapour_pressure 10m_wind_speed","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"valid-time-values-for-variable-relative-humidity-m-","dir":"Reference","previous_headings":"","what":"Valid time values for variable \"Relative-Humidity-2m\"","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"06h 09h 12h 15h 18h","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"Temperature conversion made accordingly : Preston-Thomas, H. (1990). International Temperature Scale 1990 (-90). Metrologia, 27(1), 3-10. doi:10.1088/0026-1394/27/1/002","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"","code":"if (FALSE) { temp <- ag5_extract(coords = c(lon = 35.72636, lat = -2.197162), dates = \"1991-04-22\", variable = \"Temperature-Air-2m\", statistic = \"Max-Day-Time\", path = \"C:/temperature_data/\") }"},{"path":"https://agrdatasci.github.io/ag5Tools/reference/arusha_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Example dataset for the agera5 package — arusha_df","title":"Example dataset for the agera5 package — arusha_df","text":"100 points Arusha, Tanzania geographic coordinates generated function st_sample package sf","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/arusha_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example dataset for the agera5 package — arusha_df","text":"","code":"arusha_df"},{"path":"https://agrdatasci.github.io/ag5Tools/reference/arusha_df.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example dataset for the agera5 package — arusha_df","text":"object class data.frame 100 rows 4 columns.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/news/index.html","id":"ag5tools-001","dir":"Changelog","previous_headings":"","what":"ag5Tools 0.0.1","title":"ag5Tools 0.0.1","text":"CRAN release: 2022-03-24","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/news/index.html","id":"first-release-version-0-0-1","dir":"Changelog","previous_headings":"","what":"First release version","title":"ag5Tools 0.0.1","text":"Added NEWS.md file track changes package.","code":""}] +[{"path":[]},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement . complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2022 ag5Tools authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/articles/ag5Tools.html","id":"get-the-cds-api-key","dir":"Articles","previous_headings":"","what":"Get the CDS API-Key","title":"ag5Tools","text":"download AgERA5 data Copernicus Climate Data Store (CDS) first register get API Key CDS API Guide. API Key, create file named “.cdsapirc”. See details CDS API Guide need install Python ‘CDASPI’ client, ag5Tools required.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/articles/ag5Tools.html","id":"downloading-agera5-data","dir":"Articles","previous_headings":"","what":"Downloading AgERA5 data","title":"ag5Tools","text":"following example downloads variable “2m_temperature”. variable seven statistics available: 24_hour_maximum 24_hour_mean 24_hour_minimum day_time_maximum day_time_mean night_time_mean night_time_minimum case, download “night_time_minimum”. replace target path location computer want store downloaded data.","code":"library(ag5Tools) ag5_download(variable = \"2m_temperature\", statistic = \"night_time_minimum\", day = \"all\", month = \"all\", year = 2015, path = \"C:/custom_target_folder\")"},{"path":"https://agrdatasci.github.io/ag5Tools/articles/extracing_data.html","id":"why-a-extracting-function-for-agera5-data","dir":"Articles","previous_headings":"","what":"Why a extracting function for agERA5 data?","title":"Extracing AgERA5 data with ag5Tools","text":"agERA5 data downloaded Copernicus Climate Data Store NetCDF files format, file extension .nc. data provided daily observations file correspond day. instance, want precipitation data year 2010, 365 files (366 case leap year). case want use precipitation data model covariates, seek specific dates extract data corresponding locations trial established. Instead, can use ag5_extract function demostrated next section. Let’s say observations field trials trait interest (e.g., yield) want link rainfall data explore effect rainfall trait. know plating harvest dates trial plot. can extract time series daily rainfall starting plating date finishing harvest date. synthetic example data shows dates random locations Arusha, Tanzania. ag5_extract() function can extract required data, long downloaded already. Notice data.frame arusha_df already column names match default arguments function. match, indicate column names arguments function ag5_download(). example, data.frame location columns named x y dates named planting_date harvest_date, call function ag5_extract() look like: Notice need worry providing specific folder files located, root folder know files . instance, stored AgERA5 data files folder D:/agera5_data/, also sub-folders precipitation temperature data, required specify path argument. case, providing path D:/agera5_data/ suffice.","code":"data(\"arusha_df\", package = \"ag5Tools\") head(arusha_df) #> lon lat start_date end_date #> 1 35.72636 -2.197162 1991-04-22 1991-08-20 #> 2 36.10249 -2.850983 1990-01-24 1990-05-24 #> 3 35.46292 -3.602582 1991-03-06 1991-07-04 #> 4 36.29166 -3.855945 1990-10-10 1991-02-07 #> 5 35.45254 -3.616361 1990-01-22 1990-05-22 #> 6 35.40131 -3.216106 1990-10-19 1991-02-16 library(ag5Tools) arusha_rainfall <- ag5_extract(coords = arusha_df, variable = \"Precipitation-Flux\", path = \"D:/agera5_data/\") arusha_rainfall <- ag5_extract(coords = example_df, lon = \"x\", lat = \"y\", start_date = \"planting_date\", end_date = \"harvest_date\", variable = \"Precipitation-Flux\", path = \"D:/agera5_data/\")"},{"path":"https://agrdatasci.github.io/ag5Tools/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"David Brown. Author, maintainer. Kaue de Sousa. Contributor. Jacob van Etten. Thesis advisor. Sytze de Bruin. Thesis advisor.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Brown, D., de Sousa, K., & van Etten, J. (2023). ag5Tools: R package downloading extracting agrometeorological data AgERA5 database. SoftwareX (Vol. 21, p. 101267). https://doi.org/10.1016/j.softx.2022.101267","code":"@Article{, title = {{ag5Tools: An R package for downloading and extracting agrometeorological data from the AgERA5 database}}, author = {David Brown and Kauê {de Sousa} and Jacob {van Etten}}, year = {2023}, doi = {10.1016/j.softx.2022.101267}, journal = {SoftwareX}, publisher = {Elsevier BV}, volume = {21}, number = {2023}, pages = {101267}, url = {https://doi.org/10.1016/j.softx.2022.101267}, }"},{"path":[]},{"path":[]},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"description","dir":"","previous_headings":"","what":"Description","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"R package ag5Tools toolbox download extract data “Agrometeorological indicators 1979 present derived reanalysis” dataset (AgERA5). https://cds.climate.copernicus.eu/cdsapp#!/dataset/10.24381/cds.6c68c9bb?tab=overview download function provides programmatic access Copernicus Climate Data Store download AgERA5 data. detailed description can found companion paper: https://doi.org/10.1016/j.softx.2022.101267","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"data-license","dir":"","previous_headings":"","what":"Data license","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"ag5Tools package distribute data, provides access Climate Data Store python cdsapi. specific details license agreement downloading using data please check license : https://cds.climate.copernicus.eu/api/v2/terms/static/licence--use-copernicus-products.pdf","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"installation","dir":"","previous_headings":"Data license","what":"Installation","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"stable version ag5Tools can installed CRAN using development version installed using","code":"install.packages(\"ag5Tools\") devtools::install_github(\"agrdatasci/ag5Tools\", build_vignettes = TRUE)"},{"path":[]},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"install-python-and-the-cds-api","dir":"","previous_headings":"Data license > Downloading AgERA5 data","what":"Install Python and the CDS API","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"using ag5Tools package, need intall Python CDS API, please see details : https://cds.climate.copernicus.eu/api--.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"get-your-cds-api-key","dir":"","previous_headings":"Data license > Downloading AgERA5 data","what":"Get your CDS API-Key","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"download AgERA5 data first register Climate Data Store get API key. Please follow instructions : https://cds.climate.copernicus.eu/api--need create file store API key, following instructions : https://cds.climate.copernicus.eu/api--.","code":""},{"path":[]},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"downloading-data","dir":"","previous_headings":"Data license > Downloading AgERA5 data","what":"Downloading data","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"following example downloads daily ‘2m_temperature’ data year 2015","code":"ag5_download(variable = \"2m_temperature\", statistic = \"night_time_minimum\", day = \"all\", month = \"all\", year = 2015, path = \"C:/custom_target_folder\" )"},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"extracting-data","dir":"","previous_headings":"Data license > Downloading AgERA5 data","what":"Extracting data","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"extract maximum day temperature (“Max-Day-Time”) “2m_temperature”","code":"ag5_extract(coords = c(35.726364, -2.197162), dates = \"1995-01-23\", variable = \"2m_temperature\", statistic = \"Max-Day-Time\", path = \"C:/agera5_data\")"},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"ag5Tools package relies functionality available open source packages. Python cdsapi R package reticulate used access Python CDS API functions R. R package terra used extract data nc files. R package fs used efficiently search list files.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"Please aware ag5Tools released MIT license, please find details MIT license document","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"cite ag5Tools scientific publications please use: Brown, D., de Sousa, K., & van Etten, J. (2023). ag5Tools: R package downloading extracting agrometeorological data AgERA5 database. SoftwareX, 21, 101267. https://doi.org/https://doi.org/10.1016/j.softx.2022.101267","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Toolbox for Downloading and Extracting Copernicus AgERA5 Data ","text":"Please note ag5Tools project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":null,"dir":"Reference","previous_headings":"","what":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"data downloaded Copernicus Climate Change Service (C3S) using Copernicus Climate Data Store (CDSAPI) Python library https://github.com/ecmwf/cdsapi function provides programmatic access AgERA5 dataset. information data license, please visit: https://cds.climate.copernicus.eu/api/v2/terms/static/licence--use-copernicus-products.pdf download data valid CDS account, CDS API key. Please follow instructions : https://cds.climate.copernicus.eu/api--create file store API key. need install Python cdsapi, Ag5Tools required.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"","code":"ag5_download( variable, statistic = NULL, year, month, day, time = NULL, version = \"1_1\", path )"},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"variable character variable downloaded. See details statistic character required variables. See details options. year numeric (Integer) Year download. 1979 - 2022 month numeric Month requested. Use month = \"\" download months requested year. day numeric Days month requested data. Use day = \"\" download days requested month time Character required \"2m_relative_humidity\". version Character Version 1_1 currently default recommended See details available options. path Character Target folder local hardrive e.g. \"C:/agera5\". folder exist user write permission.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"return value, called side effects.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"agera-variables-available-for-download-","dir":"Reference","previous_headings":"","what":"AgERA5 variables available for download:","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"cloud_cover liquid_precipitation_duration_fraction snow_thickness_lwe solar_radiation_flux 2m_temperature 2m_dewpoint_temperature precipitation_flux solid_precipitation_duration_fraction snow_thickness vapour_pressure 10m_wind_speed 2m_relative_humidity","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"statistics-for-variable-m-temperature-","dir":"Reference","previous_headings":"","what":"Statistics for variable \"2m_temperature\"","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"Variable \"2m_temperature\" requires indicate least one following options statistic: 24_hour_maximum 24_hour_mean 24_hour_minimum day_time_maximum day_time_mean night_time_mean night_time_minimum","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"parameter-time-for-variable-m-relative-humidity-","dir":"Reference","previous_headings":"","what":"Parameter \"time\" for Variable \"2m_relative_humidity\"","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"Variable \"2m_relative_humidity\" requires indicate one following options time: 06_00 09_00 12_00 15_00 18_00","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"variables-that-require-statistic","dir":"Reference","previous_headings":"","what":"Variables that require statistic","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"following variables, \"24_hour_mean\" statistic available, explicitly indicated. cloud_cover snow_thickness_lwe 2m_dewpoint_temperature snow_thickness vapour_pressure 10m_wind_speed","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_download.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Downloads AgERA5 data from the Copernicus Climate Change Service - Copernicus Climate Data Store — ag5_download","text":"","code":"if (FALSE) { ag5_download(variable = \"2m_temperature\", statistic = \"night_time_minimum\", day = \"all\", month = \"all\", year = 2015, path = \"C:/custom_target_folder\" ) }"},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract AgERA5 data stored in a local hard drive — ag5_extract","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"Extract data AgERA5 data files previously downloaded Copernicus Climate Data Store. functions use package 'terra' read *.nc files extract requested data given location dates. dates one value extracts single observation specified variable location. dates character vector length == 2, extract time series specified variable location, first dates value start date second end date.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"","code":"ag5_extract(coords, ..., path) # S3 method for numeric ag5_extract( coords, dates, variable, statistic = NULL, time = NULL, celsius = FALSE, parallel = TRUE, ..., path ) # S3 method for data.frame ag5_extract( coords, lon = \"lon\", lat = \"lat\", start_date = \"start_date\", end_date = \"end_date\", variable, statistic = NULL, time = NULL, celsius = FALSE, ncores = NULL, ..., path )"},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"coords numeric vector length = 2 form (lon, lat), data.frame required columns ... parameters path character path folder containing AgERA5 files dates character dates extracting specified variable, vector length 1 extracts single date, vector length 2 indicates start end dates. column name case data.frame variable character AgERA5 variable extract, see details available options statistic character variables, see details valid options time variable Relative-Humidity-2m, see details valid options celsius logical variables \"Temperature-Air-2m\" \"2m_dewpoint_temperature\". parallel logical Use parallel computation speed-data processing lon character Column name longitude values case data.frame lat character Column name latitude values case data.frame start_date character Column name start_date values case coords data.frame end_date character Column name end_date values case coords data.frame ncores Number cores use parallel. NULL parallel , half available cores used. TRUE values converted Kelvin Celsius. Default FALSE","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"numeric vector length equal number dates first second date. returned vecter named vector, requested dates names. one date provided function returns numeric vector length = 1. coords data.frame, function returns list numeric vectors, one corresponding rows input data.frame","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"valid-variable-values","dir":"Reference","previous_headings":"","what":"Valid variable values","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"\"cloud_cover\" \"liquid_precipitation_duration_fraction\" \"snow_thickness_lwe\" \"Solar-Radiation-Flux\" \"Temperature-Air-2m\" \"2m_dewpoint_temperature\" \"Precipitation-Flux\" \"solid_precipitation_duration_fraction\" \"snow_thickness\" \"vapour_pressure\" \"10m_wind_speed\" \"Relative-Humidity-2m\"","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"valid-statistics-for-variable-temperature-air-m-","dir":"Reference","previous_headings":"","what":"Valid statistics for variable \"Temperature-Air-2m\"","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"Max-24h Mean-24h 24_hour_minimum Max-Day-Time Mean-Day-Time Mean-Night-Time Min-Night-Time","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"variables-that-require-statistic","dir":"Reference","previous_headings":"","what":"Variables that require statistic","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"following variables, \"24_hour_mean\" statistic available, explicitly indicated. cloud_cover snow_thickness_lwe 2m_dewpoint_temperature snow_thickness vapour_pressure 10m_wind_speed","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"valid-time-values-for-variable-relative-humidity-m-","dir":"Reference","previous_headings":"","what":"Valid time values for variable \"Relative-Humidity-2m\"","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"06h 09h 12h 15h 18h","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"Temperature conversion made accordingly : Preston-Thomas, H. (1990). International Temperature Scale 1990 (-90). Metrologia, 27(1), 3-10. doi:10.1088/0026-1394/27/1/002","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/ag5_extract.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract AgERA5 data stored in a local hard drive — ag5_extract","text":"","code":"if (FALSE) { temp <- ag5_extract(coords = c(lon = 35.72636, lat = -2.197162), dates = \"1991-04-22\", variable = \"Temperature-Air-2m\", statistic = \"Max-Day-Time\", path = \"C:/temperature_data/\") }"},{"path":"https://agrdatasci.github.io/ag5Tools/reference/arusha_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Example dataset for the agera5 package — arusha_df","title":"Example dataset for the agera5 package — arusha_df","text":"100 points Arusha, Tanzania geographic coordinates generated function st_sample package sf","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/reference/arusha_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example dataset for the agera5 package — arusha_df","text":"","code":"arusha_df"},{"path":"https://agrdatasci.github.io/ag5Tools/reference/arusha_df.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example dataset for the agera5 package — arusha_df","text":"object class data.frame 100 rows 4 columns.","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/news/index.html","id":"ag5tools-001","dir":"Changelog","previous_headings":"","what":"ag5Tools 0.0.1","title":"ag5Tools 0.0.1","text":"CRAN release: 2022-03-24","code":""},{"path":"https://agrdatasci.github.io/ag5Tools/news/index.html","id":"first-release-version-0-0-1","dir":"Changelog","previous_headings":"","what":"First release version","title":"ag5Tools 0.0.1","text":"Added NEWS.md file track changes package.","code":""}]