wf_request | R Documentation |
Stage a data request, and optionally download the data to disk. Alternatively
you can only stage requests, logging the request URLs to submit download
queries later on using wf_transfer
.
Note that the function will do some basic checks on the request
input
to identify possible problems.
wf_request(
request,
user = "ecmwfr",
transfer = TRUE,
path = tempdir(),
time_out = 3600,
retry = 30,
job_name,
verbose = TRUE
)
wf_request_batch(
request_list,
workers = 2,
user = "ecmwfr",
path = tempdir(),
time_out = 3600,
retry = 5,
total_timeout = length(request_list) * time_out/workers
)
request |
nested list with query parameters following the layout as specified on the ECMWF APIs page |
user |
user (default = "ecmwf") provided by the ECMWF data service,
used to retrieve the token set by |
transfer |
logical, download data TRUE or FALSE (default = TRUE) |
path |
path were to store the downloaded data |
time_out |
how long to wait on a download to start (default =
|
retry |
polling frequency of submitted request for downloading (default =
|
job_name |
optional name to use as an RStudio job and as output variable name. It has to be a syntactically valid name. |
verbose |
show feedback on processing |
request_list |
a list of requests that will be processed in parallel. |
workers |
maximum number of simultaneous request that will be submitted to the service. Most ECMWF services are limited to 20 concurrent requests (default = 2). |
total_timeout |
overall timeout limit for all the requests in seconds. |
the path of the downloaded (requested file) or the an R6 object with download/transfer information
Koen Hufkens
wf_set_key
wf_transfer
## Not run:
# set key
wf_set_key(key = "123")
request <- list(
dataset_short_name = "reanalysis-era5-pressure-levels",
product_type = "reanalysis",
variable = "geopotential",
year = "2024",
month = "03",
day = "01",
time = "13:00",
pressure_level = "1000",
data_format = "grib",
target = "download.grib"
)
# demo query
wf_request(request = request)
# Run as an RStudio Job. When finished, will create a
# variable named "test" in your environment with the path to
# the downloaded file.
wf_request(request = request, job_name = "test")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.