grib_vectors

../../_images/GRIBVECTORS.png

Combines scalar GRIB fields (Fieldset) into vector fields for the purpose of plotting. The user supplies GRIB data of vector X and Y components (cartesian coordinates) or intensity/direction (polar coordinates) with the option of colouring the vectorial representation (arrows) according to the magnitude of a user supplied scalar quantity. The classic example is to plot a wind field from u/v components coloured according to temperature.

Note

This function performs the same task as the Grib Vectors icon in Metview’s user interface. It accepts its parameters as keyword arguments, described below.

grib_vectors(**kwargs)

Combines scalar GRIB fields (Fieldset) into vector fields for the purpose of plotting.

Parameters
  • type ({"vector_field", "polar_field"}, default: "vector_field") – Specifies the type of the vector field to make. When it is set to “vector_field” the result is defined by u_component and v_component. Otherwise when the value is “polar_field” the result is defined by intensity and direction.

  • u_component (Fieldset) – Specifies the Fieldset to be used as the vector field’s x component. Available when type is “vector_field”.

  • v_component (Fieldset) – Specifies the Fieldset to be used as the vector field’s y component. Available when type is “vector_field”.

  • intensity (Fieldset) – Specifies the Fieldset to be used as the vector field’s intensity component. Available when type is “polar_field”.

  • direction (Fieldset) – Specifies the Fieldset to be used as the vector field’s direction component. Available when type is “polar_field”.

  • colouring_field (Fieldset) – Specifies the Fieldset that the colouring is based on. If not supplied, the computed magnitude of the vector components will be used for colouring.

Return type

Request