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:
dsxarray.Dataset

input dataset with velocity variables. Expected variables are: - vx: velocity in x direction - vy: velocity in y direction - vmod: velocity module

See gridmarthe.read_velocity() to get velocity dataset from file.

axmatplotlib.axes, optional

if not provided, an ax will be created and returned.

xyfreqint, optional

filter velocity data every X cell.

veclenghtfloat, optional

vector scale legend. Default is 1.

color_modbool, optional

use velocity module as color field. Default is False.

sqrt_normbool, 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_xylist or tuple, optional

coordinates (X, Y) in Axes dimension (from 0 to 1) where to add the velocity scale.

Returns:
axmatplotlib.axes