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

Allow zero-sized interpolation target functionspace #206

Conversation

odlomax
Copy link
Contributor

@odlomax odlomax commented Jun 6, 2024

This PR addresses Atlas issue #205, and is needed for jcsda/oops issue #2264.

The SphericalVector and Structured2D interpolation methods can now be called with empty target functionspaces. Also tested are the finite-element and cubedsphere interpolation methods.

@odlomax odlomax changed the title Bugfix/allow zero-sized interpolation target functionspace Allow zero-sized interpolation target functionspace Jun 6, 2024
Copy link
Member

@wdeconinck wdeconinck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good to me! I think there were already some guards like this in place, but probably only added in the methods where the issues were encountered and tested.

@odlomax
Copy link
Contributor Author

odlomax commented Jun 7, 2024

That looks good to me! I think there were already some guards like this in place, but probably only added in the methods where the issues were encountered and tested.

That's all we can do, really! I think the main hurdle was tweaking the adjoint checks so that they're not over reliant on checking for a matrix. I suspect we're the only folks who use that functionally.

@wdeconinck wdeconinck force-pushed the bugfix/allow_zero_sized_interpolation_target_functionspace branch from 6c1a464 to 5fada06 Compare June 7, 2024 09:36
@wdeconinck wdeconinck merged commit 92d1a07 into ecmwf:develop Jun 7, 2024
21 checks passed
@fmahebert
Copy link
Contributor

@odlomax Thanks for this!

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

Successfully merging this pull request may close these issues.

3 participants