You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IndexError Traceback (most recent call last)
Cell In[4], line 8
5 datasets_dep = [{"elevtn": "merit_hydro", "zmin": 0.001}, {"elevtn": "gebco"}]
7 # Add depth information to modelgrid based on these chosen datasets
----> 8 dep = sf.setup_dep(datasets_dep=datasets_dep)
10 # Make a plot of the merged topobathy, here colour limits are set between an elevation of -5 to 5 meters
11 _ = sf.plot_basemap(variable="dep", bmap="sat", zoomlevel=12)
File ~\AppData\Local\anaconda3\envs\SFINCS\Lib\site-packages\hydromt_sfincs\sfincs.py:351, in SfincsModel.setup_dep(self, datasets_dep, buffer_cells, interp_method)
348 datasets_dep = self._parse_datasets_dep(datasets_dep, res=res)
350 if self.grid_type == "regular":
--> 351 da_dep = workflows.merge_multi_dataarrays(
352 da_list=datasets_dep,
353 da_like=self.mask,
354 buffer_cells=buffer_cells,
355 interp_method=interp_method,
356 logger=self.logger,
357 )
359 # check if no nan data is present in the bed levels
360 nmissing = int(np.sum(np.isnan(da_dep.values)))
File ~\AppData\Local\anaconda3\envs\SFINCS\Lib\site-packages\hydromt_sfincs\workflows\merge.py:66, in merge_multi_dataarrays(da_list, gdf_list, da_like, reproj_kwargs, buffer_cells, interp_method, logger)
26 """Merge a list of data arrays by reprojecting these to a common destination grid
27 and combine valid values.
28
(...)
62
63 """
65 # start with common grid
---> 66 method = da_list[0].get("reproj_method", None)
67 da1 = da_list[0].get("da")
69 # get resolution of da1 in meters
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to initialize the sfincs model by the example script shown in https://deltares.github.io/hydromt_sfincs/latest/_examples/build_from_script.html. When I load the elevation datasets I receive the next error:
IndexError Traceback (most recent call last)
Cell In[4], line 8
5 datasets_dep = [{"elevtn": "merit_hydro", "zmin": 0.001}, {"elevtn": "gebco"}]
7 # Add depth information to modelgrid based on these chosen datasets
----> 8 dep = sf.setup_dep(datasets_dep=datasets_dep)
10 # Make a plot of the merged topobathy, here colour limits are set between an elevation of -5 to 5 meters
11 _ = sf.plot_basemap(variable="dep", bmap="sat", zoomlevel=12)
File ~\AppData\Local\anaconda3\envs\SFINCS\Lib\site-packages\hydromt_sfincs\sfincs.py:351, in SfincsModel.setup_dep(self, datasets_dep, buffer_cells, interp_method)
348 datasets_dep = self._parse_datasets_dep(datasets_dep, res=res)
350 if self.grid_type == "regular":
--> 351 da_dep = workflows.merge_multi_dataarrays(
352 da_list=datasets_dep,
353 da_like=self.mask,
354 buffer_cells=buffer_cells,
355 interp_method=interp_method,
356 logger=self.logger,
357 )
359 # check if no nan data is present in the bed levels
360 nmissing = int(np.sum(np.isnan(da_dep.values)))
File ~\AppData\Local\anaconda3\envs\SFINCS\Lib\site-packages\hydromt_sfincs\workflows\merge.py:66, in merge_multi_dataarrays(da_list, gdf_list, da_like, reproj_kwargs, buffer_cells, interp_method, logger)
26 """Merge a list of data arrays by reprojecting these to a common destination grid
27 and combine valid values.
28
(...)
62
63 """
65 # start with common grid
---> 66 method = da_list[0].get("reproj_method", None)
67 da1 = da_list[0].get("da")
69 # get resolution of da1 in meters
IndexError: list index out of range
Does anyone know what is happening?
Beta Was this translation helpful? Give feedback.
All reactions