View source: R/tag_download_wind.R
tag_download_wind | R Documentation |
This function download data associated to each flight from the ERA5 hourly pressure levels
with the Climate Data Store (CDS) and through the ecmwfr
R package.
Any variable available from the ERA5 pressure level can be downloaded.
The flights are determined from the stationary periods classified tag$stap
. It request a
single file for each flight using the exact time (hourly basis) and pressure (altitude). To make
the download more efficient, wf_request_batch()
is used to download all files at the same time (up to 20 requests in parallel).
To be able to download data from the Climate Data Store (CDS), you will need to create an ECMWF
account on https://www.ecmwf.int/. Once created, you can
retrieve your API Token on https://cds.climate.copernicus.eu/profile and save them in your local keychain with:
ecmwfr::wf_set_key("abcd1234-foo-bar-98765431-XXXXXXXXXX")
More information in the GeoPressureManual.
tag_download_wind(
tag,
extent = tag$param$tag_set_map$extent,
include_stap_id = NULL,
variable = c("u_component_of_wind", "v_component_of_wind"),
file = function(stap_id)
glue::glue("./data/wind/{tag$param$id}/{tag$param$id}_{stap_id}.nc"),
overwrite = FALSE,
workers = 19,
cds_token = deprecated(),
...
)
tag |
a GeoPressureR |
extent |
geographical extent of the map on which the likelihood will be computed.
Vector of length 4 |
include_stap_id |
stationary period identifiers of the start of the flight to download. Default is to download all flights. |
variable |
list of variables to download from the ERA5 pressure level : |
file |
absolute or relative path of the ERA5 wind data file to be downloaded. Function taking as single argument the stationary period identifier. |
overwrite |
logical. If |
workers |
maximum number of simultaneous request that will be submitted to the service. Most ECMWF services are limited to 20 concurrent requests (default = 2). |
cds_token |
|
... |
Arguments passed on to
|
the path of the downloaded (requested file) or the an R6 object with download/transfer information
wf_request_batch()
,
GeoPressureManual
Other movement:
bird_create()
,
graph_set_movement()
,
graph_transition()
,
plot_graph_movement()
,
speed2prob()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.