Skip to content

Conversation

@jcanton
Copy link
Contributor

@jcanton jcanton commented Dec 1, 2025

Based upon #953 #954 and #957 by @msimberg
Adds torus support to geometry, RBF and interpolation.
Also adds torus grids to all datatests

msimberg and others added 5 commits November 19, 2025 14:39
* main:
  Update DaCe version (#962)
  blueline: move vertical grid to grid_wrapper, add flat_height (#956)
  CI testdata moved to `cwci02` project (#960)
  Bump actions/checkout from 5 to 6 (#955)
  Test fixes for  metrics fields (#949)
  Remove pytest-deadfixtures from test dependency (#950)
  Revert "Add debug info to stencil tests"
  Add debug info to stencil tests
@jcanton jcanton closed this Dec 1, 2025
@jcanton jcanton reopened this Dec 1, 2025
…nto better-torus-support-metrics

* origin/better-torus-support-geometry:
  Apply suggestion from @msimberg
@jcanton jcanton changed the title Better torus support metrics Better torus support Dec 1, 2025
@jcanton
Copy link
Contributor Author

jcanton commented Dec 11, 2025

cscs-ci run default

Comment on lines +238 to +249
return (
tangent_x,
tangent_y,
tangent_z,
tangent_u,
tangent_v,
normal_x,
normal_y,
normal_z,
normal_u,
normal_v,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

here why we cannot just return the components on x and y. I think u and v are just the copy of them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we could but it does not make a difference in terms of memory usage to do it here (and doing it in other places makes it less readable IMO)

@msimberg
Copy link
Contributor

cscs-ci run default

Copy link
Contributor

@msimberg msimberg left a comment

Choose a reason for hiding this comment

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

I'm a bit blind to my own changes, but @jcanton improvements look very good to me.

I only have a few minor requests for changes.

* main:
  Update dace version to tag 2025_12_11 (#983)
  update gt4py version in standalone driver (#977)
  [greenline] standalone driver for jw test case (#902)
  Fix second call to mo_intp_rbf_rbf_vec_interpol_vertex in diffusion (#974)
  Bump actions/cache from 4 to 5 (#975)
@jcanton
Copy link
Contributor Author

jcanton commented Dec 23, 2025

cscs-ci run default

@jcanton
Copy link
Contributor Author

jcanton commented Dec 24, 2025

cscs-ci run default

"""
return distance_on_edges_torus(
vertex_x(E2C2V[2]),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suddenly, I am thinking if is it better to define far indices in icon.py as a enum class or global constants or something else instead of putting a hardcoded number here, such as
E2C2V_NEIGHBOR_INDEX1 = 0
E2C2V_NEIGHBOR_INDEX2 = 1
E2C2V_FAR_INDEX1 = 2
E2C2V_FAR_INDEX2 = 3
(I do not remember whether gt4py allows that or not, and I put this comment because it seems that the figure in the docstring of arc_distance_of_far_edges_in_diamond seems to be inconsistent with the actual indices, leading to confusion. If we have a universal definition, then it will be clearer)

Copy link
Contributor Author

@jcanton jcanton Dec 29, 2025

Choose a reason for hiding this comment

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

I fixed the docstsring, nice catch!
I tried some ways (constants, enum class) to move the indexes to some named variable but gt4py doesn't like it, and I cannot find any other field_operator that does this so I am guessing this is not supported, right @havogt ?

@jcanton
Copy link
Contributor Author

jcanton commented Dec 29, 2025

cscs-ci run default

@jcanton
Copy link
Contributor Author

jcanton commented Dec 29, 2025

cscs-ci run default

@jcanton jcanton requested review from OngChia and msimberg December 29, 2025 13:49
@jcanton
Copy link
Contributor Author

jcanton commented Dec 30, 2025

cscs-ci run default

@jcanton jcanton removed the request for review from halungge December 30, 2025 10:27
Copy link
Contributor

@msimberg msimberg 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 to me, thank you @jcanton!

Some of @OngChia's comments are still useful to address in my opinion, so leaving final approval to him.

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Mandatory Tests

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

  • cscs-ci run default

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.

@jcanton
Copy link
Contributor Author

jcanton commented Jan 5, 2026

cscs-ci run default

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.

5 participants