| Title: | Easy Access to High-Resolution Daily Climate Data for Europe |
|---|---|
| Description: | Get high-resolution (1 km) daily, monthly and annual climate data (precipitation, and average, minimum and maximum temperatures) for points and polygons within Europe. |
| Authors: | Verónica Cruz-Alonso [aut, cph] (ORCID: <https://orcid.org/0000-0002-0642-036X>), Francisco Rodríguez-Sánchez [aut, cph] (ORCID: <https://orcid.org/0000-0002-7981-1599>), Christoph Pucher [aut] (ORCID: <https://orcid.org/0000-0002-9269-1907>), Paloma Ruiz-Benito [aut] (ORCID: <https://orcid.org/0000-0002-2781-5870>), Julen Astigarraga [aut] (ORCID: <https://orcid.org/0000-0001-9520-3713>), Mathias Neumann [aut] (ORCID: <https://orcid.org/0000-0003-2472-943X>), Sofía Miguel [aut, cre] (ORCID: <https://orcid.org/0000-0002-1341-8022>), Sophia Ratcliffe [aut] (ORCID: <https://orcid.org/0000-0001-9284-7900>) |
| Maintainer: | Sofía Miguel <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.0.1 |
| Built: | 2026-05-18 15:49:36 UTC |
| Source: | https://github.com/VeruGHub/easyclimate |
Check that the online climate data server is available and working correctly. Only works for version 4 of the climate dataset.
check_server(climatic_var = NULL, year = NULL, verbose = TRUE)check_server(climatic_var = NULL, year = NULL, verbose = TRUE)
climatic_var |
Optional. One of "Prcp", "Tmin", or "Tmax". |
year |
Optional. Year between 1950 and 2022. |
verbose |
Logical. Print diagnostic messages, or just return TRUE/FALSE? |
This function checks access to the latest version of the climatic dataset (version 4).
TRUE if the server seems available, FALSE otherwise.
check_server()check_server()
Extract annual climate data (temperature and precipitation) for a given set of points or polygons within Europe.
get_annual_climate( coords = NULL, climatic_var = "Prcp", period = NULL, output = "df" )get_annual_climate( coords = NULL, climatic_var = "Prcp", period = NULL, output = "df" )
coords |
A matrix, data.frame, |
climatic_var |
Character. Climatic variables to be downloaded ('Tmax', 'Tmin', 'Tavg' or 'Prcp'). Various elements can be concatenated in the vector. |
period |
Numbers representing years between 1950 and 2024. To specify a sequence of years use the format 'start:end' (e.g. YYYY:YYYY, see examples). Various elements can be concatenated in the vector (e.g. c(2000:2005, 2010:2015, 2020)) |
output |
Character. Either "df", which returns a dataframe with daily
climatic values for each point/polygon, or "raster", which returns |
Either:
A data.frame (if output = "df")
A list of terra::SpatRaster() object (if output = "raster")
For precipitation, the function returns total (accumulated) precipitation per year. For temperature variables ('Tmin', 'Tmax', 'Tavg') the function returns the average (i.e. the annual average of minimum and maximum daily temperatures, or the average annual temperature).
Veronica Cruz-Alonso, Francisco Rodriguez-Sanchez
Pucher C. 2023. Description and Evaluation of Downscaled Daily Climate Data Version 4. https://doi.org/10.6084/m9.figshare.22962671.v1
Werner Rammer, Christoph Pucher, Mathias Neumann. 2018. Description, Evaluation and Validation of Downscaled Daily Climate Data Version 2. ftp://palantir.boku.ac.at/Public/ClimateData/
Adam Moreno, Hubert Hasenauer. 2016. Spatial downscaling of European climate data. International Journal of Climatology 36: 1444–1458.
# Coords as matrix coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_annual_climate(coords, period = 2008) # 2008 ex <- get_annual_climate(coords, period = c(2008, 2010)) # 2008 AND 2010 ex <- get_annual_climate(coords, period = 2008:2010) # 2008 TO 2010 ex <- get_annual_climate(coords, period = 2008, climatic_var = "Tmin") # Coords as data.frame or tbl_df coords <- as.data.frame(coords) #coords <- tibble::as_tibble(coords) names(coords) <- c("lon", "lat") # must have these columns ex <- get_annual_climate(coords, period = 2008) # single month # Coords as sf coords <- sf::st_as_sf(coords, coords = c("lon", "lat")) ex <- get_annual_climate(coords, period = 2008) # single month # Several points coords <- matrix(c(-5.36, 37.40, -4.05, 38.10), ncol = 2, byrow = TRUE) ex <- get_annual_climate(coords, period = 2008, output = "raster") # raster output # Multiple climatic variables coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_annual_climate(coords, climatic_var = c("Tmin", "Tmax"), period = 2008) ## Polygons coords <- terra::vect("POLYGON ((-5 38, -5 37.5, -4.5 37.5, -4.5 38, -5 38))") # Return raster ex <- get_annual_climate(coords, period = 2008, output = "raster") ex <- get_annual_climate(coords, climatic_var = c("Tmin", "Tmax"), period = 2008, output = "raster") # Multiple climatic variables # Return dataframe for polygon ex <- get_annual_climate(coords, period = 2008)# Coords as matrix coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_annual_climate(coords, period = 2008) # 2008 ex <- get_annual_climate(coords, period = c(2008, 2010)) # 2008 AND 2010 ex <- get_annual_climate(coords, period = 2008:2010) # 2008 TO 2010 ex <- get_annual_climate(coords, period = 2008, climatic_var = "Tmin") # Coords as data.frame or tbl_df coords <- as.data.frame(coords) #coords <- tibble::as_tibble(coords) names(coords) <- c("lon", "lat") # must have these columns ex <- get_annual_climate(coords, period = 2008) # single month # Coords as sf coords <- sf::st_as_sf(coords, coords = c("lon", "lat")) ex <- get_annual_climate(coords, period = 2008) # single month # Several points coords <- matrix(c(-5.36, 37.40, -4.05, 38.10), ncol = 2, byrow = TRUE) ex <- get_annual_climate(coords, period = 2008, output = "raster") # raster output # Multiple climatic variables coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_annual_climate(coords, climatic_var = c("Tmin", "Tmax"), period = 2008) ## Polygons coords <- terra::vect("POLYGON ((-5 38, -5 37.5, -4.5 37.5, -4.5 38, -5 38))") # Return raster ex <- get_annual_climate(coords, period = 2008, output = "raster") ex <- get_annual_climate(coords, climatic_var = c("Tmin", "Tmax"), period = 2008, output = "raster") # Multiple climatic variables # Return dataframe for polygon ex <- get_annual_climate(coords, period = 2008)
Extract daily climate data (temperature and precipitation) for a given set of points or polygons within Europe.
get_daily_climate( coords = NULL, climatic_var = "Prcp", period = NULL, output = "df", version = "last", check_connection = FALSE )get_daily_climate( coords = NULL, climatic_var = "Prcp", period = NULL, output = "df", version = "last", check_connection = FALSE )
coords |
A matrix, data.frame, |
climatic_var |
Character. Climatic variables to be downloaded ('Tmax', 'Tmin' or 'Prcp'). Various elements can be concatenated in the vector. |
period |
Either integer numbers (representing years between 1950 and 2024), or dates in "YYYY-MM-DD" format (to obtain data for specific days). To specify a sequence of years or dates use the format 'start:end' (e.g. YYYY:YYYY or "YYYY-MM-DD:YYYY-MM-DD", see examples). Various elements can be concatenated in the vector (e.g. c(2000:2005, 2010:2015, 2020), c("2000-01-01:2000-01-15", "2000-02-01")) |
output |
Character. Either "df", which returns a dataframe with daily
climatic values for each point/polygon, or "raster", which returns |
version |
Character. Version of the climate data. It uses the latest version ('last') by default. The former version (4) is also available, for the sake of reproducibility. See 'references' for details on the climatic data sets. |
check_connection |
Logical. Check the connection to the server before
attempting data download? Only used if |
Either:
A data.frame (if output = "df")
A terra::SpatRaster() object (if output = "raster")
A list of terra::SpatRaster() objects (if output = "raster" and there is
more than one climatic_var).
Veronica Cruz-Alonso, Francisco Rodriguez-Sanchez
Pucher C. 2023. Description and Evaluation of Downscaled Daily Climate Data Version 4. https://doi.org/10.6084/m9.figshare.22962671.v1
Werner Rammer, Christoph Pucher, Mathias Neumann. 2018. Description, Evaluation and Validation of Downscaled Daily Climate Data Version 2. ftp://palantir.boku.ac.at/Public/ClimateData/
Adam Moreno, Hubert Hasenauer. 2016. Spatial downscaling of European climate data. International Journal of Climatology 36: 1444–1458.
# Coords as matrix coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_daily_climate(coords, period = "2001-01-01") # single day ex <- get_daily_climate(coords, period = c("2001-01-01", "2001-01-03")) # 1st AND 3rd Jan 2001 ex <- get_daily_climate(coords, period = "2001-01-01:2001-01-03") # 1st TO 3rd Jan 2001 ex <- get_daily_climate(coords, period = 2008) # entire year ex <- get_daily_climate(coords, period = c(2008, 2010)) # 2008 AND 2010 ex <- get_daily_climate(coords, period = 2008:2010) # 2008 TO 2010 ex <- get_daily_climate(coords, period = "2001-01-01", climatic_var = "Tmin") # Coords as data.frame or tbl_df coords <- as.data.frame(coords) #coords <- tibble::as_tibble(coords) names(coords) <- c("lon", "lat") # must have these columns ex <- get_daily_climate(coords, period = "2001-01-01") # single day # Coords as sf coords <- sf::st_as_sf(coords, coords = c("lon", "lat")) ex <- get_daily_climate(coords, period = "2001-01-01") # single day # Several points coords <- matrix(c(-5.36, 37.40, -4.05, 38.10), ncol = 2, byrow = TRUE) ex <- get_daily_climate(coords, period = "2001-01-01", output = "raster") # raster output # Multiple climatic variables coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_daily_climate(coords, climatic_var = c("Tmin", "Tmax"), period = "2001-01-01") ## Polygons coords <- terra::vect("POLYGON ((-5 38, -5 37.5, -4.5 37.5, -4.5 38, -5 38))") # Return raster ex <- get_daily_climate(coords, period = "2001-01-01", output = "raster") # Return dataframe for polygon ex <- get_daily_climate(coords, period = "2001-01-01")# Coords as matrix coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_daily_climate(coords, period = "2001-01-01") # single day ex <- get_daily_climate(coords, period = c("2001-01-01", "2001-01-03")) # 1st AND 3rd Jan 2001 ex <- get_daily_climate(coords, period = "2001-01-01:2001-01-03") # 1st TO 3rd Jan 2001 ex <- get_daily_climate(coords, period = 2008) # entire year ex <- get_daily_climate(coords, period = c(2008, 2010)) # 2008 AND 2010 ex <- get_daily_climate(coords, period = 2008:2010) # 2008 TO 2010 ex <- get_daily_climate(coords, period = "2001-01-01", climatic_var = "Tmin") # Coords as data.frame or tbl_df coords <- as.data.frame(coords) #coords <- tibble::as_tibble(coords) names(coords) <- c("lon", "lat") # must have these columns ex <- get_daily_climate(coords, period = "2001-01-01") # single day # Coords as sf coords <- sf::st_as_sf(coords, coords = c("lon", "lat")) ex <- get_daily_climate(coords, period = "2001-01-01") # single day # Several points coords <- matrix(c(-5.36, 37.40, -4.05, 38.10), ncol = 2, byrow = TRUE) ex <- get_daily_climate(coords, period = "2001-01-01", output = "raster") # raster output # Multiple climatic variables coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_daily_climate(coords, climatic_var = c("Tmin", "Tmax"), period = "2001-01-01") ## Polygons coords <- terra::vect("POLYGON ((-5 38, -5 37.5, -4.5 37.5, -4.5 38, -5 38))") # Return raster ex <- get_daily_climate(coords, period = "2001-01-01", output = "raster") # Return dataframe for polygon ex <- get_daily_climate(coords, period = "2001-01-01")
Extract monthly climate data (temperature and precipitation) for a given set of points or polygons within Europe.
get_monthly_climate( coords = NULL, climatic_var = "Prcp", period = NULL, output = "df" )get_monthly_climate( coords = NULL, climatic_var = "Prcp", period = NULL, output = "df" )
coords |
A matrix, data.frame, |
climatic_var |
Character. Climatic variables to be downloaded ('Tmax', 'Tmin', 'Tavg' or 'Prcp'). Various elements can be concatenated in the vector. |
period |
Either numbers (representing years between 1950 and 2024), or dates in "YYYY-MM" format (to obtain data for specific months). To specify a sequence of years or months use the format 'start:end' (e.g. YYYY:YYYY or "YYYY-MM:YYYY-MM", see examples). Various elements can be concatenated in the vector (e.g. c(2000:2005, 2010:2015, 2020), c("2000-01:2000-06", "2001-01")) |
output |
Character. Either "df", which returns a dataframe with daily
climatic values for each point/polygon, or "raster", which returns |
Either:
A data.frame (if output = "df")
A list of terra::SpatRaster() object (if output = "raster")
For precipitation, the function returns total (accumulated) precipitation per month. For temperature variables ('Tmin', 'Tmax', 'Tavg') the function returns the average (i.e. the monthly average of minimum and maximum daily temperatures, or the average monthly temperature).
Veronica Cruz-Alonso, Francisco Rodriguez-Sanchez
Pucher C. 2023. Description and Evaluation of Downscaled Daily Climate Data Version 4. https://doi.org/10.6084/m9.figshare.22962671.v1
Werner Rammer, Christoph Pucher, Mathias Neumann. 2018. Description, Evaluation and Validation of Downscaled Daily Climate Data Version 2. ftp://palantir.boku.ac.at/Public/ClimateData/
Adam Moreno, Hubert Hasenauer. 2016. Spatial downscaling of European climate data. International Journal of Climatology 36: 1444–1458.
# Coords as matrix coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_monthly_climate(coords, period = "2001-01") # single month ex <- get_monthly_climate(coords, period = c("2001-01", "2001-03")) # January AND March 2001 ex <- get_monthly_climate(coords, period = "2001-01:2001-03") # January TO March 2001 ex <- get_monthly_climate(coords, period = 2008) # entire year ex <- get_monthly_climate(coords, period = c(2008, 2010)) # 2008 AND 2010 ex <- get_monthly_climate(coords, period = 2008:2010) # 2008 TO 2010 ex <- get_monthly_climate(coords, period = "2001-01", climatic_var = "Tmin") # Coords as data.frame or tbl_df coords <- as.data.frame(coords) #coords <- tibble::as_tibble(coords) names(coords) <- c("lon", "lat") # must have these columns ex <- get_monthly_climate(coords, period = "2001-01") # single month # Coords as sf coords <- sf::st_as_sf(coords, coords = c("lon", "lat")) ex <- get_monthly_climate(coords, period = "2001-01") # single month # Several points coords <- matrix(c(-5.36, 37.40, -4.05, 38.10), ncol = 2, byrow = TRUE) ex <- get_monthly_climate(coords, period = "2001-01", output = "raster") # raster output # Multiple climatic variables coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_monthly_climate(coords, climatic_var = c("Tmin", "Tmax"), period = "2001-01") ## Polygons coords <- terra::vect("POLYGON ((-5 38, -5 37.5, -4.5 37.5, -4.5 38, -5 38))") # Return raster ex <- get_monthly_climate(coords, period = "2001-01", output = "raster") ex <- get_monthly_climate(coords, climatic_var = c("Tmin", "Tmax"), period = "2001-01", output = "raster") # Multiple climatic variables # Return dataframe for polygon ex <- get_monthly_climate(coords, period = "2001-01")# Coords as matrix coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_monthly_climate(coords, period = "2001-01") # single month ex <- get_monthly_climate(coords, period = c("2001-01", "2001-03")) # January AND March 2001 ex <- get_monthly_climate(coords, period = "2001-01:2001-03") # January TO March 2001 ex <- get_monthly_climate(coords, period = 2008) # entire year ex <- get_monthly_climate(coords, period = c(2008, 2010)) # 2008 AND 2010 ex <- get_monthly_climate(coords, period = 2008:2010) # 2008 TO 2010 ex <- get_monthly_climate(coords, period = "2001-01", climatic_var = "Tmin") # Coords as data.frame or tbl_df coords <- as.data.frame(coords) #coords <- tibble::as_tibble(coords) names(coords) <- c("lon", "lat") # must have these columns ex <- get_monthly_climate(coords, period = "2001-01") # single month # Coords as sf coords <- sf::st_as_sf(coords, coords = c("lon", "lat")) ex <- get_monthly_climate(coords, period = "2001-01") # single month # Several points coords <- matrix(c(-5.36, 37.40, -4.05, 38.10), ncol = 2, byrow = TRUE) ex <- get_monthly_climate(coords, period = "2001-01", output = "raster") # raster output # Multiple climatic variables coords <- matrix(c(-5.36, 37.40), ncol = 2) ex <- get_monthly_climate(coords, climatic_var = c("Tmin", "Tmax"), period = "2001-01") ## Polygons coords <- terra::vect("POLYGON ((-5 38, -5 37.5, -4.5 37.5, -4.5 38, -5 38))") # Return raster ex <- get_monthly_climate(coords, period = "2001-01", output = "raster") ex <- get_monthly_climate(coords, climatic_var = c("Tmin", "Tmax"), period = "2001-01", output = "raster") # Multiple climatic variables # Return dataframe for polygon ex <- get_monthly_climate(coords, period = "2001-01")