easyclimate.plot.icon.plot_triangular_grid¶
- easyclimate.plot.icon.plot_triangular_grid(ds, *, lon_min=None, lon_max=None, lat_min=None, lat_max=None, ax=None, transform=None, auto_extent=True, extent_margin=0.05, cell_margin=0.05, global_plot=False, center_lon=None, input_radians=True, skip_large_lon_jump=True, max_polygon_lon_span=180.0, lon_name_cell='clon', lat_name_cell='clat', lon_bnds_name='clon_bnds', lat_bnds_name='clat_bnds', deduplicate_edges=True, project_to_map=None, **linekwargs)¶
Plot ICON native triangular mesh edges.
Parameters¶
- ds
xarray.Dataset ICON dataset containing triangular cell bounds.
- lon_min, lon_max, lat_min, lat_max
float, optional Optional plot extent in degrees. Cross-dateline longitude windows are supported.
- ax
matplotlib.axes.Axes, optional Axes on which to draw. By default, use the current axes.
- transform
cartopy.crs.CRS, optional Coordinate reference system of the input coordinates for Cartopy axes.
- auto_extent
bool, default: True If True and no explicit extent is supplied, infer the extent from ICON cell centers.
- extent_margin
float, default: 0.05 Fractional margin added to the automatically inferred extent.
- cell_margin
float, default: 0.05 Fractional padding used when selecting triangles near the visible extent.
- global_plot
bool, default: False If True, draw a global extent centered on
center_lon.- 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.
- skip_large_lon_jump
bool, default: True If True, skip triangles with very large wrapped longitude spans.
- max_polygon_lon_span
float, default: 180.0 Maximum accepted wrapped triangle longitude span in degrees.
- lon_name_cell, lat_name_cell, lon_bnds_name, lat_bnds_name
str ICON coordinate and triangular-bound variable names.
- deduplicate_edges
bool, default: True If True, remove duplicate shared cell edges before drawing.
- project_to_map
boolor {“force”}, optional If True or None on Cartopy axes, use the fast endpoint-projection path only for global-scale plots and use Cartopy’s exact path transform for regional plots. If False, always let Cartopy transform each path itself. If “force”, always project all edge endpoints to the target map projection in one vectorized operation before creating the collection. The forced path avoids Cartopy’s per-path Shapely projection overhead, but may differ from Cartopy’s exact transform on regional projections.
- **linekwargs
Additional keyword arguments passed to
matplotlib.collections.LineCollection.
Returns¶
matplotlib.collections.LineCollectionLine collection containing selected ICON triangular mesh edges.
- ds