earthkit_data_meteoswiss_opendata.request#
Request validation and STAC query creation.
Copyright (c) 2026 MeteoSwiss, contributors listed in AUTHORS
Distributed under the terms of the BSD 3-Clause License.
SPDX-License-Identifier: BSD-3-Clause
Attributes#
Classes#
Supported MeteoSwiss Open Data NWP collections. |
|
Validated MeteoSwiss forecast request. |
Module Contents#
- logger#
- DurationAdapter#
- 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.