cru_ts_bbox: Download CRU TS climate data for a bounding box

View source: R/cru_ts.R

CRUTSBboxR Documentation

Download CRU TS climate data for a bounding box

Description

Downloads CRU TS v4.07 monthly gridded climate data and filters the data to a geographic bounding box. The data is for the global land areas at a resolution of 0.5 degrees, for 1901-2022.

Usage

CRUTSBbox(...)

cru_ts_bbox(
  variable,
  start_year,
  end_year,
  north,
  south,
  east,
  west,
  output_dir = tempdir(),
  use_cache = TRUE,
  ...
)

Arguments

...

Arguments that the aliases send to the primary function.

variable

CRU TS variable code. See list_cru_ts_variables(). Common values: "tmp" (mean temperature), "pre" (precipitation), "tmx" (max temperature), "tmn" (min temperature).

start_year

Start year (1901-2022).

end_year

End year (1901-2022).

north

North boundary (latitude).

south

South boundary (latitude).

east

East boundary (longitude).

west

West boundary (longitude).

output_dir

Directory for temporary files (default: tempdir()).

use_cache

If TRUE, use the data in the cache (default: TRUE).

Value

A data.frame with the columns: year, month, latitude, longitude, value, variable.

Examples


# Monthly mean temperature for India, 2010-2020
data <- cru_ts_bbox(
  variable = "tmp",
  start_year = 2010, end_year = 2020,
  north = 35, south = 8, east = 97, west = 68
)

# Precipitation for Europe, 1981-2010
data <- cru_ts_bbox(
  variable = "pre",
  start_year = 1981, end_year = 2010,
  north = 71, south = 36, east = 40, west = -10
)


varunayan documentation built on Oct. 30, 2026, 1:07 a.m.