lair.hrrr.create_s3_subgroup_url#

lair.hrrr.create_s3_subgroup_url(zarr_id, prefix=True)[source]#

Create the s3 subgroup url for a zarr id.

  • Where the actual data variable is stored

  • While subgroups are part of the zarr spec, there’s not necessarily a good reason for the data in this case to have this extra level of nesting

Parameters:
  • zarr_id (ZarrId) – ZarrId instance

  • prefix (bool) – include prefix

Returns:

str – s3 subgroup url

Return type:

str

See also

create_s3_group_url

The level above.

create_s3_chunk_url

The level below.

Examples

>>> import datetime as dt
>>> from lair.hrrr import ZarrId, create_s3_subgroup_url
>>> zarr_id = ZarrId(
...     dt.datetime(2024, 1, 15, 12), "sfc", "10m_above_ground", "UGRD", "anl"
... )
>>> create_s3_subgroup_url(zarr_id, prefix=False)
'sfc/20240115/20240115_12z_anl.zarr/10m_above_ground/UGRD/10m_above_ground'