jnsebgosselin / gwhat

Ground-Water Hydrograph Analysis Toolbox
GNU General Public License v3.0
31 stars 8 forks source link

Bug when using integers in weather data #422

Open jnsebgosselin opened 2 years ago

jnsebgosselin commented 2 years ago

What steps will reproduce the problem?

  1. Create a new input weather data file
  2. Make sure to use integer values in one of the column used for groundwater recharge calculation. All the values of that column must be integers.
  3. Compute groundwater recharge using that weather dataset

The following bug occurs:

Traceback (most recent call last):
  File "C:\Users\jean-\Documents\Projets\gwhat\gwhat\gwrecharge\gwrecharge_calc2.py", line 198, in eval_recharge
    rechg, ru, etr, ras, pacc = self.surf_water_budget(cro, rasmax)
  File "C:\Users\jean-\Documents\Projets\gwhat\gwhat\gwrecharge\gwrecharge_calc2.py", line 394, in surf_water_budget
    rechg, ru, etr, ras, pacc = calcul_surf_water_budget(
  File "gwhat\gwrecharge\gwrecharge_calculs.pyx", line 19, in gwhat.gwrecharge.gwrecharge_calculs.calcul_surf_water_budget
ValueError: Buffer dtype mismatch, expected 'float64_t' but got 'long long'
ayoubc commented 1 year ago

Hi @jnsebgosselin. Can you provide some steps how to create a new input weather data file, and an example of column to modify.

jnsebgosselin commented 1 year ago

Hello @ayoubc! There are examples in the Example folder:

https://github.com/jnsebgosselin/gwhat/tree/master/releases/Projects/Example/Meteo/Input

And also one file in the samples folder:

https://github.com/jnsebgosselin/gwhat/tree/master/samples