grib_vectors
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
andv_component
. Otherwise when the value is “polar_field” the result is defined byintensity
anddirection
.u_component (
Fieldset
) – Specifies theFieldset
to be used as the vector field’s x component. Available whentype
is “vector_field”.v_component (
Fieldset
) – Specifies theFieldset
to be used as the vector field’s y component. Available whentype
is “vector_field”.intensity (
Fieldset
) – Specifies theFieldset
to be used as the vector field’s intensity component. Available whentype
is “polar_field”.direction (
Fieldset
) – Specifies theFieldset
to be used as the vector field’s direction component. Available whentype
is “polar_field”.colouring_field (
Fieldset
) – Specifies theFieldset
that the colouring is based on. If not supplied, the computed magnitude of the vector components will be used for colouring.
- Return type
Request