Skip to content

Conversation

@erikvansebille
Copy link
Member

@erikvansebille erikvansebille commented Oct 23, 2025

This PR implements some changes needed to get virtualshipcode to run with parcels v4, as part of the EDITO Model Lab hackathon. It is not aligned with the v1-refactoring/development though, so better to not merge. Also, better to manually copy some of the changes here to a new PR for proper v4-integration later, when Parcels-v4 is out of alpha stage

Perhaps the most important aspect is the creation of the FieldSet, which is surprisingly clean:

dso = xr.open_mfdataset([filenames["U"], filenames["T"], filenames["S"]])
dso["depth"] = -dso["depth"]
dso = dso.reindex(depth=dso.depth[::-1])
dso = dso.rename({"so": "S", "thetao": "T"})
dso.time.attrs["axis"] = "T"
dsb = xr.open_dataset(filenames["bathymetry"]).rename_vars({"deptho": "bathymetry"})
dsb["bathymetry"] = -dsb["bathymetry"]
ds = xr.merge([dso, dsb], join="inner")
fieldset = FieldSet.from_copernicusmarine(ds)

Also note that, during this attempt to integrate virtualship and Parcels-v4, we also found some bugs/issues in Parcels-v4 itself: Parcels-code/Parcels#2348

j-atkins and others added 30 commits October 21, 2025 13:38
Consolidates/unifies the old dual ship_config.yaml and schedule.yaml config files into one expedition.yaml file, in line with  v1 dev objectives.
Fix unnecessarily divergent branches.
…ls dependency from parcels-v4 branch on github
- Define workspace with VirtualShip name and pixi-build preview
- Configure multiple test environments (py310, py311, py312)
- Set up feature environments for docs, typing, and pre-commit
- Define pixi tasks for tests, docs, linting, and type checking
- Align dependencies with existing pyproject.toml
- Replace mamba-org/setup-micromamba with prefix-dev/setup-pixi
- Update test job to use pixi environments (test-py310, test-py312)
- Update typechecking job to use pixi run typing
- Enable pixi caching for faster CI runs
- Simplify workflow by removing manual dependency installation
- Replace Conda-based development setup with Pixi
- Add comprehensive Pixi workflows section with examples
- Document testing, docs, and code quality commands
- Include tips for environment management and CI reproduction
- Update dependency management instructions to reference pixi.toml
Add Pixi badge to indicate project uses Pixi for environment management
Environment management is now handled by pixi.toml. The environment.yml
file is no longer needed as all dependencies are defined in pixi.toml.
@erikvansebille erikvansebille changed the base branch from main to v1-dev October 23, 2025 09:14
@j-atkins j-atkins changed the title Edito hackathon Edito hackathon (Parcels v4) Oct 27, 2025
@erikvansebille erikvansebille changed the title Edito hackathon (Parcels v4) [DP NOT MERGE] Parcels-v4 integration for EDITO hackathon Oct 27, 2025
@erikvansebille erikvansebille marked this pull request as draft October 27, 2025 15:45
@erikvansebille erikvansebille changed the title [DP NOT MERGE] Parcels-v4 integration for EDITO hackathon [DO NOT MERGE] Parcels-v4 integration for EDITO hackathon Oct 27, 2025
@j-atkins j-atkins mentioned this pull request Nov 19, 2025
Base automatically changed from v1-dev to main November 21, 2025 09:10
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.

4 participants