Skip to content

Conversation

@erikvansebille
Copy link
Member

In the current implementation, set.execute does not support an inputdt < 1 second (i.e. dt.dtype("ns") because we initialise the particledata.dt.dtype in seconds, so any input dt smaller than that will be 0 (and hence the code will go into an infinite loop)

Now, we could of course set the default particledata.dt.dtype in "ns", but the disadvantage is that all these dts will then be very large numbers. But perhaps a nicer way is to let users update the particledata.dt.dtype only when that is necessary (i.e. when their input dt is sub second), This PR proposes that.

This PR addresses #2241

Copy link
Contributor

@VeckoTheGecko VeckoTheGecko 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!

@erikvansebille erikvansebille merged commit 1002bd0 into v4-dev Sep 26, 2025
9 checks passed
@erikvansebille erikvansebille deleted the subsecond_dt_support branch September 26, 2025 07:19
@github-project-automation github-project-automation bot moved this from Backlog to Done in Parcels development Sep 26, 2025
erikvansebille added a commit that referenced this pull request Oct 2, 2025
The error message in #2242 referred to `set_dt_dtype()`, while the method has been renamed to `update_dt_dtype`. This PR fixed the error message
VeckoTheGecko pushed a commit that referenced this pull request Oct 2, 2025
The error message in #2242 referred to `set_dt_dtype()`, while the method has been renamed to `update_dt_dtype`. This PR fixed the error message
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.

3 participants