Currently, the boundary conditions are specified as:
sf = invert_Poisson(vor, dims=['lat', 'lon'], BCs=['fixed', 'periodic'])
which means the north-south BCs are all fixed and east-west BCs are periodic. This is not flexible enough if one wants the north BC as the 'fixed' one while the south BC as the 'extend' or 'reflect' one.
One possible solution is to use dict to specify BCs as:
sf = invert_Poisson(vor, dims=['lat', 'lon'], BCs={'lat':('fixed'. 'extend'), 'lon':('periodic', 'periodic')})
Also, I am thinking if the underlying algorithm should be refactored as two steps: 1) pad the domain with proper BCs and 2) iterate for the solution. But this may cause some problems if BCs are at 1) poles and 2) vortex center where coordinates are undefined.
Currently, the boundary conditions are specified as:
which means the north-south BCs are all fixed and east-west BCs are periodic. This is not flexible enough if one wants the north BC as the 'fixed' one while the south BC as the 'extend' or 'reflect' one.
One possible solution is to use dict to specify BCs as:
Also, I am thinking if the underlying algorithm should be refactored as two steps: 1) pad the domain with proper BCs and 2) iterate for the solution. But this may cause some problems if BCs are at 1) poles and 2) vortex center where coordinates are undefined.