Skip to content

Patch no time interval index search - #2050

Merged
fluidnumericsJoe merged 3 commits into
v4-devfrom
patch-no-time-interval-index-search
Jun 27, 2025
Merged

Patch no time interval index search#2050
fluidnumericsJoe merged 3 commits into
v4-devfrom
patch-no-time-interval-index-search

Conversation

@fluidnumericsJoe

@fluidnumericsJoe fluidnumericsJoe commented Jun 27, 2025

Copy link
Copy Markdown
Contributor
  • [ X ] Chose the correct base branch (main for v3 changes, v4-dev for v4 changes)
  • [ X ] Added tests

This PR brings in the following changes

  • The _search_time_index now returns a tuple corresponding to both the time index and the time interpolation weight, even when a field has no time interval .
  • The unstructured grid stommel gyre example dataset is made consistent with the FESOM2 data layout, moving the pressure and lateral velocity components to be face registered and keeping the vertical velocity component vertex registered.
  • A new test is added for testing field evaluation for a field that is constant in time (the unstructured stommel gyre dataset)

This commit also fixes the unstructured stommel gyre example dataset to
be consistent in the variable placement with FESOM2. Specifically, the
pressure, U, and V fields are face registered and the vertical
velocities are vertex registered.
This test verifies that a field that has no time interval (is constant
in time) evaluates to the same value. Additionally, this test is a
minimal reproducer for the case that the patch in the
search_time_indices function is meant to resolve.

The search_time_indices function is called in the `Field.eval` method, which
always expects a tuple output corresponding to the time index and the
time interpolation weight. Previously, when there was no time interval,
the search_time_indices function only returned a single value.
@fluidnumericsJoe
fluidnumericsJoe merged commit d6e5686 into v4-dev Jun 27, 2025
5 of 11 checks passed
@fluidnumericsJoe
fluidnumericsJoe deleted the patch-no-time-interval-index-search branch June 27, 2025 14:16
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Parcels development Jun 27, 2025
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.

2 participants