Skip to content

Masked array performance #3470

@bjlittle

Description

@bjlittle

Given #3301 and SciTools/iris-agg-regrid#37 we should consider whether masked arrays with no masked points should be automatically converted to ordinary ndarrays for obvious performance benefits.

Note that python-netcdf4 now automatically always returns masked arrays.

This could be considered as a breaking change in iris behaviour, and so puts it plum in 3.0.0 territory.


As a user of iris, I want comparable regridding performance when using masked array data where no points are masked (i.e. mask=False) and non-masked arrays. I would also like to have the ability to apply this functionality to other areas of my code if I deem it necessary.

I would like the capacility to be avilable to users to apply else where in their code.

Acceptance Criteria

  • Create a function/decorator that can be applied to my iris function to give equivalent performance if my cube data is masked, but the mask is False.
  • The output cube data should remain masked if it was originally masked. Remain unmasked if originally unmasked.
  • The function/decorator is applied to appropriate iris regridding methods.
  • Have an ASV benchmark to prove the benefits of the solution.
  • The new functionality should be in the what's new.
  • The new functionality is documented in the user guide.

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions