-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Part of #969 We cannot fully test this since we don't yet support testing results from Python. ```python import ribasim_testmodels import subprocess model = ribasim_testmodels.basic_model() toml_path = "basic/ribasim.toml" model.write(toml_path) subprocess.call(["ribasim.cmd", toml_path], check=True) uds = model.to_xugrid() uds.ugrid.to_netcdf("basic.nc") ``` This results in the following netCDF: [basic.zip](https://github.com/Deltares/Ribasim/files/14930060/basic.zip) It has `flow_rate` on the edges, and all variables from basin.arrow on the nodes. The edge visualization is fine, and it supports the QGIS temporal controller: ![image](https://github.com/Deltares/Ribasim/assets/4471859/9551afc0-114c-4c7d-882d-81c58952dbbd) I'm not yet happy with the visualization on nodes. Maybe @Huite has ideas on how to improve this? ![image](https://github.com/Deltares/Ribasim/assets/4471859/a1b1a6e9-abe3-435c-828f-471b4ec9bd0b) The problem is that the `uds` has all nodes, but we only have Basin results on Basins, so the rest is NaN. If there is a NaN in between QGIS doesn't draw the line. If instead we put `uds[var_name] = da.reindex_like(uds, fill_value=0.0)` then it looks more like the flow_rate image, though that isn't what we want. Ideally we get some nice clear points. Also it would be nice to support displaying 'Basin / area' polygons over time instead of nodes. @Huite is that something that UGRID supports?
- Loading branch information
Showing
3 changed files
with
75 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters