Homework
Exercise 1
- Download network.res1d into a new project folder.
- Create an empty Jupyter Notebook and import
mikeio1d
. - Open the
network.res1d
file into aRes1D
object. - Use the
info()
method to get an overview of the results. - Read all ‘WaterLevel’ quantities for all nodes into a Pandas
DataFrame
. - Display the
describe()
statistics for thisDataFrame
.
Exercise 2
- Continue with the
Res1D
object from Exercise 1 (or reopennetwork.res1d
). - Access the reach named “101l1”.
- Print the static properties:
length
andn_gridpoints
for this reach. - Plot the ‘WaterLevel’ time series for reach “101l1”.
- On a separate plot, plot the ‘Discharge’ time series for reach “101l1”.
Exercise 3
- Reopen
network.res1d
usingmikeio1d.open()
. - This time, during the
open()
call, specify that you only want to load:- Nodes: “1”, “5”, and “10”.
- Quantities: Only “WaterLevel”.
- Time range: From “1994-08-07 17:00:00” to “1994-08-07 17:30:00”.
- Read the data from the resulting
Res1D
object into a PandasDataFrame
. - Print the
head()
of thisDataFrame
. How many columns does it have?
Exercise 4
- Open
network.res1d
into aRes1D
object. - Access the first grid point on the reach named “100l1”.
- Plot its water level.
- Access the last grid point on the reach named “100l1”.
- Plot its water level.
Exercise 5
- Download model.res1d into a new project folder.
- Open
model.res1d
into aRes1D
object. - Read the discharge of reach
G60F260_G60F240_l1
into a Pandas DateFrame. Use the discharge closest to the end node. - Confirm the end node of the reach is a node of type
Outlet
with idG60F240
. - Download observed.csv into your project folder.
- Read observed flows from the CSV file into a DataFrame (remembering to use a DatetimeIndex). These represent observed flows of the reach referenced in step 3 above.
- Plot the time series comparison of model vs observed for the following events:
- 2021-07-31 12:00 to 2021-07-31 15:45
- 2021-07-28 17:25 to 2021-07-28 20:55
- 2021-06-21 06:55 to 2021-06-21 18:00