Skip to content

Commit

Permalink
Quick bug fix before release
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsebgosselin committed Apr 25, 2018
1 parent 0f42663 commit 143969a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gwhat/gwrecharge/gwrecharge_calc2.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# ---- Imports: standard libraries

import os
import os.path as osp
import datetime
from itertools import product
Expand Down Expand Up @@ -262,8 +263,6 @@ def eval_recharge(self):
'Longitude', 'Elevation']
glue_rawdata['wxinfo'] = {k: self.wxdset[k] for k in keys}

self._save_glue_to_npy(glue_rawdata)

# Calcul GLUE from the set of behavioural model and send the results
# with a signal so that it can be handled on the UI side.

Expand Down Expand Up @@ -295,6 +294,8 @@ def _print_model_params_summary(self, set_Sy, set_Cru, set_RASmax):

def _save_glue_to_npy(self, glue_rawdata):
"""Save the last computed glue results in a numpy npy file."""
if osp.exists(osp.dirname(__file__)):
os.makedirs(osp.dirname(__file__))
filename = osp.join(osp.dirname(__file__), 'glue_rawdata.npy')
np.save(filename, glue_rawdata)

Expand Down

0 comments on commit 143969a

Please sign in to comment.