easyclimate.plot.mpas.voronoi_extract

Coordinate extraction for MPAS plots.

Functions

extract_cell_latlon(ds, *[, da, lon_min, lon_max, ...])

Extract and wrap MPAS cell and vertex lon/lat.

Module Contents

easyclimate.plot.mpas.voronoi_extract.extract_cell_latlon(ds, *, da=None, lon_min=None, lon_max=None, lat_min=None, lat_max=None, auto_extent=True, extent_margin=0.05, global_plot=False, center_lon=None, input_radians=True, lon_name_cell='lonCell', lat_name_cell='latCell', lon_name_vertex='lonVertex', lat_name_vertex='latVertex')

Extract and wrap MPAS cell and vertex lon/lat.

Parameters

dsxarray.Dataset

MPAS dataset containing cell and vertex coordinate variables.

daxarray.DataArray or numpy.ndarray, optional

Cell-centered data. If provided, finite values are used for extent inference and center_lon inference.

lon_min, lon_max, lat_min, lat_maxfloat, optional

User-defined plotting window. Supports cross-dateline windows, e.g. lon_min=90, lon_max=-60 means 90E to 300E.

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.

global_plotbool, default: False

If True, return a global extent centered on center_lon.

center_lonfloat, optional

Longitude wrapping center. If None, inferred automatically.

input_radiansbool, default: True

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

lon_name_cell, lat_name_cell, lon_name_vertex, lat_name_vertexstr

MPAS coordinate variable names.

Returns

dict

Dictionary with wrapped cell and vertex coordinates, the inferred longitude center, and plotting extent values.