dataio.case module

class CreateCaseMetadata(config, rootfolder, casename, caseuser, description=None)[source]

Bases: object

Create metadata for an FMU Case.

In ERT this is typically ran as an hook workflow in advance.

Parameters:
  • config (dict) – A configuration dictionary. In the standard case this is read from FMU global variables (via fmuconfig). The dictionary must contain some predefined main level keys. If config is None or the env variable FMU_GLOBAL_CONFIG pointing to a file is provided, then it will attempt to parse that file instead.

  • rootfolder (str | Path) – Absolute path to the case root, including case name.

  • casename (str) – Name of case (experiment)

  • caseuser (str) – Username provided

  • description (Optional) – Description text as string or list of strings.

config: dict
rootfolder: str | Path
casename: str
caseuser: str
description: Union[str, list, None] = None
generate_metadata()[source]

Generate case metadata.

Return type:

dict

Returns:

A dictionary with case metadata or an empty dictionary if the metadata already exists.

export()[source]

Export case metadata to file.

Return type:

str

Returns:

Full path of metadata file.