Learn R Programming

meteo (version 2.0-2)

get_meteo: 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")

Value

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

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).

Author

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

See Also

pred.strk

Examples

Run this code
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")

Run the code above in your browser using DataLab