William.Hatheway
Active member
**Guide to Using Copernicus ERA5 Data with WRF**
Dear WRF Users,
Many users encounter challenges when utilizing ERA5 data from the Copernicus Climate Data Store (CDS) with WRF. To assist, I've put together a step-by-step guide on how to successfully download, process, and run ERA5 data within WRF. Please note that, unlike ERA5 data from NOAA's RDA database, the ECMWF Copernicus database involves a few additional steps.
### Step 1: Acquiring ERA5 Data from CDS
ERA5 data from ECMWF is split into two distinct categories: Pressure Levels and Single-Level Surface data. It's crucial to download these datasets separately and store them in separate directories for proper processing. I recommend organizing them as follows:
- `ERA5/PRESSURE`
- `ERA5/SURFACE`
You can find the necessary datasets here:
- [ERA5 Pressure Level Data]
cds.climate.copernicus.eu
- [ERA5 Single-Level Surface Data]
cds.climate.copernicus.eu
### Step 2: Downloading Data for WRF
#### ERA5 Pressure Level Data
For the pressure level data, download the following variables and pressure levels:
**Variables:**
- `divergence`, `fraction_of_cloud_cover`, `geopotential`, `ozone_mass_mixing_ratio`, `potential_vorticity`, `relative_humidity`, `specific_cloud_ice_water_content`, `specific_cloud_liquid_water_content`, `specific_humidity`, `specific_rain_water_content`, `specific_snow_water_content`, `temperature`, `u_component_of_wind`, `v_component_of_wind`, `vertical_velocity`, `vorticity`
**Pressure Levels:**
- `10`, `20`, `30`, `50`, `70`, `100`, `125`, `150`, `175`, `200`, `225`, `250`, `300`, `350`, `400`, `450`, `500`, `550`, `600`, `650`, `700`, `750`, `775`, `800`, `825`, `850`, `875`, `900`, `925`, `950`, `975`, `1000`
**Times:** (adjust according to your case)
- `00:00`, `01:00`, `02:00`, ..., `23:00`
#### ERA5 Single-Level Surface Data
For the surface data, the following variables are required:
**Variables:**
- `10m_u_component_of_wind`, `10m_v_component_of_wind`, `2m_dewpoint_temperature`, `2m_temperature`, `land_sea_mask`, `mean_sea_level_pressure`, `sea_ice_cover`, `sea_surface_temperature`, `skin_temperature`, `snow_density`, `snow_depth`, `soil_temperature_level_1`, `soil_temperature_level_2`, `soil_temperature_level_3`, `soil_temperature_level_4`, `surface_pressure`, `volumetric_soil_water_layer_1`, `volumetric_soil_water_layer_2`, `volumetric_soil_water_layer_3`, `volumetric_soil_water_layer_4`
**Times:** (adjust according to your case)
- `00:00`, `01:00`, `02:00`, ..., `23:00`
### Step 3: Ungribbing the Data
After downloading the required data, you'll need to ungrib both datasets. The best approach is to use two separate `namelist.wps` files—one for pressure data and one for surface data. This separation simplifies the process and keeps the workflow organized. I’ve provided example `namelist.wps` files that can assist you.
#### Ungribbing the Pressure Data
Use the following commands to ungrib the pressure data:
The `namelist.wps` should be configured like this for pressure data:
#### Ungribbing the Surface Data
Next, ungrib the surface data with the following commands:
Use a different prefix for the surface data in the `namelist.wps`:
### Step 3a: Running Geogrid ###
You'll need to run geogrid.exe with the surface wps file
### Step 4: Running Metgrid
Once the ungribbing process is complete, the next step is to run `metgrid` to process the data for WRF. You need to configure `metgrid` to read both the pressure (FILE) and surface (SFILE) data by specifying them in the `namelist.wps` file:
Run `metgrid` using the following command:
This command will process both the surface and pressure data and generate the `met` files needed for WRF.
### Step 5: Running WRF
After completing the `metgrid` step, the `met` files will be ready for WRF. You can either copy or link these files to the WRF directory and proceed with your WRF simulation.
---
I hope this guide helps streamline the process of using ERA5 data from Copernicus with WRF. If you encounter any issues or have questions, feel free to reach out. Please note, I am not affiliated with NCAR, and my goal is simply to assist fellow users. For any corrections or additional insights, I encourage the forum admins (@kwerner, @Ming Chen, @weiwang) to weigh in.
Best regards
Dear WRF Users,
Many users encounter challenges when utilizing ERA5 data from the Copernicus Climate Data Store (CDS) with WRF. To assist, I've put together a step-by-step guide on how to successfully download, process, and run ERA5 data within WRF. Please note that, unlike ERA5 data from NOAA's RDA database, the ECMWF Copernicus database involves a few additional steps.
### Step 1: Acquiring ERA5 Data from CDS
ERA5 data from ECMWF is split into two distinct categories: Pressure Levels and Single-Level Surface data. It's crucial to download these datasets separately and store them in separate directories for proper processing. I recommend organizing them as follows:
- `ERA5/PRESSURE`
- `ERA5/SURFACE`
You can find the necessary datasets here:
- [ERA5 Pressure Level Data]

ERA5 hourly data on pressure levels from 1940 to present
ERA5 is the fifth generation ECMWF reanalysis for the global climate and weather for the past 8 decades. Data is available from 1940 onwards. ERA5 replaces the ERA-Interim reanalysis. Reanalysis combines model data with observations from across the world into a globally complete and consistent...

ERA5 hourly data on single levels from 1940 to present
ERA5 is the fifth generation ECMWF reanalysis for the global climate and weather for the past 8 decades. Data is available from 1940 onwards. ERA5 replaces the ERA-Interim reanalysis. Reanalysis combines model data with observations from across the world into a globally complete and consistent...
### Step 2: Downloading Data for WRF
#### ERA5 Pressure Level Data
For the pressure level data, download the following variables and pressure levels:
**Variables:**
- `divergence`, `fraction_of_cloud_cover`, `geopotential`, `ozone_mass_mixing_ratio`, `potential_vorticity`, `relative_humidity`, `specific_cloud_ice_water_content`, `specific_cloud_liquid_water_content`, `specific_humidity`, `specific_rain_water_content`, `specific_snow_water_content`, `temperature`, `u_component_of_wind`, `v_component_of_wind`, `vertical_velocity`, `vorticity`
**Pressure Levels:**
- `10`, `20`, `30`, `50`, `70`, `100`, `125`, `150`, `175`, `200`, `225`, `250`, `300`, `350`, `400`, `450`, `500`, `550`, `600`, `650`, `700`, `750`, `775`, `800`, `825`, `850`, `875`, `900`, `925`, `950`, `975`, `1000`
**Times:** (adjust according to your case)
- `00:00`, `01:00`, `02:00`, ..., `23:00`
#### ERA5 Single-Level Surface Data
For the surface data, the following variables are required:
**Variables:**
- `10m_u_component_of_wind`, `10m_v_component_of_wind`, `2m_dewpoint_temperature`, `2m_temperature`, `land_sea_mask`, `mean_sea_level_pressure`, `sea_ice_cover`, `sea_surface_temperature`, `skin_temperature`, `snow_density`, `snow_depth`, `soil_temperature_level_1`, `soil_temperature_level_2`, `soil_temperature_level_3`, `soil_temperature_level_4`, `surface_pressure`, `volumetric_soil_water_layer_1`, `volumetric_soil_water_layer_2`, `volumetric_soil_water_layer_3`, `volumetric_soil_water_layer_4`
**Times:** (adjust according to your case)
- `00:00`, `01:00`, `02:00`, ..., `23:00`
### Step 3: Ungribbing the Data
After downloading the required data, you'll need to ungrib both datasets. The best approach is to use two separate `namelist.wps` files—one for pressure data and one for surface data. This separation simplifies the process and keeps the workflow organized. I’ve provided example `namelist.wps` files that can assist you.
#### Ungribbing the Pressure Data
Use the following commands to ungrib the pressure data:
Bash:
ulimit -s unlimited
cd /path/to/wps/folder/
# Linking pressure level data
./link_grib.csh /path/to/ERA5/PRESSURE/
# Linking Vtable for ECMWF
ln -sf ungrib/Variable_Tables/Vtable.ECMWF ./Vtable
# Ungrib the data
./ungrib.exe
# Remove GRIB files after processing
rm -rf GRIBFILE.*
The `namelist.wps` should be configured like this for pressure data:
Code:
&ungrib
out_format = 'WPS',
prefix = 'FILE',
/
#### Ungribbing the Surface Data
Next, ungrib the surface data with the following commands:
Bash:
# Linking surface level data
./link_grib.csh /path/to/ERA5/SURFACE/
# Linking Vtable for ECMWF
ln -sf ungrib/Variable_Tables/Vtable.ECMWF ./Vtable
# Ungrib the data
./ungrib.exe
Use a different prefix for the surface data in the `namelist.wps`:
Code:
&ungrib
out_format = 'WPS',
prefix = 'SFILE',
/
### Step 3a: Running Geogrid ###
You'll need to run geogrid.exe with the surface wps file
### Step 4: Running Metgrid
Once the ungribbing process is complete, the next step is to run `metgrid` to process the data for WRF. You need to configure `metgrid` to read both the pressure (FILE) and surface (SFILE) data by specifying them in the `namelist.wps` file:
Code:
&metgrid
fg_name = 'SFILE','FILE',
io_form_metgrid = 2,
/
Run `metgrid` using the following command:
Bash:
mpirun -np ./metgrid.exe
This command will process both the surface and pressure data and generate the `met` files needed for WRF.
### Step 5: Running WRF
After completing the `metgrid` step, the `met` files will be ready for WRF. You can either copy or link these files to the WRF directory and proceed with your WRF simulation.
---
I hope this guide helps streamline the process of using ERA5 data from Copernicus with WRF. If you encounter any issues or have questions, feel free to reach out. Please note, I am not affiliated with NCAR, and my goal is simply to assist fellow users. For any corrections or additional insights, I encourage the forum admins (@kwerner, @Ming Chen, @weiwang) to weigh in.
Best regards
Attachments
Last edited: