lair.soundings.download_soundings#
- lair.soundings.download_soundings(station, start, end, dst=None, months=None)[source]#
Download upper air soundings from the Wyoming archive.
Each one is saved as
download_sounding()saves it, in the units ofSounding.units.- Parameters:
station (str) – The 3-letter station identifier (e.g.
'SLC').start (datetime) – The start date and time. Soundings are at 00 and 12 UTC, so the first one requested is the first of those at or after
start. A time without a time zone follows the UTC rule; one with a time zone is converted to UTC.end (datetime) – The end date and time (inclusive), read like
start.dst (str) – The destination directory. Defaults to
$LAIR_SOUNDING_DIR/<station>.months (list) – The months to download (1 to 12), by default every month.
- Raises:
ValueError – If the unit siphon reports for a wind is not one
download_sounding()can convert, or Wyoming answers with an error other than “No data available” (a sounding Wyoming does not have is logged and skipped).requests.exceptions.HTTPError – For an HTTP error other than Wyoming’s “Please try again later”, after which the same sounding is asked for again 2 seconds later.
See also
get_soundingsReads them, with
download=Truedownloading first.download_soundingOne sounding.
Examples
The soundings of January 2024, at 00 and 12 UTC. It needs the network, so it is not run when the docs build:
>>> from lair.soundings import download_soundings >>> download_soundings( ... "SLC", "2024-01-01", "2024-01-31 12:00", dst="soundings/SLC" ... )