Created
August 8, 2025 19:25
-
-
Save sharkinsspatial/63fac8901bf58b9b9ba18853fd01a9d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "id": "b2319c29-f64e-4eb7-8ec8-cb52f32fcf1c", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "import os\n", | |
| "import xarray as xr\n", | |
| "from virtualizarr.parsers import HDFParser\n", | |
| "from obstore.store import LocalStore\n", | |
| "from virtualizarr.manifests.store import ObjectStoreRegistry\n", | |
| "import numpy as np\n", | |
| "import h5py" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 2, | |
| "id": "aacf1df0-e12b-41cc-9350-b943a908cc10", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "'/Users/seanharkins/projects/hrrrparser/hrrrparser'" | |
| ] | |
| }, | |
| "execution_count": 2, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "cwd = os.getcwd()\n", | |
| "cwd" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 3, | |
| "id": "50efd768-5ee6-4a47-97e4-3f40aedc8b22", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "'/Users/seanharkins/projects/hrrrparser/hrrrparser/test.nc'" | |
| ] | |
| }, | |
| "execution_count": 3, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "path = f\"{cwd}/test.nc\"\n", | |
| "path" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 4, | |
| "id": "1a0269ce-d286-4824-ae5b-7cfd38c848cb", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "f = h5py.File(path, \"w\")\n", | |
| "data = np.random.random((100, 100))\n", | |
| "f.create_dataset(name=\"data\", data=data, chunks=(50, 50))\n", | |
| "f.close()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 5, | |
| "id": "0fd8210b-c72a-4fe1-883a-416933a93e37", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "object_store = LocalStore()\n", | |
| "registry = ObjectStoreRegistry({\"file://\": object_store})" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 6, | |
| "id": "b85dc599-4060-4eb6-b68f-d7654dc20931", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "<virtualizarr.manifests.store.ManifestStore at 0x114d4eba0>" | |
| ] | |
| }, | |
| "execution_count": 6, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "parser = HDFParser()\n", | |
| "ms = parser(url=f\"file://{path}\", registry=registry)\n", | |
| "ms" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 7, | |
| "id": "5544d5fa-5a7c-45a8-99c8-7c307b502fab", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "ArrayV3Metadata(shape=(100, 100), data_type=Float64(endianness='little'), chunk_grid=RegularChunkGrid(chunk_shape=(50, 50)), chunk_key_encoding=DefaultChunkKeyEncoding(name='default', separator='/'), fill_value=np.float64(0.0), codecs=(BytesCodec(endian=<Endian.little: 'little'>),), attributes={}, dimension_names=('phony_dim_0', 'phony_dim_1'), zarr_format=3, node_type='array', storage_transformers=())" | |
| ] | |
| }, | |
| "execution_count": 7, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "ms._group.arrays[\"data\"].metadata" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 8, | |
| "id": "336eb98f-fbab-4c52-8f6b-2049e7563147", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "from zarr.abc.codec import ArrayBytesCodec\n", | |
| "from zarr.core.buffer import Buffer, NDBuffer\n", | |
| "from dataclasses import dataclass\n", | |
| "from zarr.core.common import JSON, parse_named_configuration\n", | |
| "from zarr.core.array_spec import ArraySpec\n", | |
| "import numpy as np\n", | |
| "\n", | |
| "CODEC_ID = \"dummy_codec\"\n", | |
| "\n", | |
| "@dataclass(frozen=True)\n", | |
| "class DummyCodec(ArrayBytesCodec):\n", | |
| " @classmethod\n", | |
| " def from_dict(cls, data: dict[str, JSON]):\n", | |
| " _, configuration_parsed = parse_named_configuration(\n", | |
| " data, CODEC_ID, require_configuration=False\n", | |
| " )\n", | |
| " configuration_parsed = configuration_parsed or {}\n", | |
| " return cls(**configuration_parsed) # type: ignore[arg-type]\n", | |
| "\n", | |
| " def to_dict(self) -> dict[str, JSON]:\n", | |
| " return {\"name\": CODEC_ID}\n", | |
| "\n", | |
| " async def _decode_single(\n", | |
| " self,\n", | |
| " chunk_data: Buffer,\n", | |
| " chunk_spec: ArraySpec,\n", | |
| " ) -> NDBuffer:\n", | |
| " data = np.full(chunk_spec.shape, 5, dtype=chunk_spec.dtype.to_native_dtype())\n", | |
| " return data\n", | |
| "\n", | |
| " async def _encode_single(\n", | |
| " self,\n", | |
| " chunk_data: NDBuffer,\n", | |
| " chunk_spec: ArraySpec,\n", | |
| " ) -> Buffer | None:\n", | |
| " raise NotImplementedError\n", | |
| "\n", | |
| " def compute_encoded_size(\n", | |
| " self, input_byte_length: int, _chunk_spec: ArraySpec\n", | |
| " ) -> int:\n", | |
| " raise NotImplementedError" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 9, | |
| "id": "6c0ccc03-5be0-4968-b429-d6b675e70a4c", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "from zarr.registry import register_codec\n", | |
| "register_codec(CODEC_ID, DummyCodec)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 10, | |
| "id": "2a7ab35f-2f8f-4be4-9275-d8736796892c", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "from dataclasses import replace\n", | |
| "meta = ms._group.arrays[\"data\"].metadata\n", | |
| "new_meta = replace(ms._group.arrays[\"data\"].metadata, codecs=[DummyCodec()])\n", | |
| "ms._group.arrays[\"data\"]._metadata = new_meta" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 11, | |
| "id": "badac2af-0420-4802-8aab-e95a33a35332", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "ArrayV3Metadata(shape=(100, 100), data_type=Float64(endianness='little'), chunk_grid=RegularChunkGrid(chunk_shape=(50, 50)), chunk_key_encoding=DefaultChunkKeyEncoding(name='default', separator='/'), fill_value=np.float64(0.0), codecs=(DummyCodec(),), attributes={}, dimension_names=('phony_dim_0', 'phony_dim_1'), zarr_format=3, node_type='array', storage_transformers=())" | |
| ] | |
| }, | |
| "execution_count": 11, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "ms._group.arrays[\"data\"].metadata" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 12, | |
| "id": "bfcc4a9c-784d-4dc1-8a06-010183f16c4c", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
| "<defs>\n", | |
| "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
| "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
| "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
| "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
| "</symbol>\n", | |
| "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
| "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
| "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "</symbol>\n", | |
| "</defs>\n", | |
| "</svg>\n", | |
| "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
| " *\n", | |
| " */\n", | |
| "\n", | |
| ":root {\n", | |
| " --xr-font-color0: var(\n", | |
| " --jp-content-font-color0,\n", | |
| " var(--pst-color-text-base rgba(0, 0, 0, 1))\n", | |
| " );\n", | |
| " --xr-font-color2: var(\n", | |
| " --jp-content-font-color2,\n", | |
| " var(--pst-color-text-base, rgba(0, 0, 0, 0.54))\n", | |
| " );\n", | |
| " --xr-font-color3: var(\n", | |
| " --jp-content-font-color3,\n", | |
| " var(--pst-color-text-base, rgba(0, 0, 0, 0.38))\n", | |
| " );\n", | |
| " --xr-border-color: var(\n", | |
| " --jp-border-color2,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 10))\n", | |
| " );\n", | |
| " --xr-disabled-color: var(\n", | |
| " --jp-layout-color3,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 40))\n", | |
| " );\n", | |
| " --xr-background-color: var(\n", | |
| " --jp-layout-color0,\n", | |
| " var(--pst-color-on-background, white)\n", | |
| " );\n", | |
| " --xr-background-color-row-even: var(\n", | |
| " --jp-layout-color1,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 5))\n", | |
| " );\n", | |
| " --xr-background-color-row-odd: var(\n", | |
| " --jp-layout-color2,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 15))\n", | |
| " );\n", | |
| "}\n", | |
| "\n", | |
| "html[theme=\"dark\"],\n", | |
| "html[data-theme=\"dark\"],\n", | |
| "body[data-theme=\"dark\"],\n", | |
| "body.vscode-dark {\n", | |
| " --xr-font-color0: var(\n", | |
| " --jp-content-font-color0,\n", | |
| " var(--pst-color-text-base, rgba(255, 255, 255, 1))\n", | |
| " );\n", | |
| " --xr-font-color2: var(\n", | |
| " --jp-content-font-color2,\n", | |
| " var(--pst-color-text-base, rgba(255, 255, 255, 0.54))\n", | |
| " );\n", | |
| " --xr-font-color3: var(\n", | |
| " --jp-content-font-color3,\n", | |
| " var(--pst-color-text-base, rgba(255, 255, 255, 0.38))\n", | |
| " );\n", | |
| " --xr-border-color: var(\n", | |
| " --jp-border-color2,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 10))\n", | |
| " );\n", | |
| " --xr-disabled-color: var(\n", | |
| " --jp-layout-color3,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 40))\n", | |
| " );\n", | |
| " --xr-background-color: var(\n", | |
| " --jp-layout-color0,\n", | |
| " var(--pst-color-on-background, #111111)\n", | |
| " );\n", | |
| " --xr-background-color-row-even: var(\n", | |
| " --jp-layout-color1,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 5))\n", | |
| " );\n", | |
| " --xr-background-color-row-odd: var(\n", | |
| " --jp-layout-color2,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 15))\n", | |
| " );\n", | |
| "}\n", | |
| "\n", | |
| ".xr-wrap {\n", | |
| " display: block !important;\n", | |
| " min-width: 300px;\n", | |
| " max-width: 700px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-text-repr-fallback {\n", | |
| " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-header {\n", | |
| " padding-top: 6px;\n", | |
| " padding-bottom: 6px;\n", | |
| " margin-bottom: 4px;\n", | |
| " border-bottom: solid 1px var(--xr-border-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-header > div,\n", | |
| ".xr-header > ul {\n", | |
| " display: inline;\n", | |
| " margin-top: 0;\n", | |
| " margin-bottom: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-obj-type,\n", | |
| ".xr-array-name {\n", | |
| " margin-left: 2px;\n", | |
| " margin-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-obj-type {\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-sections {\n", | |
| " padding-left: 0 !important;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input {\n", | |
| " display: inline-block;\n", | |
| " opacity: 0;\n", | |
| " height: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input + label {\n", | |
| " color: var(--xr-disabled-color);\n", | |
| " border: 2px solid transparent !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:enabled + label {\n", | |
| " cursor: pointer;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:focus + label {\n", | |
| " border: 2px solid var(--xr-font-color0) !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:enabled + label:hover {\n", | |
| " color: var(--xr-font-color0);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary {\n", | |
| " grid-column: 1;\n", | |
| " color: var(--xr-font-color2);\n", | |
| " font-weight: 500;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary > span {\n", | |
| " display: inline-block;\n", | |
| " padding-left: 0.5em;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:disabled + label {\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in + label:before {\n", | |
| " display: inline-block;\n", | |
| " content: \"►\";\n", | |
| " font-size: 11px;\n", | |
| " width: 15px;\n", | |
| " text-align: center;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:disabled + label:before {\n", | |
| " color: var(--xr-disabled-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked + label:before {\n", | |
| " content: \"▼\";\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked + label > span {\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary,\n", | |
| ".xr-section-inline-details {\n", | |
| " padding-top: 4px;\n", | |
| " padding-bottom: 4px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-inline-details {\n", | |
| " grid-column: 2 / -1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-details {\n", | |
| " display: none;\n", | |
| " grid-column: 1 / -1;\n", | |
| " margin-bottom: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-wrap {\n", | |
| " grid-column: 1 / -1;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 20px auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-wrap > label {\n", | |
| " grid-column: 1;\n", | |
| " vertical-align: top;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-preview {\n", | |
| " color: var(--xr-font-color3);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-preview,\n", | |
| ".xr-array-data {\n", | |
| " padding: 0 5px !important;\n", | |
| " grid-column: 2;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-data,\n", | |
| ".xr-array-in:checked ~ .xr-array-preview {\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-in:checked ~ .xr-array-data,\n", | |
| ".xr-array-preview {\n", | |
| " display: inline-block;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list {\n", | |
| " display: inline-block !important;\n", | |
| " list-style: none;\n", | |
| " padding: 0 !important;\n", | |
| " margin: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list li {\n", | |
| " display: inline-block;\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list:before {\n", | |
| " content: \"(\";\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list:after {\n", | |
| " content: \")\";\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list li:not(:last-child):after {\n", | |
| " content: \",\";\n", | |
| " padding-right: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-has-index {\n", | |
| " font-weight: bold;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-list,\n", | |
| ".xr-var-item {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-item > div,\n", | |
| ".xr-var-item label,\n", | |
| ".xr-var-item > .xr-var-name span {\n", | |
| " background-color: var(--xr-background-color-row-even);\n", | |
| " border-color: var(--xr-background-color-row-odd);\n", | |
| " margin-bottom: 0;\n", | |
| " padding-top: 2px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-item > .xr-var-name:hover span {\n", | |
| " padding-right: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-list > li:nth-child(odd) > div,\n", | |
| ".xr-var-list > li:nth-child(odd) > label,\n", | |
| ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
| " background-color: var(--xr-background-color-row-odd);\n", | |
| " border-color: var(--xr-background-color-row-even);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name {\n", | |
| " grid-column: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-dims {\n", | |
| " grid-column: 2;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-dtype {\n", | |
| " grid-column: 3;\n", | |
| " text-align: right;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-preview {\n", | |
| " grid-column: 4;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-index-preview {\n", | |
| " grid-column: 2 / 5;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name,\n", | |
| ".xr-var-dims,\n", | |
| ".xr-var-dtype,\n", | |
| ".xr-preview,\n", | |
| ".xr-attrs dt {\n", | |
| " white-space: nowrap;\n", | |
| " overflow: hidden;\n", | |
| " text-overflow: ellipsis;\n", | |
| " padding-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name:hover,\n", | |
| ".xr-var-dims:hover,\n", | |
| ".xr-var-dtype:hover,\n", | |
| ".xr-attrs dt:hover {\n", | |
| " overflow: visible;\n", | |
| " width: auto;\n", | |
| " z-index: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-data {\n", | |
| " display: none;\n", | |
| " border-top: 2px dotted var(--xr-background-color);\n", | |
| " padding-bottom: 20px !important;\n", | |
| " padding-top: 10px !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in + label,\n", | |
| ".xr-var-data-in + label,\n", | |
| ".xr-index-data-in + label {\n", | |
| " padding: 0 1px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
| ".xr-var-data-in:checked ~ .xr-var-data,\n", | |
| ".xr-index-data-in:checked ~ .xr-index-data {\n", | |
| " display: block;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-data > table {\n", | |
| " float: right;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-data > pre,\n", | |
| ".xr-index-data > pre,\n", | |
| ".xr-var-data > table > tbody > tr {\n", | |
| " background-color: transparent !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name span,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-name div,\n", | |
| ".xr-index-data,\n", | |
| ".xr-attrs {\n", | |
| " padding-left: 25px !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs,\n", | |
| ".xr-var-attrs,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-data {\n", | |
| " grid-column: 1 / -1;\n", | |
| "}\n", | |
| "\n", | |
| "dl.xr-attrs {\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 125px auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt,\n", | |
| ".xr-attrs dd {\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| " float: left;\n", | |
| " padding-right: 10px;\n", | |
| " width: auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt {\n", | |
| " font-weight: normal;\n", | |
| " grid-column: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt:hover span {\n", | |
| " display: inline-block;\n", | |
| " background: var(--xr-background-color);\n", | |
| " padding-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dd {\n", | |
| " grid-column: 2;\n", | |
| " white-space: pre-wrap;\n", | |
| " word-break: break-all;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-icon-database,\n", | |
| ".xr-icon-file-text2,\n", | |
| ".xr-no-icon {\n", | |
| " display: inline-block;\n", | |
| " vertical-align: middle;\n", | |
| " width: 1em;\n", | |
| " height: 1.5em !important;\n", | |
| " stroke-width: 0;\n", | |
| " stroke: currentColor;\n", | |
| " fill: currentColor;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in:checked + label > .xr-icon-file-text2,\n", | |
| ".xr-var-data-in:checked + label > .xr-icon-database,\n", | |
| ".xr-index-data-in:checked + label > .xr-icon-database {\n", | |
| " color: var(--xr-font-color0);\n", | |
| " filter: drop-shadow(1px 1px 5px var(--xr-font-color2));\n", | |
| " stroke-width: 0.8px;\n", | |
| "}\n", | |
| "</style><pre class='xr-text-repr-fallback'><xarray.Dataset> Size: 80kB\n", | |
| "Dimensions: (phony_dim_0: 100, phony_dim_1: 100)\n", | |
| "Dimensions without coordinates: phony_dim_0, phony_dim_1\n", | |
| "Data variables:\n", | |
| " data (phony_dim_0, phony_dim_1) float64 80kB ...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-a87839ab-1d99-4d1f-a698-f358a71755b0' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-a87839ab-1d99-4d1f-a698-f358a71755b0' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>phony_dim_0</span>: 100</li><li><span>phony_dim_1</span>: 100</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-593bb2d8-c305-40f9-b834-c765a195b665' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-593bb2d8-c305-40f9-b834-c765a195b665' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-5b281364-30b7-4308-96a6-ead06fb9d47e' class='xr-section-summary-in' type='checkbox' checked><label for='section-5b281364-30b7-4308-96a6-ead06fb9d47e' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>data</span></div><div class='xr-var-dims'>(phony_dim_0, phony_dim_1)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-6c0772b5-a1bf-48e4-85f0-f6a57709f3e9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6c0772b5-a1bf-48e4-85f0-f6a57709f3e9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-579a6ce3-3d4a-40c0-864d-7806828feb1d' class='xr-var-data-in' type='checkbox'><label for='data-579a6ce3-3d4a-40c0-864d-7806828feb1d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[10000 values with dtype=float64]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e55c8d2c-b8b2-4db6-9af2-fca4cd69181e' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e55c8d2c-b8b2-4db6-9af2-fca4cd69181e' class='xr-section-summary' title='Expand/collapse section'>Indexes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-f2a87763-43bf-4fad-96c7-4c58038c504b' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-f2a87763-43bf-4fad-96c7-4c58038c504b' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>" | |
| ], | |
| "text/plain": [ | |
| "<xarray.Dataset> Size: 80kB\n", | |
| "Dimensions: (phony_dim_0: 100, phony_dim_1: 100)\n", | |
| "Dimensions without coordinates: phony_dim_0, phony_dim_1\n", | |
| "Data variables:\n", | |
| " data (phony_dim_0, phony_dim_1) float64 80kB ..." | |
| ] | |
| }, | |
| "execution_count": 12, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "ds = xr.open_zarr(ms, zarr_format=3, consolidated=False)\n", | |
| "ds" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 13, | |
| "id": "ff87a158-3009-45e0-ac7c-883b89133c2e", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "array([[5., 5., 5., ..., 5., 5., 5.],\n", | |
| " [5., 5., 5., ..., 5., 5., 5.],\n", | |
| " [5., 5., 5., ..., 5., 5., 5.],\n", | |
| " ...,\n", | |
| " [5., 5., 5., ..., 5., 5., 5.],\n", | |
| " [5., 5., 5., ..., 5., 5., 5.],\n", | |
| " [5., 5., 5., ..., 5., 5., 5.]], shape=(100, 100))" | |
| ] | |
| }, | |
| "execution_count": 13, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "ds.data.values" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 14, | |
| "id": "14b910a2-2bb1-4246-902a-bd2d805b7917", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
| "<defs>\n", | |
| "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
| "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
| "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
| "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
| "</symbol>\n", | |
| "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
| "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
| "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "</symbol>\n", | |
| "</defs>\n", | |
| "</svg>\n", | |
| "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
| " *\n", | |
| " */\n", | |
| "\n", | |
| ":root {\n", | |
| " --xr-font-color0: var(\n", | |
| " --jp-content-font-color0,\n", | |
| " var(--pst-color-text-base rgba(0, 0, 0, 1))\n", | |
| " );\n", | |
| " --xr-font-color2: var(\n", | |
| " --jp-content-font-color2,\n", | |
| " var(--pst-color-text-base, rgba(0, 0, 0, 0.54))\n", | |
| " );\n", | |
| " --xr-font-color3: var(\n", | |
| " --jp-content-font-color3,\n", | |
| " var(--pst-color-text-base, rgba(0, 0, 0, 0.38))\n", | |
| " );\n", | |
| " --xr-border-color: var(\n", | |
| " --jp-border-color2,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 10))\n", | |
| " );\n", | |
| " --xr-disabled-color: var(\n", | |
| " --jp-layout-color3,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 40))\n", | |
| " );\n", | |
| " --xr-background-color: var(\n", | |
| " --jp-layout-color0,\n", | |
| " var(--pst-color-on-background, white)\n", | |
| " );\n", | |
| " --xr-background-color-row-even: var(\n", | |
| " --jp-layout-color1,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 5))\n", | |
| " );\n", | |
| " --xr-background-color-row-odd: var(\n", | |
| " --jp-layout-color2,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 15))\n", | |
| " );\n", | |
| "}\n", | |
| "\n", | |
| "html[theme=\"dark\"],\n", | |
| "html[data-theme=\"dark\"],\n", | |
| "body[data-theme=\"dark\"],\n", | |
| "body.vscode-dark {\n", | |
| " --xr-font-color0: var(\n", | |
| " --jp-content-font-color0,\n", | |
| " var(--pst-color-text-base, rgba(255, 255, 255, 1))\n", | |
| " );\n", | |
| " --xr-font-color2: var(\n", | |
| " --jp-content-font-color2,\n", | |
| " var(--pst-color-text-base, rgba(255, 255, 255, 0.54))\n", | |
| " );\n", | |
| " --xr-font-color3: var(\n", | |
| " --jp-content-font-color3,\n", | |
| " var(--pst-color-text-base, rgba(255, 255, 255, 0.38))\n", | |
| " );\n", | |
| " --xr-border-color: var(\n", | |
| " --jp-border-color2,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 10))\n", | |
| " );\n", | |
| " --xr-disabled-color: var(\n", | |
| " --jp-layout-color3,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 40))\n", | |
| " );\n", | |
| " --xr-background-color: var(\n", | |
| " --jp-layout-color0,\n", | |
| " var(--pst-color-on-background, #111111)\n", | |
| " );\n", | |
| " --xr-background-color-row-even: var(\n", | |
| " --jp-layout-color1,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 5))\n", | |
| " );\n", | |
| " --xr-background-color-row-odd: var(\n", | |
| " --jp-layout-color2,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 15))\n", | |
| " );\n", | |
| "}\n", | |
| "\n", | |
| ".xr-wrap {\n", | |
| " display: block !important;\n", | |
| " min-width: 300px;\n", | |
| " max-width: 700px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-text-repr-fallback {\n", | |
| " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-header {\n", | |
| " padding-top: 6px;\n", | |
| " padding-bottom: 6px;\n", | |
| " margin-bottom: 4px;\n", | |
| " border-bottom: solid 1px var(--xr-border-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-header > div,\n", | |
| ".xr-header > ul {\n", | |
| " display: inline;\n", | |
| " margin-top: 0;\n", | |
| " margin-bottom: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-obj-type,\n", | |
| ".xr-array-name {\n", | |
| " margin-left: 2px;\n", | |
| " margin-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-obj-type {\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-sections {\n", | |
| " padding-left: 0 !important;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input {\n", | |
| " display: inline-block;\n", | |
| " opacity: 0;\n", | |
| " height: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input + label {\n", | |
| " color: var(--xr-disabled-color);\n", | |
| " border: 2px solid transparent !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:enabled + label {\n", | |
| " cursor: pointer;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:focus + label {\n", | |
| " border: 2px solid var(--xr-font-color0) !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:enabled + label:hover {\n", | |
| " color: var(--xr-font-color0);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary {\n", | |
| " grid-column: 1;\n", | |
| " color: var(--xr-font-color2);\n", | |
| " font-weight: 500;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary > span {\n", | |
| " display: inline-block;\n", | |
| " padding-left: 0.5em;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:disabled + label {\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in + label:before {\n", | |
| " display: inline-block;\n", | |
| " content: \"►\";\n", | |
| " font-size: 11px;\n", | |
| " width: 15px;\n", | |
| " text-align: center;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:disabled + label:before {\n", | |
| " color: var(--xr-disabled-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked + label:before {\n", | |
| " content: \"▼\";\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked + label > span {\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary,\n", | |
| ".xr-section-inline-details {\n", | |
| " padding-top: 4px;\n", | |
| " padding-bottom: 4px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-inline-details {\n", | |
| " grid-column: 2 / -1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-details {\n", | |
| " display: none;\n", | |
| " grid-column: 1 / -1;\n", | |
| " margin-bottom: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-wrap {\n", | |
| " grid-column: 1 / -1;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 20px auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-wrap > label {\n", | |
| " grid-column: 1;\n", | |
| " vertical-align: top;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-preview {\n", | |
| " color: var(--xr-font-color3);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-preview,\n", | |
| ".xr-array-data {\n", | |
| " padding: 0 5px !important;\n", | |
| " grid-column: 2;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-data,\n", | |
| ".xr-array-in:checked ~ .xr-array-preview {\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-in:checked ~ .xr-array-data,\n", | |
| ".xr-array-preview {\n", | |
| " display: inline-block;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list {\n", | |
| " display: inline-block !important;\n", | |
| " list-style: none;\n", | |
| " padding: 0 !important;\n", | |
| " margin: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list li {\n", | |
| " display: inline-block;\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list:before {\n", | |
| " content: \"(\";\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list:after {\n", | |
| " content: \")\";\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list li:not(:last-child):after {\n", | |
| " content: \",\";\n", | |
| " padding-right: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-has-index {\n", | |
| " font-weight: bold;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-list,\n", | |
| ".xr-var-item {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-item > div,\n", | |
| ".xr-var-item label,\n", | |
| ".xr-var-item > .xr-var-name span {\n", | |
| " background-color: var(--xr-background-color-row-even);\n", | |
| " border-color: var(--xr-background-color-row-odd);\n", | |
| " margin-bottom: 0;\n", | |
| " padding-top: 2px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-item > .xr-var-name:hover span {\n", | |
| " padding-right: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-list > li:nth-child(odd) > div,\n", | |
| ".xr-var-list > li:nth-child(odd) > label,\n", | |
| ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
| " background-color: var(--xr-background-color-row-odd);\n", | |
| " border-color: var(--xr-background-color-row-even);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name {\n", | |
| " grid-column: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-dims {\n", | |
| " grid-column: 2;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-dtype {\n", | |
| " grid-column: 3;\n", | |
| " text-align: right;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-preview {\n", | |
| " grid-column: 4;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-index-preview {\n", | |
| " grid-column: 2 / 5;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name,\n", | |
| ".xr-var-dims,\n", | |
| ".xr-var-dtype,\n", | |
| ".xr-preview,\n", | |
| ".xr-attrs dt {\n", | |
| " white-space: nowrap;\n", | |
| " overflow: hidden;\n", | |
| " text-overflow: ellipsis;\n", | |
| " padding-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name:hover,\n", | |
| ".xr-var-dims:hover,\n", | |
| ".xr-var-dtype:hover,\n", | |
| ".xr-attrs dt:hover {\n", | |
| " overflow: visible;\n", | |
| " width: auto;\n", | |
| " z-index: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-data {\n", | |
| " display: none;\n", | |
| " border-top: 2px dotted var(--xr-background-color);\n", | |
| " padding-bottom: 20px !important;\n", | |
| " padding-top: 10px !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in + label,\n", | |
| ".xr-var-data-in + label,\n", | |
| ".xr-index-data-in + label {\n", | |
| " padding: 0 1px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
| ".xr-var-data-in:checked ~ .xr-var-data,\n", | |
| ".xr-index-data-in:checked ~ .xr-index-data {\n", | |
| " display: block;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-data > table {\n", | |
| " float: right;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-data > pre,\n", | |
| ".xr-index-data > pre,\n", | |
| ".xr-var-data > table > tbody > tr {\n", | |
| " background-color: transparent !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name span,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-name div,\n", | |
| ".xr-index-data,\n", | |
| ".xr-attrs {\n", | |
| " padding-left: 25px !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs,\n", | |
| ".xr-var-attrs,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-data {\n", | |
| " grid-column: 1 / -1;\n", | |
| "}\n", | |
| "\n", | |
| "dl.xr-attrs {\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 125px auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt,\n", | |
| ".xr-attrs dd {\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| " float: left;\n", | |
| " padding-right: 10px;\n", | |
| " width: auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt {\n", | |
| " font-weight: normal;\n", | |
| " grid-column: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt:hover span {\n", | |
| " display: inline-block;\n", | |
| " background: var(--xr-background-color);\n", | |
| " padding-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dd {\n", | |
| " grid-column: 2;\n", | |
| " white-space: pre-wrap;\n", | |
| " word-break: break-all;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-icon-database,\n", | |
| ".xr-icon-file-text2,\n", | |
| ".xr-no-icon {\n", | |
| " display: inline-block;\n", | |
| " vertical-align: middle;\n", | |
| " width: 1em;\n", | |
| " height: 1.5em !important;\n", | |
| " stroke-width: 0;\n", | |
| " stroke: currentColor;\n", | |
| " fill: currentColor;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in:checked + label > .xr-icon-file-text2,\n", | |
| ".xr-var-data-in:checked + label > .xr-icon-database,\n", | |
| ".xr-index-data-in:checked + label > .xr-icon-database {\n", | |
| " color: var(--xr-font-color0);\n", | |
| " filter: drop-shadow(1px 1px 5px var(--xr-font-color2));\n", | |
| " stroke-width: 0.8px;\n", | |
| "}\n", | |
| "</style><pre class='xr-text-repr-fallback'><xarray.Dataset> Size: 80kB\n", | |
| "Dimensions: (phony_dim_0: 100, phony_dim_1: 100)\n", | |
| "Dimensions without coordinates: phony_dim_0, phony_dim_1\n", | |
| "Data variables:\n", | |
| " data (phony_dim_0, phony_dim_1) float64 80kB ManifestArray<shape=(100...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-5f6f8d0b-a928-4a8f-9d0c-52f9e7eed46f' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-5f6f8d0b-a928-4a8f-9d0c-52f9e7eed46f' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>phony_dim_0</span>: 100</li><li><span>phony_dim_1</span>: 100</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-7fe9bd18-aeed-4757-95de-c0c19e72604c' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-7fe9bd18-aeed-4757-95de-c0c19e72604c' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-e906e885-98d2-4f43-9c50-bec570168007' class='xr-section-summary-in' type='checkbox' checked><label for='section-e906e885-98d2-4f43-9c50-bec570168007' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>data</span></div><div class='xr-var-dims'>(phony_dim_0, phony_dim_1)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>ManifestArray<shape=(100, 100), ...</div><input id='attrs-5d15ea3e-568a-405c-b485-6536b1d09d8f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5d15ea3e-568a-405c-b485-6536b1d09d8f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-67133e77-8eea-48aa-bddc-460c0673fdd6' class='xr-var-data-in' type='checkbox'><label for='data-67133e77-8eea-48aa-bddc-460c0673fdd6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>ManifestArray<shape=(100, 100), dtype=float64, chunks=(50, 50)></pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-160deeec-411a-4046-b643-09ea027acdf3' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-160deeec-411a-4046-b643-09ea027acdf3' class='xr-section-summary' title='Expand/collapse section'>Indexes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-348df235-83f2-4e09-974f-a9e84f9797a9' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-348df235-83f2-4e09-974f-a9e84f9797a9' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>" | |
| ], | |
| "text/plain": [ | |
| "<xarray.Dataset> Size: 80kB\n", | |
| "Dimensions: (phony_dim_0: 100, phony_dim_1: 100)\n", | |
| "Dimensions without coordinates: phony_dim_0, phony_dim_1\n", | |
| "Data variables:\n", | |
| " data (phony_dim_0, phony_dim_1) float64 80kB ManifestArray<shape=(100..." | |
| ] | |
| }, | |
| "execution_count": 14, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "vds = ms.to_virtual_dataset()\n", | |
| "vds" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 15, | |
| "id": "970d8cec-8b34-4071-8a52-de1f9142b5f0", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "import icechunk\n", | |
| "storage = icechunk.in_memory_storage()\n", | |
| "repo = icechunk.Repository.open_or_create(storage)\n", | |
| "session = repo.writable_session(\"main\")" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 16, | |
| "id": "49b6466d-f732-4699-86e7-bc66f8a778fa", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "vds.vz.to_icechunk(session.store)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 17, | |
| "id": "3df793b4-3269-4bf8-8737-ed05ad8be1da", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
| "<defs>\n", | |
| "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
| "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
| "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
| "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
| "</symbol>\n", | |
| "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
| "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
| "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
| "</symbol>\n", | |
| "</defs>\n", | |
| "</svg>\n", | |
| "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
| " *\n", | |
| " */\n", | |
| "\n", | |
| ":root {\n", | |
| " --xr-font-color0: var(\n", | |
| " --jp-content-font-color0,\n", | |
| " var(--pst-color-text-base rgba(0, 0, 0, 1))\n", | |
| " );\n", | |
| " --xr-font-color2: var(\n", | |
| " --jp-content-font-color2,\n", | |
| " var(--pst-color-text-base, rgba(0, 0, 0, 0.54))\n", | |
| " );\n", | |
| " --xr-font-color3: var(\n", | |
| " --jp-content-font-color3,\n", | |
| " var(--pst-color-text-base, rgba(0, 0, 0, 0.38))\n", | |
| " );\n", | |
| " --xr-border-color: var(\n", | |
| " --jp-border-color2,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 10))\n", | |
| " );\n", | |
| " --xr-disabled-color: var(\n", | |
| " --jp-layout-color3,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 40))\n", | |
| " );\n", | |
| " --xr-background-color: var(\n", | |
| " --jp-layout-color0,\n", | |
| " var(--pst-color-on-background, white)\n", | |
| " );\n", | |
| " --xr-background-color-row-even: var(\n", | |
| " --jp-layout-color1,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 5))\n", | |
| " );\n", | |
| " --xr-background-color-row-odd: var(\n", | |
| " --jp-layout-color2,\n", | |
| " hsl(from var(--pst-color-on-background, white) h s calc(l - 15))\n", | |
| " );\n", | |
| "}\n", | |
| "\n", | |
| "html[theme=\"dark\"],\n", | |
| "html[data-theme=\"dark\"],\n", | |
| "body[data-theme=\"dark\"],\n", | |
| "body.vscode-dark {\n", | |
| " --xr-font-color0: var(\n", | |
| " --jp-content-font-color0,\n", | |
| " var(--pst-color-text-base, rgba(255, 255, 255, 1))\n", | |
| " );\n", | |
| " --xr-font-color2: var(\n", | |
| " --jp-content-font-color2,\n", | |
| " var(--pst-color-text-base, rgba(255, 255, 255, 0.54))\n", | |
| " );\n", | |
| " --xr-font-color3: var(\n", | |
| " --jp-content-font-color3,\n", | |
| " var(--pst-color-text-base, rgba(255, 255, 255, 0.38))\n", | |
| " );\n", | |
| " --xr-border-color: var(\n", | |
| " --jp-border-color2,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 10))\n", | |
| " );\n", | |
| " --xr-disabled-color: var(\n", | |
| " --jp-layout-color3,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 40))\n", | |
| " );\n", | |
| " --xr-background-color: var(\n", | |
| " --jp-layout-color0,\n", | |
| " var(--pst-color-on-background, #111111)\n", | |
| " );\n", | |
| " --xr-background-color-row-even: var(\n", | |
| " --jp-layout-color1,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 5))\n", | |
| " );\n", | |
| " --xr-background-color-row-odd: var(\n", | |
| " --jp-layout-color2,\n", | |
| " hsl(from var(--pst-color-on-background, #111111) h s calc(l + 15))\n", | |
| " );\n", | |
| "}\n", | |
| "\n", | |
| ".xr-wrap {\n", | |
| " display: block !important;\n", | |
| " min-width: 300px;\n", | |
| " max-width: 700px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-text-repr-fallback {\n", | |
| " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-header {\n", | |
| " padding-top: 6px;\n", | |
| " padding-bottom: 6px;\n", | |
| " margin-bottom: 4px;\n", | |
| " border-bottom: solid 1px var(--xr-border-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-header > div,\n", | |
| ".xr-header > ul {\n", | |
| " display: inline;\n", | |
| " margin-top: 0;\n", | |
| " margin-bottom: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-obj-type,\n", | |
| ".xr-array-name {\n", | |
| " margin-left: 2px;\n", | |
| " margin-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-obj-type {\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-sections {\n", | |
| " padding-left: 0 !important;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input {\n", | |
| " display: inline-block;\n", | |
| " opacity: 0;\n", | |
| " height: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input + label {\n", | |
| " color: var(--xr-disabled-color);\n", | |
| " border: 2px solid transparent !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:enabled + label {\n", | |
| " cursor: pointer;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:focus + label {\n", | |
| " border: 2px solid var(--xr-font-color0) !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-item input:enabled + label:hover {\n", | |
| " color: var(--xr-font-color0);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary {\n", | |
| " grid-column: 1;\n", | |
| " color: var(--xr-font-color2);\n", | |
| " font-weight: 500;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary > span {\n", | |
| " display: inline-block;\n", | |
| " padding-left: 0.5em;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:disabled + label {\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in + label:before {\n", | |
| " display: inline-block;\n", | |
| " content: \"►\";\n", | |
| " font-size: 11px;\n", | |
| " width: 15px;\n", | |
| " text-align: center;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:disabled + label:before {\n", | |
| " color: var(--xr-disabled-color);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked + label:before {\n", | |
| " content: \"▼\";\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked + label > span {\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary,\n", | |
| ".xr-section-inline-details {\n", | |
| " padding-top: 4px;\n", | |
| " padding-bottom: 4px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-inline-details {\n", | |
| " grid-column: 2 / -1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-details {\n", | |
| " display: none;\n", | |
| " grid-column: 1 / -1;\n", | |
| " margin-bottom: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-wrap {\n", | |
| " grid-column: 1 / -1;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 20px auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-wrap > label {\n", | |
| " grid-column: 1;\n", | |
| " vertical-align: top;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-preview {\n", | |
| " color: var(--xr-font-color3);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-preview,\n", | |
| ".xr-array-data {\n", | |
| " padding: 0 5px !important;\n", | |
| " grid-column: 2;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-data,\n", | |
| ".xr-array-in:checked ~ .xr-array-preview {\n", | |
| " display: none;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-array-in:checked ~ .xr-array-data,\n", | |
| ".xr-array-preview {\n", | |
| " display: inline-block;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list {\n", | |
| " display: inline-block !important;\n", | |
| " list-style: none;\n", | |
| " padding: 0 !important;\n", | |
| " margin: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list li {\n", | |
| " display: inline-block;\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list:before {\n", | |
| " content: \"(\";\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list:after {\n", | |
| " content: \")\";\n", | |
| "}\n", | |
| "\n", | |
| ".xr-dim-list li:not(:last-child):after {\n", | |
| " content: \",\";\n", | |
| " padding-right: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-has-index {\n", | |
| " font-weight: bold;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-list,\n", | |
| ".xr-var-item {\n", | |
| " display: contents;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-item > div,\n", | |
| ".xr-var-item label,\n", | |
| ".xr-var-item > .xr-var-name span {\n", | |
| " background-color: var(--xr-background-color-row-even);\n", | |
| " border-color: var(--xr-background-color-row-odd);\n", | |
| " margin-bottom: 0;\n", | |
| " padding-top: 2px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-item > .xr-var-name:hover span {\n", | |
| " padding-right: 5px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-list > li:nth-child(odd) > div,\n", | |
| ".xr-var-list > li:nth-child(odd) > label,\n", | |
| ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
| " background-color: var(--xr-background-color-row-odd);\n", | |
| " border-color: var(--xr-background-color-row-even);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name {\n", | |
| " grid-column: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-dims {\n", | |
| " grid-column: 2;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-dtype {\n", | |
| " grid-column: 3;\n", | |
| " text-align: right;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-preview {\n", | |
| " grid-column: 4;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-index-preview {\n", | |
| " grid-column: 2 / 5;\n", | |
| " color: var(--xr-font-color2);\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name,\n", | |
| ".xr-var-dims,\n", | |
| ".xr-var-dtype,\n", | |
| ".xr-preview,\n", | |
| ".xr-attrs dt {\n", | |
| " white-space: nowrap;\n", | |
| " overflow: hidden;\n", | |
| " text-overflow: ellipsis;\n", | |
| " padding-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name:hover,\n", | |
| ".xr-var-dims:hover,\n", | |
| ".xr-var-dtype:hover,\n", | |
| ".xr-attrs dt:hover {\n", | |
| " overflow: visible;\n", | |
| " width: auto;\n", | |
| " z-index: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-data {\n", | |
| " display: none;\n", | |
| " border-top: 2px dotted var(--xr-background-color);\n", | |
| " padding-bottom: 20px !important;\n", | |
| " padding-top: 10px !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in + label,\n", | |
| ".xr-var-data-in + label,\n", | |
| ".xr-index-data-in + label {\n", | |
| " padding: 0 1px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
| ".xr-var-data-in:checked ~ .xr-var-data,\n", | |
| ".xr-index-data-in:checked ~ .xr-index-data {\n", | |
| " display: block;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-data > table {\n", | |
| " float: right;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-data > pre,\n", | |
| ".xr-index-data > pre,\n", | |
| ".xr-var-data > table > tbody > tr {\n", | |
| " background-color: transparent !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-name span,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-name div,\n", | |
| ".xr-index-data,\n", | |
| ".xr-attrs {\n", | |
| " padding-left: 25px !important;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs,\n", | |
| ".xr-var-attrs,\n", | |
| ".xr-var-data,\n", | |
| ".xr-index-data {\n", | |
| " grid-column: 1 / -1;\n", | |
| "}\n", | |
| "\n", | |
| "dl.xr-attrs {\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| " display: grid;\n", | |
| " grid-template-columns: 125px auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt,\n", | |
| ".xr-attrs dd {\n", | |
| " padding: 0;\n", | |
| " margin: 0;\n", | |
| " float: left;\n", | |
| " padding-right: 10px;\n", | |
| " width: auto;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt {\n", | |
| " font-weight: normal;\n", | |
| " grid-column: 1;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dt:hover span {\n", | |
| " display: inline-block;\n", | |
| " background: var(--xr-background-color);\n", | |
| " padding-right: 10px;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-attrs dd {\n", | |
| " grid-column: 2;\n", | |
| " white-space: pre-wrap;\n", | |
| " word-break: break-all;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-icon-database,\n", | |
| ".xr-icon-file-text2,\n", | |
| ".xr-no-icon {\n", | |
| " display: inline-block;\n", | |
| " vertical-align: middle;\n", | |
| " width: 1em;\n", | |
| " height: 1.5em !important;\n", | |
| " stroke-width: 0;\n", | |
| " stroke: currentColor;\n", | |
| " fill: currentColor;\n", | |
| "}\n", | |
| "\n", | |
| ".xr-var-attrs-in:checked + label > .xr-icon-file-text2,\n", | |
| ".xr-var-data-in:checked + label > .xr-icon-database,\n", | |
| ".xr-index-data-in:checked + label > .xr-icon-database {\n", | |
| " color: var(--xr-font-color0);\n", | |
| " filter: drop-shadow(1px 1px 5px var(--xr-font-color2));\n", | |
| " stroke-width: 0.8px;\n", | |
| "}\n", | |
| "</style><pre class='xr-text-repr-fallback'><xarray.Dataset> Size: 80kB\n", | |
| "Dimensions: (phony_dim_0: 100, phony_dim_1: 100)\n", | |
| "Dimensions without coordinates: phony_dim_0, phony_dim_1\n", | |
| "Data variables:\n", | |
| " data (phony_dim_0, phony_dim_1) float64 80kB ...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-2fb1ff13-ed58-496f-a3a7-550a9890fba5' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-2fb1ff13-ed58-496f-a3a7-550a9890fba5' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>phony_dim_0</span>: 100</li><li><span>phony_dim_1</span>: 100</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-93baf4ad-820b-4e28-ab58-c3dbf6f23a31' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-93baf4ad-820b-4e28-ab58-c3dbf6f23a31' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-af2e82de-7224-4d9f-a230-f23fad04e5f1' class='xr-section-summary-in' type='checkbox' checked><label for='section-af2e82de-7224-4d9f-a230-f23fad04e5f1' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>data</span></div><div class='xr-var-dims'>(phony_dim_0, phony_dim_1)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-afba6052-e6c4-4483-b7d1-04e3bbeaf56e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-afba6052-e6c4-4483-b7d1-04e3bbeaf56e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-06dc0f44-d076-46f6-b70c-1acb09e8ca8b' class='xr-var-data-in' type='checkbox'><label for='data-06dc0f44-d076-46f6-b70c-1acb09e8ca8b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[10000 values with dtype=float64]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d6568834-0d59-411a-b322-898a9146e38a' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-d6568834-0d59-411a-b322-898a9146e38a' class='xr-section-summary' title='Expand/collapse section'>Indexes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-751ba229-6366-4a9e-a634-e7e49c6ab31e' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-751ba229-6366-4a9e-a634-e7e49c6ab31e' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>" | |
| ], | |
| "text/plain": [ | |
| "<xarray.Dataset> Size: 80kB\n", | |
| "Dimensions: (phony_dim_0: 100, phony_dim_1: 100)\n", | |
| "Dimensions without coordinates: phony_dim_0, phony_dim_1\n", | |
| "Data variables:\n", | |
| " data (phony_dim_0, phony_dim_1) float64 80kB ..." | |
| ] | |
| }, | |
| "execution_count": 17, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "ice_ds = xr.open_zarr(session.store, group=\"/\", zarr_format=3, consolidated=False)\n", | |
| "ice_ds" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 18, | |
| "id": "e400688c-cf7e-4a1f-b6a9-64c10a3f5717", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "array([[0., 0., 0., ..., 0., 0., 0.],\n", | |
| " [0., 0., 0., ..., 0., 0., 0.],\n", | |
| " [0., 0., 0., ..., 0., 0., 0.],\n", | |
| " ...,\n", | |
| " [0., 0., 0., ..., 0., 0., 0.],\n", | |
| " [0., 0., 0., ..., 0., 0., 0.],\n", | |
| " [0., 0., 0., ..., 0., 0., 0.]], shape=(100, 100))" | |
| ] | |
| }, | |
| "execution_count": 18, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "ice_ds.data.values" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 19, | |
| "id": "31f0ad56-1d89-4654-951e-ef25090fbb7b", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "{'chunks': (50, 50),\n", | |
| " 'preferred_chunks': {'phony_dim_0': 50, 'phony_dim_1': 50},\n", | |
| " 'compressors': (),\n", | |
| " 'filters': (),\n", | |
| " 'shards': None,\n", | |
| " 'serializer': DummyCodec(),\n", | |
| " 'dtype': dtype('<f8')}" | |
| ] | |
| }, | |
| "execution_count": 19, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "ice_ds.data.encoding" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "2e862ca6-bccf-4cec-8623-91727e02acc1", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "display_name": "Python 3 (ipykernel)", | |
| "language": "python", | |
| "name": "python3" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": { | |
| "name": "ipython", | |
| "version": 3 | |
| }, | |
| "file_extension": ".py", | |
| "mimetype": "text/x-python", | |
| "name": "python", | |
| "nbconvert_exporter": "python", | |
| "pygments_lexer": "ipython3", | |
| "version": "3.13.2" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 5 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment