gridmarthe.plot_veloc_quiver
- gridmarthe.plot_veloc_quiver(ds, ax=None, xyfreq=1, veclenght=1, color_mod=False, sqrt_norm=True, loc_scale_xy=(0.1, 0.1))[source]
Plot velocity field as quiver
- Parameters:
ds (xr.Dataset) –
input dataset with velocity variables. Expected variables are: - vx: velocity in x direction - vy: velocity in y direction - vmod: velocity module
See
gm.read_velocity()to get velocity dataset from file.ax (matplotlib.axes, optional) – if not provided, an ax will be created and returned.
xyfreq (int, optional) – filter velocity data every X cell.
veclenght (float, optional) – vector scale legend. Default is 1.
color_mod (bool, optional) – use velocity module as color field. Default is False.
sqrt_norm (bool, optional) –
Norm the velocity data u and v, with
\[ \begin{align}\begin{aligned}u = u / \sqrt{u^2 + v^2}\\v = v / \sqrt{u^2 + v^2}\end{aligned}\end{align} \]Default is True (recommended).
loc_scale_xy (list or tuple, optional) – coordinates (X, Y) in Axes dimension (from 0 to 1) where to add the velocity scale.
- Returns:
ax (matplotlib.axes)