Skip to content

Conversation

davidhassell
Copy link
Collaborator

Fixes: #229

Copy link
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good. As indicated for the desired solution in the corresponding issue:

cf.aggregate needs to return, unaggregated, the fields with bad units, and report that it has done so

which has been achieved here, as tested by applying override_units("mangoes", inplace=True) on a field and observing that it reports Unaggregatable 'eastward_wind' fields have been output: Non-valid units <Units: mangoes> upon unsuccessful (without erroring) attempt to aggregate it with itself.

I have made one optional minor suggestion made not pertaining to the functionality, as below.

Copy link
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, ignore the conclusion from my previous review comment, sorry - I meant to say we could do with a test for the bad units case to check for the right result and log message! I suppose that could be added in a later PR, though.

@davidhassell davidhassell merged commit 13a1cb8 into NCAS-CMS:master Jul 14, 2021
@davidhassell davidhassell added this to the 3.11.0 milestone Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cf.aggregate fails when field units are non-valid
2 participants