Description Usage Arguments Note Examples
View source: R/grd_download_data_era5.R
Download ERA5 data after querying with the function grd_get_url
1 | grd_download_data_era5(output_grd_get_url_era5)
|
output_grd_get_url_era5 |
output of grd_get_url with collection="ERA5" |
There must exist the file .cdsapirc in the root directory of the computer (e.g. "/home/ptaconet"). See https://dominicroye.github.io/en/2018/access-to-climate-reanalysis-data-from-r/ for additional details
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
require(sf)
roi = st_as_sf(data.frame(
geom = "POLYGON ((-5.82 9.54, -5.42 9.55, -5.41 8.84, -5.81 8.84, -5.82 9.54))"),
wkt = "geom",crs = 4326)
time_range = as.Date(c("2017-01-01","2017-01-30"))
# query to get ERA5 url
era5_urls <- grd_get_url(collection = "ERA5", variables = c("10m_u_component_of_wind","10m_v_component_of_wind"), roi = roi, time_range = time_range)
# now download data
grd_download_data_era5(era5_urls)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.