Skip to content

Add convert_delft3d_to_sgrid - #2774

Merged
erikvansebille merged 14 commits into
Parcels-code:mainfrom
erikvansebille:delft3d-support
Aug 3, 2026
Merged

Add convert_delft3d_to_sgrid#2774
erikvansebille merged 14 commits into
Parcels-code:mainfrom
erikvansebille:delft3d-support

Conversation

@erikvansebille

@erikvansebille erikvansebille commented Jul 27, 2026

Copy link
Copy Markdown
Member

Description

This PR adds a convert_delft3d_to_sgrid() function, to convert structured-grid netcdf output from Delft3D to SGrid, and use it in Parcels.

Note that the interpolation method is currently set to XFreeslip, which may not be the best choice for this data on a Grid. However, we can't use the CGrid_Velocity() interpolator as currently implemented in Parcels on the example data that I got from Port of Rotterdam), because the VELU and VELV velocities are rotated to the east and north directions - where the CGrid_Velocity() interpolator expects unrotated velocities in the M and N directions. I'm planning to talk to Deltares to see how we can fix this

Note that, at least for performance, this PR is blocked by #2780

Checklist

AI Disclosure

None

@erikvansebille erikvansebille added the 🚧BLOCKED🚧 An issue that is blocked by another issue. label Jul 29, 2026

@VeckoTheGecko VeckoTheGecko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Small edit, but otherwise LGTM - I think this is a great starting point (and the warning is good to flag the degree of support we currently have)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

-This tutorial shows how to load in files from the [Delft3D](https://www.deltares.nl/en/software/delft3d-4-suite/) model into Parcels. 
+This tutorial shows how to load in [Delft3D](https://www.deltares.nl/en/software/delft3d-4-suite/) model output files (in NetCDF format) into Parcels.

if I recall correctly, NetCDF wasn't the default output format for Delft3D. Best to be explicit here I think

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks! The default output for Delft3D is netcdf (it isn't for SWASH; see #2764). But your suggestion is good anyways

@erikvansebille
erikvansebille enabled auto-merge (squash) August 3, 2026 10:08
@erikvansebille
erikvansebille merged commit cdaef9a into Parcels-code:main Aug 3, 2026
15 of 16 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Parcels development Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚧BLOCKED🚧 An issue that is blocked by another issue.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Reading Delft3D Flow NetCDF output into parcels

2 participants