pr_dl_cmip: Download Global CMIP6 driver data

View source: R/pr_dl_cmip.R

pr_dl_cmipR Documentation

Download Global CMIP6 driver data

Description

Data is downloaded from the Copernicus Data Store, this routine therefore requires a valid account with this service and your ID and key installed on your system using the 'ecmwfr' package.

Usage

pr_dl_cmip(
  path = tempdir(),
  end_year = 2100,
  model = "miroc6",
  scenario = "ssp5_8_5",
  variable = c("daily_maximum_near_surface_air_temperature",
    "daily_minimum_near_surface_air_temperature", "precipitation"),
  extent = c(40, -80, 50, -70),
  time_out = 3600,
  user
)

Arguments

path

a path where to save the gridded data

end_year

end year of the data queried, by default this is set to 2100 but the dataset runs up until 2300

model

CMIP6 model data to download (character vector)

scenario

which RCP scenario to select for (default = "ssp5_8_5", or business as usual). Choose from: historical, ssp1_1_9, ssp1_2.6, ssp4_3_4, ssp5_3_4OS, ssp2_4_5, ssp4_6_0, ssp3_7_0,ssp5_8_5 (consult the Copernicus documentation for further details)

variable

which climate variables to download, by default all required variables are downloaded. (default = c("daily_maximum_near_surface_air_temperature", "daily_minimum_near_surface_air_temperature", "precipitation"))

extent

vector with coordinates defining the region of interest defined as ymax, xmin, ymin, xmax in lat/lon (default = c( 40, -80, 50, -70))

time_out

time out in seconds before the ecmwfr download returns to the prompt retaining the request running on the CDS server. Data can be retrieved later from the CDS webpage once finished. By default the time-out is set to an 3600 seconds (1h). It is advised to increase this to 2 or 3 hours for larger downloads.

user

Copernicus Data Store user ID (a number), on linux do not forget to set options(keyring_backend='file') if you use a file based keyring.

Details

The routine provides access to all available model runs and is a user friendly wrapper around a standard 'ecmwfr' call. Custom data formatting is possible, but herefore we refer to the 'ecmwfr' package.

For a full list of the models consult the Copernicus documentation (<https://cds.climate.copernicus.eu/cdsapp#!/dataset/projections-cmip6?tab=overview>) and the data query tools (<https://cds.climate.copernicus.eu/cdsapp#!/dataset/projections-cmip6?tab=form>).

Value

nothing is returned to the R working environment, files are downloaded and stored on disk

Examples


## Not run: 
print("todo")

## End(Not run)

bluegreen-labs/phenor documentation built on Sept. 2, 2023, 10:34 a.m.