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.
Discover ERA5 ARCO precipitation variables on GDEX through the API
Open a cloud-optimized Zarr store directly with
xarraySubset a global precipitation field for a chosen time
Convert units and visualize precipitation on a map
Compute a simple diagnostic (zonal-mean precipitation)
Prerequisites¶
| Concepts | Importance | Notes |
|---|---|---|
| Introduction to ARCO/Zarr on GDEX | Necessary | Opening Zarr stores on GDEX |
| xarray | Necessary | Labeled N-D arrays |
| Cartopy | Necessary | Mapping |
| Dask | Helpful | Larger-than-memory subsets |
| ARCO ERA5 Cookbook | Helpful | Companion cookbook on the ARCO ERA5 dataset |
Time to learn: 30 minutes
Imports¶
import xarray as xr
import numpy as np
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeatureERA5 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 ID | Description |
|---|---|
d633000 | ERA5 reanalysis on the 0.25° lat–lon grid — surface, pressure-level, and forecast/mean-flux fields (precipitation lives here) |
d633006 | ERA5 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 —
d633000ships one atd633000-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
d633000dataset homepage.
Here we use MTPR — Mean total precipitation rate, a surface mean-flux field combining convective and large-scale precipitation. Its reference file is:
reference_url = ("https://data.gdex.ucar.edu/d633000/kerchunk/meanflux/Mean_total_precipitation_rate-osdf.json")
reference_url'https://data.gdex.ucar.edu/d633000/kerchunk/meanflux/Mean_total_precipitation_rate-osdf.json'%%time
ds = xr.open_dataset(reference_url, engine ='kerchunk')
dsCPU times: user 1.33 s, sys: 421 ms, total: 1.75 s
Wall time: 36.3 s
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⁻¹.
mtpr = ds["MTPR"]
mtprSelecting 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.
precip = mtpr.sel(forecast_initial_time="2023-07-15T06:00:00").isel(forecast_hour=6)
precip_mmday = precip * 86400
precip_mmday.attrs["units"] = "mm/day"
precip_mmday.attrs["long_name"] = "Mean total precipitation rate"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.
fig, ax = plt.subplots(figsize=(12, 6), subplot_kw={"projection": ccrs.PlateCarree()})
precip_mmday.plot(
ax=ax,
transform=ccrs.PlateCarree(),
x="longitude",
y="latitude",
cmap="Blues",
robust=True,
cbar_kwargs={"label": "Precipitation (mm/day)", "shrink": 0.7},
)
ax.coastlines(color="black", linewidth=0.8)
ax.add_feature(cfeature.BORDERS, linewidth=0.3)
ax.set_title("ERA5 Mean Total Precipitation Rate — 2023-07-15 06:00 UTC")
plt.show()/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)

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.