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

Propagated unpadded coords in pad #583

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TomNicholas
Copy link
Contributor

@TomNicholas
Copy link
Contributor Author

@jbusecke to fix #575 we need to change _strip_all_coords to instead strip only the coords which are a function of the padded dimensions. Therefore we need a function like

def _strip_axis_coords(da, padding_axes):
   ...

For _pad_basic this is fine, but for face-connected grids its the implementation is a bit more complicated because pad_axes is not known until after you know you have a face-connected grid.

Instead how about we move the coordinate stripping inside of _pad_basic?

@jbusecke
Copy link
Contributor

For _pad_basic this is fine, but for face-connected grids its the implementation is a bit more complicated because pad_axes is not known until after you know you have a face-connected grid.

I am not sure I follow this entirely. But could we do something like this:

def _strip_all_axis_coords(da, grid):
    # get rid of any dim that is associated with a grid axis
   ...

If I understand this correctly, the problem was not with dims associated with an axis that is not being padded, but instead with dims that are not associated with any axis? This approach would strip more than is needed, but would still probably work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Time coordinate being dropped by apply_as_grid_ufunc
2 participants