earthkit_data_meteoswiss_opendata#
Copyright (c) 2026 MeteoSwiss, contributors listed in AUTHORS
Distributed under the terms of the BSD 3-Clause License.
SPDX-License-Identifier: BSD-3-Clause
Submodules#
Attributes#
Classes#
Supported MeteoSwiss Open Data NWP collections. |
|
Validated MeteoSwiss forecast request. |
|
Earthkit source for MeteoSwiss Open Data. |
Functions#
|
Return assets matching a MeteoSwiss request. |
Package Contents#
- API_URL = 'https://data.geo.admin.ch/api/stac/v1'#
- get_asset_urls(request: earthkit_data_meteoswiss_opendata.request.Request) list[str][source]#
Return assets matching a MeteoSwiss request.
For requests with several lead times, only complete forecast runs are returned.
- class Collection[source]#
Bases:
enum.StrEnumSupported MeteoSwiss Open Data NWP collections.
- ICON_CH1 = 'ogd-forecasting-icon-ch1'#
- ICON_CH2 = 'ogd-forecasting-icon-ch2'#
- KENDA_CH1 = 'ogd-analysis-kenda-ch1'#
- property stac_id: str#
Return the full STAC collection identifier.
- class Request[source]#
Validated MeteoSwiss forecast request.
ref_timeis accepted as an alias forreference_datetime.lead_timeis accepted as an alias forhorizon.- collection: Collection#
- variable: Annotated[str, Field(min_length=1)]#
- reference_datetime: Annotated[str, Field(validation_alias=AliasChoices('reference_datetime', 'ref_time'))]#
- perturbed: bool#
- horizon: Annotated[datetime.timedelta | list[datetime.timedelta], Field(validation_alias=AliasChoices('horizon', 'lead_time'))]#
- classmethod validate_reference_datetime(value: Any) str[source]#
Validate and normalize the reference datetime.
- classmethod validate_horizon(value: datetime.timedelta | list[datetime.timedelta]) datetime.timedelta | list[datetime.timedelta][source]#
Validate one or more forecast horizons.
- property lead_times: list[datetime.timedelta]#
Return the requested horizons as a list.
- class MeteoSwissOpenDataSource(*, collection: earthkit_data_meteoswiss_opendata.request.Collection | str, variable: str, perturbed: bool, ref_time: str | datetime.datetime, lead_time: str | datetime.timedelta | list[str | datetime.timedelta])[source]#
Bases:
earthkit.data.sources.SourceEarthkit source for MeteoSwiss Open Data.
- request#