easyclimate.plot.icon.plot_cell_barbs¶
- easyclimate.plot.icon.plot_cell_barbs(ds, u_da, v_da, *, ax=None, lon_min=None, lon_max=None, lat_min=None, lat_max=None, center_lon=None, input_radians=True, lon_name_cell='clon', lat_name_cell='clat', nx_bins=35, ny_bins=20, thin_method='nearest_center', use_thinning_cache=True, transform=None, title=None, **barbs_kwargs)¶
Plot cell-centered vector wind as wind barbs on an ICON mesh.
ICON cell-centered vectors are thinned into regular longitude-latitude bins before they are passed to
Axes.barbs. This keeps barb density readable on native ICON triangular meshes.Parameters¶
- ds
xarray.Dataset ICON dataset containing cell coordinate variables.
- u_da, v_da
xarray.DataArrayornumpy.ndarray Cell-centered zonal/eastward and meridional/northward vector components. Each input must be one-dimensional on
ncellsafter selecting time or vertical dimensions.- ax
matplotlib.axes.Axes, optional Axes on which to draw. By default, use the current axes.
- lon_min, lon_max, lat_min, lat_max
float Plot extent in degrees. These bounds are required so vector thinning is restricted to the requested ICON domain.
- center_lon
float, optional Longitude center used for wrapping. If None, infer it from the extent or valid cell centers.
- input_radians
bool, default: True If True, ICON longitude and latitude variables are interpreted as radians and converted to degrees.
- lon_name_cell, lat_name_cell
str ICON cell coordinate variable names.
- nx_bins, ny_bins
int, default: 35, 20 Number of longitude and latitude bins used to thin vectors.
- thin_method{“nearest_center”, “max_speed”, “mean”}, default: “nearest_center”
Rule used to choose or aggregate one vector per bin.
- use_thinning_cache
bool, default: True If True, cache coordinate-only bin metadata for repeated calls on the same ICON mesh and extent.
- transform
cartopy.crs.CRS, optional Coordinate reference system of the input coordinates for Cartopy axes.
- title
str, optional Axes title. If None, use a default wind-barb title.
- **barbs_kwargs
Additional keyword arguments passed to
Axes.barbs.
Returns¶
matplotlib.quiver.BarbsBarb container returned by
Axes.barbs.
- ds