cdsDownload | R Documentation |
Create a .nc file, containing the mean temperature and precipitation records of a defined location, downloaded from the ECMFWR "ERA-5 Land monthly averaged data", via the Copernicus CDS API. Before using, the registration to the Copernicus CDS site is required (https://cds.climate.copernicus.eu/#!/home) as well as the acceptance of the terms and conditions here: https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products.
cdsDownload(U_ID, API_Key, lat, lon, sPath = getwd(), site_id = "")
U_ID |
The user ID for the authentication in the Copernicus CDS service (string) |
API_Key |
The key needed to make an API request (string) |
lat |
The latitude of the site of interest, expressed in decimals with a single decimal digit. For southing latitude values use a negative number (integer) |
lon |
The longitude of the site of interest, expressed in decimals with a single decimal digit. For westing longitude values, use a negative number (integer) |
sPath |
The path of the directory where the file is going to be saved (string) |
site_id |
Set as empty, it is a string where it is possible to insert the study area id, which will be reported in the file name |
## Not run:
user_id <- "39434" #example not working user id
user_key <- "0683788m-2136-2716-61g9-g4b97f8e4l1b" #example not working key
N <- 44.3
E <- 11.2
cdsDownload(U_ID = user_id, API_Key = user_key, lat = N, lon = E, sPath = dir, site_id = "")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.