I am able to download data for one year (i.e. 2008) using the script below and details are found here:
library (ecmwfr)
# Specify the data set
request <- list("dataset" = "reanalysis-era5-pressure-levels",
"product_type" = "reanalysis",
"variable" = "temperature",
"pressure_level" = "850",
"year" = "2008",
"month" = "04",
"day" = "04",
"time" = "00:00",
"area" = "70/-20/30/60",
"format" = "netcdf",
"target" = "era5-demo.nc")
# Start downloading the data, the path of the file
# will be returned as a variable (ncfile)
ncfile <- wf_request(user = "2088",
request = request,
transfer = TRUE,
path = "~",
verbose = FALSE)
Question: How can I download the data by year for the period 2008-2017 using the code above? The downloaded file names should have the specific year appended to them.