mwind

../../_images/MWIND.png

This is the visual definition for specifying how vector data is displayed. It controls features such as wind arrows and wind flags. Note that Metview will automatically interpret certain pairs of GRIB parameters as vector components, for example u/v and 10u/10v. Use grib_vectors() to plot an arbitrary pair of scalar fields as a vector field.

Note

The list of available arrow head styles can be found here.

Note

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

mwind(**kwargs)

Defines the style for wind plotting.

Parameters
  • wind_field_type ({"flags", "arrows", "streamlines"}, default: "arrows") – Method of wind plotting.

  • wind_thinning_mode ({"density", "thinning"}, default: "thinning") –

    Controls the actual number of wind arrows/flags plotted.

    New in Metview version 5.13.0.

  • wind_density (number, default: 5.0) –

    Defines the wind plotting density in flags/arrows per cm units when wind_thinning_mode is “density”.

    New in Metview version 5.13.0.

  • wind_thinning_factor (number, default: 2.0) – Controls the spatial thinning of the wind arrow/flag plotting when wind_thinning_mode is “thinning”. If it is 1 the all the arrows/flags will be plotted. For values greater than 1 a spatial thinning will be applied; the higher the value the higher the thinning will be.

  • legend ({"on", "off"}, default: "off") – Enables the legend.

  • wind_legend_text (str, default: "vector") – Defines the legend entry text.

  • wind_advanced_method ({"on", "off"}, default: "off") – Enables the advanced wind plotting method (“on”) when wind flag/arrow colours can be defined for a set of bands. If it is “off” all the wind flags/arrows will have the same colour.

  • wind_advanced_colour_parameter ({"speed", "parameter"}, default: "speed") – Specifies the parameter defining the magnitude of the flags/arrows when plotting GRIB fields. Only use “parameter” when you want to colour the wind field by another (scalar) field. See grib_vectors() for details.

  • wind_advanced_colour_selection_type ({"count", "interval", "list"}, default: "count") – Technique to calculate the wind bands in advanced mode.

  • wind_advanced_colour_max_value (number, default: 1.e21) – Highest value to be plotted in advanced mode.

  • wind_advanced_colour_min_value (number, default: -1.e21) – Lowest value to be plotted in advanced mode.

  • wind_advanced_colour_level_count (number, default: 10) – Number of levels to be plotted when wind_advanced_colour_selection_type is “count”. The plotting library will try to find a “nice” set of levels, which means that the number of levels could be slightly different than specified here.

  • wind_advanced_colour_level_tolerance (number, default: 2) – Do not use nice levels if the number of levels differs from wind_advanced_colour_level_count by more than wind_advanced_colour_level_tolerance.

  • wind_advanced_colour_reference_level (number, default: 0.0) – The value from which the wind bands are calculated.

  • wind_advanced_colour_level_interval (number, default: 8.0) – Interval between two wind values when wind_advanced_colour_selection_type is “interval”.

  • wind_advanced_colour_level_list (number or list[number]) – List of wind band values.

  • wind_advanced_colour_table_colour_method ({"calculate", "list"}, default: "calculate") – Method of generating the colours for the wind bands.

  • wind_advanced_colour_max_level_colour (str, default: "blue") – Highest wind band entry colour.

  • wind_advanced_colour_min_level_colour (str, default: "red") – Lowest wind band entry colour.

  • wind_advanced_colour_direction ({"clockwise", "anti_clockwise"}, default: "anti_clockwise") – Direction of colour sampling along the colour wheel for plotting when wind_advanced_colour_table_colour_method is “calculate”.

  • wind_advanced_colour_list (str or list[str]) – List of colours for the wind bands.

  • wind_advanced_colour_list_policy ({"lastone", "cycle"}, default: "lastone") – Specifies what to do if there are fewer colours in wind_advanced_colour_list than there are wind bands.

  • wind_flag_calm_indicator ({"on", "off"}, default: "on") – Plots calm indicator circle, if wind speed is less than or equal to wind_flag_calm_below.

  • wind_flag_calm_indicator_size (number, default: 0.3) – The radius (cm) of the calm indicator circle.

  • wind_flag_calm_below (number, default: 0.5) – Winds less than or equal to this value (m/s) will be drawn as calm.

  • wind_flag_colour (str, default: "blue") – Colour of the wind flag shaft, barbs and pennants.

  • wind_flag_length (number, default: 1.0) – Physical length (cm) of wind flag shaft.

  • wind_flag_max_speed (number, default: 1.0e+21) – Highest value of the wind flags to be plotted.

  • wind_flag_min_speed (number, default: -1.0e+21) – Lowest value of the wind flags to be plotted.

  • wind_flag_style ({"solid", "dash", "dot", "chain_dot", "chain_dash"}, default: "solid") – Controls the line style of the wind flag shaft.

  • wind_flag_origin_marker ({"dot", "circle", "off"}, default: "circle") – Symbol for marking the exact location of the current grid point for wind flags.

  • wind_flag_origin_marker_size (number, default: 0.3) –

  • wind_flag_thickness (number, default: 1) – Thickness of the wind flag shaft.

  • wind_arrow_calm_indicator ({"on", "off"}, default: "off") – Plots the calm indicator circle if the wind speed is less than or equal to wind_arrow_calm_below.

  • wind_arrow_calm_indicator_size (number, default: 0.3) – The radius (cm) of the calm indicator circle.

  • wind_arrow_calm_below (number, default: 0.5) – Winds less than or equal to this value (m/s) will be drawn as calm.

  • wind_arrow_colour (str, default: "blue") – Colour of the wind arrow.

  • wind_arrow_head_shape ({0, 1, 2, 3}, default: 0) – Indicates the shape of the arrow head. The list of available arrow head styles can be found here.

  • wind_arrow_head_ratio (number, default: 0.3) – Indicates the shape of the arrow head. The list of available arrow head styles can be found here.

  • wind_arrow_max_speed (number, default: 1.0e+21) – Highest value of the wind arrows to be plotted.

  • wind_arrow_min_speed (number, default: -1.0e+21) – Lowest value of the wind arrows to be plotted.

  • wind_arrow_fixed_velocity (number, default: 0) – Plots fixed velocity arrows (m/s). See wind_arrow_unit_velocity.

  • wind_arrow_thickness (number, default: 1) – Thickness of the wind arrow shaft.

  • wind_arrow_style ({"solid", "dash", "dot", "chain_dot", "chain_dash"}, default: "solid") – Controls the line style of the arrow shaft.

  • wind_arrow_unit_velocity (number, default: 25.0) – Wind speed in m/s that will be plotted as a 1 cm long wind arrow.

  • wind_arrow_legend_text (str, default: "m") – Text to be used as units in the legend text.

  • wind_streamline_min_density (number, default: 1) – The minimum number of streamlines to be plotted in one square cm of the user’s subpage.

  • wind_streamline_min_speed (number, default: 1) – Wind speed below which streamline plotting will be stopped.

  • wind_streamline_thickness (number, default: 2) – Thickness of streamlines.

  • wind_streamline_colour (str, default: "blue") – Colour of streamlines.

  • wind_streamline_style ({"solid", "dash", "dot", "chain_dot", "chain_dash"}, default: "solid") – Line style of streamlines.

  • wind_streamline_head_shape (number, default: 0) – Indicates the shape of the arrow heads on the streamlines.

  • wind_streamline_head_ratio (number, default: 0.3) – Indicates the shape of the arrow heads on the streamlines.

Return type

Request