This file contains 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
# /// script | |
# requires-python = ">=3.11" | |
# dependencies = [ | |
# "zarr == 3.0.0", | |
# ] | |
# /// | |
from zarr import create_array | |
import numpy as np |
This file contains 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
2025-01-08 15:34:58,955 - gcsfs - DEBUG - _call -- GET: https://storage.googleapis.com/download/storage/v1/b/gcp-public-data-arco-era5/o/ar%2Ffull_37-1h-0p25deg-chunk-1.zarr-v3%2Fzarr.json?alt=media, (), {} | |
2025-01-08 15:34:58,955 - gcsfs - DEBUG - _call -- GET: https://storage.googleapis.com/download/storage/v1/b/gcp-public-data-arco-era5/o/ar%2Ffull_37-1h-0p25deg-chunk-1.zarr-v3%2F.zgroup?alt=media, (), {} | |
2025-01-08 15:34:58,955 - gcsfs - DEBUG - _call -- GET: https://storage.googleapis.com/download/storage/v1/b/gcp-public-data-arco-era5/o/ar%2Ffull_37-1h-0p25deg-chunk-1.zarr-v3%2F.zattrs?alt=media, (), {} | |
2025-01-08 15:34:58,955 - gcsfs - DEBUG - _call -- GET: https://storage.googleapis.com/download/storage/v1/b/gcp-public-data-arco-era5/o/ar%2Ffull_37-1h-0p25deg-chunk-1.zarr-v3%2F.zmetadata?alt=media, (), {} | |
2025-01-08 15:34:59,751 - gcsfs - DEBUG - _call -- GET: b/{}/o, ('gcp-public-data-arco-era5',), None | |
2025-01-08 15:35:00,364 - gcsfs - DEBUG - _call -- GET: b/{}/o, ('gcp-public-data-arco-era5',), No |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# /// script | |
# requires-python = ">=3.10" | |
# dependencies = [ | |
# "numpy", | |
# ] | |
# /// | |
import numpy as np | |
from typing import Iterable | |
BBox = tuple[tuple[int, int], ...] |
This file contains 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
# /// script | |
# requires-python = ">=3.10" | |
# dependencies = [ | |
# "numpy", | |
# ] | |
# /// | |
import numpy as np | |
from typing import Iterable | |
BBox = tuple[tuple[int, int], ...] |
This file contains 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
{ | |
debug | |
} | |
:8000 { | |
file_server { | |
browse | |
root /path/to/data | |
} | |
header { | |
Access-Control-Allow-Headers * |
This file contains 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
from __future__ import annotations | |
from concurrent.futures import ThreadPoolExecutor, as_completed, wait | |
import os | |
import time | |
from typing import Any, Dict, List | |
import click | |
import numpy as np | |
import zarr | |
from zarr.storage import FSStore | |
import logging |
This file contains 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
""" | |
Demo of TypedDict for payloads for a method on a dataclass that returns a new instance with updated attributes. | |
""" | |
from dataclasses import dataclass | |
from typing import TypedDict | |
class FooUpdate(TypedDict): | |
prop_a: int | |
prop_b: str |
This file contains 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
from xarray_ome_ngff.registry import get_adapters | |
import zarr | |
from typing import Union | |
import dask.array as da | |
from xarray import DataArray | |
import os | |
def infer_coords(group: zarr.Group, array: zarr.Array): | |
# these conditionals should be handled by a lower-level validation function | |
if 'multiscales' in group.attrs: |
NewerOlder