Skip to content

Commit

Permalink
Merge pull request #387 from jnsebgosselin/remove_deadcode
Browse files Browse the repository at this point in the history
PR: remove dead code in HydroCalc2.py
  • Loading branch information
jnsebgosselin committed Apr 26, 2021
2 parents 95236b1 + 964d157 commit 867d722
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions gwhat/HydroCalc2.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,6 @@ def _setup_mpl_canvas(self):
[], [], clip_on=True, ls='none', zorder=10, marker='+', ms=8,
mec='red', mew=2, mfc='red')

# Predicted water levels.
self.plt_wlpre, = ax0.plot([], [], color='red', clip_on=True,
ls='-', zorder=10, marker='None')

# Recession.
self._mrc_plt, = ax0.plot([], [], color='red', clip_on=True,
zorder=15, marker='None', linestyle='--')
Expand Down Expand Up @@ -940,8 +936,6 @@ def setup_hydrograph(self):

# Plot observed and predicted water levels
self._draw_obs_wl()
self.plt_wlpre.set_data([], [])

self.draw_meas_wl()
self.draw_glue_wl()
self.draw_weather()
Expand Down Expand Up @@ -1043,34 +1037,6 @@ def switch_date_format(self):
self.draw_glue_wl()
self.draw()

def plot_synth_hydro(self, parameters):
print(parameters)
Cro = parameters['Cro']
RASmax = parameters['RASmax']
Sy = parameters['Sy']

# ----------------------------------------------- compute recharge ----

rechg, _, _, _, _ = \
self.synth_hydrograph.surf_water_budget(Cro, RASmax)

# ------------------------------------------- compute water levels ----

# We introduce the time lag here.
tweatr = self.wxdset.get_xldates() + 0
twlvl = self.time

ts = np.where(twlvl[0] == tweatr)[0][0]
te = np.where(twlvl[-1] == tweatr)[0][0]

WLpre = self.synth_hydrograph.calc_hydrograph(rechg[ts:te], Sy)

# ---------------------------------------------- plot water levels ----

self.plt_wlpre.set_data(self.synth_hydrograph.DATE, WLpre/1000.)

self.draw()

def setup_wl_style(self):
"""
Setup the line and marker style of the obeserved water level data.
Expand Down

0 comments on commit 867d722

Please sign in to comment.