act.plotting.TimeSeriesDisplay.plot_barbs_from_spd_dir#

TimeSeriesDisplay.plot_barbs_from_spd_dir(speed_field, direction_field, pres_field=None, dsname=None, **kwargs)[source]#

This procedure will make a wind barb plot timeseries. If a pressure field is given and the wind fields are 1D, which, for example, would occur if one wants to plot a timeseries of rawinsonde data, then a time-height cross section of winds will be made.

Note: This procedure calls plot_barbs_from_u_v and will take in the same keyword arguments as that procedure.

Parameters:
  • speed_field (str) – The name of the field specifying the wind speed in m/s.

  • direction_field (str) – The name of the field specifying the wind direction in degrees. 0 degrees is defined to be north and increases clockwise like what is used in standard meteorological notation.

  • pres_field (str) – The name of the field specifying pressure or height. If using height coordinates, then we recommend setting invert_y_axis to False.

  • dsname (str) – The name of the datastream to plot. Setting to None will make ACT attempt to autodetect this.

  • kwargs (dict) – Any additional keyword arguments will be passed into act.plotting.TimeSeriesDisplay.plot_barbs_from_u_and_v().

Returns:

the_ax (matplotlib axis handle) – The handle to the axis where the plot was made on.

Examples

..code-block :: python

sonde_ds = act.io.arm.read_arm_netcdf(

act.tests.sample_files.EXAMPLE_TWP_SONDE_WILDCARD)

BarbDisplay = act.plotting.TimeSeriesDisplay(

{‘sonde_darwin’: sonde_ds}, figsize=(10,5))

BarbDisplay.plot_barbs_from_spd_dir(‘deg’, ‘wspd’, ‘pres’,

num_barbs_x=20)