Skip to content

Adding append and overwrite options to ParticleFile API#2655

Open
erikvansebille wants to merge 2 commits into
Parcels-code:mainfrom
erikvansebille:particlefile_append_overwrite
Open

Adding append and overwrite options to ParticleFile API#2655
erikvansebille wants to merge 2 commits into
Parcels-code:mainfrom
erikvansebille:particlefile_append_overwrite

Conversation

@erikvansebille
Copy link
Copy Markdown
Member

Description

This PR adds an option to ParticleFile.__init__ to control when the file already exists: either raise an error (default), overwrite, or append to the exisiting file.

Note that in the case of "append", the t=0 should not be written in pset.execute(), as it was already written at the end of the previous pset.execute()`

Checklist

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
    • Describe how you used it (e.g., by pasting your prompt):
      I used Claude code to help with the implementation of the append option in particlefile.write()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant