Skip to content

Add Field.time_interval attribute#2000

Merged
VeckoTheGecko merged 3 commits intov4-devfrom
field-time-interval
May 6, 2025
Merged

Add Field.time_interval attribute#2000
VeckoTheGecko merged 3 commits intov4-devfrom
field-time-interval

Conversation

@VeckoTheGecko
Copy link
Copy Markdown
Contributor

@VeckoTheGecko VeckoTheGecko commented May 6, 2025

Changes:

  • Add Field.time_interval attribute
  • add tests for Field.time_interval and FieldSet.time_interval
  • Update TimeInterval to also work for np.datetime64

Copy link
Copy Markdown
Contributor

@fluidnumericsJoe fluidnumericsJoe left a comment

Choose a reason for hiding this comment

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

This looks good to me. In #1999 I'll need to revisit Field.__init__ ; it looks like we won't need to pad with a length 1 time dimension given the get_time_interval method can work with something with or without a time dimension. All good.

@VeckoTheGecko VeckoTheGecko merged commit 33602c7 into v4-dev May 6, 2025
1 of 2 checks passed
@VeckoTheGecko VeckoTheGecko deleted the field-time-interval branch May 6, 2025 18:04
@github-project-automation github-project-automation bot moved this from Backlog to Done in Parcels development May 6, 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