Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: remove dead code in HydroCalc2.py #387

Merged
merged 1 commit into from
Apr 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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