get_meteo: Get daily meteorological data for specific location and...

View source: R/get_meteo.R

get_meteoR Documentation

Get daily meteorological data for specific location and dates.

Description

The function gives back daily metorological data for specific location and dates for Europe for 1991-2020 period (from MeteoEurope1km dataset).

Usage

get_meteo(loc,
          dates,
          var = "tmean",
          source = "MeteoEurope1km")

Arguments

loc

sf, SpatVector, data.frame, matrix, numeric or integer; Locations in WGS84 (EPSG:4326). If data.frame or matrix columns are lon/lat.

dates

Date or character; Date(s).

var

character; Daily meteorological variable. Possible values are: "tmean" (default), "tmax", "tmin", "prcp", or "slp".

source

character; Data source. Possible values are: "MeteoEurope1km" (default).

Value

data.frame object with daily meteorological values for specific locations (rows) and specific dates (columns). First column is location ID.

Author(s)

Aleksandar Sekulić asekulic@grf.bg.ac.rs

See Also

pred.strk

Examples

library(terra)

loc <- c(21, 45)
# loc <- as.data.frame(rbind(c(21, 45),
#                            c(21,45.5),
#                            c(21.5,45),
#                            c(21.5,45.5)))

dates <- as.Date("2020-12-25")
# dates <- seq(as.Date("2020-12-25"), as.Date("2020-12-31"), by="day")

tmean <- get_meteo(loc,
                   dates,
                   var = "tmean", # "tmax" "tmin" "prcp" "slp"
                   source = "MeteoEurope1km")

meteo documentation built on Oct. 14, 2023, 5:07 p.m.