pychunked_data_view.chunked_data_view#
Classes#
Defines how a axis will be chunked |
|
Defines which axis from a MARS Request form an axis in the Zarr array. |
|
Suported data extractors. |
|
Module Contents#
- class Chunking(*args, **kwds)#
Bases:
enum.EnumDefines 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 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]#
- class ChunkedDataView(obj: chunked_data_view_bindings.chunked_data_view_bindings.ChunkedDataView)#
- _obj#
- at(index: list[int] | tuple[int, Ellipsis])#
- chunkShape()#
- chunks()#
- shape()#
- class ExtractorType(*args, **kwds)#
Bases:
enum.EnumSuported data extractors.
Defines what storage format the caller expects to be stored in FDB.
- GRIB#
Extract data from GRIB
- 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
Noneto 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()#