|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": {}, |
| 6 | + "source": [ |
| 7 | + "# Explore the initialisation maps\n", |
| 8 | + "In this tutorial we will explore the initialisation maps offered by `plasticparcels`. Descriptions of these initialisation maps can be found [here](https://plastic.oceanparcels.org/en/latest/initialisationmaps.html)" |
| 9 | + ] |
| 10 | + }, |
| 11 | + { |
| 12 | + "cell_type": "code", |
| 13 | + "execution_count": 1, |
| 14 | + "metadata": {}, |
| 15 | + "outputs": [], |
| 16 | + "source": [ |
| 17 | + "# Library imports\n", |
| 18 | + "from datetime import datetime, timedelta\n", |
| 19 | + "import os\n", |
| 20 | + "os.chdir('../../')\n", |
| 21 | + "# Parcels and PlasticParcels imports\n", |
| 22 | + "import plasticparcels as pp\n", |
| 23 | + "\n", |
| 24 | + "# Plotting imports\n", |
| 25 | + "import matplotlib.pyplot as plt\n", |
| 26 | + "import cartopy.crs as ccrs\n", |
| 27 | + "import cartopy.feature as cfeature\n", |
| 28 | + "import xarray as xr\n", |
| 29 | + "import pandas as pd" |
| 30 | + ] |
| 31 | + }, |
| 32 | + { |
| 33 | + "cell_type": "code", |
| 34 | + "execution_count": 2, |
| 35 | + "metadata": {}, |
| 36 | + "outputs": [], |
| 37 | + "source": [ |
| 38 | + "# Load the model settings\n", |
| 39 | + "settings = {\"release_maps\": {\n", |
| 40 | + " \"coastal\": None,\n", |
| 41 | + " \"rivers\": None,\n", |
| 42 | + " \"fisheries\": None,\n", |
| 43 | + " \"global_concentrations\": None,},\n", |
| 44 | + " \"unbeaching\": {\n", |
| 45 | + " \"filename\": None,\n", |
| 46 | + " }\n", |
| 47 | + "}" |
| 48 | + ] |
| 49 | + }, |
| 50 | + { |
| 51 | + "cell_type": "code", |
| 52 | + "execution_count": 3, |
| 53 | + "metadata": {}, |
| 54 | + "outputs": [], |
| 55 | + "source": [ |
| 56 | + "# Download the mask and release data\n", |
| 57 | + "settings = pp.utils.download_plasticparcels_dataset('NEMO0083', settings, 'input_data')" |
| 58 | + ] |
| 59 | + }, |
| 60 | + { |
| 61 | + "cell_type": "markdown", |
| 62 | + "metadata": {}, |
| 63 | + "source": [ |
| 64 | + "## Explore the `coastal` initialisation map\n", |
| 65 | + "We will first load in the data using `pandas`" |
| 66 | + ] |
| 67 | + }, |
| 68 | + { |
| 69 | + "cell_type": "code", |
| 70 | + "execution_count": 4, |
| 71 | + "metadata": {}, |
| 72 | + "outputs": [], |
| 73 | + "source": [ |
| 74 | + "coastal_ds = pd.read_csv(settings['release_maps']['coastal'])" |
| 75 | + ] |
| 76 | + }, |
| 77 | + { |
| 78 | + "cell_type": "code", |
| 79 | + "execution_count": null, |
| 80 | + "metadata": {}, |
| 81 | + "outputs": [], |
| 82 | + "source": [] |
| 83 | + } |
| 84 | + ], |
| 85 | + "metadata": { |
| 86 | + "kernelspec": { |
| 87 | + "display_name": "py3_parcels", |
| 88 | + "language": "python", |
| 89 | + "name": "python3" |
| 90 | + }, |
| 91 | + "language_info": { |
| 92 | + "codemirror_mode": { |
| 93 | + "name": "ipython", |
| 94 | + "version": 3 |
| 95 | + }, |
| 96 | + "file_extension": ".py", |
| 97 | + "mimetype": "text/x-python", |
| 98 | + "name": "python", |
| 99 | + "nbconvert_exporter": "python", |
| 100 | + "pygments_lexer": "ipython3", |
| 101 | + "version": "3.10.12" |
| 102 | + } |
| 103 | + }, |
| 104 | + "nbformat": 4, |
| 105 | + "nbformat_minor": 2 |
| 106 | +} |
0 commit comments