Skip to content

2031 uxgrid vertical search#2032

Merged
fluidnumericsJoe merged 14 commits into
v4-devfrom
2031-uxgrid-vertical-search
Jun 16, 2025
Merged

2031 uxgrid vertical search#2032
fluidnumericsJoe merged 14 commits into
v4-devfrom
2031-uxgrid-vertical-search

Conversation

@fluidnumericsJoe

@fluidnumericsJoe fluidnumericsJoe commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

This PR introduces changes that enable vertical search for unstructured Grids. This currently assumes that z-layer coordinates are used with no partial or shaved cells.

For the vertical interpolation, we now test interpolation of fields that are uniform in space and time and those that vary linearly with depth.

Additionally, fixes are introduced in the application_kernels/interpolation.py that resolve previous test failures for test_fesom2_square_delaunay_uniform_z_coordinate_eval

@fluidnumericsJoe

Copy link
Copy Markdown
Contributor Author

@VeckoTheGecko - The piecewise linear interpolation is still broken on unstructured grid due to some strange indexing/memory error. However, this should give a gist of what could be done to enable vertical search and would be a good first cut for FESOM2 demos.

I have a few more tests I'd like to put in to make sure that at least piecewise constant is correct for fields that are linear in z . Further, it'd be good to get your other branches merged in before this one.

Comment thread parcels/uxgrid.py Outdated
@github-project-automation github-project-automation Bot moved this from Backlog to Ready in Parcels development Jun 10, 2025
This commit adds a test case to verify we can exactly interpolate fields
that depend linearly on z. Additionally, this commit fixes the
previously failing `test_fesom2_square_delaunay_uniform_z_coordinate_eval`.

The fix for the apparent memory bug is to reference `field.values`
@fluidnumericsJoe fluidnumericsJoe changed the title [DRAFT] 2031 uxgrid vertical search 2031 uxgrid vertical search Jun 11, 2025
@fluidnumericsJoe fluidnumericsJoe linked an issue Jun 11, 2025 that may be closed by this pull request
@fluidnumericsJoe fluidnumericsJoe marked this pull request as ready for review June 11, 2025 14:28
@fluidnumericsJoe

Copy link
Copy Markdown
Contributor Author

On the unit test that is failing. when I run the full suite of v4 tests, it fails. When I call it directly, it does not fail. I'm looking into this

@fluidnumericsJoe

Copy link
Copy Markdown
Contributor Author

On the unit test that is failing. when I run the full suite of v4 tests, it fails. When I call it directly, it does not fail. I'm looking into this

In the new test I incorporated, updating the data set to modify values changes the expected values for tests called after it. Looking into a workaround here

@VeckoTheGecko

This comment was marked as off-topic.

@fluidnumericsJoe

Copy link
Copy Markdown
Contributor Author

Indeed this was test pollution. For one of the tests, I was overwriting the values stored by the pressure and vertical velocity; tests that were run later on that also used the same dataset ended up failing assertions due to the change in the underlying data.

Solution here was to do a deep copy of the dataset for the test where pressure and vertical velocity are modified, rather than using the dataset provided by our _datasets/unstructured/generic.py directly. All should be good now

@fluidnumericsJoe fluidnumericsJoe merged commit 3cb3746 into v4-dev Jun 16, 2025
6 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Vertical Search for unstructured Grids

2 participants