easyclimate.plot.mpas.cell_voronoi

Voronoi-style plots for MPAS cells.

Functions

plot_cell_voronoi(ds, da, *[, ax, transform, lon_min, ...])

Plot MPAS cell-centered scalar field on native polygon cells.

Module Contents

easyclimate.plot.mpas.cell_voronoi.plot_cell_voronoi(ds, da, *, ax=None, transform=None, lon_min=None, lon_max=None, lat_min=None, lat_max=None, auto_extent=True, extent_margin=0.05, cell_margin=0.05, global_plot=False, input_radians=True, center_lon=None, skip_large_lon_jump=True, max_polygon_lon_span=180.0, cmap=None, vmin=None, vmax=None, symmetric=False, percentile=98, edgecolor='none', linewidth=0.0, add_colorbar=True, cbar_kwargs=None, title=None, xlabel='Longitude', ylabel='Latitude', aspect='auto', lon_name_cell='lonCell', lat_name_cell='latCell', lon_name_vertex='lonVertex', lat_name_vertex='latVertex', vertices_on_cell_name='verticesOnCell', n_edges_on_cell_name='nEdgesOnCell', use_geometry_cache=True)

Plot MPAS cell-centered scalar field on native polygon cells.

The scalar field is rendered on each native MPAS cell polygon. The function works with both plain Matplotlib axes and Cartopy GeoAxes.

Parameters

dsxarray.Dataset

Dataset containing MPAS mesh geometry.

daxarray.DataArray or numpy.ndarray

Cell-centered scalar field. Must be 1D on nCells after selection.

axmatplotlib.axes.Axes, optional

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

projectioncartopy.crs.CRS, optional

Reserved for compatibility with older call sites.

transformcartopy.crs.CRS, optional

Coordinate reference system of the input coordinates for Cartopy axes.

lon_min, lon_max, lat_min, lat_maxfloat, optional

Plot extent. Cross-dateline windows are supported, for example: lon_min=-190, lon_max=-60 describes the continuous longitude window from 170E to 60W.

auto_extentbool, default: True

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

extent_marginfloat, default: 0.05

Fractional margin added to the automatically inferred extent.

cell_marginfloat, default: 0.05

Extra fraction of the plot extent used to select cells outside the visible window. This helps avoid missing partial cells along boundaries.

global_plotbool, default: False

If True, draw a global extent centered on center_lon.

input_radiansbool, default: True

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

center_lonfloat, optional

Longitude wrapping center. If None, inferred from lon_min/lon_max or valid cell centers.

skip_large_lon_jumpbool, default: True

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

max_polygon_lon_spanfloat, default: 180.0

Maximum accepted wrapped polygon longitude span in degrees.

cmapstr or matplotlib.colors.Colormap, optional

Colormap used for cell values.

vmin, vmaxfloat, optional

Color limits. If omitted, infer them from selected values.

symmetricbool, default: False

If True, infer symmetric color limits around zero.

percentilefloat, default: 98

Percentile used for automatic color-limit inference.

edgecolor, linewidth

Polygon edge style passed to matplotlib.collections.PolyCollection.

add_colorbarbool, default: True

If True, add a colorbar for the polygon collection.

cbar_kwargsdict, optional

Keyword arguments passed to Figure.colorbar.

titlestr, optional

Axes title. If None, use the data long name.

figsize(float, float), default: (8, 6)

Reserved for compatibility with older call sites.

xlabel, ylabelstr

Axis labels used for plain Matplotlib axes.

aspectstr or float, default: “auto”

Aspect setting used for plain Matplotlib axes.

lon_name_cell, lat_name_cell, lon_name_vertex, lat_name_vertexstr

MPAS coordinate variable names.

vertices_on_cell_name, n_edges_on_cell_namestr

MPAS connectivity variable names.

use_geometry_cachebool, default: True

If True, cache native cell polygon geometry for repeated calls.

Returns

axmatplotlib.axes.Axes

Axes containing the plot.

pcmatplotlib.collections.PolyCollection

Polygon collection added to the axes.

MPAS Cell-centered Voronoi plots

MPAS Cell-centered Voronoi plots