Speed up landice gridded_flood_fill with scipy.ndimage#948
Speed up landice gridded_flood_fill with scipy.ndimage#948matthewhoffman merged 2 commits intoMPAS-Dev:mainfrom
gridded_flood_fill with scipy.ndimage#948Conversation
TestingWhen using the I still need to confirm that these result in similar masks. |
Speed up gridded_flood_fill with scipy.ndimage instead of nested loops. For the antarctica_8km_2024_01_29.nc, this reduced the time from about 7s to 0.005s. This could make it much more manageable to use high-resolution gridded data sets to determine cell spacing for large meshes.
20fa45e to
bfdd243
Compare
matthewhoffman
left a comment
There was a problem hiding this comment.
@trhille , this looks great, and thanks for adding the test showing no answers change. CI is failing for some unrelated reason, so once I sort that out, I will merge.
|
@xylar , it looks like the CI is failing when trying to build jigsaw. I forced the CI to rerun and got the same error. I'm confused because this branch is based on main, and the CI appeared to pass on the most recent PR. I can dig deeper, but wanted to check if you had any insight into this, as I know it happens periodically. |
|
The way of building jigsaw changes (or can change) in #944. I don't really want to debug the "old" way of building jigsaw. |
|
Based on group discussion, merging without CI passing. |

Speed up gridded_flood_fill with scipy.ndimage instead of nested loops. For the antarctica_8km_2024_01_29.nc, this reduced the time from about 7s to 0.005s. This could make it much more manageable to use high-resolution gridded data sets to determine cell spacing for large meshes.
Checklist
Testingin this PR) any testing that was used to verify the changes