Skip to content

Add particlefile_to_v3_zarr() helper - #2811

Merged
VeckoTheGecko merged 19 commits into
Parcels-code:mainfrom
VeckoTheGecko:push-unusxmtrrptn
Aug 13, 2026
Merged

Add particlefile_to_v3_zarr() helper#2811
VeckoTheGecko merged 19 commits into
Parcels-code:mainfrom
VeckoTheGecko:push-unusxmtrrptn

Conversation

@VeckoTheGecko

Copy link
Copy Markdown
Contributor

Description

Adds particlefile_to_v3_zarr helper, tests, and strategies for property based testing.

Note that this function is eager. This is noted in the docstring for the function.

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: Familiarity with polars API.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I thought that this would be useful for the future as well

Comment thread src/parcels/_compat_v3.py
Comment thread src/parcels/_compat_v3.py
df = pl.read_parquet(from_parquet)
table = pq.read_table(from_parquet)

# TODO: Check for available memory here and fail as a safeguard?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is intentionally left here. I think it would be good to discuss (or leave for a future PR)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also as part of #2818?

Comment thread src/parcels/_v3.py Outdated
Comment thread tests/test_v3.py Outdated
Comment thread tests/test_v3.py Outdated
Comment thread src/parcels/_compat_v3.py

@erikvansebille erikvansebille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good; a few comments/questions

Comment thread docs/user_guide/getting_started/tutorial_output.ipynb
Comment thread src/parcels/_strategies/_core.py Outdated
Comment thread src/parcels/_strategies/_core.py Outdated
Comment thread src/parcels/__init__.py Outdated
Comment thread src/parcels/_compat_v3.py
Comment thread src/parcels/_v3.py Outdated
Comment thread src/parcels/_v3.py Outdated
Comment thread src/parcels/_compat_v3.py
Comment thread src/parcels/_compat_v3.py
@VeckoTheGecko
VeckoTheGecko enabled auto-merge (squash) August 13, 2026 06:51
@VeckoTheGecko
VeckoTheGecko disabled auto-merge August 13, 2026 06:54
@VeckoTheGecko
VeckoTheGecko merged commit 7264ff7 into Parcels-code:main Aug 13, 2026
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parquet to CF-trajectory compliant Zarr conversion tooling

2 participants