Add stencil support for LFRic domain kernels (#1948) - #3572
Draft
arporter wants to merge 14 commits into
Draft
Conversation
Domain kernels (operates_on = domain) can now use stencil arguments on read-only field inputs. The PSy layer generates full stencil arrays for the entire domain, and these are now correctly passed to domain kernels instead of being rejected at parse time. Changes: - Remove parser restriction that rejected stencils in domain kernels (lfric_arg_descriptor.py) - Add domain-specific stencil methods in kern_call_arg_list.py: * stencil_unknown_extent_domain() * stencil_2d_unknown_extent_domain() * stencil_2d_max_extent_domain() * stencil_domain() * stencil_2d_domain() - Update argument ordering in arg_ordering.py to dispatch to appropriate stencil methods based on kernel type (domain vs column) - Update test: rename test_no_stencil_domain_kernel() to test_stencil_domain_kernel() to verify stencils now work Key difference from column kernels: - Column kernels: receive scalar/indexed stencil values per column - Domain kernels: receive full stencil arrays for all domain cells All 106 related tests pass successfully. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3572 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 399 399
Lines 56181 56200 +19
=========================================
+ Hits 56181 56200 +19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… minimal stub-symbol-table tags (fixes #1948)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
This is my first attempt at using AI (copilot) to do feature development. I've now burnt my monthly free allocation so it's back to the old way... |
…l is invoked without args
Member
Author
|
I'm in the process of extending eg5 to include a domain kernel and also making it compile. I'm still having some trouble determining what the ranks of the various stencil-related args should be. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements stencil support for LFRic domain kernels (issue #1948). It removes the previous restriction that rejected stencil arguments for domain kernels and updates argument passing so domain kernels receive full stencil arrays (rank-3/4) rather than column-indexed slices. Tests added/updated and linting passed.\n\nChanges:\n- Remove parser restriction rejecting domain kernel stencils\n- Add domain-specific stencil arg-building methods\n- Dispatch arg ordering based on kernel type\n- Update tests\n\nAll related tests pass locally (1373 passed, 21 xfailed).