Downloading ERA5 Data and Creating Time Series

Jul 29, 2024

Downloading ERA5 Data and Creating Time Series

Introduction

  • Presentation on downloading ECMWF MWF data (ERA5) and creating time series.
  • Requested by a YouTube follower.

Overview of ERA5 Data

  • Provides hourly estimates of various atmospheric, land, and oceanic climate variables.
  • Coverage: 30 km grid, 137 levels from surface to 80 km.
  • Includes uncertainty information for all variables.

Steps to Download ERA5 Data

  1. **Search for ERA5: **Use Google to find the ERA5 data.
    • Key term: "ERA5 ECRF"
  2. Navigate the Copernicus Website:
    • Click on the right side to download ERA5 from Copernicus.
  3. Select Data Set:
    • Choose the type of data (real analysis data set).
    • Focus on downloading hourly data.
  4. Choose Variables:
    • Options: temperature, relative humidity, and more.
    • Example: Select temperature data for specific pressure levels (300-1000 hPa).
  5. Define Time Range and Area:
    • Set year (e.g., 2020) and specify area coordinates.
    • Example coordinates: East -20 to -108 (USA).
  6. Format Selection:
    • Choose NetCDF format for easier data extraction.
  7. Submit Form:
    • Create account if necessary and submit.
    • Processing time can vary (e.g., 22 minutes shown in demo).

Data Characteristics and Processing

  • Data file size (example: 54.7 GB) mentioned.
  • Python Use for Processing:
    • Using Jupyter Notebook for step-by-step execution.
    • Libraries: import libraries needed for processing NetCDF files, including:
      • numpy for array manipulations.
      • pandas for data frame handling.
      • netCDF4 for reading the data.

Creating Time Series

  1. Read NetCDF Data File:
    • Use method netCDF4.Dataset to access the file.
  2. Explore Variables:
    • Check the contents of the variables (e.g., longitude, latitude, temperature) along with units.
    • The time variable should reference a start date (from 1900).
  3. Extract Time Values:
    • Loop through time indices to create a time series.
  4. Find Station Locations:
    • Use geographic coordinates to find the closest grid point in the dataset.
  5. Store Temperature Time Series:
    • Export data into CSV format by looping through each station and creating a structured output.

Plotting and Final Remarks

  • After extracting time series data:
    • Use matplotlib to plot the temperature over time.
    • Save plots with appropriate titles and labels.
  • Output shows multiple CSV files generated for each station.
  • Encouragement to reach out for queries regarding the process.

Conclusion

  • Summary of accessing and processing ERA5 data.
  • Option to download ECMWF data for personal projects.