energy_data_retrieval.sources.earthmover_era5.client#

Read native ERA5 in bounded time/spatial tiles from a pinned public snapshot.

Optional dependencies are imported only when native acquisition is requested. The public 2026 study snapshot is explicit, never silently advanced to main.

class energy_data_retrieval.sources.earthmover_era5.client.NativeWeatherChunk(site: 'Site', frame: 'pd.DataFrame', snapshot_id: 'str', cell_latitude: 'float', cell_longitude: 'float')[source]#

Bases: object

Parameters:
  • site (Site)

  • frame (DataFrame)

  • snapshot_id (str)

  • cell_latitude (float)

  • cell_longitude (float)

site: Site#
frame: DataFrame#
snapshot_id: str#
cell_latitude: float#
cell_longitude: float#
class energy_data_retrieval.sources.earthmover_era5.client.NativeERA5Client(snapshot_id: 'str' = 'TZ2KX6A24CJ5DG17T7MG', chunk_hours: 'int' = 8736)[source]#

Bases: object

Parameters:
  • snapshot_id (str)

  • chunk_hours (int)

snapshot_id: str#
chunk_hours: int#
iter_weather(sites, start, end, *, skip_partition=None)[source]#

Read each intersecting native tile once per time block, yielding site frames.

At most five 12 by 12 spatial tiles of chunk_hours + 1 are resident. Sites sharing a native cell reuse values. Source hours beyond snapshot coverage fail explicitly, instead of substituting a different weather product.

Parameters:
  • sites (Sequence[Site])

  • start (date)

  • end (date)

  • skip_partition (Callable[[Site, int, int, float, float], bool] | None)

Return type:

Iterator[NativeWeatherChunk]

energy_data_retrieval.sources.earthmover_era5.client.normalize_native_arrays(site_id, time_seconds, *, t2m, u10, v10, ssrd, fg10)[source]#

Convert original ERA5 units and interval labels without interpolation.

Parameters:
  • site_id (str)

  • time_seconds (ndarray[tuple[Any, ...], dtype[_ScalarT]])

  • t2m (ndarray[tuple[Any, ...], dtype[_ScalarT]])

  • u10 (ndarray[tuple[Any, ...], dtype[_ScalarT]])

  • v10 (ndarray[tuple[Any, ...], dtype[_ScalarT]])

  • ssrd (ndarray[tuple[Any, ...], dtype[_ScalarT]])

  • fg10 (ndarray[tuple[Any, ...], dtype[_ScalarT]])

Return type:

DataFrame