Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add model.to_xugrid() #1314

Merged
merged 6 commits into from
Mar 26, 2024
Merged

Add model.to_xugrid() #1314

merged 6 commits into from
Mar 26, 2024

Conversation

visr
Copy link
Member

@visr visr commented Mar 25, 2024

This adds an optional dependency on xugrid, to facilitate creating UGRID netCDFs, to support #969.

For now I did not yet add any results to the dataset, but this could be done as a follow-up. This is just the network.

@visr
Copy link
Member Author

visr commented Mar 26, 2024

This code assumes globally unique node IDs, so I added it to the list at #1318. An additional complication is that MDAL currently doesn't support (variable length?) strings as coordinate variables, so just adding node_type::String is maybe not possible. @Huite suggested encoding them as integers for now with an IntEnum.

@visr visr marked this pull request as ready for review March 26, 2024 09:33
Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

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

Small comments, looks good to me otherwise

python/ribasim/ribasim/model.py Show resolved Hide resolved
python/ribasim/ribasim/model.py Outdated Show resolved Hide resolved
python/ribasim/ribasim/model.py Outdated Show resolved Hide resolved
visr and others added 2 commits March 26, 2024 11:12
Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
@visr visr merged commit 0c02f9a into main Mar 26, 2024
24 checks passed
@visr visr deleted the xugrid branch March 26, 2024 11:08
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.

3 participants