Skip to content

Commit a570463

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b4ac854 commit a570463

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

docs/tutorials/Drifter_data_tutorial.ipynb

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@
8282
"for i, lon in enumerate(np.linspace(31, 32, 20)):\n",
8383
" vs_drifters.append(\n",
8484
" 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",
8789
" depth=0.0,\n",
88-
" lifetime=timedelta(days=90)\n",
90+
" lifetime=timedelta(days=90),\n",
8991
" )\n",
9092
" )"
9193
]
@@ -113,7 +115,14 @@
113115
],
114116
"source": [
115117
"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+
")"
117126
]
118127
},
119128
{
@@ -173,7 +182,7 @@
173182
"\n",
174183
"for i in range(len(ds.lon)):\n",
175184
" 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",
177186
"ax.set_xlabel(\"Initial longitude [degrees E]\")\n",
178187
"ax.set_ylabel(\"Final longitude [degrees E]\")\n",
179188
"plt.show()"

0 commit comments

Comments
 (0)