DHI/mikeio

mikeio.read string time argument not working as intended

jsmariegaard opened this issue · 0 comments

mikeio.read("ts.dfs0", time="2018") gives different results for equidistant and non-equidistant files.

Reading non-equidistant files works as intended (i.e. gives all data in 2018 in the above example). If ts.dfs0 is equidistant, however, only one timestep i returned: 2018-1-1 00:00:00 !

In other cases, an error is thrown when time is a string! The below lines should give the same Dataset, but the second throws an error:

mikeio.read("../tests/testdata/HD2D.dfsu")["1985-08-06"]
mikeio.read("../tests/testdata/HD2D.dfsu", time="1985-08-06")