energy_data_retrieval.sources.cru_ts.client#

CRU TS v4.10 decadal NetCDF retrieval and native monthly processing.

class energy_data_retrieval.sources.cru_ts.client.CRUTSRequest(variable, start_year, end_year)[source]#

Bases: object

Pin the release, variable and years; select decadal files instead of the full archive.

Parameters:
  • variable (str)

  • start_year (int)

  • end_year (int)

variable: str#
start_year: int#
end_year: int#
urls()[source]#
Return type:

tuple[str, …]

class energy_data_retrieval.sources.cru_ts.client.CRUTSClient(http)[source]#

Bases: object

Parameters:

http (HTTPClient)

download(request, directory)[source]#

Use UEA’s copy when CEDA is unavailable, per the provider’s instructions.

Parameters:
Return type:

tuple[RequestRecord, …]

energy_data_retrieval.sources.cru_ts.client.iter_monthly(paths, *, variable, start_year, end_year, bbox=None, maximum_values=40000000)[source]#

Yield CF-decoded months, preserving missing cells and native time semantics.

Parameters:
  • paths (Sequence[Path])

  • variable (str)

  • start_year (int)

  • end_year (int)

  • bbox (tuple[float, float, float, float] | None)

  • maximum_values (int)

Return type:

Iterator[DataArray]