{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Using `dask` with `climpred`\n", "\n", "This demo demonstrates `climpred`'s capabilities with [`dask`](https://docs.dask.org/en/latest/array.html). This enables enables out-of-memory and parallel computation for large datasets with `climpred`." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import warnings\n", "\n", "%matplotlib inline\n", "import numpy as np\n", "import xarray as xr\n", "import dask\n", "import climpred\n", "\n", "warnings.filterwarnings(\"ignore\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Load a `Client` to use `dask.distributed`: [stackoverflow](https://stackoverflow.com/questions/51099685/best-practices-in-setting-number-of-dask-workers)\n", "- (Optionally) [Use the `dask` dashboard to visualize performance](https://github.com/dask/dask-labextension)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Number of CPUs: 4, number of threads: 2, number of workers: 2, processes: False\n" ] }, { "data": { "text/html": [ "
\n",
"Client\n", "
| \n",
"\n",
"Cluster\n", "
| \n",
"
\n",
"
| \n",
"\n", "\n", " | \n", "