ecmwfr (version 1.2.2)

wf_transfer: ECMWF data transfer function

Description

Returns the contents of the requested url as a netCDF file downloaded to disk or the current status of the requested transfer.

Usage

wf_transfer(
  url,
  user,
  service = "webapi",
  path = tempdir(),
  filename = tempfile("ecmwfr_"),
  verbose = TRUE
)

Arguments

url

url to query

user

user (email address) used to sign up for the ECMWF data service, used to retrieve the token set by wf_set_key.

service

which service to use, one of webapi or cds

path

path were to store the downloaded data

filename

filename to use for the downloaded data

verbose

show feedback on data transfers

Value

a netCDF of data on disk as specified by a wf_request

See Also

wf_set_key wf_request

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
# set key
wf_set_key(user = "test@mail.com", key = "123")

# request data and grab url and try a transfer
r <- wf_request(request, "test@email.com", transfer = FALSE)

# check transfer, will download if available
wf_transfer(r$href, "test@email.com")
# }

Run the code above in your browser using DataLab