Stream: hack-projects

Topic: Alternative pop_tools.lateral_fill


view this post on Zulip Frank Bryan (May 22 2020 at 19:09):

I am looking at implementing an alternative to the current version of pop_tools.lateral_fill that uses a SOR solution of the Laplace equation to do the filling. It has the potential advantage of being easily implemented in array syntax without looping or conditionals in the iteration loop (other than checking for convergence). First step is to figure out how to wrap an old F90 version of this algorithm to be callable from python (question posted in the jupyter channel). Next will be an implementation in pure xarray.

view this post on Zulip Deepak Cherian (May 22 2020 at 19:13):

it may be easier to port the loopy Fortran version to pure python and then compile with numba rather than convert to array syntax

view this post on Zulip Matt Long (May 22 2020 at 19:15):

Agreed. This is the way that the current smoother is implemented
https://github.com/matt-long/pop-tools/blob/master/pop_tools/fill.py

view this post on Zulip Matt Long (May 22 2020 at 19:17):

@Frank Bryan, note that this provides a generic xarray interface, so your task would be confined to a pure numpy implementation.


Last updated: May 16 2025 at 17:14 UTC