sup3r.preprocessing.derivers.utilities.invert_uv#
- invert_uv(u, v, lat_lon)[source]#
Transform u and v back to windspeed and winddirection
- Parameters:
u (Union[np.ndarray, da.core.Array]) – 3D array of high res U data (spatial_1, spatial_2, temporal)
v (Union[np.ndarray, da.core.Array]) – 3D array of high res V data (spatial_1, spatial_2, temporal)
lat_lon (Union[np.ndarray, da.core.Array]) – 3D array of lat lon (spatial_1, spatial_2, 2) Last dimension has lat / lon in that order
- Returns:
ws (Union[np.ndarray, da.core.Array]) – 3D array of high res windspeed data (spatial_1, spatial_2, temporal)
wd (Union[np.ndarray, da.core.Array]) – 3D array of high res winddirection data. Angle is in degrees and measured relative to the south_north direction. (spatial_1, spatial_2, temporal)