href¶
Parse Met Office deterministic forecast hrefs into structured objects.
Href
dataclass
¶
Href(
href: str,
model: Model,
theme: Theme,
parameter: str,
reference_datetime: str,
valid_datetime: str,
forecast_horizon: str,
)
collection_id
property
¶
Gets the STAC collection ID for this href.
Returns:
| Type | Description |
|---|---|
str
|
The collection ID string. |
datetime
property
¶
Gets the datetime from the valid time string.
Returns:
| Type | Description |
|---|---|
datetime
|
A datetime object parsed from the valid time. |
duration
property
¶
Extracts the duration from the parameter if present.
Returns:
| Type | Description |
|---|---|
str | None
|
The duration string (ISO 8601 format) if the parameter includes one, |
str | None
|
None otherwise. |