tephpy.io.wyoming ================= .. py:module:: tephpy.io.wyoming .. autoapi-nested-parse:: University of Wyoming sounding archive reader (spec §3.4). :func:`fetch` requests one ascent from the archive's post-2024 wsgi interface in its machine-readable ``TEXT:CSV`` form — bare, self-describing CSV (verified 2026-07-27) — over stdlib ``urllib`` behind a function-local import, and hands the body to a pure, transport-free parser. Network failures, HTTP errors, and the archive's "no data" replies raise :class:`~tephpy.exceptions.TephpyIOError` summarising the upstream response; the parsed sounding passes the ordinary ingest validation (spec §6). .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: tephpy.io.wyoming.fetch Module Contents --------------- .. py:function:: fetch(station: str, time: datetime.datetime | str, *, timeout: float | None = None) -> tephpy.sounding.Sounding Fetch one sounding from the University of Wyoming archive. :Parameters: **station** : :class:`python:str` The WMO station identifier, e.g. ``"72357"``. **time** : :obj:`datetime.datetime` or :class:`python:str` The nominal launch time; a string is read with :meth:`datetime.datetime.fromisoformat`, and a naive value is read as UTC (the ``Sounding`` convention). **timeout** : :class:`python:float`, optional The request timeout in seconds (default ``WYOMING_TIMEOUT``). :Returns: :obj:`Sounding ` The validated sounding, with `station` and `time` as metadata — so the legend label derives for free (spec §3.4). :Raises: :obj:`TephpyIOError ` For network failures, HTTP errors (including the archive's "no data at that time" and "unknown station" replies), or a response the parser does not recognise. :obj:`TypeError` If `time` is neither a datetime nor a string. :obj:`ValueError` If a `time` string is not ISO 8601. .. !! processed by numpydoc !!