Skip to contents

Reads ERA5-Land Daily Aggregated data (ECMWF/ERA5_LAND/DAILY_AGGR) from Google Earth Engine. Supports temperature and precipitation variables via the variable argument.

Usage

read_era5(
  date,
  region,
  variable = c("temperature", "precipitation"),
  backend = c("rest", "rgee"),
  cache = TRUE,
  max_tries = 3L,
  initial_delay = 1
)

Arguments

date

Character or Date. Date in "YYYY-MM-DD" format.

region

An sf::sf, sf::st_sfc(), or terra::ext() object defining the spatial extent. Required.

variable

Character. "temperature" (default) or "precipitation".

backend

Character. "rest" (default) or "rgee".

cache

Logical. Use disk cache? Default TRUE.

max_tries

Integer. Retry attempts. Default 3L.

initial_delay

Numeric. Initial retry delay in seconds. Default 1.

Value

A terra::rast() SpatRaster. CRS: EPSG:4326. Values:

  • Temperature: degrees Celsius (converted from Kelvin)

  • Precipitation: mm (converted from metres)

Data availability

1950-01-01 to present. Daily. ~11 km spatial resolution.

References

Munoz Sabater, J. (2019). ERA5-Land hourly data from 1950 to present. Copernicus Climate Change Service (C3S) Climate Data Store (CDS). doi:10.24381/cds.e2161bac

Examples

if (FALSE) { # interactive()
temp <- read_era5(date = "2024-06-15",
                  region = terra::ext(138, 140, -36, -34))

precip <- read_era5(date = "2024-06-15",
                    region = terra::ext(138, 140, -36, -34),
                    variable = "precipitation")
}