import mikeio1d
Multiple file types are supported by reading them into the res1d structure. The following file types are supported:
mikeio1d.Res1D.get_supported_file_extensions()
{'.crf', '.out', '.prf', '.res', '.res11', '.res1d', '.resx', '.whr', '.xrf'}
Example for SWMM
res = mikeio1d.open("../tests/testdata/swmm.out")
res
<mikeio1d.Res1D>
ax = res.nodes["14"].SWMM_NODE_DEPTH.plot()
Example for EPANET res files
res = mikeio1d.open("../tests/testdata/epanet.res")
res
<mikeio1d.Res1D>
ax = res.nodes["10"].Pressure.plot()
Example for EPANET resx files
res = mikeio1d.open("../tests/testdata/epanet.resx")
res
<mikeio1d.Res1D>
df = res.reaches["9"].Pump_efficiency.read()
df.head()
Pump efficiency:9 | |
---|---|
2022-10-13 00:00:00 | 75.0 |
2022-10-13 01:00:00 | 75.0 |
2022-10-13 02:00:00 | 75.0 |
2022-10-13 03:00:00 | 75.0 |
2022-10-13 04:00:00 | 75.0 |