lair.hrrr.Winds#
- class lair.hrrr.Winds(lat, lon, times)[source]#
Class to download HRRR winds at a point.
Making one downloads the winds: the 10 m u and v analyses of each hour, at the HRRR grid point nearest to
latandlon, from the public HRRR-Zarr archive on Amazon S3. Get HRRR winds at a point shows it. Each parameter is also an attribute of the same name.- Parameters:
lat (float) – latitude of point
lon (float) – longitude of point
times (list[dt.datetime]) – Hours of the analyses to download. A naive time follows the UTC rule. A tz-aware time is converted to UTC to choose the analysis, so 05:00 in
America/Denverin January reads the 12 UTC analysis.
- Variables:
nearest_point (xr.Dataset) – nearest point to lat, lon
chunk_id (numpy.ndarray) – chunk id of nearest point (a 0-d array holding a string such as
"4.5")zarr_ids (dict[str, list[ZarrId]]) – dictionary of zarr ids with var as key
data (pd.DataFrame) – 10 m winds:
u,v(earth-relative),ws(speed from u and v) andwd(seewinds_frame()). The index istimesas given, so tz-aware times keep their time zone.
See also
winds_frameBuilds
datafrom the downloaded components.ZarrIdNames one hour of one variable in the archive.
lair.clock.UTC2MTNMoves the index to Mountain time.
Examples
Needs the internet (the
requests,formatsandgeoextras):>>> import datetime as dt >>> from lair.hrrr import Winds >>> times = [dt.datetime(2024, 1, 15, 12), dt.datetime(2024, 1, 15, 13)] # UTC >>> w = Winds(lat=40.766, lon=-111.848, times=times) >>> w.data