pychunked_data_view#

Submodules#

Classes#

AxisDefinition

Defines which axis from a MARS Request form an axis in the Zarr array.

ChunkedDataView

ChunkedDataViewBuilder

Chunking

Defines how a axis will be chunked

ExtractorType

Suported data extractors.

Package Contents#

class AxisDefinition(keys: list[str], chunking: Chunking, dim_name: str | None = None)#

Defines which axis from a MARS Request form an axis in the Zarr array.

Also defines if the data is to be chunked.

Parameters:
  • keys (list of str) – mars keys that form this axis.

  • chunking (Chunking) – Define how this axis shall be chunked.

  • dim_name (str | None) – Optional dimension name for xarray compatibility. If not provided, the name is auto-derived as the keys joined by “_” (e.g. ["date", "time"]"date_time").

static _translate_chunking(chunking: Chunking) chunked_data_view_bindings.chunked_data_view_bindings.AxisDefinition.NoChunking | chunked_data_view_bindings.chunked_data_view_bindings.AxisDefinition.IndividualChunking#
_obj#
_dim_name: str#
property dim_name: str#
property keys: list[str]#
property chunking: Chunking#
class ChunkedDataView(obj: chunked_data_view_bindings.chunked_data_view_bindings.ChunkedDataView)#
_obj#
at(index: list[int] | tuple[int, Ellipsis])#
chunkShape()#
chunks()#
shape()#
class ChunkedDataViewBuilder(fdb_config_file: pathlib.Path | None)#
_obj#
_parts_axes: list[list[AxisDefinition]] = []#
add_part(mars_request_key_values: str, axes: list[AxisDefinition], extractor_type: ExtractorType)#
extend_on_axis(axis: int)#
dim_names() list[str | None]#

Return dimension names for all zarr axes, derived from the first added part.

The last entry is always None to represent the implicit field-values dimension (spatial data points within each GRIB field).

Returns:

One entry per zarr dimension; final entry is None.

Return type:

list[str | None]

build()#
class Chunking(*args, **kwds)#

Bases: enum.Enum

Defines how a axis will be chunked

NONE#

Axis will not be chunked, accessing any value from this axis will load all values.

SINGLE_VALUE#

Axis will be chunked. One chunk per value.

NONE#
SINGLE_VALUE#
class ExtractorType(*args, **kwds)#

Bases: enum.Enum

Suported data extractors.

Defines what storage format the caller expects to be stored in FDB.

GRIB#

Extract data from GRIB