Skip to content

Commit

Permalink
Fix wflow plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
WOTrompDeltares committed Sep 13, 2024
1 parent bdb2422 commit 8afcb27
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
4 changes: 4 additions & 0 deletions DT_flood/utils/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def plot_wflow_model(wflow_model):
wflow_model : hydromt_wflow.WFlowModel
Wflow model instance from hydromt_wflow
"""

if "wflow_dem" not in wflow_model.staticmaps:
wflow_model.read_staticmaps("staticmaps.nc")

proj = ccrs.PlateCarree()
gdf_bas = wflow_model.basins
gdf_riv = wflow_model.rivers
Expand Down
30 changes: 20 additions & 10 deletions Notebooks/SetupWFlow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,25 @@
"wf.write_config()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"wf.write()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"wf_read = WflowModel(root=wf_root, mode=\"r\")\n",
"wf_read.read()"
]
},
{
"cell_type": "code",
"execution_count": 11,
Expand Down Expand Up @@ -435,16 +454,7 @@
}
],
"source": [
"plot_wflow_model(wf)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"wf.write()"
"plot_wflow_model(wf_read)"
]
},
{
Expand Down

0 comments on commit 8afcb27

Please sign in to comment.