gordias.config.get_transfer_configuration_attributes#

gordias.config.get_transfer_configuration_attributes(cubes: CubeList, transfer: list[InputTransferConfiguration]) tuple[dict[str, str], list[str]]#

Create transfer attributes from the transfer configuration.

Collects values from the cubes and returns a dictionary containing all transfer attributes and a list containing attributes that could not be found in all cubes.

Parameters:
  • cubes (iris.cube.CubeList) – A list of cubes.

  • transfer (list[InputTransferConfiguration]) – A list containing InputTransferConfiguration objects that describes the transfer configuration for the global attributes in the input files.

Returns:

  • attribute_dict (dict[str, str]) – A dictionary containing all transfer attributes defined by the configurations.

  • attributes_not_found (list[str]) – A list of string containing global attributes that could not be found in all cubes.

Raises:

ValueError – If a attribute defined in the configuration could not be found.