UW-Hydro / RVIC

RVIC Streamflow Routing Model
http://rvic.readthedocs.org
GNU General Public License v3.0
34 stars 58 forks source link

[bug] subset_length must be a multiple of 2 #107

Closed kwhitney727 closed 6 years ago

kwhitney727 commented 6 years ago

lines 333, 334 of param_file.py in subset function define d_left and d_right, which need to be integers, to be +/- subset_length / 2, which will be float if 'subset_length' is not a multiple of 2. Since d_left and d_right are used as array indices, they cannot have float values, yet there is no logic in rvic to ensure that subset_length is an even number.

jhamman commented 6 years ago

Thanks @kwhitney727 - this is a good point and I agree we should fix it. I'll take a look at your PR in a bit.

jhamman commented 6 years ago

closed via #109