Skip to content

ix bug that caused weighted cf.collapse and cf.weights to fail when a cell meausures has a size 1 axis#954

Merged
davidhassell merged 3 commits into
NCAS-CMS:mainfrom
davidhassell:volume-cell-measure
Jun 17, 2026
Merged

ix bug that caused weighted cf.collapse and cf.weights to fail when a cell meausures has a size 1 axis#954
davidhassell merged 3 commits into
NCAS-CMS:mainfrom
davidhassell:volume-cell-measure

Conversation

@davidhassell

Copy link
Copy Markdown
Collaborator

Fixes #952

@davidhassell davidhassell added this to the NEXTVERSION milestone Jun 12, 2026
@davidhassell davidhassell added the bug Something isn't working label Jun 12, 2026

@sadielbartholomew sadielbartholomew left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(Assuming we get Dan's permission to use his data file in the test suite), all good.

The only thing I'd comment before saying merge away is that the sample data file Dan provided has all masked data (I guess from context it's a small subspace of a ocean field masked over land?) and for testing purposes it might be better to have it or a similar dataset with at least some unmasked elements (unless a fully-masked dataset is useful in itself for testing on, perhaps?). Otherwise we could assume something went wrong when using it for testing. But maybe I'm overthinking it...

@davidhassell

Copy link
Copy Markdown
Collaborator Author

Thanks, Sadie,

I think this issue is all about the metadata, so no need to change the data array in the file. We can always do that in via cf-python if ever we want to.

@davidhassell davidhassell merged commit 6d8704e into NCAS-CMS:main Jun 17, 2026
1 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cf.Field.collapse() fails when computing a volume mean where the volume cell measure is time-dependant

2 participants