Submit a request to the Copernicus Climate Data Service to download
(part of) a dataset. If the request is successful, a job identifier is
returned which can be used to actually download the data (cds_download_jobs()).
Usage
cds_submit_job(
dataset,
...,
wait = TRUE,
check_quota = TRUE,
check_licence = TRUE,
token = cds_get_token()
)Arguments
- dataset
The dataset name to be downloaded, or a
listreturned bycds_build_request(). When this argument is missing the function will attempt to build a request with text on the clipboard usingcds_python_to_r().- ...
Subsetting parameters passed onto
cds_build_request(). Should be empty whendatasetis missing or alist.- wait
A
logicalvalue indicating if the function should wait for the submitted job to finish. Set it toFALSEto continue without waiting- check_quota
Each account has a quota of data that can be downloaded. If this argument is set to
TRUE(default) it is checked if the request doesn't exceed your quota. Set it toFALSEto skip this step and speed up the submission.- check_licence
Datasets generally require you to accept certain terms of use. If this argument is set to
TRUE(default), it will be checked if you have accepted all required licences for the submitted request. Set it toFALSEto skip this step and speed up the submission.- token
An API key to be used for authentication. Will use
cds_get_token()by default.
Examples
if (interactive() && cds_token_works()) {
job <- cds_submit_job(
dataset = "reanalysis-era5-pressure-levels",
variable = "geopotential",
product_type = "reanalysis",
area = c(n = 55, w = -1, s = 50, e = 10),
year = "2024",
month = "03",
day = "01",
pressure_level = "1000",
data_format = "netcdf"
)
## Or split into two separate steps:
req <- cds_build_request(
dataset = "reanalysis-era5-pressure-levels",
variable = "geopotential",
product_type = "reanalysis",
area = c(n = 55, w = -1, s = 50, e = 10),
year = "2024",
month = "03",
day = "01",
pressure_level = "1000",
data_format = "netcdf"
)
job <- cds_submit_job(req)
}