pychunked_data_view.chunked_data_view ===================================== .. py:module:: pychunked_data_view.chunked_data_view Classes ------- .. autoapisummary:: pychunked_data_view.chunked_data_view.Chunking pychunked_data_view.chunked_data_view.AxisDefinition pychunked_data_view.chunked_data_view.ChunkedDataView pychunked_data_view.chunked_data_view.ExtractorType pychunked_data_view.chunked_data_view.ChunkedDataViewBuilder Module Contents --------------- .. py:class:: Chunking(*args, **kwds) Bases: :py:obj:`enum.Enum` Defines how a axis will be chunked .. attribute:: NONE Axis will not be chunked, accessing any value from this axis will load all values. .. attribute:: SINGLE_VALUE Axis will be chunked. One chunk per value. .. py:attribute:: NONE .. py:attribute:: SINGLE_VALUE .. py: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. :param keys: mars keys that form this axis. :type keys: list of str :param chunking: Define how this axis shall be chunked. :type chunking: Chunking :param dim_name: 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"``). :type dim_name: str | None .. py:method:: _translate_chunking(chunking: Chunking) -> chunked_data_view_bindings.chunked_data_view_bindings.AxisDefinition.NoChunking | chunked_data_view_bindings.chunked_data_view_bindings.AxisDefinition.IndividualChunking :staticmethod: .. py:attribute:: _obj .. py:attribute:: _dim_name :type: str .. py:property:: dim_name :type: str .. py:property:: keys :type: list[str] .. py:property:: chunking :type: Chunking .. py:class:: ChunkedDataView(obj: chunked_data_view_bindings.chunked_data_view_bindings.ChunkedDataView) .. py:attribute:: _obj .. py:method:: at(index: list[int] | tuple[int, Ellipsis]) .. py:method:: chunkShape() .. py:method:: chunks() .. py:method:: shape() .. py:class:: ExtractorType(*args, **kwds) Bases: :py:obj:`enum.Enum` Suported data extractors. Defines what storage format the caller expects to be stored in FDB. .. py:attribute:: GRIB Extract data from GRIB .. py:class:: ChunkedDataViewBuilder(fdb_config_file: pathlib.Path | None) .. py:attribute:: _obj .. py:attribute:: _parts_axes :type: list[list[AxisDefinition]] :value: [] .. py:method:: add_part(mars_request_key_values: str, axes: list[AxisDefinition], extractor_type: ExtractorType) .. py:method:: extend_on_axis(axis: int) .. py:method:: 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``. :rtype: list[str | None] .. py:method:: build()