xscape.accessors.XScapeDAAccessor

class xscape.accessors.XScapeDAAccessor(xarray_obj)
__init__(xarray_obj)

Methods

__init__(xarray_obj)

ss_sel(point)

Return the corresponding seascape for the specified point.

to_km_grid(gridsize, extent)

Convert an XScape DataArray to a kilometric grid.

Attributes

c_points

DataFrame of center points of each seascape.

gridsize

Horizontal pixel size of this DataArray.

property c_points

DataFrame of center points of each seascape.

property gridsize

Horizontal pixel size of this DataArray.

ss_sel(point)

Return the corresponding seascape for the specified point.

Calculates the corresponding seascape index and performs .isel() on the calling object to retrieve it.

Parameters:

point (pd.Series) – Coordinates of the point in a series with “lat” and “lon” values.

Returns:

XScape-style DataArray containing only one seascape.

Return type:

xr.DataArray

Raises:

ValueError – If the point does not correspond to the center of any seascape.

to_km_grid(gridsize, extent)

Convert an XScape DataArray to a kilometric grid.

Parameters:
  • gridsize (float) – Size of the new grid in kilometers.

  • extent (float) – extent of the new grid in kilometers.

Returns:

XScape DataArray regridded in the specified a kilometric grid.

Return type:

xr.DataArray