Skip to contents

Send a query to the UKCP API for projection data and get a job (that will produce .csv outputs) started.

Usage

start_ukcp_projection_csv_job(
  label,
  API_KEY = Sys.getenv("UKCP_API_KEY"),
  identifier,
  area_details,
  collection,
  temp_avg,
  year_range,
  variable,
  climate_change_type,
  ensemble_member_set,
  scenario
)

Arguments

label

Job label for your request - this will appear in the UKCP API.

API_KEY

Your UKCP API key. Defaults to the UKCP_API_KEY environment variable if created.

identifier

Identifier for the dataset you would like to query.

area_details

The coordinates (northings/eastings) of the location you are interested in. Enter as a vector with W, S, E, N boundaries in that order.

collection

The collection the queried dataset is part of.

temp_avg

The time period the data is broken down by, eg 'day' or 'may' (for data for that month, 'mall' for all months).

year_range

Years covered by your call. Enter as a vector in the following format: c(min_yr, max_yr). Note there may be restrictions on which years can be sent depending on which data you are requesting.

variable

The measurement you are trying to extract, eg 'rainfall' or 'sun'.

climate_change_type

Whether you want 'absolute' or 'anomaly' values.

ensemble_member_set

Set of models used to generate projections.

scenario

RCP scenario (rcp26 or rcp85) to gather projections for. Note only variable for global projections.

Value

A list of information about your job, crucially the URL to use to get the results (when ready).

Examples

if (FALSE) {
 start_ukcp_projection_csv_job(
  label = "ukcpR-query",
  identifier = "LS2_Subset_01",
  area_details = c(292500, 72500, 293500, 73500),
  collection = "land-gcm",
  temp_avg = "mall",
  year_range = c(2061, 2080),
  variable = "tas"
 )
 }