easyclimate.plot.icon.cell_streamplot¶
Cell-centered streamline plotting utilities for ICON meshes.
Functions¶
|
Plot cell-centered vector wind as streamlines on an ICON mesh. |
Module Contents¶
- easyclimate.plot.icon.cell_streamplot.plot_cell_streamplot(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=160, ny=100, interpolation_padding=None, interpolation_padding_cells=2.0, min_valid_fraction=0.02, max_triangle_edge=None, use_triangulation_cache=True, transform=None, title=None, **streamplot_kwargs)¶
Plot cell-centered vector wind as streamlines on an ICON mesh.
ICON cell-centered irregular vectors are first interpolated onto a regular lon-lat grid with SciPy linear interpolation, then passed to
Axes.streamplot/ Cartopy GeoAxesstreamplot.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 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, 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, 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 ICON cells for interpolation. Padding keeps the requested output grid inside the interpolation hull, reducing blank margins near plot edges. 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.
- max_triangle_edge
float, optional Maximum accepted source-cell separation for interpolation support. Longer source triangles are masked when a triangulation-based cache path is used.
- use_triangulation_cache
bool, default: True If True, cache geometry-only interpolation metadata for repeated calls on the same ICON mesh and grid.
- 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 streamline title.
- **streamplot_kwargs
Additional keyword arguments passed to
Axes.streamplot.
Returns¶
matplotlib.streamplot.StreamplotSetStreamplot set returned by
Axes.streamplot.
- ds