Closed veenstrajelmer closed 1 year ago
Below example results in dataset with zero-size dims: Frozen({'nNetNode': 0, 'nNetLink': 0})
Frozen({'nNetNode': 0, 'nNetLink': 0})
import os import dfm_tools as dfmt import matplotlib.pyplot as plt plt.close('all') dir_issue = r'p:\dflowfm\maintenance\JIRA\06000-06999\06548' slice_x = slice(15,25) slice_y = slice(56,62) #plot bedlevel from interpreted network file_nc = os.path.join(dir_issue,'set_bathy_2.17.06','DFM_interpreted_network_dummy_model_net.nc') uds = dfmt.open_partitioned_dataset(file_nc) uds_sel = uds.ugrid.sel(x=slice_x,y=slice_x) print(uds.grid.bounds) print(uds_sel)
Mistake with y=slice_x, the function actually works as expected.
y=slice_x
Below example results in dataset with zero-size dims:
Frozen({'nNetNode': 0, 'nNetLink': 0})