# Download ERA5 data by R

**URL:** <https://forum.ecmwf.int/t/download-era5-data-by-r/3423>\
**Category:** API\
**Created:** [24 July 2024 11:08 UTC](https://forum.ecmwf.int/t/download-era5-data-by-r/3423 "2024-07-24T11:08:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Kevin\_Marsh](https://forum.ecmwf.int/user_avatar/forum.ecmwf.int/kevin_marsh/32/368_2.png) [@Kevin\_Marsh](https://forum.ecmwf.int/u/Kevin_Marsh)\
**Post date:** [24 July 2024 20:46 UTC](https://forum.ecmwf.int/t/download-era5-data-by-r/3423/2 "2024-07-24T20:46:32Z")

</div>

this forum post describes how R can be used to access ERA5 data from the current CDS. Please note the recommended way to access ERA5 data is via the CDS API

> [@Download CDS ERA5 data using R](https://prod.ecmwf-forum-prod.compute.cci2.ecmwf.int/t/download-cds-era5-data-using-r/1365):
>
> Users can download CDS data using the&nbsp;[ecmwfr](https://cran.r-project.org/web/packages/ecmwfr/index.html) package&nbsp;in R with&nbsp;“cds” as the "service" although it is not supported by C3S. In the examples below, "KEY" and "UID" are your CDS API key and UID respectively. Please have a look at the following example to download ERA5 2m temperature for a selected area in netCDF format:&nbsp; library(ecmwfr) &nbsp; cds.key \<- "Insert\_your\_CDS\_API\_KEY\_here" wf\_set\_key(user = "Insert\_your\_CDS\_UID\_here", key = cds.key, service = "cds") …

---

_[View the full topic](https://forum.ecmwf.int/t/download-era5-data-by-r/3423)._
