wf_transfer: ECMWF data transfer function

View source: R/wf_transfer.R

wf_transferR Documentation

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 = "ecmwfr",
  path = tempdir(),
  filename = tempfile("ecmwfr_", tmpdir = ""),
  verbose = TRUE
)

Arguments

url

R6 wf_request) query output or API endpoint

user

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

path

path were to store the downloaded data

filename

filename to use for the downloaded data

verbose

show feedback on data transfers

Details

Normal workflows would use the methods included in returned objects. This is for legacy support and custom scripting only.

Value

a (netCDF) file of data on disk as specified by a wf_request

Author(s)

Koen Hufkens

See Also

wf_set_key wf_request

Examples


## Not run: 
# request data and grab url and try a transfer
# (request not provided)
r <- wf_request(request, transfer = FALSE)

# check transfer, will download if available
wf_transfer(r$get_url())

## End(Not run)

khufkens/ecmwfr documentation built on Nov. 21, 2024, 5:19 a.m.