Fix for cf.aggregate failures when field units are non-valid#233
Fix for cf.aggregate failures when field units are non-valid#233davidhassell merged 3 commits intoNCAS-CMS:masterfrom
Conversation
sadielbartholomew
left a comment
There was a problem hiding this comment.
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.
sadielbartholomew
left a comment
There was a problem hiding this comment.
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.
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Fixes: #229