-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
aggregationRerlating to metadata-based field and domain aggregationRerlating to metadata-based field and domain aggregationbugSomething isn't workingSomething isn't working
Milestone
Description
At v3.11.0 (and all other versions since 3.0.0) , cf.aggregate
fails when creating new axes for each input field from one or more given properties, using the dimension
keyword argument:
>>> import cf
>>> print (cf.__version__)
3.11.0
>>> f = cf.example_field(0)
>>> g = f.copy()
>>> f.set_property('sim', 'r1i1p1f1')
>>> g.set_property('sim', 'r2i1p1f1')
>>> a = cf.aggregate([f, g], dimension='sim')
Traceback (most recent call last):
File "agg.py", line 20, in <module>
a = cf.aggregate([f, g], dimension='sim')[0]
File "/home/david/NCAS-CMS/cfdm/cfdm/decorators.py", line 171, in verbose_override_wrapper
return method_with_verbose_kwarg(*args, **kwargs)
File "/home/david/cf-python/cf/aggregate.py", line 1721, in aggregate
meta = _Meta(
File "/home/david/cf-python/cf/aggregate.py", line 355, in __init__
aux_coords = {
File "/home/david/cf-python/cf/aggregate.py", line 358, in <dictcomp>
if axis in construct_axes[aux]
KeyError: 'auxiliarycoordinate0'
This is simply a bug in code that was not covered by the units tests. PR fix to follow.
Thank you to @bnlawrence for originally spotting this.
sadielbartholomew
Metadata
Metadata
Assignees
Labels
aggregationRerlating to metadata-based field and domain aggregationRerlating to metadata-based field and domain aggregationbugSomething isn't workingSomething isn't working