Open jfrost-mo opened 3 months ago
@jfrost-mo I will probably create a branch to update the regrid operator to handle a cubelist (realise this issue is for operators more generally). Reason for this is that to implement regrid caching, for one of the functions I need this capability (see comment in #720). Mentioning here to avoid duplication in case you start this work on all operators including regrid!
That sounds good. We probably want a few different branches for the different operators that need conversion to make reviewing easy.
What problem does your feature request solve?
Currently there is not a good way to run operators that only take a single cube over all cubes in a CubeList. For example, regridding.
Describe the solution you'd like
These operators should be expanded to handle a CubeList. This should be done by looping over the cubes inside the operator, before returning another CubeList of the processed cubes.
Describe alternatives you've considered
We could add another operator to loop the existing single cube operators. It would have a signature similar to this:
I'm tempted to avoid it however, as it makes recipes harder to understand, and this functionality is part of making an operator more valuable than the underlying iris code. Looping within the operators also unlocks opportunities, like caching the regridder in #720.