Skip to content

Conversation

@erikvansebille
Copy link
Member

Removing the outputdt=np.inf default value in ParticleFile.__init__. This fixes #1806

Removing the `outputdt=np.inf` default value in `ParticleFile.__init__`. This fixes #1806
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. I think it was introduced in 23f0bd7 , @erikvansebille do you know what the interpretation of np.inf for outputdt was for? (e.g., not writing the outputs?) Its been a while since that commit, so perhaps just drift

@erikvansebille
Copy link
Member Author

@erikvansebille do you know what the interpretation of np.inf for outputdt was for? (e.g., not writing the outputs?) Its been a while since that commit, so perhaps just drift

The timings of the different callbacks in pset.execute (output, input, repeated, callbackdt etc) are set to np.inf if they are not used, see the line below
https://github.com/OceanParcels/Parcels/blob/07428683c2620030ed626037e2608746f4ffe544/parcels/particleset.py#L1086
and
https://github.com/OceanParcels/Parcels/blob/07428683c2620030ed626037e2608746f4ffe544/parcels/particleset.py#L1152

@erikvansebille erikvansebille merged commit b73b638 into master Jan 6, 2025
16 checks passed
@erikvansebille erikvansebille deleted the fix_particlefile_npinf_bug branch January 6, 2025 12:42
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.

Default ParticleFile output frequency results in infinite loop

3 participants