lair.hrrr.create_s3_group_url#
- lair.hrrr.create_s3_group_url(zarr_id, prefix=True)[source]#
Create the s3 group url for a zarr id.
Start of the zarr array data format
Includes metadata such as the grid
The archive is keyed by the UTC run hour: a naive
run_hourfollows the UTC rule, and a tz-aware one is converted to UTC.- Parameters:
- Returns:
str – s3 group url
- Return type:
See also
create_s3_subgroup_urlThe same, one level down.
create_s3_chunk_urlThe same, down to one chunk.
ZarrIdWhat it takes.
Examples
The archive is keyed by the UTC hour, so 05:00 in Utah in January is the 12 UTC run:
>>> import datetime as dt >>> from zoneinfo import ZoneInfo >>> from lair.hrrr import ZarrId, create_s3_group_url >>> local = dt.datetime(2024, 1, 15, 5, tzinfo=ZoneInfo("America/Denver")) >>> zarr_id = ZarrId(local, "sfc", "10m_above_ground", "UGRD", "anl") >>> create_s3_group_url(zarr_id, prefix=False) 'sfc/20240115/20240115_12z_anl.zarr/10m_above_ground/UGRD'