diff --git a/DocumentedExamples/TemperatureSalinityDiagrams.ipynb b/DocumentedExamples/TemperatureSalinityDiagrams.ipynb deleted file mode 100644 index 22212da8..00000000 --- a/DocumentedExamples/TemperatureSalinityDiagrams.ipynb +++ /dev/null @@ -1,2968 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Temperature Salinity Plots" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "In this notebook there are a few examples on how to plot temperature-salinity diagrams of model output. The cosima cookbook is used to extract data, however there are other methods including using dask to get variables that could also be used, that are contained (but are outdated) in previous versions of this notebook.\n", - "\n", - "The first method uses `pandas` dataframe to plot the data with datashader, and then the second method uses pandas dataframe to add a colourmap from the age variable. The advantage of this method is that it is efficient, but the datashader module is not as simple and user friendly as `matplotlib`.\n", - "\n", - "The third method uses xarray scatter plots to plot a T-S diagram without pandas, instead with the xarray DataArray object. Its limitation is that it is slow. \n", - "\n", - "The fourth method uses `xhistogram` to bin the data so that the number of points at one T-S value is clearer.\n", - "\n", - "The fifth method is a documented example which uses the DataArray to make a 2D scipy histogram so that a true volume weighted T-S plot can be constructed, which takes ito account the differing sizes of cells in the model. The density isopycnals are also included in here too because they are often useful for these types of plots.\n", - "\n", - "Firstly, we load our modules as required." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import dask\n", - "import dask.array as da\n", - "import dask.dataframe as dd\n", - "from dask import delayed\n", - "import numpy as np\n", - "import xarray as xr\n", - "from distributed.diagnostics.progressbar import progress\n", - "import cosima_cookbook as cc\n", - "import bokeh.plotting as bp\n", - "\n", - "import matplotlib.pyplot as plt\n", - "import pandas as pd\n", - "\n", - "import datashader as ds\n", - "import datashader.transfer_functions as tf\n", - "import gsw\n", - "import scipy as scipy\n", - "from scipy import stats\n", - "from xhistogram.xarray import histogram\n", - "\n", - "import holoviews as hv\n", - "import holoviews.operation.datashader as hd" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "starting distributed client...\n" - ] - }, - { - "data": { - "text/html": [ - "
\n",
- "Client\n", - "
| \n",
- "\n",
- "Cluster\n", - "
| \n",
- "