dataio.aggregation module

class AggregatedData(aggregation_id=None, casepath=None, source_metadata=<factory>, name='', operation='', tagname='', verbosity='DEPRECATED')[source]

Bases: object

Instantate AggregatedData object.

Parameters:
  • aggregation_id (Optional[str]) – Give an explicit ID for the aggregation. If None, an ID will be

  • uuids. (made based on existing realization)

  • casepath (Union[str, Path, None]) – The root folder to the case, default is None. If None, the casepath is derived from the first input metadata paths (cf. source_metadata) if possible. If given explicitly, the physical casepath folder must exist in advance, otherwise a ValueError will be raised.

  • source_metadata (list) – A list of individual metadata dictionarys, coming from the valid metadata per input element that forms the aggregation.

  • operation (str) – A string that describes the operation, e.g. “mean”. This is mandatory and there is no default.

  • tagname (str) – Additional name, as part of file name

meta_format: ClassVar[Optional[Literal['yaml', 'json']]] = None
aggregation_id: Optional[str] = None
casepath: Union[str, Path, None] = None
source_metadata: list
name: str = ''
operation: str = ''
tagname: str = ''
verbosity: str = 'DEPRECATED'
generate_metadata(obj, compute_md5=True, skip_null=True, **kwargs)[source]

Generate metadata for the aggregated data.

This is a quite different and much simpler operation than the ExportData() version, as here most metadata for each input element are already known. Hence, the metadata for the first element in the input list is used as template.

Parameters:
  • obj – The map, 3D grid, table, etc instance.

  • compute_md5 – If True, an md5 sum for the file will be created. This involves a temporary export of the data, and may be time consuming for large data.

  • skip_null – This input parameter has been deprecated. If set to False, a deprecation warning will be raised.

  • **kwargs – See AggregatedData() arguments; initial will be overridden by settings here.

generate_aggregation_metadata(obj, compute_md5=True, skip_null=True, **kwargs)[source]

Alias method name, see generate_metadata

export(obj, **kwargs)[source]

Export aggregated file with metadata to file.

Parameters:
  • obj – Aggregated object to export, e.g. a XTGeo RegularSurface

  • **kwargs – See AggregatedData() arguments; initial will be overridden by settings here.

Returns:

full path to exported item.

Return type:

String