Skip to content

Commit

Permalink
fix: future warning on resampling with H instead of h
Browse files Browse the repository at this point in the history
  • Loading branch information
hellkite500 committed Jul 24, 2024
1 parent 476b512 commit 059000e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/ngen_cal/src/ngen/cal/calibration_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, adjustables: Sequence[Adjustable], eval_nexus: Nexus, hooks:
#use the nwis location to get observation data
obs =self._eval_nexus._hydro_location.get_data(start_time, end_time)
#make sure data is hourly
self._observed = obs.set_index('value_time')['value'].resample('1H').nearest()
self._observed = obs.set_index('value_time')['value'].resample('1h').nearest()
self._observed.rename('obs_flow', inplace=True)
#observations in ft^3/s convert to m^3/s
self._observed = self._observed * 0.028316847
Expand Down
2 changes: 1 addition & 1 deletion python/ngen_cal/src/ngen/cal/ngen_hooks/ngen_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_output(self, id: str) -> Series:
dt_range = pd.date_range(tnx_df.index[0], tnx_df.index[-1], len(output.index)).round('min')
output.index = dt_range
#this may not be strictly nessicary...I think the _evalutate will align these...
output = output.resample('1H').first()
output = output.resample('1h').first()
output.name="sim_flow"
return output
except FileNotFoundError:
Expand Down

0 comments on commit 059000e

Please sign in to comment.