era5#
ERA5 reanalysis source with multi-backend support.
Fetches ERA5 data from one or more earth2studio backends (ARCO, WB2,
NCAR, CDS). Each requested variable is routed to the highest-priority
backend whose lexicon contains it. When variables span multiple
backends, results are fetched separately and merged along the
variable dimension.
Each pipeline index corresponds to a single timestamp, and the returned
xarray.DataArray has dimensions (time, variable, lat, lon)
with a single time step.
Classes#
Fetch ERA5 reanalysis fields from earth2studio backends. |
Module Contents#
- class physicsnemo_curator.domains.da.sources.era5.ERA5Source(
- times: list[datetime.datetime],
- variables: list[str],
- *,
- backend: str | list[str] = 'arco',
- backend_options: dict[str, dict[str, Any]] | None = None,
- cache: bool = True,
Bases:
physicsnemo_curator.core.base.Source[xarray.DataArray]Fetch ERA5 reanalysis fields from earth2studio backends.
Supports four backends — ARCO, WB2, NCAR, and CDS — with automatic per-variable routing. Each variable is assigned to the highest-priority backend whose lexicon contains it.
- Parameters:
times (list[datetime]) – Timestamps to fetch. Must be within the range of the selected backend(s).
variables (list[str]) – Earth2studio variable identifiers (e.g.
"t2m","z500").backend (str | list[str]) – Backend name or priority-ordered list. Valid names:
"arco","wb2","ncar","cds". Default"arco"preserves backward compatibility.backend_options (dict[str, dict[str, Any]] | None) – Per-backend keyword arguments forwarded to the constructor. Example:
{"ncar": {"max_workers": 8}}. Thecacheandverboseparameters are set automatically.cache (bool) – Whether to cache downloaded chunks locally (default
True).
Examples
>>> from datetime import datetime >>> source = ERA5Source( ... times=[datetime(2020, 6, 1, 0)], ... variables=["t2m", "u10m"], ... ) >>> len(source) 1
Multi-backend with fallback:
>>> source = ERA5Source( ... times=[datetime(2020, 6, 1, 0)], ... variables=["t2m", "cp"], ... backend=["arco", "ncar"], ... ) >>> source.variable_routing {'t2m': 'arco', 'cp': 'ncar'}
Note
ERA5 documentation: ECMWF ERA5
earth2studio: NVIDIA earth2studio
CDS API: Climate Data Store
- classmethod params() list[physicsnemo_curator.core.base.Param]#
Return parameter descriptors for the ERA5 source.
- property active_backend: str | None#
Return the single backend name if all variables use one backend.
Returns
Noneif variables are split across multiple backends.- Returns:
Backend name or
None.- Return type:
str | None
- description: ClassVar[str] = 'ERA5 reanalysis via earth2studio (ARCO, WB2, NCAR, CDS)'#
Short description shown in the interactive CLI.
- property times: list[datetime.datetime]#
Return the list of timestamps in this source.