Prepares coordinates and obtains climate normals using climr::downscale

getClimate(
  coords,
  byCombo = FALSE,
  outFormat = "data.table",
  filename = tempfile(fileext = ".rds"),
  ...
)

Arguments

coords

a data.table, or spatial points (SpatVector or sf) with point coordinates ("lon" = longitude, "lat" = latitude), elevation ("elev") and point IDs ("id").

byCombo

logical. If TRUE, climr::downscale is iterated by combinations of any arguments passed to downscale via ... (e.g., vars, gcms, ssps).

outFormat

character. Should outputs be in the form of a data.table ("data.table"), list of data.tables ("list") or written directly to disk ("disk")? If byCombo == FALSE, only "data.table" and "disk" will work.

filename

character. Passed to saveRDS(..., file) if outFormat == "disk". Defaults to tempfile(fileext = ".csv").

...

further arguments passed to climr::downscale().

Value

climate normals as a data.table

Details

If bgcs is provided, the BGC field will be appended to the output data.table.