meteodatalab.operators.wind

Wind operators.

Functions

direction(u, v)

Compute the horizontal wind direction.

speed(u, v)

Compute the horizontal wind speed.

meteodatalab.operators.wind.direction(u: DataArray, v: DataArray) DataArray[source]

Compute the horizontal wind direction.

Note that terrain following grid deformation is not accounted for. The input fields are required to be located on the mass points of a regular grid defined in the rotated latlon coordinate system. The preferred unit is meters per second but any consistent unit system acceptable.

Parameters:
  • u (xarray.DataArray) – the x component of the wind velocity [m/s].

  • v (xarray.DataArray) – the y component of the wind velocity [m/s].

Raises:

ValueError – if any of the input fields is located on staggered points or on any other than a regular grid in the rotated latlon coordinate system.

Returns:

the horizontal wind direction with respect to geographic North [deg].

Return type:

xarray.DataArray

meteodatalab.operators.wind.speed(u: DataArray, v: DataArray) DataArray[source]

Compute the horizontal wind speed.

Note that terrain following grid deformation is not accounted for. The input fields are required to be located on the mass points. The preferred unit is meters per second but any consistent unit system acceptable.

Parameters:
  • u (xarray.DataArray) – the x component of the wind velocity [m/s].

  • v (xarray.DataArray) – the y component of the wind velocity [m/s].

Raises:

ValueError – if any of the input fields is located on staggered points.

Returns:

the horizontal wind speed [m/s].

Return type:

xarray.DataArray