Skip to content

bindings: move swap from Fortran to Python#1115

Closed
havogt wants to merge 6 commits intomainfrom
blueline_swap_rbf_vec_coeff_e_and_v
Closed

bindings: move swap from Fortran to Python#1115
havogt wants to merge 6 commits intomainfrom
blueline_swap_rbf_vec_coeff_e_and_v

Conversation

@havogt
Copy link
Contributor

@havogt havogt commented Mar 18, 2026

Needs updated serialized data. See https://github.com/C2SM/icon-exclaim/pull/428

@havogt havogt requested review from jcanton and muellch March 18, 2026 10:46
Copy link
Contributor

@muellch muellch left a comment

Choose a reason for hiding this comment

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

Looks good, I left one suggestion to improve variable names.


# Create separate fields for the two components of the RBF vector coefficients and swap.
# TODO(havogt): we could use GT4Py's named collections.
rbf_coeff_1 = gtx.as_field(
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we should rename those from rbf_coeff_1 to rbf_vec_coeff_v_1 or rbf_coeff_v_1 so it is clear it is the vertex coefficients. There are also edge and cell coeffs ...

Copy link
Contributor

Choose a reason for hiding this comment

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

We could also do this later, now these names are icon4py internal?

@github-actions
Copy link

Mandatory Tests

Please make sure you run these tests via comment before you merge!

  • cscs-ci run default
  • cscs-ci run distributed

Optional Tests

To run benchmarks you can use:

  • cscs-ci run benchmark-bencher

To run tests and benchmarks with the DaCe backend you can use:

  • cscs-ci run dace

To run test levels ignored by the default test suite (mostly simple datatest for static fields computations) you can use:

  • cscs-ci run extra

For more detailed information please look at CI in the EXCLAIM universe.

havogt added a commit that referenced this pull request Mar 25, 2026
…#1119)

Combines #1118 and #1115, because both require `v3` serialized data:
- Move computation of `vertoffset_gradp` from `vertidx_gradp` to Python
(index2offset)
- Move transpose (and decomposition) of `rbf_vec_coeff_v` and
`rbf_vec_coeff_e` to Python

Additional:
- Add missing halo exchange to `compute_zdiff_gradp` (test failure
triggered by new serialized data, most likely unrelated to the other
changes)
- Refactor `kflip_wgtfacq` to a more general `flip` on fields
@havogt
Copy link
Contributor Author

havogt commented Mar 25, 2026

merged in #1119

@havogt havogt closed this Mar 25, 2026
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.

2 participants