You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adding Headers to User guide
So that sections can directly be linked to
* Moving getting-started to within user-guide
* Updating links
* Update installation instructions
* Clean up docs
* Removing stray print statement in unit tests
* Fix info on combining models
Copy file name to clipboardExpand all lines: docs/index.md
+6-9Lines changed: 6 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,9 @@ _Animation of virtual particles carried by ocean surface flow in the global ocea
12
12
You can browse the documentation for older versions by using the version switcher in the bottom right.
13
13
```
14
14
15
-
**Useful links**: [Installation instructions](getting_started/installation.md) | [Discussions on GitHub](https://github.com/Parcels-code/parcels/discussions) | [Issue on GitHub](https://github.com/Parcels-code/parcels/issues) | [Parcels website](https://parcels-code.org/) | [CLAM community website](https://clam-community.github.io/) | [API reference](reference/parcels/index)
15
+
**Useful links**: [Installation instructions](user_guide/getting_started/installation) | [Discussions on GitHub](https://github.com/Parcels-code/parcels/discussions) | [Issue on GitHub](https://github.com/Parcels-code/parcels/issues) | [Parcels website](https://parcels-code.org/) | [CLAM community website](https://clam-community.github.io/) | [API reference](reference/parcels/index)
16
+
17
+
New to **Parcels**? Check out the [installation instructions](user_guide/getting_started/installation), run the [quickstart tutorial](user_guide/getting_started/tutorial_quickstart), and learn the [key concepts](user_guide/getting_started/explanation_concepts) to understand the package.
16
18
17
19
`````{grid} 1 2 2 2
18
20
:gutter: 4
@@ -22,13 +24,12 @@ You can browse the documentation for older versions by using the version switche
22
24
````{grid-item-card} Getting started
23
25
:shadow: md
24
26
25
-
New to **Parcels**? Check out the installation guide, run the quickstart tutorial, and learn the key concepts to understand the package.
27
+
New to **Parcels**? Check out the [installation instructions](user_guide/getting_started/installation), run the [quickstart tutorial](user_guide/getting_started/tutorial_quickstart), and learn the [key concepts](user_guide/getting_started/explanation_concepts) to understand the package.
26
28
27
29
+++
28
30
29
-
```{button-ref} getting_started/index
31
+
```{button-ref} user_guide/index
30
32
:ref-type: doc
31
-
:click-parent:
32
33
:color: secondary
33
34
:expand:
34
35
@@ -38,13 +39,12 @@ Get started!
38
39
````{grid-item-card} How to?
39
40
:shadow: md
40
41
41
-
Wondering how to load a `FieldSet` or write a `Kernel`? Find **tutorials** and explainers to these and other questions here:
42
+
Wondering how to load a `FieldSet` or write a `Kernel`? Find **tutorials** and explainers to these and other questions here.
42
43
43
44
+++
44
45
45
46
```{button-ref} user_guide/index
46
47
:ref-type: doc
47
-
:click-parent:
48
48
:color: secondary
49
49
:expand:
50
50
@@ -60,7 +60,6 @@ We encourage anyone to help improve **Parcels**: read our guidelines to get star
60
60
61
61
```{button-ref} development/index
62
62
:ref-type: doc
63
-
:click-parent:
64
63
:color: secondary
65
64
:expand:
66
65
@@ -76,7 +75,6 @@ Want to interact with other users and **Parcels** developers?
Copy file name to clipboardExpand all lines: docs/user_guide/examples/tutorial_fesom.ipynb
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
"3. Build a `FieldSet` with `parcels.FieldSet.from_ugrid_conventions`.\n",
19
19
"4. Run the simulation as on any structured grid.\n",
20
20
"\n",
21
-
"If you have not done so already, work through the [quickstart tutorial](../../getting_started/tutorial_quickstart.md) first to get familiar with `ParticleSet`, `Kernel`, and `ParticleFile`."
21
+
"If you have not done so already, work through the [quickstart tutorial](../getting_started/tutorial_quickstart.md) first to get familiar with `ParticleSet`, `Kernel`, and `ParticleFile`."
22
22
]
23
23
},
24
24
{
@@ -44,7 +44,7 @@
44
44
"source": [
45
45
"## Get the FESOM tutorial dataset\n",
46
46
"\n",
47
-
"We use a small periodic-channel snapshot from a FESOM2 simulation that ships with Parcels' tutorial data registry. As in the [quickstart](../../getting_started/tutorial_quickstart.md), `parcels.tutorial.open_dataset` downloads the files into a local cache on first use; subsequent calls just return the cached copy.\n",
47
+
"We use a small periodic-channel snapshot from a FESOM2 simulation that ships with Parcels' tutorial data registry. As in the [quickstart](../getting_started/tutorial_quickstart.md), `parcels.tutorial.open_dataset` downloads the files into a local cache on first use; subsequent calls just return the cached copy.\n",
48
48
"\n",
49
49
"`uxarray` expects file paths rather than an in-memory dataset, so we trigger the downloads and then point `ux.open_mfdataset` at the cached files:"
Copy file name to clipboardExpand all lines: docs/user_guide/examples/tutorial_write_in_kernel.ipynb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
"\n",
20
20
"For these cases, you can use the `pfile.write()` method anywhere in a `Kernel`. You can write to the same file as the one specified in `output_file` or to a different file. \n",
21
21
"\n",
22
-
"This short tutorial will show you how to use `pfile.write()` in a kernel. We will use the same dataset and particle set as in the [output tutorial ](../../getting_started/tutorial_output.ipynb)."
22
+
"This short tutorial will show you how to use `pfile.write()` in a kernel. We will use the same dataset and particle set as in the [output tutorial ](../getting_started/tutorial_output.ipynb)."
Copy file name to clipboardExpand all lines: docs/user_guide/getting_started/explanation_concepts.md
+19-22Lines changed: 19 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,9 @@ A Parcels simulation is generally built up from four different components:
17
17
3.[**Kernels**](#3-kernels). Kernels perform some specific operation on the particles every time step (e.g. advect the particles with the three-dimensional flow; or interpolate the temperature field to the particle location).
18
18
4.[**Execute**](#4-execute). Execute the simulation. The core method which integrates the operations defined in Kernels for a given runtime and timestep, and writes output to a ParticleFile.
19
19
20
-
We discuss each component in more detail below. The subsections titled **"Learn how to"** link to more detailed [how-to guide notebooks](../user_guide/index.md) and more detailed _explanations_ of Parcels functionality are included under **"Read more about"** subsections. The full list of classes and methods is in the [API reference](../reference/parcels/index). If you want to learn by doing, check out the [quickstart tutorial](./tutorial_quickstart.md) to start creating your first Parcels simulation.
20
+
We discuss each component in more detail below. The subsections titled **"Learn how to"** link to more detailed [how-to guide notebooks](../index.md) and more detailed _explanations_ of Parcels functionality are included under **"Read more about"** subsections. The full list of classes and methods is in the [API reference](../../reference/parcels/index). If you want to learn by doing, check out the [quickstart tutorial](./tutorial_quickstart.md) to start creating your first Parcels simulation.
In some cases, we might want to combine `parcels.Field`s from different sources in the same `parcels.FieldSet`, such as ocean currents from one dataset and Stokes drift from another. This is possible in Parcels by adding each`parcels.Field` separately:
44
+
In some cases, we might want to combine fields from different sources in the same `parcels.FieldSet`, such as ocean currents from one dataset and Stokes drift from another. This is possible in Parcels by creating multiple`parcels.FieldSet` objects and combining them into a single `parcels.FieldSet`:
Basic kernels are included in Parcels to compute advection and diffusion. The standard advection kernel is `parcels.kernels.AdvectionRK2`, a [second-order Runge-Kutta integrator](https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#The_Runge%E2%80%93Kutta_method) of the advection function.
127
124
128
125
```{warning}
129
-
It is advised _not_ to update the particle coordinates (`particles.t`, `particles.z`, `particles.y`, or `particles.x`) directly within a Kernel, as that can negatively interfere with the way that particle movements by different kernels are vectorially added. Use a change in the coordinates: `particles.dy`, `particles.dx` and/or `particles.dz`. Read the [kernel loop tutorial](../user_guide/examples/explanation_kernelloop.md) to understand why.
126
+
It is advised _not_ to update the particle coordinates (`particles.t`, `particles.z`, `particles.y`, or `particles.x`) directly within a Kernel, as that can negatively interfere with the way that particle movements by different kernels are vectorially added. Use a change in the coordinates: `particles.dy`, `particles.dx` and/or `particles.dz`. Read the [kernel loop tutorial](../examples/explanation_kernelloop.md) to understand why.
130
127
```
131
128
132
129
(custom-kernel)=
@@ -151,20 +148,20 @@ Every Kernel must be a function with the following (and only those) arguments: `
151
148
```
152
149
153
150
```{warning}
154
-
We have to be careful with kernels that sample velocities on "spherical" grids (so with longitude and latitude in degrees). Parcels can automatically convert velocities from m s<sup>-1</sup> to degrees s<sup>-1</sup>, but only when using `VectorFields`. [This guide](../user_guide/examples/tutorial_velocityconversion.ipynb) describes how to use velocities on a "spherical" grid in Parcels.
151
+
We have to be careful with kernels that sample velocities on "spherical" grids (so with longitude and latitude in degrees). Parcels can automatically convert velocities from m s<sup>-1</sup> to degrees s<sup>-1</sup>, but only when using `VectorFields`. [This guide](../examples/tutorial_velocityconversion.ipynb) describes how to use velocities on a "spherical" grid in Parcels.
To analyse the particle data generated in the simulation, we need to define a `parcels.ParticleFile` and add it as an argument to `parcels.ParticleSet.execute()`. The output will be written in a [parquet format](https://parquet.apache.org/), which can be opened as a `polars.DataFrame`. The dataset will contain the particle data with at least `t`, `z`, `y` and `x`, for each particle at timesteps defined by the `outputdt` argument.
190
187
191
-
There are many ways to analyze particle output, and although we provide [a short tutorial to get started](./tutorial_output.ipynb), we recommend writing your own analysis code and checking out [related Lagrangian analysis projects in our community page](../community/index.md#analysis-code).
188
+
There are many ways to analyze particle output, and although we provide [a short tutorial to get started](./tutorial_output.ipynb), we recommend writing your own analysis code and checking out [related Lagrangian analysis projects in our community page](../../community/index.md#analysis-code).
192
189
193
190
```{admonition} 🖥️ Learn how to run a simulation
194
191
:class: seealso
195
-
- [Choose an appropriate timestep and integrator](../user_guide/examples/tutorial_dt_integrators.ipynb)
192
+
- [Choose an appropriate timestep and integrator](../examples/tutorial_dt_integrators.ipynb)
196
193
- [Work with Parcels output](./tutorial_output.ipynb)
Copy file name to clipboardExpand all lines: docs/user_guide/getting_started/installation.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,19 @@ The steps below are the installation instructions for Linux, macOS and Windows.
14
14
15
15
**Step 2:** Start a terminal (Linux / macOS) or the Anaconda prompt (Windows). Activate the `base` environment of your Miniconda and create an environment containing Parcels, all its essential dependencies, `trajan` (a trajectory plotting dependency used in the notebooks) and the nice-to-have cartopy and jupyter packages: -->
16
16
17
-
Parcels v4 is in active development and hasn't been released.
17
+
Parcels v4 is in active development.
18
18
19
-
A pre-release version of Parcels (i.e., the latest version on `main`) can be installed via conda using the following instructions (which creates an environment `parcels-env`, activates it, installs Parcels from a custom pre-release channel that we're using, and installs some additional helper packages).
19
+
A pre-release version of Parcels (i.e., the latest version on `main`) can be installed via conda using the following instructions (which creates an environment `parcelsv4-env`, activates it, installs Parcels from a custom pre-release channel that we're using, and installs some additional helper packages).
20
+
21
+
```{warning}
22
+
Before installing the latest version of Parcels, we *highly* recommend creating a new environment so that it doesn't affect your current environment (which you may be using for your research).
23
+
24
+
You can find your current environment with `conda env list` and identifying the environment with a `*` next to it. At any point, you can use `conda activate ...` (replacing `...` with the name that had the `*` next to it) to return to your environment with version 3 of Parcels.
0 commit comments