xdggs.conventions.Convention.decode

xdggs.conventions.Convention.decode#

Convention.decode(obj, *, grid_info, name, index_options)#

Decode the dataset according to the convention.

This takes a dataset and performs all the necessary mutations to convert to the xdggs convention and attach the DGGSIndex.

Parameters:
  • ds (xarray.Dataset) – The encoded dataset.

  • grid_info (mapping or xdggs.DGGSInfo, optional) – Overrides for the grid metadata.

  • name (str, optional) – The name of the cell ids coordinate.

  • index_options (mapping of str to Any, optional) – Additional options for the index.

Returns:

decoded (xarray.Dataset) – The decoded dataset with a DGGSIndex.