DTOcean / dtocean

Download the DTOcean installation wizard, get help and report issues here.
GNU General Public License v3.0
4 stars 6 forks source link

Error in running the Hydrodynamics module - cannot convert float NaN to integer #22

Closed kilomwork closed 7 years ago

kilomwork commented 7 years ago

When I am running the Hydrodynamics module, I experienced the following error. A ValueError Occurred: : cannot convert float NaN to integer Could you suggest any solutions for this?? Thank you very much for your help.

nan

2017-07-11 10:13:23,908 - INFO - aneris.control.simulation - Datastate stored
2017-07-11 10:45:16,358 - CRITICAL - dtocean_gui.main - A ValueError occurred: cannot convert float NaN to integer
2017-07-11 10:45:16,447 - CRITICAL - dtocean_gui.main -   File "D:\DTOcean\lib\site-packages\dtocean_gui\main.py", line 185, in run
    self._project)
  File "D:\DTOcean\lib\site-packages\dtocean_core\menu.py", line 457, in execute_current
    allow_unavailable=allow_unavailable)
  File "D:\DTOcean\lib\site-packages\dtocean_core\menu.py", line 168, in _execute
    allow_unavailable=allow_unavailable)
  File "D:\DTOcean\lib\site-packages\dtocean_core\core.py", line 1769, in execute_interface
    interface = core.connect_interface(project, interface)
  File "D:\DTOcean\lib\site-packages\dtocean_gui\core.py", line 267, in connect_interface
    interface = super(GUICore, self).connect_interface(project, interface)
  File "D:\DTOcean\lib\site-packages\dtocean_core\core.py", line 1244, in connect_interface
    interface.connect()
  File "D:\DTOcean\lib\site-packages\dtocean_core\interfaces\hydrodynamics.py", line 420, in connect
    occurrence_matrix = make_tide_statistics(tide_dict)
  File "D:\DTOcean\lib\site-packages\dtocean_core\tools\hydrodynamics.py", line 256, in make_tide_statistics
    tabu=np.linspace(umin, umax, ltabu)
  File "D:\DTOcean\lib\site-packages\numpy\core\function_base.py", line 84, in linspace
    num = int(num)
H0R5E commented 7 years ago

Hi @kilomyau, this bug can be triggered if your "Tidal Occurrence Extraction Point" variable lies outside of the lease area domain. There will be a better error for this problem in version 1.1.

kilomwork commented 7 years ago

Thank you very much for your help Mathew. Unfortunately, I have checked the Tidal Occurrence Extraction Point of my input and that lies within my lease area. Could you suggest any other possible sources of errors?

H0R5E commented 7 years ago

Can you share the .dto file with me? I'll see if it runs OK on the development build.

kilomwork commented 7 years ago

Hi Mathew, the attached zip file is my dto file. Thank you! test2.zip

H0R5E commented 7 years ago

Hi @kilomyau. I couldn't get all your data to load due to some backwards compatibility issues but I did notice that the x-coordinate of the extraction point is set to 587500.00 which is way outside of the extent of your lease area. This is probably triggering the bug I mentioned above.

kilomwork commented 7 years ago

Hi Mathew,

Thank you for your help.

I use pgadmin to update the tidal extraction point but I am not sure why the coordinates in the dto file do not match with the data that I stored in the pgadmin.

The attached file is a new dto file that I created after I had updated the coordinates of the tidal extraction point. Unfortunately, the error still occurs.

nan1

Hydrodynamics.zip

H0R5E commented 7 years ago

Hi @kilomyau, the tidal time series data seems to be corrupt. It looks like it is mostly zeros and nans from the image below. You need to check the format you used to enter the data into the database.

currents_missing_data

H0R5E commented 7 years ago

Closing due to inactivity.