Homework
Exercise 1
- Download network.res1d into a new project folder.
- Create an empty Jupyter Notebook and import
mikeio1d. - Open the
network.res1dfile into aRes1Dobject. - 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
Res1Dobject from Exercise 1 (or reopennetwork.res1d). - Access the reach named “101l1”.
- Print the static properties:
lengthandn_gridpointsfor 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.res1dusingmikeio1d.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
Res1Dobject into a PandasDataFrame. - Print the
head()of thisDataFrame. How many columns does it have?
Exercise 4
- Open
network.res1dinto aRes1Dobject. - 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.res1dinto aRes1Dobject. - Read the discharge of reach
G60F260_G60F240_l1into a Pandas DateFrame. Use the discharge closest to the end node. - Confirm the end node of the reach is a node of type
Outletwith 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
Want to check your work?
Download the exercise solutions: