Skip to content

Conversation

@fluidnumerics-joe
Copy link
Contributor

@fluidnumerics-joe fluidnumerics-joe commented Jan 7, 2026

This PR adds FieldSet.from_icon to support easy loading of data from the ICON model. Resolves #2425
In the process of adding this support, the following additional changes were made

  • Unstructured grid Interpolation scheme naming convention has been updated to follow Ux<lateral type><face|node|edge><vertical type><ZF | ZC> where <lateral type> is the type of interpolation applied in the lateral directions (e.g. "Constant" or "Linear") and <vertical type> is the type of interpolation applied in the vertical direction . The choice of face, node, or edge indicates where data is registered laterally and the choice of ZF or ZC indicates where data is registered vertically.
  • Additional default interpolation schemes were added to support the data placement in the sample provided by a Parcels community member mentioned in Add support for ICON model output #2425
  • Add correctness tests for additional interpolation kernels. This will be accomplished using constant, bilinear, and trilinear functions to prove exactness of the provided interpolation methods (no convergence testing will be conducted in this PR).
  • Changed the 2d triangle area to a signed area to prevent false positives that were found in new tests with generic icon data
  • Changed unstructured generic data types to fp64 to reduce floating point errors in barycentric interpolation for assessing exactness of interpolation schemes
  • Updated relevant notebooks with information on new interpolation methods.

`zc` refers to the vertical center and `zf` refers to the vertical
interface

I've also relaxed the requirement that the Conventions attribute be
defined; having this convention defined in the uxdataarray doesn't imply
compliance with a given convention..
New interpolator naming convention for unstructured grids will follow
Ux<lateral type><face|node|edge><vertical type><ZF | ZC> where
lateral type is the type of interpolation applied in the lateral
directions (e.g. "Constant" or "Linear") and vertical type is the type
of interpolation applied in the vertical direction .

The choice of face, node, or edge indicates where data is registered
laterally and the choice of ZF or ZC indicates where data is registered
vertically.
fluidnumerics-joe and others added 11 commits January 8, 2026 14:33
Still sorting out an issue with the linear node constant z interpolator
Also adjusted the test function for barycentric interpolation to an
affine function of lat and lon (f=a*lon + b*lat); Affine functions are
exact for barycentric interpolation while product (f=a*lon*lat) are not
exact since the second derivative (the leading truncation error) is
non-zero.
Signed areas in 2-D help ensure that we don't have false positives.
Since uxarray ensures consistent winding direction among elements, this
is a safe change to make that also helps prevent edge cases of finding
points in a cell that are not actually in the cell.
I suspect a library under the hood (a uxarray dependency) changed
causing a change in the output of the delaunay triangulation. Note that
delaunay triangulations are not unique (there is more than one possible
triangulation possible).
@fluidnumerics-joe fluidnumerics-joe changed the title [DRAFT] Feature/from icon Feature/from icon Jan 9, 2026
@fluidnumerics-joe fluidnumerics-joe marked this pull request as ready for review January 9, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Add support for ICON model output

2 participants