Clusters and Cloud Products

class ceda_datapoint.core.cloud.DataPointMapper(mappings: dict = None, id: str = None)[source]

Mapper object for calling specific properties of an item

set_id(id: str) None[source]

Set the ID for this mapper - cosmetic only

get(key: str, stac_object: object) str[source]

Mapper.index(‘assets’,stac_object)

class ceda_datapoint.core.cloud.DataPointCloudProduct(asset_stac: dict, id: str = None, cf: str = None, order: int = None, mode: str = 'xarray', meta: dict = None, stac_attrs: dict = None, properties: dict = None, mapper: DataPointMapper = None)[source]

Object for storing and manipulating a single cloud product i.e Kerchunk/Zarr/CFA.

property cloud_format: str

Read-only property

property href: str

Read-only href property

help() None[source]

Display public methods for this object.

info() None[source]

Display information about this object

open_dataset(local_only: bool = False, **kwargs) Dataset[source]

Open the dataset for this product (in xarray). Specific methods to open cloud formats are private since the method should be determined by internal values not user input.

Parameters:

local_only – (bool) Switch to using local-only files - DataPoint will convert all hrefs and internal Kerchunk links to use local paths.

class ceda_datapoint.core.cloud.DataPointCluster(products: list, parent_id: str = None, meta: dict = None, local_only: bool = False, show_unreachable: bool = False)[source]

A set of non-combined datasets opened using the DataPointSearch to_dataset() method. Has some additional properties over a list of datasets.

property products: list[ceda_datapoint.core.cloud.DataPointCloudProduct]

List of products contained within this cluster

help() None[source]

Helper function - lists methods that can be utilised for this class

info() None[source]

Information about this object instance.

open_dataset(id: str, mode: str = 'xarray', local_only: bool = False, **kwargs) Dataset[source]

Open a dataset from within this cluster’s cloud products. A dataset can be indexed either by id or position within this cluster’s set of datasets.

Parameters:
  • id – (str) The ID or index of the dataset in the resulting cluster.

  • mode – (str) The type of dataset to be returned, currently only Xarray is supported (0.3.X)

  • local_only – (bool) Switch to using local-only files - DataPoint will convert all hrefs and internal Kerchunk links to use local paths.