lair.hrrr.create_s3_chunk_url#
- lair.hrrr.create_s3_chunk_url(zarr_id, chunk_id, prefix=False)[source]#
Create the s3 chunk url for a zarr id.
Contains just the data for the chunk (no metadata)
Current APIs (zarr, xarray) don’t support reading zarr data by chunks, so we have to write relatively low-level code to load data on this level
- Parameters:
- Returns:
str – s3 chunk url
- Return type:
See also
create_s3_subgroup_urlThe level above.
get_valueReads the chunk this names.
get_nearest_pointGives the
chunk_idof a point.
Examples
>>> import datetime as dt >>> from lair.hrrr import ZarrId, create_s3_chunk_url >>> zarr_id = ZarrId( ... dt.datetime(2024, 1, 15, 12), "sfc", "10m_above_ground", "UGRD", "anl" ... ) >>> create_s3_chunk_url(zarr_id, "4.5") 'sfc/20240115/20240115_12z_anl.zarr/10m_above_ground/UGRD/10m_above_ground/UGRD/4.5'