Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ERA5 Reanalysis Data Workflow - Mean Precipitation

Authors
Affiliations
NSF NCAR
NSF NCAR
NSF NCAR

Overview

ERA5 is ECMWF’s fifth-generation global atmospheric reanalysis, covering 1940–present at roughly 0.25° (~31 km) resolution. GDEX hosts ERA5 as dataset d633000.

In this notebook we access ERA5 precipitation directly from GDEX’s Analysis-Ready, Cloud-Optimized (ARCO) Zarr stores — no bulk downloads and no intake-ESM catalog. We then make a quick map and a zonal-mean diagnostic.

  1. Discover ERA5 ARCO precipitation variables on GDEX through the API

  2. Open a cloud-optimized Zarr store directly with xarray

  3. Subset a global precipitation field for a chosen time

  4. Convert units and visualize precipitation on a map

  5. Compute a simple diagnostic (zonal-mean precipitation)

Prerequisites

ConceptsImportanceNotes
Introduction to ARCO/Zarr on GDEXNecessaryOpening Zarr stores on GDEX
xarrayNecessaryLabeled N-D arrays
CartopyNecessaryMapping
DaskHelpfulLarger-than-memory subsets
ARCO ERA5 CookbookHelpfulCompanion cookbook on the ARCO ERA5 dataset
  • Time to learn: 30 minutes


Imports

ERA5 on GDEX

GDEX publishes selected datasets in ARCO form — chunked, indexed Zarr stores or virtual zarr stores that support fast remote, partial reads. For ERA5 (d633000), the precipitation fields are exposed as kerchunk reference files: small JSON “indexes” that point into the underlying archive and let xarray treat the whole collection as a single Zarr store.

The practical upshot: we open the data lazily over HTTPS and only the bytes we actually use get transferred — no need to download full files.

Dataset IDDescription
d633000ERA5 reanalysis on the 0.25° lat–lon grid — surface, pressure-level, and forecast/mean-flux fields (precipitation lives here)
d633006ERA5 reanalysis model-level data on the native ~0.28° grid

Loading the ERA5 precipitation reference file

This notebook assumes you’ve already identified the kerchunk reference file for the variable you want. There are a few ways to find it:

  • Programmatically, through the GDEX API — see the API notebooks and the ARCO discovery endpoints (has_arco, search_arco_vars) demonstrated in Introduction to ARCO/Zarr on GDEX.

  • Via the dataset’s intake-ESM catalog — d633000 ships one at d633000-https.json, which lets you search variables and look up their reference files. Note this is available for this dataset but not all GDEX datasets have a catalog.

  • Interactively, by searching the d633000 dataset homepage.

Here we use MTPR — Mean total precipitation rate, a surface mean-flux field combining convective and large-scale precipitation. Its reference file is:

'https://data.gdex.ucar.edu/d633000/kerchunk/meanflux/Mean_total_precipitation_rate-osdf.json'
CPU times: user 1.33 s, sys: 421 ms, total: 1.75 s
Wall time: 36.3 s
Loading...

Inspecting the data

MTPR is organized by forecast_initial_time (twice-daily forecast base times, 1940–2024) and forecast_hour (1–12 hours into each forecast), on a 0.25° latitude–longitude grid. Values are a mean rate in kg m⁻² s⁻¹.

Loading...

Selecting a precipitation field

We pick a single field: the forecast initialized on 15 July 2023 at 06:00 UTC, six hours in. Since 1 kg m⁻² s⁻¹ ≈ 86400 mm/day, we convert to mm/day for an interpretable map.

Visualizing global precipitation

A PlateCarree map with coastlines puts the field in geographic context. Calling .plot() triggers the lazy read of just this one slice.

/home/runner/micromamba/envs/gdex-cookbook/lib/python3.12/site-packages/cartopy/io/__init__.py:263: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/110m_physical/ne_110m_coastline.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
/home/runner/micromamba/envs/gdex-cookbook/lib/python3.12/site-packages/cartopy/io/__init__.py:263: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/110m_cultural/ne_110m_admin_0_boundary_lines_land.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
<Figure size 1200x600 with 2 Axes>

Summary

We opened ERA5 mean total precipitation rate from GDEX’s ARCO Zarr store, selected a single forecast field, converted it to mm/day, and visualized it as a global map and a zonal-mean profile.

What’s next?

Continue to the JRA-3Q Reanalysis Workflow, which applies a similar GDEX access pattern to another global reanalysis.