DTOcean / dtocean

Design and techno-economic assessment of marine renewable energy arrays
https://dtocean.github.io
GNU General Public License v3.0
4 stars 6 forks source link

Tidal scenario fails when altering Tidal Probability Bins #10

Closed davidbould closed 3 years ago

davidbould commented 7 years ago

Some users reporting failure when running the sample tidal data and setting: Tidal Probability Bins = 1 User Array Option = Fixed

H0R5E commented 7 years ago

Is this in the instructions to use these values?

H0R5E commented 7 years ago

OK, so this is confirmed:


2017-03-07 11:23:11,913 - INFO - aneris.control.simulation - Datastate with level "hydrodynamics start" stored
2017-03-07 11:23:13,714 - CRITICAL - dtocean_gui.main - An IndexError occurred: index 1 is out of bounds for axis 0 with size 1
2017-03-07 11:23:14,599 - CRITICAL - dtocean_gui.main -   File "C:\DTOcean\lib\site-packages\dtocean_gui\main.py", line 185, in run
    self._project)
  File "C:\DTOcean\lib\site-packages\dtocean_core\menu.py", line 457, in execute_current
    allow_unavailable=allow_unavailable)
  File "C:\DTOcean\lib\site-packages\dtocean_core\menu.py", line 168, in _execute
    allow_unavailable=allow_unavailable)
  File "C:\DTOcean\lib\site-packages\dtocean_core\core.py", line 1769, in execute_interface
    interface = core.connect_interface(project, interface)
  File "C:\DTOcean\lib\site-packages\dtocean_gui\core.py", line 267, in connect_interface
    interface = super(GUICore, self).connect_interface(project, interface)
  File "C:\DTOcean\lib\site-packages\dtocean_core\core.py", line 1244, in connect_interface
    interface.connect()
  File "C:\DTOcean\lib\site-packages\dtocean_core\interfaces\hydrodynamics.py", line 420, in connect
    occurrence_matrix = make_tide_statistics(tide_dict)
  File "C:\DTOcean\lib\site-packages\dtocean_core\tools\hydrodynamics.py", line 292, in make_tide_statistics
    dc=tabc[1]-tabc[0]

I'm not sure its really a bug. Perhaps a warning saying a minimum of two bins is required would suffice.