$ python test_agg.py
------------------
original_cube (w: 3; z: 3; y: 3; x: 3)
Dimension coordinates:
w x - - -
z - x - -
y - - x -
x - - - x
shape (3, 3, 3, 3)
------------------
aggregated_cube (*ANONYMOUS*: 3; z: 3; y: 3; x: 3)
Dimension coordinates:
z - x - -
y - - x -
x - - - x
Auxiliary coordinates:
w x - - -
Attributes:
history: Mean of original_cube aggregated over w
Cell methods:
mean: w
shape (3, 3, 3, 3)
Cube.aggregated_by() appears to be broken.
The aggregated data dimension is not being collapsed.
https://github.com/bblay/iris_issue_files/blob/master/test_agg.py