climate_ref_core.esgf.base
#
Base classes and protocols for ESGF data requests.
This module provides the infrastructure for fetching datasets from ESGF using the intake-esgf package.
ESGFRequest
#
Bases: Protocol
Protocol for ESGF dataset requests.
Implementations provide the logic for searching ESGF and generating output paths for downloaded datasets.
Source code in packages/climate-ref-core/src/climate_ref_core/esgf/base.py
slug
instance-attribute
#
Unique identifier for this request.
source_type
instance-attribute
#
Type of dataset (e.g., 'CMIP6', 'obs4MIPs').
time_span
instance-attribute
#
Optional time range to filter datasets (start, end).
fetch_datasets()
#
Fetch dataset metadata from ESGF.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame containing dataset metadata and file paths. Must contain at minimum: - key: A unique identifier for the dataset - files: A list of files for the dataset |
Source code in packages/climate-ref-core/src/climate_ref_core/esgf/base.py
IntakeESGFMixin
#
Mixin that fetches datasets from ESGF using intake-esgf.
Subclasses must define: - facets: dict[str, str | tuple[str, ...]] - remove_ensembles: bool - time_span: tuple[str, str] | None
Source code in packages/climate-ref-core/src/climate_ref_core/esgf/base.py
fetch_datasets()
#
Fetch dataset metadata from ESGF.