Skip to content

Commit 7dc8a9c

Browse files
reint-fischerreint-fischer
authored andcommitted
add reference API links to quickstart tutorial
1 parent d4bbfc2 commit 7dc8a9c

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

docs/getting_started/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,3 @@ Getting started with parcels is easy; here you will find:
99
🎓 Output tutorial <tutorial_output.ipynb>
1010
📖 Conceptual workflow <explanation_concepts.md>
1111
```
12-
13-
```{note}
14-
TODO: Add links to Reference API in quickstart tutorial and concepts explanation
15-
```

docs/getting_started/tutorial_quickstart.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ ds_fields
4141
As we can see, the reanalysis dataset contains eastward velocity `uo`, northward velocity `vo`, potential temperature
4242
(`thetao`) and salinity (`so`) fields.
4343

44-
These hydrodynamic fields need to be stored in a `parcels.FieldSet` object. Parcels provides tooling to parse many types
45-
of models or observations into such a `parcels.FieldSet` object. Here, we use `FieldSet.from_copernicusmarine()`, which
44+
These hydrodynamic fields need to be stored in a {py:obj}`parcels.FieldSet` object. Parcels provides tooling to parse many types
45+
of models or observations into such a `parcels.FieldSet` object. Here, we use {py:obj}`FieldSet.from_copernicusmarine()`, which
4646
recognizes the standard names of a velocity field:
4747

4848
```{code-cell}
@@ -61,10 +61,10 @@ velocity = ds_fields.isel(time=0, depth=0).plot.quiver(x="longitude", y="latitud
6161
Now that we have created a `parcels.FieldSet` object from the hydrodynamic data, we need to provide our second input:
6262
the virtual particles for which we will calculate the trajectories.
6363

64-
We need to create a `parcels.ParticleSet` object with the particles' initial time and position. The `parcels.ParticleSet`
64+
We need to create a {py:obj}`parcels.ParticleSet` object with the particles' initial time and position. The `parcels.ParticleSet`
6565
object also needs to know about the `FieldSet` in which the particles "live". Finally, we need to specify the type of
66-
`parcels.Particle` we want to use. The default particles have `time`, `z`, `lat`, and `lon`, but you can easily add
67-
other `Variables` such as size, temperature, or age to create your own particles to mimic plastic or an [ARGO float](../user_guide/examples/tutorial_Argofloats.ipynb).
66+
{py:obj}`parcels.ParticleClass` we want to use. The default particles have `time`, `z`, `lat`, and `lon`, but you can easily add
67+
other {py:obj}`parcels.Variable`s such as size, temperature, or age to create your own particles to mimic plastic or an [ARGO float](../user_guide/examples/tutorial_Argofloats.ipynb).
6868

6969
```{code-cell}
7070
# Particle locations and initial time
@@ -90,7 +90,7 @@ ax.scatter(lon,lat,s=40,c='w',edgecolors='r');
9090
## Compute: `Kernel`
9191

9292
After setting up the input data and particle start locations and times, we need to specify what calculations to do with
93-
the particles. These calculations, or numerical integrations, will be performed by what we call a `Kernel`, operating on
93+
the particles. These calculations, or numerical integrations, will be performed by what we call a {py:obj}`parcels.Kernel`, operating on
9494
all particles in the `ParticleSet`. The most common calculation is the advection of particles through the velocity field.
9595
Parcels comes with a number of standard kernels, from which we will use the Runge-Kutta advection kernel `AdvectionRK2`:
9696

@@ -105,7 +105,7 @@ kernels = [parcels.kernels.AdvectionRK2]
105105
## Prepare output: `ParticleFile`
106106

107107
Before starting the simulation, we must define where and how frequent we want to write the output of our simulation.
108-
We can define this in a `ParticleFile` object:
108+
We can define this in a {py:obj}`parcels.ParticleFile` object:
109109

110110
```{code-cell}
111111
output_file = parcels.ParticleFile("output-quickstart.zarr", outputdt=np.timedelta64(1, "h"))
@@ -117,18 +117,14 @@ the `outputdt` argument so that it captures the smallest timescales of our inter
117117

118118
## Run Simulation: `ParticleSet.execute()`
119119

120-
Finally, we can run the simulation by _executing_ the `ParticleSet` using the specified list of `kernels`.
120+
Finally, we can run the simulation by _executing_ the `ParticleSet` using the specified list of `kernels`. This is done using the {py:meth}`parcels.ParticleSet.execute()` method.
121121
Additionally, we need to specify:
122122

123123
- the `runtime`: for how long we want to simulate particles.
124124
- the `dt`: the timestep with which to perform the numerical integration in the `kernels`. Depending on the numerical
125125
integration scheme, the accuracy of our simulation will depend on `dt`. Read [this notebook](https://github.com/Parcels-code/10year-anniversary-session2/blob/8931ef69577dbf00273a5ab4b7cf522667e146c5/advection_and_windage.ipynb)
126126
to learn more about numerical accuracy.
127127

128-
```{note}
129-
TODO: add Michaels 10-years Parcels notebook to the user guide
130-
```
131-
132128
```{code-cell}
133129
:tags: [hide-output]
134130
pset.execute(

0 commit comments

Comments
 (0)