easyclimate.plot.icon.triangular_grid

Grid-line plots for ICON native triangular meshes.

Functions

plot_triangular_grid(ds, *[, lon_min, lon_max, ...])

Plot ICON native triangular mesh edges.

Module Contents

easyclimate.plot.icon.triangular_grid.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

dsxarray.Dataset

ICON dataset containing triangular cell bounds.

lon_min, lon_max, lat_min, lat_maxfloat, optional

Optional plot extent in degrees. Cross-dateline longitude windows are supported.

axmatplotlib.axes.Axes, optional

Axes on which to draw. By default, use the current axes.

transformcartopy.crs.CRS, optional

Coordinate reference system of the input coordinates for Cartopy axes.

auto_extentbool, default: True

If True and no explicit extent is supplied, infer the extent from ICON cell centers.

extent_marginfloat, default: 0.05

Fractional margin added to the automatically inferred extent.

cell_marginfloat, default: 0.05

Fractional padding used when selecting triangles near the visible extent.

global_plotbool, default: False

If True, draw a global extent centered on center_lon.

center_lonfloat, optional

Longitude center used for wrapping. If None, infer it from the extent or valid cell centers.

input_radiansbool, default: True

If True, ICON longitude and latitude variables are interpreted as radians and converted to degrees.

skip_large_lon_jumpbool, default: True

If True, skip triangles with very large wrapped longitude spans.

max_polygon_lon_spanfloat, default: 180.0

Maximum accepted wrapped triangle longitude span in degrees.

lon_name_cell, lat_name_cell, lon_bnds_name, lat_bnds_namestr

ICON coordinate and triangular-bound variable names.

deduplicate_edgesbool, default: True

If True, remove duplicate shared cell edges before drawing.

project_to_mapbool or {“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.LineCollection

Line collection containing selected ICON triangular mesh edges.

ICON/Triangular grid

ICON/Triangular grid