easyclimate.plot.mpas.cell_curved_quiver¶
Curved quiver plots for MPAS cell winds.
Functions¶
Plot MPAS cell-centered vector wind as curved quiver trajectories. |
Module Contents¶
- easyclimate.plot.mpas.cell_curved_quiver.plot_cell_curved_quiver(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='lonCell', lat_name_cell='latCell', nx=160, ny=100, interpolation_padding=None, interpolation_padding_cells=2.0, min_valid_fraction=0.02, use_triangulation_cache=True, use_interp_weight_cache=True, transform=None, project_to_map=True, regrid_shape=None, regrid_global_epsilon=1e-06, density=1, linewidth=None, color=None, cmap=None, norm=None, arrowsize=1, arrowstyle='-|>', zorder=None, start_points=None, integration_direction='both', grains=15, broken_streamlines=True, ref_magnitude: float | None = None, ref_length: float | None = None, min_frac_length: float = 0.0, length_norm: Literal['reference', 'max', 'percentile'] = 'reference', mask_density: int | tuple[int, int] = 10, line_start_stride: int = 1, arrow_stride: int = 1, min_distance: float = 0.0, arrow_head_ratio: float = 1.0, arrow_position: float = 1.0, title=None) easyclimate.plot.modplot.CurvedQuiverplotSet¶
Plot MPAS cell-centered vector wind as curved quiver trajectories.
The MPAS cell-centered irregular vectors are first interpolated onto a regular grid, then drawn with the same curved-quiver engine used by
easyclimate.plot.curved_quiver_plot.curved_quiver().Parameters¶
- ds
xarray.Dataset MPAS dataset containing cell coordinate variables.
- u_da, v_da
xarray.DataArrayornumpy.ndarray Cell-centered zonal/eastward and meridional/northward vectors, 1D on nCells after selection.
- 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 to define the regular interpolation grid.
- 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, MPAS longitude and latitude variables are interpreted as radians and converted to degrees.
- lon_name_cell, lat_name_cell
str MPAS cell coordinate variable names.
- nx, ny
int, default: 160, 100 Number of longitude and latitude points in the regular interpolation grid.
- interpolation_padding
floator (float,float) orNone, optional Extra longitude/latitude degrees used only when selecting source cells for triangular interpolation. If None, padding is inferred from
interpolation_padding_cellsand the regular grid spacing.- interpolation_padding_cells
float, default: 2.0 Number of regular-grid cells used as automatic interpolation padding.
- min_valid_fraction
float, default: 0.02 Minimum fraction of valid interpolated grid points required before plotting.
- use_triangulation_cache, use_interp_weight_cache
bool, default: True If True, cache triangulation and interpolation weights for repeated calls on the same mesh and grid.
- transform
cartopy.crs.CRS, optional Coordinate reference system of the input coordinates for Cartopy axes.
- project_to_map
bool, default: True For Cartopy GeoAxes, transform the regular lon-lat grid and vector components to the target projection before drawing when the transformed grid remains rectilinear.
- regrid_shape
intor (int,int) orNone, optional Regrid vectors directly onto a regular grid in target projection coordinates. This is only supported for Cartopy GeoAxes and takes precedence over
project_to_map.- regrid_global_epsilon
float, default: 1.0e-6 Small longitude shrink applied to full-width global regridding windows.
- density, linewidth, color, cmap, norm, arrowsize, arrowstyle
Curved-quiver style options passed to
velovect.- zorder, start_points, integration_direction, grains, broken_streamlines
Curved-quiver trajectory options passed to
velovect.- ref_magnitude, ref_length, min_frac_length, length_norm
Options controlling how vector magnitude maps to curved-vector length.
- mask_density, line_start_stride, arrow_stride, min_distance
Options controlling seed-point density and collision masking.
- arrow_head_ratio, arrow_position
Arrow-head size and placement controls.
- title
str, optional Axes title. If None, use a default curved-quiver title.
Returns¶
easyclimate.plot.modplot.CurvedQuiverplotSetContainer with line and arrow artists returned by
velovect.
- ds