Skip to content

Migrate to Parcels v4 - #342

Merged
j-atkins merged 121 commits into
mainfrom
migrate-v4
Sep 14, 2026
Merged

j-atkins merged 121 commits into
mainfrom
migrate-v4

Conversation

@j-atkins

@j-atkins j-atkins commented May 20, 2026

Copy link
Copy Markdown
Collaborator

This PR migrates to using Parcels v4 for VirtualShip.


  • Update instrument kernels
  • Update fieldset ingestion workflows
  • Update to Parquet output
  • Implement new fieldset/performance handling strategy, i.e. new v4 docs
  • Implement Refactor underway instruments #231
  • Check expedition / workflow
    • including underway instruments
    • Argo float bug [in kernel(s)?], immediately goes out of bounds after first timestep... likely depth convention related
  • Implement initial timestep sampling (i.e. Parcels #2622)
  • Update to work with local data / --from-data
  • Update tests
  • Add new tests for v4 specific logic(?)
  • Update docs / tutorials (e.g. notebooks using .zarr output) [new PR]
    • Plus new requirements for local data ingestion: depth dim has positive: down or positive: up
  • ARGO_FLOATS: Enhance performance + no need to update cycle_age during ascent?

Closes #239, closes #232, closes #231, closes #323, closes #238

@j-atkins
j-atkins changed the base branch from main to update-docs-sensors May 20, 2026 15:02
@j-atkins
j-atkins force-pushed the update-docs-sensors branch from f474279 to 0fe1340 Compare May 21, 2026 08:24
Base automatically changed from update-docs-sensors to main May 21, 2026 09:08
@j-atkins

j-atkins commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

cc @erikvansebille

This PR is ready for re-review. Please note a couple of things, which have been added more recently, including tinkering around _via_tmp_ds in base.py (e.g. using Zarr stores to try and squeeze out a bit more performance), plus moving to execute instrument simulations with a context manager protocol for a better handling of the tmp directory writing. Also, changing the Argo Float DT (now matching the 5 min output dt) which speeds up the actual Parcels simulation considerably (unless there is a reason to keep it as DT = 10.0?).

Also, there are some changes that have been reviewed already, most notably the updates to the docs, and probably don’t need much time spent on them. Apologies this probably wasn’t the most efficient way of structuring the PRs.

@j-atkins
j-atkins requested review from erikvansebille and removed request for erikvansebille September 4, 2026 09:10

@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.

Impressive effort, @j-atkins! See below some small comments/questions

Comment thread src/virtualship/instruments/base.py Outdated
Comment thread src/virtualship/instruments/ctd.py Outdated
Comment thread src/virtualship/instruments/ctd.py Outdated
Comment thread src/virtualship/instruments/ctd.py Outdated
Comment thread src/virtualship/models/expedition.py Outdated
Comment thread pixi.toml
@j-atkins

j-atkins commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the review, @erikvansebille! Comments now addressed, including moving to using boolean indexing across all (non-underway) instrument kernels.

@VeckoTheGecko I have updated/unpinned pixi in the pixi.toml so should be up to date. Do you just want to have a quick once over though?

@VeckoTheGecko

Copy link
Copy Markdown
Collaborator

I have updated/unpinned pixi in the pixi.toml so should be up to date. Do you just want to have a quick once over though?

Heya - just seeing this. Will take a look at the pixi.toml

@VeckoTheGecko

Copy link
Copy Markdown
Collaborator

The pixi.toml looks good! (only question is about sortedcontainers, which is a dependency but not used anywhere in the project - but that's not from this PR)

@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 - happy for you to merge!

@j-atkins
j-atkins merged commit 07acda2 into main Sep 14, 2026
12 checks passed
@j-atkins
j-atkins deleted the migrate-v4 branch September 14, 2026 08:24
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.

.csv output Update numpy dependency Add support for Python 3.13/3.14 Integrate Parcels v4 into VirtualShip Refactor underway instruments

3 participants