LimnoTech / HSPsquared

Hydrologic Simulation Program Python (HSPsquared)
GNU Affero General Public License v3.0
2 stars 0 forks source link

ZRW_WestIndian error 1 #7

Open steveskrip opened 4 years ago

steveskrip commented 4 years ago

Received following error when attempting to read_UCI using the ZRW_WestIndian .uci file. Workaround by deleting hours:minutes in UCI file.

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-7-af0364dabdb1> in <module>
      1 from readUCI import read_UCI
----> 2 read_UCI(filepath+'hspf.uci', filepath+'hspf.h5')
~\Documents\GitHub\HSPsquared\HSP2\readUCI.py in read_UCI(uciname, hdfname)
    862         f = reader(uciname)
    863         for line in f:
--> 864             if line[0:6] == 'GLOBAL':       global_(info, getlines(f))
    865             if line[0:3] == 'OPN':              opn(info, getlines(f))
    866             if line[0:7] == 'NETWORK':  net=network(info, getlines(f))
~\Documents\GitHub\HSPsquared\HSP2\readUCI.py in global_(info, lines)
    955     d = parseD(lines[1], parse, ('GLOBAL','START'))
    956     start = str(Timestamp(f"{d['SYR']}-{d['SMO']}-{d['SDA']}")
--> 957       + Timedelta(int(d['SHR']), 'h') + Timedelta(int(d['SMI']), 'T'))[0:16]
    958     stop  = str(Timestamp(f"{d['EYR']}-{d['EMO']}-{d['EDA']}")
    959       + Timedelta(int(d['EHR']), 'h') + Timedelta(int(d['EMI']), 'T'))[0:16]
ValueError: invalid literal for int() with base 10: '00:

`

aufdenkampe commented 3 years ago

@steveskrip, has this issue been resolved by fixes since April (such as connected to https://github.com/respec/HSPsquared/issues/40)?

If so, please close.

steveskrip commented 3 years ago

I need to rerun the LimnoTech tests with the updated fixes. Will do that and report back