Skip to content

Commit 89cb886

Browse files
reint-fischerreint-fischer
authored andcommitted
fix some text
1 parent 00c4447 commit 89cb886

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

docs/user_guide/examples/tutorial_dt_integrators.ipynb

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@
4343
"\n",
4444
"where $\\mathbf{v}(\\mathbf{x},t) = (u(\\mathbf{x},t), v(\\mathbf{x},t))$ describes the ocean velocity field at position $\\mathbf{x}$ at time $t$.\n",
4545
"\n",
46-
"To estimate the timescale that we want to resolve, we can think about the scales at which advection varies. Here we use the daily velocity fields at 1/12th degree horizontal resolution from the Copernicus Marine Service. This means that the velocity will vary in time at scales >= 24 hours, and in space at scales >= 1/12th degree.\n",
47-
"\n",
48-
"```{note}\n",
49-
"Our displacement occurs in units of longitude and latitde, but our velocity field is in m/s. Read [this guide](./tutorial_unitconverters.ipynb) to understand how Parcels converts these units under the hood.\n",
50-
"```"
46+
"To estimate the timescale that we want to resolve, we can think about the scales at which advection varies. Here we use the daily velocity fields at 1/12th degree horizontal resolution from the Copernicus Marine Service. This means that the velocity will vary in time at scales >= 24 hours, and in space at scales >= 1/12th degree."
5147
]
5248
},
5349
{
@@ -139,7 +135,7 @@
139135
"source": [
140136
"```{admonition} 🖥️ Spherical grids and unit converters\n",
141137
":class: seealso\n",
142-
"Read the [UnitConversion guide](./tutorial_unitconverters.ipynb) to see how to use `parcels.GeographicPolar()` to convert to degrees s<sup>-1</sup>.\n",
138+
"Our displacement occurs in units of longitude and latitde, but our velocity field is in m/s. Read the [UnitConversion guide](./tutorial_unitconverters.ipynb) to see how Parcels uses `parcels.GeographicPolar()` under the hood to convert from m s<sup>-1</sup> to degrees s<sup>-1</sup>.\n",
143139
"```"
144140
]
145141
},
@@ -205,7 +201,7 @@
205201
"We simulate particles using a range of timesteps that differ by a factor 2-10, starting at (dt < 24 hours). We also keep track of the time it takes to run each simulation:\n",
206202
"\n",
207203
"```{warning}\n",
208-
"`dt` must be chosen such that $k`dt`$ fits exactly in the FieldSet dt (24 hours), where $k$ is an integer. \n",
204+
"`dt` must be chosen such that $k$ $\\text{d}t$ fits exactly in the FieldSet dt (24 hours), where $k$ is an integer. \n",
209205
"```"
210206
]
211207
},
@@ -261,7 +257,7 @@
261257
" )\n",
262258
" sim_duration_i = time.time() - start_time\n",
263259
" sim_duration[i] = sim_duration_i\n",
264-
" print(f\"Simulation duration = {np.round(sim_duration_i, 2)} seconds\")"
260+
" print(f\"Simulation duration (dt = {int(dt / np.timedelta64(1, 's'))} s) = {np.round(sim_duration_i, 2)} seconds\")"
265261
]
266262
},
267263
{
@@ -428,7 +424,7 @@
428424
"metadata": {},
429425
"source": [
430426
"```{warning}\n",
431-
"As you can see, the separation distance starts to increase rapidly with time. Small errors can grow, and the accuracy of the integration therefore depends strongly on the runtime and flow conditions (see [Finite Size Lyapunov Exponents](#flow-conditions)).\n",
427+
"As you can see, the separation distance starts to increase rapidly with time. Small errors can grow, and the accuracy of the integration therefore depends strongly on the runtime and flow conditions (see [the discussion on flow conditions](#flow-conditions) at the end of this guide).\n",
432428
"```"
433429
]
434430
},
@@ -496,16 +492,6 @@
496492
"df"
497493
]
498494
},
499-
{
500-
"cell_type": "markdown",
501-
"id": "22",
502-
"metadata": {},
503-
"source": [
504-
"```{note}\n",
505-
"The desired precision is not always best measured by the separation distance of individual trajectories. Depending on the application of your Parcels simulation and the process you are computing, other metrics may be more suitable.\n",
506-
"```"
507-
]
508-
},
509495
{
510496
"cell_type": "markdown",
511497
"id": "23",
@@ -622,7 +608,7 @@
622608
" )\n",
623609
" sim_duration_ij = time.time() - start_time\n",
624610
" sim_duration[i, j] = sim_duration_ij\n",
625-
" print(f\"Simulation duration = {np.round(sim_duration_ij, 2)} seconds\")"
611+
" print(f\"Simulation duration (dt = {int(dt / np.timedelta64(1, 's'))} s) = {np.round(sim_duration_ij, 2)} seconds\")"
626612
]
627613
},
628614
{

0 commit comments

Comments
 (0)