-
Notifications
You must be signed in to change notification settings - Fork 298
ENH: Optimisation of regrid. #1431
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
Conversation
|
Please could you share your findings on the impact of this change - thanks. |
|
In my profiling, looking at primarily a 30second (21600, 43200) source regridded to N96 (145, 192) or N216 (325, 432). The three most expensive contributors to the regrid are _cropped_bounds (PR to come), _within_bounds and ma_average calls. This accounts for ~30%, ~25% for the _cropped_bounds and _within_bounds (these figures are explicitly for regrid - I have factored out the touching of data by doing this beforehand). Though results will depend on the src and target grids, going from the 30second to the N96 with this vectorisation and caching yields a 15% speedup. This will make a dramatic difference to systems in place we hope to replace which perform a similar caching. |
|
Thanks @cpelley - that sets the scene nicely. |
|
No problem, cheers @rhattersley |
lib/iris/experimental/regrid.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably drop this comment as you've added it later.
|
Thank you for your interest @esc24, I have made the suggested changes. |
|
oh dear: Looks like a conda bug? interesting how this doesn't appear to be happening on PRs pointing to master though. Does anyone know about this or should I continue to investigate? |
It's OK - see #1441. You just need a rebase. |
af6a793 to
45105fe
Compare
|
I have cherry-picked your commit. Should be all good now thanks @rhattersley |
|
Is there anything I can do to get help these PRs along? If there is any further information required, please let me know. |
|
Thanks @esc24 thats great! |
Vectorised and cached bounds checking.
15% speedup going from 30second (21600, 43200) source to N96 (145, 192)