lair.air#

Winds and polar binning.

wind_components() and wind_direction() convert between a wind’s speed and direction (the direction it blows from, in degrees clockwise from north) and its u and v components; rotate_winds() turns HRRR’s grid-relative components to earth-relative ones. bin_polar() and its helpers bin data by wind direction into the 16 compass sectors of WIND_SECTORS, for the polar plots of lair.plotter.

Attributes

WIND_SECTORS

The 16 compass sectors used by bin_polar(), in degrees clockwise from N: WIND_SECTORS["ESE"] is 112.5.

Functions

bin_polar

Bin data into polar coordinates.

circularize_radial_data

Circularize radial data for polar plots.

rotate_winds

Rotate HRRR winds from grid to earth coordinates.

sector_radians

Radian values of the 16 direction sectors (radian_bin of bin_polar()).

wind_components

Calculate the u and v components of the wind.

wind_direction

Convert u and v components to wind direction.