Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle CubeLists in all operators that operate on Cubes #721

Open
3 of 17 tasks
jfrost-mo opened this issue Jul 1, 2024 · 2 comments
Open
3 of 17 tasks

Handle CubeLists in all operators that operate on Cubes #721

jfrost-mo opened this issue Jul 1, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request super Parent issue tracking multiple sub issues

Comments

@jfrost-mo
Copy link
Member

jfrost-mo commented Jul 1, 2024

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. This will then be able to read_cubes directly on multiple models.

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:

- operator: misc.apply_to_all
  operator_to_apply: regrid.regrid_onto_xyspacing
  args:
    xspacing: 0.5
    yspacing: 0.5

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.

Individual tracking issues:

@jwarner8
Copy link
Contributor

jwarner8 commented Jul 4, 2024

@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!

@jfrost-mo
Copy link
Member Author

That sounds good. We probably want a few different branches for the different operators that need conversion to make reviewing easy.

@jfrost-mo jfrost-mo added the super Parent issue tracking multiple sub issues label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request super Parent issue tracking multiple sub issues
Projects
None yet
Development

No branches or pull requests

2 participants