easyclimate.plot.projection

Graph processing related functions

Functions

draw_Circlemap_PolarStereo(*, lat_range[, ...])

Utility function to set the boundary of ax to a path that surrounds a

add_lon_cyclic(data_input, inter[, lon_dim])

Add a cyclic point to an array and optionally a corresponding coordinate.

add_lon_cyclic_lonarray(data_input, lon_array[, lon_dim])

Add a cyclic point to an array and optionally a corresponding coordinate.

Module Contents

easyclimate.plot.projection.draw_Circlemap_PolarStereo(*, lat_range: tuple | list, add_gridlines: bool = True, lon_step: float = None, lat_step: float = None, ax: matplotlib.axes.Axes = None, draw_labels: bool = True, set_map_boundary_kwargs: dict = {}, gridlines_kwargs: dict = {})

Utility function to set the boundary of ax to a path that surrounds a given region specified by latitude and longitude coordinates. This boundary is drawn in the projection coordinates and therefore follows any curves created by the projection. As of now, this works consistently for the North/South Polar Stereographic Projections.

Parameters

lat_rangetuple, list.

The two-tuple containing the start and end of the desired range of latitudes. The first entry must be smaller than the second entry. Both entries must be between [-90 , 90].

add_gridlines: bool.

whether or not add gridlines and tick labels to a map.

lon_step: float.

The step of grid lines in longitude.

lat_step: float.

The step of grid lines in latitude.

axmatplotlib.axes.Axes

The axes to which the boundary will be applied.

draw_labels: bool.

Whether to draw labels. Defaults to True.

**set_map_boundary_kwargs: dict.

Additional keyword arguments to wrapped geocat.viz.util.set_map_boundary.

**gridlines_kwargs: dict.

Additional keyword arguments to wrapped cartopy.mpl.gridliner.Gridliner.

See also

geocat.viz.util.set_map_boundary, cartopy.mpl.gridliner.Gridliner.

easyclimate.plot.projection.add_lon_cyclic(data_input: xarray.DataArray, inter: float, lon_dim: str = 'lon')

Add a cyclic point to an array and optionally a corresponding coordinate.

Parameters

data_inputxarray.DataArray or xarray.Dataset

The spatio-temporal data to be calculated.

inter: float

Longitude interval (assuming longitude is arranged in a sequence of equal differences).

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

easyclimate.plot.projection.add_lon_cyclic_lonarray(data_input: xarray.DataArray, lon_array: numpy.array, lon_dim: str = 'lon')

Add a cyclic point to an array and optionally a corresponding coordinate.

Parameters

data_inputxarray.DataArray or xarray.Dataset

The spatio-temporal data to be calculated.

inter: float

Longitude interval (assuming longitude is arranged in a sequence of equal differences).

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.