<blockquote>
  <p>Any Python/R packages that can extract and plot these data in an efficient way?</p>
</blockquote>

<p>I can highly recommend using the Python package <a href="http://xarray.pydata.org/en/stable/" rel="nofollow noreferrer">xarray</a> or <a href="https://scitools.org.uk/iris/docs/latest/" rel="nofollow noreferrer">iris</a> for data analysis and <a href="https://scitools.org.uk/cartopy/docs/latest/" rel="nofollow noreferrer">Cartopy</a> for plotting. </p>

CC BY-SA 4.0
2019-05-07T16:33:00.930Z
2019-09-10T08:41:47.307Z
2019-09-10T08:41:47.307Z
Basileios
<p>This is coming from a newcomer, so please be kind.</p>

<p>As I delve into the world of meteo data and reanalysis for the first time, I found that acquiring weather data is a lengthy process, so I'm shouting out for some help to get me started with it.</p>

<ol>
<li><p>What is the recommended workflow to acquire <strong>ERA5</strong> data for a region of interest (ROI) for a few surface variables (precip, soilmoisutre, tempmin, solar rad)? </p>

<ul>
<li>Is there an API that connects me (R, Python, Curl) to the ERA5 database? </li>
<li>Do I need to download whole (global) files even if my ROI is always within the same country? If so, are we talking about 100GB, 1,000GB or 10,000GB of data for 6 variables, whole historical?</li>
</ul></li>
<li><p>Seems like there are plenty of tools to extract ROI data from grib files. What is the recommended tool to learn in 2019? </p>

<ul>
<li><p>Is CDO the most appropriate tool for the job? </p></li>
<li><p>Any Python/R packages that can extract and plot these data in an efficient way?</p></li>
</ul></li>
</ol>

<p>Thanks and let me know how to complement the info above</p>

CC BY-SA 4.0
2019-03-26T17:16:28.450Z
Do you need to automate the process? Or you are happy with an online interface to manually select, visualize and download the data?
Camilo Rada
CC BY-SA 4.0
2019-03-26T17:19:53.427Z
if it is just few layers for a specific area, you can simply follow the procedure described here (https://confluence.ecmwf.int/display/CKB/How+to+download+ERA5) and use the built in API.
Nemesi
CC BY-SA 4.0
2019-03-27T17:44:04.947Z
@CamiloRada, data acquisition has to be automated. I've found the manual interface <<< https://confluence.ecmwf.int/display/CKB/How+to+download+ERA5>> and studying it now. Question remains on what the best tool to aggregate this data for ROIs is. Would you suggest ClimateDataOperators (CDOs) for someone on Windows ?
Dan
CC BY-SA 4.0
2019-03-27T17:44:27.733Z
@Nemesi, thanks. I'm following the tutorial now.
Dan
CC BY-SA 4.0
2019-03-27T22:45:10.747Z
As of 2019/March: "A facility for selecting a geographical subset of ERA5 or Seasonal forecast data will soon be implemented on the CDS web download interface" ..... link: https://confluence.ecmwf.int/pages/viewpage.action?pageId=133261020 
I'm leaving the question open to understand if CDO is the most appropriate way to accomplish this without the ecmwf API.
Dan
CC BY-SA 4.0
2019-03-28T09:36:41.877Z
@Dan, Sorry, I didn't read all the tutorial and did not realize that the facility was still under development. If you are familiar with Python, you could adapt this script (https://confluence.ecmwf.int/pages/viewpage.action?pageId=73016800) to extract the data for your ROI. I did not not work yet with ERA5 files, but I assume that the structure of the file should be similar to the one they used for ERA-Interim.
Nemesi
CC BY-SA 4.0
2019-03-28T09:40:26.857Z
To answer your question, in my experience, CDO and NCO are the most efficient tools to resize and get info from NetCDF, HDF5, or GRiB files, but sometimes you want to use scripts (I usually use R, but Python is probably even more efficient) to extract and process climate data and prepare the outputs in a format that you can use for your purposes. For instance, I often used R scripts to extract climate projections from .nc files and prepare input files for a land surface model. So, there is no a standard way to proceed, it depends on what you need to do.
Nemesi
<meteorology><reanalysis><era>
Extracting Regional Data from ERA5
Dan
# Extracting Regional Data from ERA5

(Asked by: username_0 on 2019-03-26)

This is coming from a newcomer, so please be kind.

As I delve into the world of meteo data and reanalysis for the first time, I found that acquiring weather data is a lengthy process, so I'm shouting out for some help to get me started with it.

1. What is the recommended workflow to acquire **ERA5** data for a region of interest (ROI) for a few surface variables (precip, soilmoisutre, tempmin, solar rad)?

   * Is there an API that connects me (R, Python, Curl) to the ERA5 database?
   * Do I need to download whole (global) files even if my ROI is always within the same country? If so, are we talking about 100GB, 1,000GB or 10,000GB of data for 6 variables, whole historical?
2. Seems like there are plenty of tools to extract ROI data from grib files. What is the recommended tool to learn in 2019?

   * Is CDO the most appropriate tool for the job?
   * Any Python/R packages that can extract and plot these data in an efficient way?

Thanks and let me know how to complement the info above

**Tags:** meteorology, reanalysis, era

> **Comments:**
> **username_1**: Do you need to automate the process? Or you are happy with an online interface to manually select, visualize and download the data?  
> **username_2**: if it is just few layers for a specific area, you can simply follow the procedure described here (https://confluence.ecmwf.int/display/CKB/How+to+download+ERA5) and use the built in API.  
> **username_0**: @username_1, data acquisition has to be automated. I've found the manual interface <<< https://confluence.ecmwf.int/display/CKB/How+to+download+ERA5>> and studying it now. Question remains on what the best tool to aggregate this data for ROIs is. Would you suggest ClimateDataOperators (CDOs) for someone on Windows ?  
> **username_0**: @username_2, thanks. I'm following the tutorial now.  
> **username_0**: As of 2019/March: "A facility for selecting a geographical subset of ERA5 or Seasonal forecast data will soon be implemented on the CDS web download interface" ..... link: https://confluence.ecmwf.int/pages/viewpage.action?pageId=133261020  I'm leaving the question open to understand if CDO is the most appropriate way to accomplish this without the ecmwf API.  
> **username_2**: @username_0, Sorry, I didn't read all the tutorial and did not realize that the facility was still under development. If you are familiar with Python, you could adapt this script (https://confluence.ecmwf.int/pages/viewpage.action?pageId=73016800) to extract the data for your ROI. I did not not work yet with ERA5 files, but I assume that the structure of the file should be similar to the one they used for ERA-Interim.  
> **username_2**: To answer your question, in my experience, CDO and NCO are the most efficient tools to resize and get info from NetCDF, HDF5, or GRiB files, but sometimes you want to use scripts (I usually use R, but Python is probably even more efficient) to extract and process climate data and prepare the outputs in a format that you can use for your purposes. For instance, I often used R scripts to extract climate projections from .nc files and prepare input files for a land surface model. So, there is no a standard way to proceed, it depends on what you need to do.  

---

## 1 answers

### Answer by username_3 on 2019-05-07. Score: 1

> Any Python/R packages that can extract and plot these data in an efficient way?

I can highly recommend using the Python package [xarray](http://xarray.pydata.org/en/stable/) or [iris](https://scitools.org.uk/iris/docs/latest/) for data analysis and [Cartopy](https://scitools.org.uk/cartopy/docs/latest/) for plotting.


---

