esmvaltool/preprocessor/_io.py
def _fix_cube_attributes(cubes):
    """Unify attributes of different cubes to allow concatenation."""
    attributes = {}
    for cube in cubes:
        for (attr, val) in cube.attributes.items():
            if attr not in attributes:
                attributes[attr] = val
            else:
                if not np.array_equal(val, attributes[attr]):
                    attributes[attr] = '{};{}'.format(
                        str(attributes[attr]), str(val))
    for cube in cubes:
        cube.attributes = attributes
Unify attributes of different cubes to allow concatenation.
Unify attributes of different cubes to allow concatenation.
Unify attributes of different cubes to allow concatenation .
def _fix_cube_attributes(cubes):
    attributes = {}
    for cube in cubes:
        for (attr, val) in cube.attributes.items():
            if attr not in attributes:
                attributes[attr] = val
            else:
                if not np.array_equal(val, attributes[attr]):
                    attributes[attr] = '{};{}'.format(
                        str(attributes[attr]), str(val))
    for cube in cubes:
        cube.attributes = attributes
def _fix_cube_attributes ( cubes ) : attributes = { } for cube in cubes : for ( attr , val ) in cube . attributes . items ( ) : if attr not in attributes : attributes [ attr ] = val else : if not np . array_equal ( val , attributes [ attr ] ) : attributes [ attr ] = '{};{}' . format ( str ( attributes [ attr ] ) , str ( val ) ) for cube in cubes : cube . attributes = attributes
Unify attributes of different cubes to allow concatenation.
Unify attributes of different cubes to allow concatenation .
"""Unify attributes of different cubes to allow concatenation."""
cubes