|
82 | 82 | "for i, lon in enumerate(np.linspace(31, 32, 20)):\n", |
83 | 83 | " vs_drifters.append(\n", |
84 | 84 | " Drifter(\n", |
85 | | - " Spacetime(Location(latitude=-30, longitude=lon),\n", |
86 | | - " time=np.datetime64(f\"2023-07-{i+2:02d} 00:00:00\")),\n", |
| 85 | + " Spacetime(\n", |
| 86 | + " Location(latitude=-30, longitude=lon),\n", |
| 87 | + " time=np.datetime64(f\"2023-07-{i+2:02d} 00:00:00\"),\n", |
| 88 | + " ),\n", |
87 | 89 | " depth=0.0,\n", |
88 | | - " lifetime=timedelta(days=90)\n", |
| 90 | + " lifetime=timedelta(days=90),\n", |
89 | 91 | " )\n", |
90 | 92 | " )" |
91 | 93 | ] |
|
113 | 115 | ], |
114 | 116 | "source": [ |
115 | 117 | "out_path = f\"{expedition_directory}/drifters.zarr\"\n", |
116 | | - "simulate_drifters(fieldset, out_path, vs_drifters, outputdt=timedelta(hours=1), dt=timedelta(minutes=30), endtime=None)" |
| 118 | + "simulate_drifters(\n", |
| 119 | + " fieldset,\n", |
| 120 | + " out_path,\n", |
| 121 | + " vs_drifters,\n", |
| 122 | + " outputdt=timedelta(hours=1),\n", |
| 123 | + " dt=timedelta(minutes=30),\n", |
| 124 | + " endtime=None,\n", |
| 125 | + ")" |
117 | 126 | ] |
118 | 127 | }, |
119 | 128 | { |
|
173 | 182 | "\n", |
174 | 183 | "for i in range(len(ds.lon)):\n", |
175 | 184 | " last_non_nan_index = np.max(np.where(~np.isnan(ds.lon[i, :])))\n", |
176 | | - " ax.plot(ds.lon[i, 0], ds.lon[i, last_non_nan_index], 'o')\n", |
| 185 | + " ax.plot(ds.lon[i, 0], ds.lon[i, last_non_nan_index], \"o\")\n", |
177 | 186 | "ax.set_xlabel(\"Initial longitude [degrees E]\")\n", |
178 | 187 | "ax.set_ylabel(\"Final longitude [degrees E]\")\n", |
179 | 188 | "plt.show()" |
|
0 commit comments