stac¶
Creates STAC collections and items for Met Office deterministic forecast data.
create_collection ¶
Creates a STAC collection for a model and theme combination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Model
|
The Met Office model (global or UK). |
required |
theme
|
Theme
|
The theme (height, pressure-level, near-surface, or whole-atmosphere). |
required |
Returns:
| Type | Description |
|---|---|
Collection
|
A STAC Collection object configured for the model and theme. |
Source code in src/stactools/met_office_deterministic/stac.py
create_items ¶
create_items(
source_hrefs: Sequence[str | Href],
model: Model | None = None,
theme: Theme | None = None,
) -> list[Item]
Creates one or more STAC items from a sequence of hrefs.
Groups hrefs by collection and item ID, then creates STAC items with assets for each unique combination of valid time and forecast horizon.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_hrefs
|
Sequence[str | Href]
|
A sequence of href strings or Href objects pointing to NetCDF forecast files. |
required |
model
|
Model | None
|
Optional model to override automatic detection from hrefs. |
None
|
theme
|
Theme | None
|
Optional theme to override automatic detection from hrefs. |
None
|
Returns:
| Type | Description |
|---|---|
list[Item]
|
A list of STAC Item objects, one for each unique combination of |
list[Item]
|
valid time and forecast horizon. |