Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving the readthedocs documentation #33

Merged
merged 42 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
fc3733a
Adding information on the required data to run plasticparcels
michaeldenes May 27, 2024
e1de5a0
Making the required data a list instead of all in one line.
michaeldenes May 27, 2024
935ccd9
Fixing minor grammar mistakes
michaeldenes May 27, 2024
eef396e
Making PlasticParcels lowercase in the physics kernels and initialisa…
michaeldenes May 27, 2024
0a7568a
Removing empty code block in initialisation maps tutorial
michaeldenes May 27, 2024
80197bf
Adding a sentence to the required data section informing the user to …
michaeldenes May 27, 2024
2fdabf1
Adding a github readme to the examples folder to link to the readthed…
michaeldenes May 27, 2024
5259eb6
Near-complete draft of the paper. Needs an updated initialisation_map…
michaeldenes May 27, 2024
e49a79d
Updates to paper based on Erik's suggestions in github
michaeldenes May 27, 2024
58812e5
Updated initialisation maps example to include a 4-part plot of all i…
michaeldenes May 28, 2024
19f8b91
Updates to the initialisation maps figure an schematic figure for the…
michaeldenes May 28, 2024
f784f36
Merge branch 'main' into update_documentation
michaeldenes May 28, 2024
80570e8
Updated example tutorial to include figure that will be used in the p…
michaeldenes May 28, 2024
351ab61
Adding usage example to the draft paper
michaeldenes May 28, 2024
30f7f59
Removing the import os statement
michaeldenes May 28, 2024
299784f
Fixing the references text that wasn't showing before
michaeldenes May 28, 2024
04c316e
Missing ` quotes around plasticparcels
michaeldenes May 28, 2024
0647543
Fixing 'van Sebille' in .bib file so that the references don't show a…
michaeldenes May 28, 2024
a3ad945
Fixing capitalisation and escaping the percentage symbol in the .bib …
michaeldenes May 28, 2024
ad4cfc4
Removing the rhs latitude labels that are overlapped by the colorbar …
michaeldenes May 28, 2024
82c9066
Fixing broken url links (don't use \url{} like latex!)
michaeldenes May 28, 2024
85b13d7
Fixing width of second figure in paper.
michaeldenes May 28, 2024
8b75b18
Some textual/grammar changes to the manuscript
erikvansebille May 29, 2024
7d7a4d7
Merge pull request #35 from OceanParcels/suggestions_evs
michaeldenes May 29, 2024
c7af024
Updated schematic figure for paper, to use the word 'kernel' instead …
michaeldenes May 29, 2024
c495e88
Updating the example python code to better match parcels style
michaeldenes May 29, 2024
16a6404
Missed a couple of variable name changes in the last commit
michaeldenes May 29, 2024
ce0141f
Changing start_date to startdate
michaeldenes May 29, 2024
6fd2f0b
Changing settings variables to be inline with parcels style
michaeldenes May 29, 2024
21a0b83
Updating Greek coast settings variable names to be more inline with p…
michaeldenes May 29, 2024
ec3169a
Update to Croatian fisheries example settings variables to be inline …
michaeldenes May 29, 2024
99ec3dc
Fixing small spacing issue on comments in the code
michaeldenes May 29, 2024
3f389ad
Updates to the add your own kernel tutorial settings variable names t…
michaeldenes May 29, 2024
037ff5d
Changing parcels version to v3.0.3 in the paper
michaeldenes May 29, 2024
62f39db
Italy example rerun to ensure it works with the variable name changes
michaeldenes May 29, 2024
7ab2bdf
initialisation maps example rerun to ensure it works with the variabl…
michaeldenes May 29, 2024
fff5309
Greece example rerun to ensure it works with the variable name changes
michaeldenes May 29, 2024
9a82151
Rerunning the Croatian fisheries example with changed settings variab…
michaeldenes May 29, 2024
23653a9
Rerunning the 'add your own kernel' tutorial with changed settings va…
michaeldenes May 29, 2024
fd36e00
Removing superfluous code in kernels.py
michaeldenes May 29, 2024
186c51b
Update docs/index.rst
michaeldenes May 29, 2024
e14fd0a
Remove two plots from Italy example, and only show the combined plot
michaeldenes May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Examples

Up-to-date documentation on the `plasticparcels` examples can be found [here](https://plastic.oceanparcels.org/en/latest/examples.html).
7 changes: 0 additions & 7 deletions docs/examples/example_initialisation_maps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1585,13 +1585,6 @@
"plt.colorbar(cb, label='Plastic amount', orientation='horizontal')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
18 changes: 17 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,25 @@ Installation
conda install conda-forge::plasticparcels


Or downloaded from https://github.com/OceanParcels/PlasticParcels
Or downloaded from https://github.com/OceanParcels/plasticparcels


Required Data
^^^^^^^^^^^^^

``plasticparcels`` has been developed for use with data from the Copernicus Marine Service, and requires the following data to run:

* Hydrodynamic model data: `MOI GLO12 (psy4v3r1) <https://www.mercator-ocean.eu/en/solutions-expertise/accessing-digital-data/product-details/?offer=4217979b-2662-329a-907c-602fdc69c3a3&system=d35404e4-40d3-59d6-3608-581c9495d86a>`_
* Biogeochemical model data: `MOI BIO4 (biomer4v2r1) <https://www.mercator-ocean.eu/en/solutions-expertise/accessing-digital-data/product-details/?offer=8d0c01f3-81c7-0a59-0d06-602fdf63c5b6&system=dc40b324-7de7-0732-880b-5d9dcf7d344a>`_
* Wave data: `ECMWF ERA5 Wave <https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels>`_ (specifically, the variables ``mean_wave_period``, ``peak_wave_period``, ``u_component_stokes_drift``, and ``v_component_stokes_drift``.)
* Wind data: `ECMWF ERA5 Wind <https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels>`_ (specifically, the variables ``10m_u_component_of_wind`` and ``10m_v_component_of_wind``)

For the wind and wave data, we recommend using the `CDS API <https://cds.climate.copernicus.eu/api-how-to>`_.

To run the examples, you will need to update the data directories in settings ``.json`` files.

Just like the ``parcels`` framework, ``plasticparcels`` can be adapted to use other hydrodynamic, biogeochemical, wave, and atmospheric models. If you require assistance, please contact us through the Discussions page on github https://github.com/OceanParcels/plasticparcels/discussions
michaeldenes marked this conversation as resolved.
Show resolved Hide resolved

.. toctree::
:maxdepth: 2
:caption: Contents
Expand Down
10 changes: 5 additions & 5 deletions docs/initialisationmaps.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Description of algorithms for particle initialisation maps
Included in the `PlasticParcels` package are four particle initialisation maps, along with the algorithms to create them. These maps represent best estimates for plastic pollution emissions along coastlines [@Jambeck2015](http://dx.doi.org/10.1126/science.1260352), from river sources [@Meijer2021](http://dx.doi.org/10.1126/sciadv.aaz5803), in the open-ocean from fishing-related activities [@Kroodsma2018](http://dx.doi.org/10.1126/science.aao5646), as well as a current best estimate of buoyant plastic concentrations globally [@Kaandorp2023](http://dx.doi.org/10.1038/s41561-023-01216-0).
Included in the `plasticparcels` package are four particle initialisation maps, along with the algorithms to create them. These maps represent best estimates for plastic pollution emissions along coastlines [@Jambeck2015](http://dx.doi.org/10.1126/science.1260352), from river sources [@Meijer2021](http://dx.doi.org/10.1126/sciadv.aaz5803), in the open-ocean from fishing-related activities [@Kroodsma2018](http://dx.doi.org/10.1126/science.aao5646), as well as a current best estimate of buoyant plastic concentrations globally [@Kaandorp2023](http://dx.doi.org/10.1038/s41561-023-01216-0).
Each initialisation map, however, requires that particles be placed in ocean grid cells, so we also provide algorithms to generate these ocean masks too.

The code for these algorithims can be found in `plasticparcels/scripts/create_release_maps.py`. Below we describe each of the algorithms.
Expand All @@ -20,7 +20,7 @@ To generate a particle initialisation map of plastic pollution that enters the o
4. Create an array with the coastal model grid-cell and its associated area, the country name, continent name, region name, and subregion name from the shapefile, and the identified population density.
5. Combine all entries generated in Step 4.4. into one array.
6. Load the global mismanaged plastic waste data [@Jambeck2015](http://dx.doi.org/10.1126/science.1260352), and join it to the array generated in Step 5, by 'left joining' on country name$^*$. Create an additional column 'MPW_cell', which represents the mismanaged plastic waste across the grid cell, by multiplying the mismanaged plastic waste per kilogram per day with the population density and the grid-cell area.
7. Save the data into a `.csv` file, to be read and processed by `PlasticParcels`.
7. Save the data into a `.csv` file, to be read and processed by `plasticparcels`.


$^*$We pre-process the country names in the [@Jambeck2015](http://dx.doi.org/10.1126/science.1260352) data to account for small differences in the naming conventions of each country. We use $`r=50`$ km, and $`\phi`$ is chosen as the model grid width in degrees. A sample plot of the initialisation map is shown in Figure X **add link**.
Expand All @@ -36,7 +36,7 @@ To generate a particle initialisation map of plastic pollution that enters the o
1. Compute the distance from the emission source to the center of every coastal grid cell, and identify the closest coastal grid cell.
2. Compute the distance from the emission source to every country border point, and identify the closest country border point.
3. Create an array with the coastal model grid-cell, the country name, continent name, region name, and subregion name of the closest border point from the Natural Earth shapefile, and the associated emissions amount.
5. Save the data into a `.csv` file, to be read and processed by `PlasticParcels`.
5. Save the data into a `.csv` file, to be read and processed by `plasticparcels`.


## Open-sea fishing-related plastic emissions <a name="fishingrelease"></a>
Expand All @@ -51,7 +51,7 @@ To generate a particle initialisation map of plastic pollution emitted into the
6. Load (or generate) the coast mask file from the selected ocean model.
7. Find the closest ocean grid cell for each entry in the aggregated dataset from Step 5. using a KD-Tree approach.
8. Aggregate the data by summing the fishing hours over the following columns: country name, continent name, flag, gear type, date (month and year), ocean grid cell.
9. Save the data into a `.csv` file, to be read and processed by `PlasticParcels`.
9. Save the data into a `.csv` file, to be read and processed by `plasticparcels`.

$^*$We use the `fleet-daily-csvs-100-v2-2020` files, which are for the year 2020 only.

Expand All @@ -70,4 +70,4 @@ To generate a particle initialisation map of the current best-estimate of global
8. Interpolate the `concentration_mass_log10` to the ocean-grid cells, using an `RegularGridInterpolator` function from `scipy.interpolate`, with the grid and data being `(lon, lat)` and `concentration_mass_log10` from the `concentration_mass_log10` dataset.
9. For all valid concentrations identified in Step 8., identify the closest country boundary vertex from the Natural Earth shapefile.
10. Create an array with the ocean model cell, the interpolated plastic concentration amount (converting it into a mass insteaf of a `log10` mass), and the continent name, region name, subregion name, country name, and country flag from the Natural Earth shapefile.
11. Combine the arrays generated in Steps 6. and 10., and save the data as a `.csv` file, to be read and processed `PlasticParcels`.
11. Combine the arrays generated in Steps 6. and 10., and save the data as a `.csv` file, to be read and processed `plasticparcels`.
18 changes: 16 additions & 2 deletions docs/paper/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,19 @@ @article{Dagestad2018
year = {2018}
}

@article{ScuttPhillips2018,
author = {Scutt Phillips, Joe and Sen Gupta, Alex and Senina, Inna and van Sebille, Erik and Lange, Michael and Lehodey, Patrick and Hampton, John and Nicol, Simon},
doi = {10.1016/j.pocean.2018.04.007},
issn = {0079-6611},
journal = {Progress in Oceanography},
month = {May},
pages = {63–74},
publisher = {Elsevier BV},
title = {An individual-based model of skipjack tuna ( Katsuwonus pelamis ) movement in the tropical Pacific ocean},
url = {http://dx.doi.org/10.1016/j.pocean.2018.04.007},
volume = {164},
year = {2018}
}


@article{JalonRojas2019,
Expand Down Expand Up @@ -407,8 +420,9 @@ @article{Kaandorp2023
year = {2023}
}

@misc{CMEMS,
@misc{CMS,
title = {{Copernicus Marine Service}},
howpublished = {https://marine.copernicus.eu/},
note = {{Accessed: 27 March 2024}}
note = {{Accessed: 27 March 2024}},
year = {2024}
}
Loading
Loading