|
51 | 51 | ], |
52 | 52 | "source": [ |
53 | 53 | "fn = \"../tests/testdata/oresundHD_run1.dfsu\"\n", |
54 | | - "da = mikeio.read(fn, items=\"Surface elevation\", time=[0,2,4])[0]\n", |
| 54 | + "da = mikeio.read(fn, items=\"Surface elevation\", time=[0, 2, 4])[0]\n", |
55 | 55 | "da" |
56 | 56 | ] |
57 | 57 | }, |
|
74 | 74 | } |
75 | 75 | ], |
76 | 76 | "source": [ |
77 | | - "_, ax = plt.subplots(1, da.n_timesteps, figsize=(11,5), sharey=True)\n", |
| 77 | + "_, ax = plt.subplots(1, da.n_timesteps, figsize=(11, 5), sharey=True)\n", |
78 | 78 | "for step in range(da.n_timesteps):\n", |
79 | 79 | " da[step].plot(ax=ax[step], vmin=0.08, vmax=0.35)" |
80 | 80 | ] |
|
110 | 110 | ], |
111 | 111 | "source": [ |
112 | 112 | "threshold = 0.2\n", |
113 | | - "mask = da<threshold\n", |
| 113 | + "mask = da < threshold\n", |
114 | 114 | "mask" |
115 | 115 | ] |
116 | 116 | }, |
|
173 | 173 | } |
174 | 174 | ], |
175 | 175 | "source": [ |
176 | | - "_, ax = plt.subplots(2, da.n_timesteps, figsize=(11,10), sharey=True)\n", |
| 176 | + "_, ax = plt.subplots(2, da.n_timesteps, figsize=(11, 10), sharey=True)\n", |
177 | 177 | "for step in range(da.n_timesteps):\n", |
178 | | - " mask[step].plot(ax=ax[0,step], cmap=\"Reds\", add_colorbar=False)\n", |
179 | | - " wl_capped[step].plot(ax=ax[1,step], vmin=0.08, vmax=0.35)" |
| 178 | + " mask[step].plot(ax=ax[0, step], cmap=\"Reds\", add_colorbar=False)\n", |
| 179 | + " wl_capped[step].plot(ax=ax[1, step], vmin=0.08, vmax=0.35)" |
180 | 180 | ] |
181 | 181 | }, |
182 | 182 | { |
|
207 | 207 | } |
208 | 208 | ], |
209 | 209 | "source": [ |
210 | | - "ze = da.geometry.element_coordinates[:,2]\n", |
| 210 | + "ze = da.geometry.element_coordinates[:, 2]\n", |
211 | 211 | "ze.shape" |
212 | 212 | ] |
213 | 213 | }, |
|
229 | 229 | ], |
230 | 230 | "source": [ |
231 | 231 | "wl_shallow = da.copy()\n", |
232 | | - "wl_shallow[ze<-10] = np.nan # select all elements with depth lower than -10m\n", |
| 232 | + "wl_shallow[ze < -10] = np.nan # select all elements with depth lower than -10m\n", |
233 | 233 | "wl_shallow.shape" |
234 | 234 | ] |
235 | 235 | }, |
|
0 commit comments