From 0b3b2f204164e25b9ae01fbd73bec3d0b1323059 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 19:10:08 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .devcontainer/devcontainer.json | 14 +- .devcontainer/scipy2023/devcontainer.json | 14 +- .github/dependabot.yml | 6 +- .github/workflows/qaqc.yaml | 2 +- _config.yml | 12 +- .../automatic-vectorizing-numpy.ipynb | 28 +-- .../apply_ufunc/complex-output-numpy.ipynb | 30 +-- advanced/apply_ufunc/core-dimensions.ipynb | 44 ++-- advanced/apply_ufunc/dask_apply_ufunc.ipynb | 106 ++++----- .../apply_ufunc/numba-vectorization.ipynb | 40 ++-- .../simple_numpy_apply_ufunc.ipynb | 60 ++--- advanced/map_blocks/simple_map_blocks.ipynb | 30 +-- .../01.1_creating_data_structures.ipynb | 102 ++++----- fundamentals/01.1_io.ipynb | 38 ++-- fundamentals/03.3_windowed.ipynb | 60 ++--- fundamentals/03.4_weighted.ipynb | 26 +-- fundamentals/04.2_faceting.ipynb | 30 +-- fundamentals/04.3_geographic_plotting.ipynb | 14 +- .../01-high-level-computation-patterns.ipynb | 208 +++++++++--------- intermediate/cmip6-cloud.ipynb | 56 ++--- .../data_cleaning/05.3_ice_velocity.ipynb | 94 ++++---- intermediate/hvplot.ipynb | 26 +-- overview/fundamental-path/index.ipynb | 2 +- overview/intermediate-path/index.ipynb | 2 +- workshops/scipy2023/index.ipynb | 2 +- 25 files changed, 523 insertions(+), 523 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 68794f5b..5afe6e2f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,20 +1,20 @@ { "build": { "dockerfile": "./Dockerfile", - "context": "../conda" + "context": "../conda", }, "postCreateCommand": { - "vscode": "mkdir ${containerWorkspaceFolder}/.vscode && cp ${containerWorkspaceFolder}/.devcontainer/tasks.json ${containerWorkspaceFolder}/.vscode/tasks.json" + "vscode": "mkdir ${containerWorkspaceFolder}/.vscode && cp ${containerWorkspaceFolder}/.devcontainer/tasks.json ${containerWorkspaceFolder}/.vscode/tasks.json", }, "hostRequirements": { - "cpus": 2 + "cpus": 2, }, "customizations": { "codespaces": { - "openFiles": ["README.md"] + "openFiles": ["README.md"], }, "vscode": { - "extensions": ["ms-toolsai.jupyter", "ms-python.python"] - } - } + "extensions": ["ms-toolsai.jupyter", "ms-python.python"], + }, + }, } diff --git a/.devcontainer/scipy2023/devcontainer.json b/.devcontainer/scipy2023/devcontainer.json index 353cfda4..2bd50629 100644 --- a/.devcontainer/scipy2023/devcontainer.json +++ b/.devcontainer/scipy2023/devcontainer.json @@ -1,21 +1,21 @@ { "build": { "dockerfile": "../Dockerfile", - "context": "../../conda" + "context": "../../conda", }, "postCreateCommand": { "jupyterlab": "mkdir /home/jovyan/.jupyter && cp ${containerWorkspaceFolder}/.devcontainer/scipy2023/jupyter_lab_config.py /home/jovyan/.jupyter/jupyter_lab_config.py", - "vscode": "mkdir ${containerWorkspaceFolder}/.vscode && cp ${containerWorkspaceFolder}/.devcontainer/scipy2023/tasks.json ${containerWorkspaceFolder}/.vscode/tasks.json" + "vscode": "mkdir ${containerWorkspaceFolder}/.vscode && cp ${containerWorkspaceFolder}/.devcontainer/scipy2023/tasks.json ${containerWorkspaceFolder}/.vscode/tasks.json", }, "hostRequirements": { - "cpus": 2 + "cpus": 2, }, "customizations": { "codespaces": { - "openFiles": ["workshops/scipy2023/README.md"] + "openFiles": ["workshops/scipy2023/README.md"], }, "vscode": { - "extensions": ["ms-toolsai.jupyter", "ms-python.python"] - } - } + "extensions": ["ms-toolsai.jupyter", "ms-python.python"], + }, + }, } diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a049e851..f2ff82d7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,6 @@ version: 2 updates: - - package-ecosystem: 'docker' - directory: '/.devcontainer' + - package-ecosystem: "docker" + directory: "/.devcontainer" schedule: - interval: 'daily' + interval: "daily" diff --git a/.github/workflows/qaqc.yaml b/.github/workflows/qaqc.yaml index 8624493a..9bdbe69a 100644 --- a/.github/workflows/qaqc.yaml +++ b/.github/workflows/qaqc.yaml @@ -33,7 +33,7 @@ jobs: with: check_filenames: true check_hidden: true - skip: '.git,*.js,qaqc.yml' + skip: ".git,*.js,qaqc.yml" ignore_words_list: hist,nd # borrowed from https://github.com/ProjectPythia/pythia-foundations/blob/main/.github/workflows/link-checker.yaml diff --git a/_config.yml b/_config.yml index 377efc77..18c79fbd 100644 --- a/_config.yml +++ b/_config.yml @@ -1,7 +1,7 @@ # Learn more at https://jupyterbook.org/customize/config.html -title: '' +title: "" author: The Xarray Community -copyright: '2023' +copyright: "2023" logo: images/logo.png only_build_toc_files: true @@ -35,7 +35,7 @@ parse: # Force re-execution of notebooks on each build. # See https://jupyterbook.org/content/execute.html execute: - execute_notebooks: 'cache' + execute_notebooks: "cache" allow_errors: false # Per-cell notebook execution limit (seconds) timeout: 300 @@ -48,11 +48,11 @@ latex: # Configure your Binder links, such as the URL of the BinderHub. launch_buttons: notebook_interface: jupyterlab - binderhub_url: 'https://mybinder.org' + binderhub_url: "https://mybinder.org" # Information about where the book exists on the web repository: - url: 'https://github.com/xarray-contrib/xarray-tutorial' + url: "https://github.com/xarray-contrib/xarray-tutorial" branch: main # Bibliography @@ -71,7 +71,7 @@ sphinx: config: language: en # accessibility # application/vnd.holoviews_load.v0+json, application/vnd.holoviews_exec.v0+json - suppress_warnings: ['mystnb.unknown_mime_type', 'misc.highlighting_failure'] + suppress_warnings: ["mystnb.unknown_mime_type", "misc.highlighting_failure"] notfound_context: body: "

Whoops! 404 Page Not Found

\n\n

Sorry, this page doesn't exist. Many sections of this book have been updated recently.

Try the search box 🔎 to find what you're looking for!

" notfound_urls_prefix: / diff --git a/advanced/apply_ufunc/automatic-vectorizing-numpy.ipynb b/advanced/apply_ufunc/automatic-vectorizing-numpy.ipynb index d88eb7bb..6a18888e 100644 --- a/advanced/apply_ufunc/automatic-vectorizing-numpy.ipynb +++ b/advanced/apply_ufunc/automatic-vectorizing-numpy.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "6849dcdc-3484-4f41-8b23-51613d36812f", + "id": "0", "metadata": { "tags": [] }, @@ -13,7 +13,7 @@ }, { "cell_type": "markdown", - "id": "afc56d28-6e55-4967-b27d-28e2cc539cc7", + "id": "1", "metadata": { "tags": [] }, @@ -100,7 +100,7 @@ { "cell_type": "code", "execution_count": null, - "id": "76aa13b8-5ced-4468-a72e-6b0a29172d6d", + "id": "2", "metadata": { "tags": [] }, @@ -123,7 +123,7 @@ }, { "cell_type": "markdown", - "id": "81356724-6c1a-4d4a-9a32-bb906a9419b2", + "id": "3", "metadata": { "tags": [] }, @@ -139,7 +139,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cb286fa0-deba-4929-b18a-79af5acb0b5b", + "id": "4", "metadata": { "tags": [] }, @@ -160,7 +160,7 @@ }, { "cell_type": "markdown", - "id": "e3382658-14e1-4842-a618-ce7a27948c31", + "id": "5", "metadata": { "tags": [] }, @@ -175,7 +175,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1476bcce-cc7b-4252-90dd-f45502dffb09", + "id": "6", "metadata": { "tags": [ "raises-exception" @@ -198,7 +198,7 @@ }, { "cell_type": "markdown", - "id": "1d1da9c2-a634-4920-890c-74d9bec9eab9", + "id": "7", "metadata": { "tags": [] }, @@ -213,7 +213,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fa306dcf-eec3-425c-b278-42d15bbc0e4f", + "id": "8", "metadata": { "tags": [ "raises-exception" @@ -239,7 +239,7 @@ }, { "cell_type": "markdown", - "id": "6f5c928b-f8cb-4016-9d6d-39743f9c2976", + "id": "9", "metadata": { "tags": [] }, @@ -255,7 +255,7 @@ }, { "cell_type": "markdown", - "id": "737cc6b4-522f-488c-9124-524cc42ebef3", + "id": "10", "metadata": { "tags": [] }, @@ -265,7 +265,7 @@ }, { "cell_type": "markdown", - "id": "b6dac8da-8420-4fc4-9aeb-29b8999d4b37", + "id": "11", "metadata": { "tags": [] }, @@ -291,7 +291,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d72fdd8c-44d2-4f6e-9fc4-7084e0e49986", + "id": "12", "metadata": { "tags": [], "user_expressions": [] @@ -313,7 +313,7 @@ }, { "cell_type": "markdown", - "id": "d81f399e-1649-4d4b-ad28-81cba8403210", + "id": "13", "metadata": { "tags": [] }, diff --git a/advanced/apply_ufunc/complex-output-numpy.ipynb b/advanced/apply_ufunc/complex-output-numpy.ipynb index ede57235..d993fe0e 100644 --- a/advanced/apply_ufunc/complex-output-numpy.ipynb +++ b/advanced/apply_ufunc/complex-output-numpy.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "0203c86c-2e42-4226-acd1-1e9bcffc6708", + "id": "0", "metadata": { "tags": [] }, @@ -41,7 +41,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f7842446-6b7d-494b-9625-5dd04dc6e9ad", + "id": "1", "metadata": { "tags": [] }, @@ -66,7 +66,7 @@ { "cell_type": "code", "execution_count": null, - "id": "936f0cb2-491b-4560-9470-d98df595b3d1", + "id": "2", "metadata": { "tags": [] }, @@ -79,7 +79,7 @@ }, { "cell_type": "markdown", - "id": "db79d3e3-2a1a-4644-82a0-d58da74e0e36", + "id": "3", "metadata": { "tags": [] }, @@ -113,7 +113,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b5e9b4b4-712d-4ef7-8e13-9bbbad59728a", + "id": "4", "metadata": { "tags": [] }, @@ -133,7 +133,7 @@ }, { "cell_type": "markdown", - "id": "c0a5b8d4-729e-4d0e-b284-4751c5edc37c", + "id": "5", "metadata": { "tags": [] }, @@ -166,7 +166,7 @@ }, { "cell_type": "markdown", - "id": "7767a63d-20c5-4c2d-8bf0-3b26bc2b336f", + "id": "6", "metadata": { "tags": [], "user_expressions": [] @@ -183,7 +183,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0fc8f8f5-0560-46f2-be65-8daabea2d837", + "id": "7", "metadata": { "tags": [ "raises-exception" @@ -205,7 +205,7 @@ }, { "cell_type": "markdown", - "id": "5276692d-0e1d-498a-8d60-e08a4d8b9d3a", + "id": "8", "metadata": { "tags": [], "user_expressions": [] @@ -231,7 +231,7 @@ { "cell_type": "code", "execution_count": null, - "id": "61a39f36-9386-407b-b1c0-b49953da9d0c", + "id": "9", "metadata": { "tags": [] }, @@ -252,7 +252,7 @@ }, { "cell_type": "markdown", - "id": "a3c45b16-795c-4549-95ee-8e9c0d7dd517", + "id": "10", "metadata": { "tags": [] }, @@ -273,7 +273,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c7accd69-fece-46be-852b-0cb7c432197a", + "id": "11", "metadata": { "tags": [] }, @@ -289,7 +289,7 @@ }, { "cell_type": "markdown", - "id": "c99f6a5e-f977-4828-9418-202d93d0acda", + "id": "12", "metadata": { "tags": [], "user_expressions": [] @@ -305,7 +305,7 @@ { "cell_type": "code", "execution_count": null, - "id": "204c649e-18d4-403a-9366-c46caaaefb52", + "id": "13", "metadata": { "tags": [] }, @@ -322,7 +322,7 @@ }, { "cell_type": "markdown", - "id": "b9b023e8-5ca4-436a-bdfb-3ce35f6ea712", + "id": "14", "metadata": { "tags": [] }, diff --git a/advanced/apply_ufunc/core-dimensions.ipynb b/advanced/apply_ufunc/core-dimensions.ipynb index 2c4d39d9..c453494c 100644 --- a/advanced/apply_ufunc/core-dimensions.ipynb +++ b/advanced/apply_ufunc/core-dimensions.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "8a5fd05a-5187-4fb6-8809-049e7158124b", + "id": "0", "metadata": { "tags": [] }, @@ -38,7 +38,7 @@ }, { "cell_type": "markdown", - "id": "626c49ba-7d57-42e1-8e20-7d1b3ec7147d", + "id": "1", "metadata": {}, "source": [ "## Setup" @@ -47,7 +47,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cb4f4b80-d990-4bde-abf9-f77bac55c7ff", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -63,7 +63,7 @@ }, { "cell_type": "markdown", - "id": "61124d8d-2992-46d1-bd49-6282fe9aba82", + "id": "3", "metadata": {}, "source": [ "Let's load a dataset" @@ -72,7 +72,7 @@ { "cell_type": "code", "execution_count": null, - "id": "920c4b39-6f55-43cf-99df-7eb6ea01ad82", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -82,7 +82,7 @@ }, { "cell_type": "markdown", - "id": "cbaab26c-24ed-4e0f-8285-f0ffff92ec14", + "id": "5", "metadata": {}, "source": [ "## Reducing with `np.mean`\n", @@ -95,7 +95,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6637aa49-4f2f-4526-929c-65086e0196a1", + "id": "6", "metadata": { "tags": [] }, @@ -106,7 +106,7 @@ }, { "cell_type": "markdown", - "id": "7b66f1f2-369c-42b5-b082-735c71a2e1f9", + "id": "7", "metadata": { "tags": [] }, @@ -117,7 +117,7 @@ { "cell_type": "code", "execution_count": null, - "id": "30e7e10b-5447-4384-bc25-0cdea72da25a", + "id": "8", "metadata": { "tags": [] }, @@ -129,7 +129,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f53ec56a-63bb-4103-87e9-4e7c14dc6c1a", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -139,7 +139,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a8214ae7-00fa-47fa-af79-79c3731b8cc1", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -148,7 +148,7 @@ }, { "cell_type": "markdown", - "id": "938bd6a2-f0c0-412a-8f9b-4b2147750892", + "id": "11", "metadata": {}, "source": [ "Let's try to use `apply_ufunc` to replicate `np.mean(ds.air.data, axis=0)`" @@ -157,7 +157,7 @@ { "cell_type": "code", "execution_count": null, - "id": "424a54a2-b704-407b-80d8-27107949f184", + "id": "12", "metadata": { "tags": [ "raises-exception" @@ -177,7 +177,7 @@ }, { "cell_type": "markdown", - "id": "0ec1348a-cf6d-4d7e-b01b-5a9ea32f7565", + "id": "13", "metadata": { "tags": [] }, @@ -196,7 +196,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6e8d7580-2300-47f3-953b-403967eb7fcd", + "id": "14", "metadata": { "tags": [ "raises-exception" @@ -218,7 +218,7 @@ }, { "cell_type": "markdown", - "id": "6e856818-80fe-4412-a71f-4f77bb6911c6", + "id": "15", "metadata": { "tags": [] }, @@ -237,7 +237,7 @@ { "cell_type": "code", "execution_count": null, - "id": "562d5758-f492-4d9a-bf68-960da7580582", + "id": "16", "metadata": { "tags": [ "raises-exception" @@ -264,7 +264,7 @@ }, { "cell_type": "markdown", - "id": "27008aae-f1b7-45b2-88c7-2c440f23a958", + "id": "17", "metadata": {}, "source": [ "Now we see the issue:\n", @@ -278,7 +278,7 @@ { "cell_type": "code", "execution_count": null, - "id": "45ee968e-bee6-43c3-b4a1-ffdfaa5bad3c", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -287,7 +287,7 @@ }, { "cell_type": "markdown", - "id": "415b2169-e855-4013-bf88-10ee2e87604e", + "id": "19", "metadata": { "tags": [] }, @@ -309,7 +309,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0dafff0a-3a6d-476b-bc96-409a1872d136", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -330,7 +330,7 @@ }, { "cell_type": "markdown", - "id": "156701e9-9104-4db4-85da-24ead2c0836d", + "id": "21", "metadata": { "tags": [] }, diff --git a/advanced/apply_ufunc/dask_apply_ufunc.ipynb b/advanced/apply_ufunc/dask_apply_ufunc.ipynb index d6ae0713..216fe92f 100644 --- a/advanced/apply_ufunc/dask_apply_ufunc.ipynb +++ b/advanced/apply_ufunc/dask_apply_ufunc.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "7a8ff28a-4be3-469f-8cf4-9297e71cc4ca", + "id": "0", "metadata": { "tags": [] }, @@ -31,7 +31,7 @@ { "cell_type": "code", "execution_count": null, - "id": "32335e2d-9f8c-490d-a991-2bcabbdf3d16", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -48,7 +48,7 @@ }, { "cell_type": "markdown", - "id": "e511efdf-1f39-4dcf-a111-660eeca2eb8c", + "id": "2", "metadata": {}, "source": [ "First lets set up a `LocalCluster` using [dask.distributed](https://distributed.dask.org/).\n", @@ -61,7 +61,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ba5df0bd-4fa2-43b2-942c-fb6ce2a55d6c", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -73,7 +73,7 @@ }, { "cell_type": "markdown", - "id": "9aa9663b-028a-4639-be90-5576f88d1bfa", + "id": "4", "metadata": {}, "source": [ "

👆

Click the Dashboard link above. Or click the \"Search\" button in the dashboard.\n", @@ -84,7 +84,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4419e2a6-9ff7-4d33-b6da-243210c34a37", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -95,7 +95,7 @@ }, { "cell_type": "markdown", - "id": "e6abae80-004a-481f-9b1a-c476de951ef0", + "id": "6", "metadata": {}, "source": [ "Let's open a dataset. We specify `chunks` so that we create a dask arrays for the DataArrays" @@ -104,7 +104,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b74da273-e603-442f-9970-ef3eb17a3ad9", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -114,7 +114,7 @@ }, { "cell_type": "markdown", - "id": "a6b21b09-3ebb-4efb-9c57-44bf587ba92d", + "id": "8", "metadata": { "tags": [] }, @@ -154,7 +154,7 @@ { "cell_type": "code", "execution_count": null, - "id": "26800228-97cc-4f35-baf8-a5face577543", + "id": "9", "metadata": { "tags": [ "raises-exception" @@ -172,7 +172,7 @@ }, { "cell_type": "markdown", - "id": "5e2c1b9f-f436-414c-944b-fa134837ee32", + "id": "10", "metadata": { "tags": [] }, @@ -187,7 +187,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b2b6ffab-5b27-4169-b4c3-ce605707ba9d", + "id": "11", "metadata": { "tags": [] }, @@ -198,7 +198,7 @@ }, { "cell_type": "markdown", - "id": "a4c17b34-7fd9-45ef-9f71-041fc8b16fdf", + "id": "12", "metadata": { "tags": [] }, @@ -210,7 +210,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4e0806da-b6ea-4618-8394-b2e888f4c556", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -225,7 +225,7 @@ }, { "cell_type": "markdown", - "id": "c1418c06-e1f8-4db8-bdf5-a4e23f6524e1", + "id": "14", "metadata": { "tags": [] }, @@ -240,7 +240,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7d9a5eb4-c6e9-445f-87bb-5bcaa653439f", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -255,7 +255,7 @@ }, { "cell_type": "markdown", - "id": "ce1b0d1c-8bf3-4ddb-aa5f-e2ca70415ad6", + "id": "16", "metadata": { "tags": [] }, @@ -293,7 +293,7 @@ }, { "cell_type": "markdown", - "id": "7952ceb1-8402-41d1-8813-31228c3e9ae6", + "id": "17", "metadata": { "tags": [] }, @@ -304,7 +304,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6c343d01-cdf6-4e48-a349-606f06c4c251", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -323,7 +323,7 @@ }, { "cell_type": "markdown", - "id": "8abf7aa7-e1e6-4935-9d59-58d4f587135c", + "id": "19", "metadata": { "tags": [] }, @@ -347,7 +347,7 @@ { "cell_type": "code", "execution_count": null, - "id": "43a04e83-c061-4e14-80d9-b73d6c36981a", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -361,7 +361,7 @@ }, { "cell_type": "markdown", - "id": "f518099f-7778-4f0a-9d40-950968c651d5", + "id": "21", "metadata": { "tags": [] }, @@ -372,7 +372,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8faef8dd-13b0-46c6-a19a-08e5e095fd4c", + "id": "22", "metadata": {}, "outputs": [], "source": [ @@ -388,7 +388,7 @@ }, { "cell_type": "markdown", - "id": "3ec8e13e-77e0-4e46-a32d-dafa5da6fa6a", + "id": "23", "metadata": { "tags": [] }, @@ -399,7 +399,7 @@ { "cell_type": "code", "execution_count": null, - "id": "95c9e6e4-5011-4968-84f7-befe25c049bb", + "id": "24", "metadata": { "tags": [] }, @@ -410,7 +410,7 @@ }, { "cell_type": "markdown", - "id": "59e97071-493c-4df3-8214-d9d5ada940d2", + "id": "25", "metadata": {}, "source": [ "Now you have control over executing this parallel computation." @@ -419,7 +419,7 @@ { "cell_type": "code", "execution_count": null, - "id": "901f0d1d-a0c5-49fe-a27e-4b831ae0f9f4", + "id": "26", "metadata": {}, "outputs": [], "source": [ @@ -430,7 +430,7 @@ }, { "cell_type": "markdown", - "id": "6b91b8ca-cec9-49ca-b136-bf3b5f612d91", + "id": "27", "metadata": { "tags": [] }, @@ -446,7 +446,7 @@ }, { "cell_type": "markdown", - "id": "116fd5c7-5d15-4c05-96d0-73acb28e5403", + "id": "28", "metadata": { "tags": [] }, @@ -463,7 +463,7 @@ { "cell_type": "code", "execution_count": null, - "id": "45d737df-8a6b-4244-bef7-c3464a1b65da", + "id": "29", "metadata": { "tags": [] }, @@ -474,7 +474,7 @@ }, { "cell_type": "markdown", - "id": "82b66790-4c7c-4902-aa3b-89f92c5641b5", + "id": "30", "metadata": { "tags": [] }, @@ -488,7 +488,7 @@ }, { "cell_type": "markdown", - "id": "141c4c5d-d3dc-433c-a89f-8c8e7084f333", + "id": "31", "metadata": { "tags": [] }, @@ -514,7 +514,7 @@ }, { "cell_type": "markdown", - "id": "f411e1dc-5413-4400-8127-757f4bb7d640", + "id": "32", "metadata": { "tags": [] }, @@ -527,7 +527,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1c454151-b331-43d1-8eb1-c0103e821712", + "id": "33", "metadata": { "tags": [] }, @@ -552,7 +552,7 @@ }, { "cell_type": "markdown", - "id": "33c4e90c-f153-407f-ba1b-e100e827e2c2", + "id": "34", "metadata": {}, "source": [ "Note that we received an Xarray object back (`integrated`) but our wrapper function was called with a numpy array of shape `(1,1,1)`.\n", @@ -589,7 +589,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b53fed48-5dc2-4a0b-985c-71bd436ca058", + "id": "35", "metadata": { "tags": [ "output-scroll" @@ -602,7 +602,7 @@ }, { "cell_type": "markdown", - "id": "c265429d-6abb-4475-a9b0-2dcb0902afb1", + "id": "36", "metadata": {}, "source": [ "We see that `integrate_wrapper` is called many times! As many times as there are blocks in the array in fact, which is 30 here (`ds.air.data.numblocks`).\n", @@ -629,7 +629,7 @@ }, { "cell_type": "markdown", - "id": "4d971644-7cd2-4cda-8004-c0bb588e3a8b", + "id": "37", "metadata": { "tags": [] }, @@ -645,7 +645,7 @@ }, { "cell_type": "markdown", - "id": "0c984ddb-3798-435b-b33b-0f9d8a645b83", + "id": "38", "metadata": { "tags": [] }, @@ -667,7 +667,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5d82f436-65fe-484e-9295-382f6c725b80", + "id": "39", "metadata": { "tags": [ "raises-exception" @@ -689,7 +689,7 @@ }, { "cell_type": "markdown", - "id": "d92e60e2-2652-4023-a6ce-7f83046e44ad", + "id": "40", "metadata": {}, "source": [ "Provide the size of the newly added dimension `newdim` in `output_sizes` as part of the `dask_gufunc_kwargs` keyword argument:\n", @@ -708,7 +708,7 @@ { "cell_type": "code", "execution_count": null, - "id": "32bc121c-cb91-430b-96ab-a39079b5e80c", + "id": "41", "metadata": { "tags": [] }, @@ -725,7 +725,7 @@ }, { "cell_type": "markdown", - "id": "b3c08d6e-cc7b-4d6d-b074-ff90ba99e6c7", + "id": "42", "metadata": {}, "source": [ "### Dimensions that change size" @@ -733,7 +733,7 @@ }, { "cell_type": "markdown", - "id": "72177e24-0c3b-4e73-9a2b-9929d19c0490", + "id": "43", "metadata": {}, "source": [ "We will now repeat the [interpolation example from earlier](interp-add-new-dim) with `\"lat\"` as the output core dimension. See the numpy notebook on [complex output](complex-output) for more.\n", @@ -758,7 +758,7 @@ { "cell_type": "code", "execution_count": null, - "id": "180ae3e2-82a2-4d2c-8217-88c97533eb1e", + "id": "44", "metadata": { "tags": [ "raises-exception" @@ -784,7 +784,7 @@ }, { "cell_type": "markdown", - "id": "62424e94-baed-425c-8169-da769da480b8", + "id": "45", "metadata": {}, "source": [ "This error means that we need to provide `output_dtypes`\n", @@ -796,7 +796,7 @@ { "cell_type": "code", "execution_count": null, - "id": "797a2875-e727-4866-af43-5ed0e8eaed5f", + "id": "46", "metadata": { "tags": [] }, @@ -821,7 +821,7 @@ }, { "cell_type": "markdown", - "id": "344b3051-b469-4859-8412-dc60552b1d14", + "id": "47", "metadata": {}, "source": [ "```{tip}\n", @@ -831,7 +831,7 @@ }, { "cell_type": "markdown", - "id": "9646a631-2318-43c4-923d-a5384885134a", + "id": "48", "metadata": {}, "source": [ "### Automatic Vectorizing\n", @@ -842,7 +842,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d8accd13-1afe-4085-97a6-86e4a5bd4405", + "id": "49", "metadata": { "tags": [] }, @@ -866,7 +866,7 @@ }, { "cell_type": "markdown", - "id": "e484de1b-9d2f-4ad0-b978-550df593ee2f", + "id": "50", "metadata": {}, "source": [ "Again, it is important to understand the conceptual flow of information between the variuus packages when executing `interped.compute()` which looks ilke\n", @@ -891,7 +891,7 @@ }, { "cell_type": "markdown", - "id": "c3618181-7432-409e-95e7-d7bc4cc567ce", + "id": "51", "metadata": { "tags": [] }, @@ -902,7 +902,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b5d9ab78-1b89-4530-a904-1d1e8475e949", + "id": "52", "metadata": { "tags": [ "remove-output" diff --git a/advanced/apply_ufunc/numba-vectorization.ipynb b/advanced/apply_ufunc/numba-vectorization.ipynb index c1df10d1..91195214 100644 --- a/advanced/apply_ufunc/numba-vectorization.ipynb +++ b/advanced/apply_ufunc/numba-vectorization.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "93a37164-1923-48bd-9393-2acb7aec1a56", + "id": "0", "metadata": { "tags": [] }, @@ -14,7 +14,7 @@ }, { "cell_type": "markdown", - "id": "d22ea5e8-ac54-4c51-ba02-c8027140c1b1", + "id": "1", "metadata": { "tags": [] }, @@ -33,7 +33,7 @@ }, { "cell_type": "markdown", - "id": "c87db0b2-bb9f-4100-aa6f-5e73ed807182", + "id": "2", "metadata": {}, "source": [ "## Load data" @@ -42,7 +42,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff0aebbd-eca0-4d4d-bb4f-42ee646acad8", + "id": "3", "metadata": { "tags": [] }, @@ -64,7 +64,7 @@ }, { "cell_type": "markdown", - "id": "b0bdb9b4-83dd-4391-a601-fbc4188ef15f", + "id": "4", "metadata": {}, "source": [ "## `vectorize`\n", @@ -75,7 +75,7 @@ { "cell_type": "code", "execution_count": null, - "id": "49793ab4-8df7-4182-8151-9276fef789d8", + "id": "5", "metadata": { "tags": [] }, @@ -91,7 +91,7 @@ }, { "cell_type": "markdown", - "id": "3c82f57c-ffe9-40ae-b429-1a273037731e", + "id": "6", "metadata": {}, "source": [ "See the numba documentation to understand `@vectorize([float64(float64, float64)])`\n", @@ -102,7 +102,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1968525f-de80-441d-8c5a-e21395c832c0", + "id": "7", "metadata": { "tags": [] }, @@ -113,7 +113,7 @@ }, { "cell_type": "markdown", - "id": "edf740d7-ca56-42dd-86f2-d9d7c2730b15", + "id": "8", "metadata": {}, "source": [ "## `guvectorize`\n", @@ -129,7 +129,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3f8e96b3-d0f0-47d8-aeec-125c89642c2b", + "id": "9", "metadata": { "tags": [] }, @@ -150,7 +150,7 @@ }, { "cell_type": "markdown", - "id": "f365fb19-5fe8-4034-9c2f-6a4a8a5b1f12", + "id": "10", "metadata": {}, "source": [ "Unlike `squared_error` we cannot pass an Xarray object to `g` directly." @@ -159,7 +159,7 @@ { "cell_type": "code", "execution_count": null, - "id": "138e692e-36bf-45ca-8131-feeb1c1b41c4", + "id": "11", "metadata": { "tags": [ "raises-exception" @@ -172,7 +172,7 @@ }, { "cell_type": "markdown", - "id": "e46c26c4-7377-4679-9b9e-923c154a4b88", + "id": "12", "metadata": {}, "source": [ "Now use `apply_ufunc`." @@ -181,7 +181,7 @@ { "cell_type": "code", "execution_count": null, - "id": "759308fa-14ef-407a-bd1d-732c7fc39c12", + "id": "13", "metadata": { "tags": [] }, @@ -198,7 +198,7 @@ }, { "cell_type": "markdown", - "id": "ba64c71d-9fe0-4479-8d3d-0b383c88e464", + "id": "14", "metadata": {}, "source": [ "Notice the following:\n", @@ -209,7 +209,7 @@ }, { "cell_type": "markdown", - "id": "471853be-b718-47b8-a19f-6ada0edda7d5", + "id": "15", "metadata": {}, "source": [ "## With dask\n" @@ -217,7 +217,7 @@ }, { "cell_type": "markdown", - "id": "f123fc32-9a48-4910-8d85-da85a15f69f8", + "id": "16", "metadata": {}, "source": [ "Use the chunked DataArray" @@ -226,7 +226,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5fe08c1c-7ef9-4d03-b57f-76047b638aa2", + "id": "17", "metadata": { "tags": [] }, @@ -238,7 +238,7 @@ }, { "cell_type": "markdown", - "id": "ad018876-302f-41bf-82e4-2605b92f3d30", + "id": "18", "metadata": {}, "source": [ "```{exercise}\n", @@ -264,7 +264,7 @@ }, { "cell_type": "markdown", - "id": "48a3df42-23d1-4953-8b28-f0efaef75fcd", + "id": "19", "metadata": {}, "source": [ "## Next\n", diff --git a/advanced/apply_ufunc/simple_numpy_apply_ufunc.ipynb b/advanced/apply_ufunc/simple_numpy_apply_ufunc.ipynb index 68fd8eb8..4305f936 100644 --- a/advanced/apply_ufunc/simple_numpy_apply_ufunc.ipynb +++ b/advanced/apply_ufunc/simple_numpy_apply_ufunc.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "7a8ff28a-4be3-469f-8cf4-9297e71cc4ca", + "id": "0", "metadata": { "tags": [] }, @@ -39,7 +39,7 @@ { "cell_type": "code", "execution_count": null, - "id": "32335e2d-9f8c-490d-a991-2bcabbdf3d16", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -55,7 +55,7 @@ }, { "cell_type": "markdown", - "id": "e6abae80-004a-481f-9b1a-c476de951ef0", + "id": "2", "metadata": {}, "source": [ "Let's load a dataset" @@ -64,7 +64,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b74da273-e603-442f-9970-ef3eb17a3ad9", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -74,7 +74,7 @@ }, { "cell_type": "markdown", - "id": "a6b21b09-3ebb-4efb-9c57-44bf587ba92d", + "id": "4", "metadata": { "tags": [] }, @@ -90,7 +90,7 @@ { "cell_type": "code", "execution_count": null, - "id": "26800228-97cc-4f35-baf8-a5face577543", + "id": "5", "metadata": { "tags": [ "raises-exception" @@ -104,7 +104,7 @@ }, { "cell_type": "markdown", - "id": "f7566ce1-5276-4f80-a33b-e1cc149f6a90", + "id": "6", "metadata": {}, "source": [ "````{tip}\n", @@ -121,7 +121,7 @@ }, { "cell_type": "markdown", - "id": "7bee21ef-be9e-4393-82cf-e0fc6fe8d97e", + "id": "7", "metadata": {}, "source": [ "We can apply `squared_error` manually by extracting the underlying numpy array" @@ -130,7 +130,7 @@ { "cell_type": "code", "execution_count": null, - "id": "69dfcefd-1720-4315-96e0-eca7cc32a3c6", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -140,7 +140,7 @@ }, { "cell_type": "markdown", - "id": "0b001bf4-1e7c-4c34-8ff3-81b18c65cf5d", + "id": "9", "metadata": {}, "source": [ "To convert this result to a DataArray, we could do it manually" @@ -149,7 +149,7 @@ { "cell_type": "code", "execution_count": null, - "id": "73fc3c08-6015-4f08-97cd-4e431229c9c5", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -165,7 +165,7 @@ }, { "cell_type": "markdown", - "id": "110f7456-a52b-4ce9-b779-f9f542a427c4", + "id": "11", "metadata": {}, "source": [ "A shorter version uses [DataArray.copy](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.copy.html)" @@ -174,7 +174,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ea78fb57-e142-4db5-8834-1889440c5367", + "id": "12", "metadata": {}, "outputs": [], "source": [ @@ -183,7 +183,7 @@ }, { "cell_type": "markdown", - "id": "b93a8aba-0427-4223-a4a3-7beb6ea4dc48", + "id": "13", "metadata": { "tags": [] }, @@ -197,7 +197,7 @@ }, { "cell_type": "markdown", - "id": "b5e335ab-b1c7-4b44-a373-7c9476427826", + "id": "14", "metadata": { "tags": [] }, @@ -210,7 +210,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f145c8ca-f559-4005-b51c-c59ee7ebaef7", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -219,7 +219,7 @@ }, { "cell_type": "markdown", - "id": "d2a667ad-81ad-42e1-a46f-f991cbbf36d0", + "id": "16", "metadata": { "tags": [] }, @@ -244,7 +244,7 @@ { "cell_type": "code", "execution_count": null, - "id": "05c0fe6d-e553-4c38-9cf7-9b7e6efab9a4", + "id": "17", "metadata": {}, "outputs": [], "source": [ @@ -259,7 +259,7 @@ }, { "cell_type": "markdown", - "id": "cb1abf7b-ba81-420d-9b59-dc0439bcfa10", + "id": "18", "metadata": { "tags": [] }, @@ -279,7 +279,7 @@ }, { "cell_type": "markdown", - "id": "2b370050-1f93-49a8-b8e1-671710967315", + "id": "19", "metadata": {}, "source": [ "## Handling attributes\n", @@ -290,7 +290,7 @@ { "cell_type": "code", "execution_count": null, - "id": "40a480bd-ff78-45b8-a818-869c2091c1f4", + "id": "20", "metadata": { "tags": [] }, @@ -302,7 +302,7 @@ }, { "cell_type": "markdown", - "id": "9169294d-08c5-413a-a87d-98e59957d102", + "id": "21", "metadata": {}, "source": [ "To propagate attributes, pass `keep_attrs=True`" @@ -311,7 +311,7 @@ { "cell_type": "code", "execution_count": null, - "id": "07f38f4f-cd62-4790-89b0-9de654ed4057", + "id": "22", "metadata": { "tags": [] }, @@ -323,7 +323,7 @@ }, { "cell_type": "markdown", - "id": "f31b53ae-b6bf-4259-8c2a-67a231c9de73", + "id": "23", "metadata": { "tags": [] }, @@ -342,7 +342,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1d1fd411-3aaa-4e86-9f3b-739c58f35ee6", + "id": "24", "metadata": { "tags": [] }, @@ -354,7 +354,7 @@ }, { "cell_type": "markdown", - "id": "84a32eb2-2e6f-4a7d-897c-b221f5c3c26e", + "id": "25", "metadata": {}, "source": [ "We see that `wrapper` is called twice" @@ -363,7 +363,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8faf9e4d-c5e3-4a41-b866-b6f39df04e10", + "id": "26", "metadata": {}, "outputs": [], "source": [ @@ -373,7 +373,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5b658981-db33-4a46-84cc-8c17db68b1e0", + "id": "27", "metadata": {}, "outputs": [], "source": [ @@ -382,7 +382,7 @@ }, { "cell_type": "markdown", - "id": "f8359efc-ffde-4357-a4fb-702dc064c85a", + "id": "28", "metadata": { "tags": [] }, @@ -404,7 +404,7 @@ { "cell_type": "code", "execution_count": null, - "id": "664a7004-6327-4edc-afe1-994c42d8181a", + "id": "29", "metadata": { "tags": [] }, diff --git a/advanced/map_blocks/simple_map_blocks.ipynb b/advanced/map_blocks/simple_map_blocks.ipynb index bfa8c939..ac842552 100644 --- a/advanced/map_blocks/simple_map_blocks.ipynb +++ b/advanced/map_blocks/simple_map_blocks.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "32a33add-8107-4f88-b831-7d24d76b2a98", + "id": "0", "metadata": { "tags": [] }, @@ -22,7 +22,7 @@ }, { "cell_type": "markdown", - "id": "8418c5da-3605-4bed-8582-7714318be228", + "id": "1", "metadata": {}, "source": [ "## Setup" @@ -31,7 +31,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0e5f4844-8b33-4c9e-aa73-de60c1dc1f03", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -42,7 +42,7 @@ }, { "cell_type": "markdown", - "id": "f26cd492-3d7e-4095-ba50-39db83ebc212", + "id": "3", "metadata": {}, "source": [ "First lets set up a `LocalCluster` using [dask.distributed](https://distributed.dask.org/).\n", @@ -55,7 +55,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e55bfcc0-aef3-4538-9491-0c2b7a5cfe6b", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -67,7 +67,7 @@ }, { "cell_type": "markdown", - "id": "739b5598-c8aa-4f6f-bdd4-634a8747a214", + "id": "5", "metadata": {}, "source": [ "

👆

Click the Dashboard link above. Or click the \"Search\" button in the dashboard.\n", @@ -78,7 +78,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0a8d57c6-0ea8-4f59-bfb3-fa6e405da420", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -89,7 +89,7 @@ }, { "cell_type": "markdown", - "id": "57eb5652-5d31-41b8-af1a-2c81a07af864", + "id": "7", "metadata": {}, "source": [ "Let's open a dataset. We specify `chunks` so that we create a dask arrays for the DataArrays" @@ -98,7 +98,7 @@ { "cell_type": "code", "execution_count": null, - "id": "db68e508-a095-4487-8cb2-8dbefb29708d", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -108,7 +108,7 @@ }, { "cell_type": "markdown", - "id": "fbff39fd-60ed-43d0-8cee-339850ac3f2e", + "id": "9", "metadata": {}, "source": [ "## Simple example\n", @@ -119,7 +119,7 @@ { "cell_type": "code", "execution_count": null, - "id": "780fe5ac-6c28-4db5-b277-bea05673f23f", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -136,7 +136,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d95d30c3-bb12-48b0-8d84-6b2e2d1532f6", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -146,7 +146,7 @@ }, { "cell_type": "markdown", - "id": "037529cc-f326-4bc1-bcec-932943b7c54b", + "id": "12", "metadata": {}, "source": [ "### Exercise\n", @@ -165,7 +165,7 @@ }, { "cell_type": "markdown", - "id": "ccab2fa5-5ce8-4bae-8e15-67e68fb55ccd", + "id": "13", "metadata": {}, "source": [ "### More advanced functions\n", @@ -180,7 +180,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f1353ece-153b-4bc6-a9e5-078ad003d9b3", + "id": "14", "metadata": {}, "outputs": [], "source": [ diff --git a/fundamentals/01.1_creating_data_structures.ipynb b/fundamentals/01.1_creating_data_structures.ipynb index b20f6336..9685cc1d 100644 --- a/fundamentals/01.1_creating_data_structures.ipynb +++ b/fundamentals/01.1_creating_data_structures.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "17d7dc20-40bc-4597-84f1-6284f5ebec99", + "id": "0", "metadata": {}, "source": [ "\n", @@ -13,7 +13,7 @@ { "cell_type": "code", "execution_count": null, - "id": "653fb538-39d0-4f82-9e04-054dc7530c67", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -28,7 +28,7 @@ }, { "cell_type": "markdown", - "id": "d712b4d3-63eb-4c69-9f1a-81d0cde1a099", + "id": "2", "metadata": {}, "source": [ "In the last lecture, we looked at the following example Dataset. In most cases Xarray Datasets are created by reading a file. We'll address this in the next lecture. Here we'll learn how to create Xarray objects from scratch" @@ -37,7 +37,7 @@ { "cell_type": "code", "execution_count": null, - "id": "68d0f1b0-eb1f-4579-b6d6-fb2a67a3bea3", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -47,7 +47,7 @@ }, { "cell_type": "markdown", - "id": "7819aedb-c6e9-4c5c-9fff-e0c93445d957", + "id": "4", "metadata": {}, "source": [ "## DataArray\n", @@ -61,7 +61,7 @@ { "cell_type": "code", "execution_count": null, - "id": "20e7c298-837b-40cf-9e82-600d69c62d5f", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -71,7 +71,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8cd31213-7af2-4ce6-9621-05ee504d7499", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -80,7 +80,7 @@ }, { "cell_type": "markdown", - "id": "7a79c73f-a3e3-419b-bfcb-bb8351ab5f50", + "id": "7", "metadata": {}, "source": [ "We do this using the [DataArray](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html) _constructor_." @@ -89,7 +89,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3410909e-0dd6-4ef4-acb4-2e40f47d2733", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -98,7 +98,7 @@ }, { "cell_type": "markdown", - "id": "6b72b5d4-8929-43ce-af73-f0ef31bd0cc9", + "id": "9", "metadata": {}, "source": [ "This works. Notice that the default dimension names are not so useful: `dim_0`, `dim_1`, `dim_2`\n", @@ -112,7 +112,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b527e34d-f830-4046-af1b-e2f752309bc9", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -121,7 +121,7 @@ }, { "cell_type": "markdown", - "id": "58dea713-1262-4b95-961f-b0aad08f4953", + "id": "11", "metadata": {}, "source": [ "Much better! But notice we have no entries under \"Coordinates\".\n", @@ -145,7 +145,7 @@ { "cell_type": "code", "execution_count": null, - "id": "042485be-ec39-4c1a-b333-66aa72d0ebe8", + "id": "12", "metadata": {}, "outputs": [], "source": [ @@ -155,7 +155,7 @@ }, { "cell_type": "markdown", - "id": "e7e1c382-cc00-4c27-a009-2620cd024389", + "id": "13", "metadata": {}, "source": [ "Assigning a plain numpy array is equivalent to creating a DataArray with those values and the same dimension name" @@ -164,7 +164,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6cccefd5-b48a-4030-bd20-35a3df9ee6f6", + "id": "14", "metadata": {}, "outputs": [], "source": [ @@ -175,7 +175,7 @@ }, { "cell_type": "markdown", - "id": "7cfd14f3-a86d-4e31-b6ce-4aaca3044c82", + "id": "15", "metadata": {}, "source": [ "We can also assign coordinates after a DataArray has been created." @@ -184,7 +184,7 @@ { "cell_type": "code", "execution_count": null, - "id": "41ccd214-ed80-44bf-91c7-53a99677e474", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -194,7 +194,7 @@ }, { "cell_type": "markdown", - "id": "1561da32-379f-4fe9-bd0a-a3b9abe65e5f", + "id": "17", "metadata": {}, "source": [ "### Attributes \n", @@ -205,7 +205,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ebbcc6b1-7e60-497c-9a5c-e13953b81b5d", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -215,7 +215,7 @@ }, { "cell_type": "markdown", - "id": "47f25031-f631-4643-b138-9040bba0fdb6", + "id": "19", "metadata": {}, "source": [ "or specified in the constructor" @@ -224,7 +224,7 @@ { "cell_type": "code", "execution_count": null, - "id": "46639869-9e7e-44f5-8f77-8fbc38808a83", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -236,7 +236,7 @@ }, { "cell_type": "markdown", - "id": "1544c70a-0172-46ec-bdaa-6acb357e5fb7", + "id": "21", "metadata": {}, "source": [ "### Non-dimension coordinates\n", @@ -251,7 +251,7 @@ { "cell_type": "code", "execution_count": null, - "id": "78227316-74fe-427a-8e1d-2a7796afd100", + "id": "22", "metadata": {}, "outputs": [], "source": [ @@ -261,7 +261,7 @@ }, { "cell_type": "markdown", - "id": "6146c08a-10da-413b-809a-057459afed54", + "id": "23", "metadata": {}, "source": [ "### Exercises\n", @@ -274,7 +274,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6b4d6202-750c-4e75-a950-53b221388b5e", + "id": "24", "metadata": { "tags": [ "hide-input", @@ -288,7 +288,7 @@ }, { "cell_type": "markdown", - "id": "4c59f08d-2090-4214-980e-1f0b97fe8677", + "id": "25", "metadata": {}, "source": [ "2. with dimension coordinates:\n", @@ -300,7 +300,7 @@ { "cell_type": "code", "execution_count": null, - "id": "729c2351-c48c-40b2-b473-917e9828b655", + "id": "26", "metadata": { "tags": [ "hide-input", @@ -318,7 +318,7 @@ }, { "cell_type": "markdown", - "id": "eadb4a67-765e-46e4-bb8c-c8e643b21f63", + "id": "27", "metadata": {}, "source": [ "3. with metadata for both data and coordinates:\n", @@ -331,7 +331,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fb20e7c7-6f8e-4efe-a0fc-a2d2bc4e40f9", + "id": "28", "metadata": {}, "outputs": [], "source": [ @@ -353,7 +353,7 @@ }, { "cell_type": "markdown", - "id": "8640c285-e582-494d-b745-80cd01e906b0", + "id": "29", "metadata": {}, "source": [ "## Dataset\n", @@ -371,7 +371,7 @@ }, { "cell_type": "markdown", - "id": "45f659a9-f62f-4820-8a5d-29a79b51c27b", + "id": "30", "metadata": {}, "source": [ "Creating an empty Dataset is easy!" @@ -380,7 +380,7 @@ { "cell_type": "code", "execution_count": null, - "id": "65581a0f-e8b8-4da5-85f7-6f847dc1f715", + "id": "31", "metadata": {}, "outputs": [], "source": [ @@ -389,7 +389,7 @@ }, { "cell_type": "markdown", - "id": "d452b562-0813-421c-bd5f-67a0ea0cabe7", + "id": "32", "metadata": {}, "source": [ "### Data Variables\n", @@ -400,7 +400,7 @@ { "cell_type": "code", "execution_count": null, - "id": "50008d77-2783-4b66-8a8d-6b821d8a567d", + "id": "33", "metadata": {}, "outputs": [], "source": [ @@ -410,7 +410,7 @@ }, { "cell_type": "markdown", - "id": "0a6e4a5c-ff52-4102-b51e-4a3343d53c6c", + "id": "34", "metadata": {}, "source": [ "You can directly assign a new data variables" @@ -419,7 +419,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a5cfcfbd-7514-404d-98dc-ae1154ae6ad5", + "id": "35", "metadata": {}, "outputs": [], "source": [ @@ -429,7 +429,7 @@ }, { "cell_type": "markdown", - "id": "da632cbd-a3d1-4aed-98f7-546faa4f27dc", + "id": "36", "metadata": {}, "source": [ "### Coordinates\n", @@ -440,7 +440,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9efc60be-a299-4aa8-992d-4f8a7dff44eb", + "id": "37", "metadata": {}, "outputs": [], "source": [ @@ -452,7 +452,7 @@ }, { "cell_type": "markdown", - "id": "e2e1cf16-f163-4a34-8433-ceb978deedfe", + "id": "38", "metadata": {}, "source": [ "Again we can assign coordinate variables after a Dataset has been created." @@ -461,7 +461,7 @@ { "cell_type": "code", "execution_count": null, - "id": "25a19c02-1979-46da-86a3-e3a4546405a7", + "id": "39", "metadata": {}, "outputs": [], "source": [ @@ -471,7 +471,7 @@ { "cell_type": "code", "execution_count": null, - "id": "91e462a1-6cab-496c-bb90-a9ca6ab4ae2c", + "id": "40", "metadata": {}, "outputs": [], "source": [ @@ -481,7 +481,7 @@ }, { "cell_type": "markdown", - "id": "473b8a3c-ef53-4b20-84ff-a5061cfaf4c7", + "id": "41", "metadata": {}, "source": [ "### Attributes" @@ -490,7 +490,7 @@ { "cell_type": "code", "execution_count": null, - "id": "da3be397-7b28-44e8-86be-465df969edc2", + "id": "42", "metadata": {}, "outputs": [], "source": [ @@ -504,7 +504,7 @@ { "cell_type": "code", "execution_count": null, - "id": "987a518e-a130-4e02-8b80-6ff857d3cefe", + "id": "43", "metadata": {}, "outputs": [], "source": [ @@ -513,7 +513,7 @@ }, { "cell_type": "markdown", - "id": "8c306194-d30d-4e45-bd9c-98d884bea506", + "id": "44", "metadata": {}, "source": [ "### Exercises\n", @@ -525,7 +525,7 @@ { "cell_type": "code", "execution_count": null, - "id": "05ee871f-baf4-4418-99d5-85a509ac914d", + "id": "45", "metadata": {}, "outputs": [], "source": [ @@ -536,7 +536,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b8c685db-b681-4e76-9e7c-4bceb6a0197b", + "id": "46", "metadata": { "tags": [ "hide-input", @@ -555,7 +555,7 @@ }, { "cell_type": "markdown", - "id": "d47c394a-e3a0-4419-b03e-74454d14d27a", + "id": "47", "metadata": {}, "source": [ "2. add coordinates to `latitude` and `longitude`:\n", @@ -567,7 +567,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6211a7bf-4f49-46db-85f9-0cb69ac00867", + "id": "48", "metadata": {}, "outputs": [], "source": [ @@ -585,7 +585,7 @@ }, { "cell_type": "markdown", - "id": "51188a48-e22e-43f4-9929-c0bab61f0894", + "id": "49", "metadata": {}, "source": [ "3. add metadata to coordinates and variables:\n", @@ -599,7 +599,7 @@ { "cell_type": "code", "execution_count": null, - "id": "38f1f371-a978-43b0-a302-4b63ef240de7", + "id": "50", "metadata": { "tags": [ "hide-input", diff --git a/fundamentals/01.1_io.ipynb b/fundamentals/01.1_io.ipynb index f9dbcd5a..f5328c4c 100644 --- a/fundamentals/01.1_io.ipynb +++ b/fundamentals/01.1_io.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "24b5bda9-4108-46b0-a3c3-4cf8e041ffa7", + "id": "0", "metadata": {}, "source": [ "# Reading and writing files\n", @@ -39,7 +39,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6dae3b9a-9ba9-4a64-87b1-78824e0e5a63", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -52,7 +52,7 @@ }, { "cell_type": "markdown", - "id": "e4bc6a8b", + "id": "2", "metadata": {}, "source": [ "The constructor of `Dataset` takes three parameters:\n", @@ -66,7 +66,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d679229a-a159-4783-81f5-dcaaf0bc74ae", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -103,7 +103,7 @@ }, { "cell_type": "markdown", - "id": "d49af8bc-49e4-41a4-b4eb-1ad537ff1445", + "id": "4", "metadata": {}, "source": [ "Reading those files is just as simple:\n" @@ -112,7 +112,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4c762492-79f6-42bc-89f9-5bcf09b49141", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -122,7 +122,7 @@ { "cell_type": "code", "execution_count": null, - "id": "083c1fc9-fe16-4662-99c1-e29e36dcfc27", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -131,7 +131,7 @@ }, { "cell_type": "markdown", - "id": "c1de72cd-d5f6-4f5b-a12c-bb77beb1a55e", + "id": "7", "metadata": {}, "source": [ "\n", @@ -151,7 +151,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f0ff7fc0-edff-4d6f-81d2-a4b3d863c4db", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -160,7 +160,7 @@ }, { "cell_type": "markdown", - "id": "0aa2e618-b257-40a0-ad81-04bb5d207224", + "id": "9", "metadata": {}, "source": [ "We can then read the created file with:\n" @@ -169,7 +169,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b487f695-c1d3-4782-b00e-49554eb24ddc", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -178,7 +178,7 @@ }, { "cell_type": "markdown", - "id": "5f0dd3e1-a33b-4c39-be24-9cbdce8ab704", + "id": "11", "metadata": {}, "source": [ "setting the `chunks` parameter to `None` avoids `dask` (more on that in a later\n", @@ -187,7 +187,7 @@ }, { "cell_type": "markdown", - "id": "6cbebf89-7a64-4af6-af7f-04c906bfbeac", + "id": "12", "metadata": {}, "source": [ "**tip:** You can write to any dictionary-like (`MutableMapping`) interface:" @@ -196,7 +196,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d163a407-3320-408c-a926-1aca07d0af70", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -207,7 +207,7 @@ }, { "cell_type": "markdown", - "id": "5b2acbba-ba4f-4819-8600-f89a6109e6df", + "id": "14", "metadata": {}, "source": [ "## Raster files using rioxarray\n", @@ -220,7 +220,7 @@ { "cell_type": "code", "execution_count": null, - "id": "648d3d02-b322-468f-8bd5-41eaf3d2bc36", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -241,7 +241,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87b540d6-33fd-4956-9a03-4d812a62f50e", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -250,7 +250,7 @@ }, { "cell_type": "markdown", - "id": "d83ec937-8e01-488d-873b-16dd83edcd62", + "id": "17", "metadata": {}, "source": [ "NOTE: you can now load this file into GIS tools like [QGIS](https://www.qgis.org)! Or open back into Xarray:" @@ -259,7 +259,7 @@ { "cell_type": "code", "execution_count": null, - "id": "81c1881c-7c7f-48c6-8add-63886372357a", + "id": "18", "metadata": {}, "outputs": [], "source": [ diff --git a/fundamentals/03.3_windowed.ipynb b/fundamentals/03.3_windowed.ipynb index 7c28884c..504ee9b7 100644 --- a/fundamentals/03.3_windowed.ipynb +++ b/fundamentals/03.3_windowed.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5d7c85f4-6334-4527-ae2e-34312161aa31", + "id": "0", "metadata": {}, "source": [ "# Windowed Computations\n", @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5863f858-a381-45ba-8f28-bc152fc845c1", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -38,7 +38,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9eb4ab3a-d83b-4a00-ab7f-6895b592e732", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -48,7 +48,7 @@ }, { "cell_type": "markdown", - "id": "18a05cff-447b-4007-ac11-3bf207d99008", + "id": "3", "metadata": {}, "source": [ "## Rolling or moving windows" @@ -56,7 +56,7 @@ }, { "cell_type": "markdown", - "id": "0693900c-b4e1-4547-8c0d-1374850a1d5c", + "id": "4", "metadata": {}, "source": [ "Rolling window operations \n", @@ -70,7 +70,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0f393ba9-4606-457a-9766-2ea90f0cbccd", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -80,7 +80,7 @@ }, { "cell_type": "markdown", - "id": "b48567bc-108a-4527-8011-5a4d45bdf966", + "id": "6", "metadata": {}, "source": [ "```{tip}\n", @@ -91,7 +91,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1b726ec2-f722-4f46-931f-dcef74f50b80", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -102,7 +102,7 @@ { "cell_type": "code", "execution_count": null, - "id": "db779a4e-7284-4928-a6a9-d677254d98d4", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -113,7 +113,7 @@ }, { "cell_type": "markdown", - "id": "f4ec25a8-372e-4e36-a60c-50fe37a353df", + "id": "9", "metadata": {}, "source": [ "We can apply rolling mean along multiple dimensions as a 2D smoother in (lat, lon). Here is an example of a 5-point running mean applied along both the `lat` and `lon` dimensions" @@ -122,7 +122,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cf7c70b3-1ca2-4647-89b3-a9d2859a329c", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -138,7 +138,7 @@ }, { "cell_type": "markdown", - "id": "014fb2fe-5673-477a-a1ce-2e50a9509f8c", + "id": "11", "metadata": {}, "source": [ "Note the addition of NaNs at the data boundaries and near continental boundaries." @@ -146,7 +146,7 @@ }, { "cell_type": "markdown", - "id": "0209579c-c0f8-4736-b726-fa46752686e3", + "id": "12", "metadata": {}, "source": [ "### Custom reductions\n", @@ -161,7 +161,7 @@ { "cell_type": "code", "execution_count": null, - "id": "68512e39-02a7-45d9-8b68-c9ac72384c58", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -171,7 +171,7 @@ }, { "cell_type": "markdown", - "id": "f7d5c0f5-6b33-4c81-9314-a760520bbaf8", + "id": "14", "metadata": {}, "source": [ "We call `construct` and provide a name for the new dimension: `window`" @@ -180,7 +180,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fbc19683-1b10-4bff-83b8-14b94361150b", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -190,7 +190,7 @@ }, { "cell_type": "markdown", - "id": "3c903632-7221-4969-9f00-963881f87853", + "id": "16", "metadata": {}, "source": [ "```{exercise} \n", @@ -211,7 +211,7 @@ }, { "cell_type": "markdown", - "id": "c2584414-92bc-48ce-b1f4-0389da06bbb0", + "id": "17", "metadata": {}, "source": [ "## Coarsening\n", @@ -228,7 +228,7 @@ { "cell_type": "code", "execution_count": null, - "id": "403ab4e5-6f8c-4322-a7e1-42e761c447be", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -238,7 +238,7 @@ }, { "cell_type": "markdown", - "id": "002b8759-aa0e-4186-aaea-3e415392fe42", + "id": "19", "metadata": {}, "source": [ "Xarrays' computation methods (groupby, groupby_bins, rolling, coarsen, weighted) all return special objects that represent the basic underlying computation pattern. For e.g. `coarse` above is a `DatasetCoarsen` object that represents 5-point windows along lat, lon of the data in `ds`. It is usually helpful to save and reuse these objects for multiple operations (e.g. a mean and standard deviation calculation)." @@ -247,7 +247,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f7464560-1516-4adb-81bd-9fa4ebf9fe44", + "id": "20", "metadata": { "tags": [ "raises-exception", @@ -263,7 +263,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2715d62f-25ba-491b-988f-97b796c64741", + "id": "21", "metadata": {}, "outputs": [], "source": [ @@ -274,7 +274,7 @@ { "cell_type": "code", "execution_count": null, - "id": "31ca5529-fd36-4236-9d9d-9a17c8b96a5e", + "id": "22", "metadata": {}, "outputs": [], "source": [ @@ -283,7 +283,7 @@ }, { "cell_type": "markdown", - "id": "e6ebec4e-5835-46e9-b7b2-b1a2ce2d1877", + "id": "23", "metadata": {}, "source": [ "### Custom reductions\n", @@ -300,7 +300,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2b6e88f0-5289-44ca-bc44-be93d8adc70a", + "id": "24", "metadata": {}, "outputs": [], "source": [ @@ -314,7 +314,7 @@ }, { "cell_type": "markdown", - "id": "824d41b9-b030-473a-86b0-a71ac95bfe5d", + "id": "25", "metadata": {}, "source": [ "Now we reshape to get one new dimension `year` of size 12." @@ -323,7 +323,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f705292d-58e5-4806-96d1-f297267e9314", + "id": "26", "metadata": {}, "outputs": [], "source": [ @@ -333,7 +333,7 @@ }, { "cell_type": "markdown", - "id": "9b97df2d-b320-4dc7-9d40-7377519fb2e7", + "id": "27", "metadata": {}, "source": [ "````{exercise} \n", @@ -359,7 +359,7 @@ }, { "cell_type": "markdown", - "id": "ac49ab39-b8b4-4514-a46f-28601276db48", + "id": "28", "metadata": {}, "source": [ "Note that `coarsen` pads with NaNs. For more control over padding, use\n", @@ -368,7 +368,7 @@ }, { "cell_type": "markdown", - "id": "9d8ccd77-dbd0-41ba-b2d2-7b3ed5b9e976", + "id": "29", "metadata": { "jp-MarkdownHeadingCollapsed": true, "tags": [] diff --git a/fundamentals/03.4_weighted.ipynb b/fundamentals/03.4_weighted.ipynb index 5a452a31..a81bae9f 100644 --- a/fundamentals/03.4_weighted.ipynb +++ b/fundamentals/03.4_weighted.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "3b76d0c1-ae2f-4256-8bb6-72355bad4bd1", + "id": "0", "metadata": { "tags": [] }, @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0e0adfad-050f-4e1c-9485-df994e13449d", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -35,7 +35,7 @@ { "cell_type": "code", "execution_count": null, - "id": "37eec39c-264c-4c25-940c-4487b7851c04", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -46,7 +46,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ef2e7b9b-e48d-4799-ab36-8c9a366e4adf", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -58,7 +58,7 @@ }, { "cell_type": "markdown", - "id": "b81b0f9c-fcac-45da-ad17-f2d2bd3b607e", + "id": "4", "metadata": {}, "source": [ "## Manual weighting\n", @@ -69,7 +69,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2c4fd175-cdf0-4dd0-9804-b813e58d1cee", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ }, { "cell_type": "markdown", - "id": "94368724-c468-4bad-92fe-b795130e470b", + "id": "6", "metadata": {}, "source": [ "We could imagine computing the weighted spatial mean of SST manually." @@ -87,7 +87,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3ab67064-4aa0-4fb2-8c36-7455d280fe53", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -98,7 +98,7 @@ }, { "cell_type": "markdown", - "id": "6ac5337c-baae-4551-95a1-0c07ead19960", + "id": "8", "metadata": {}, "source": [ "That would be wrong, however, because the denominator (`weights.sum(dim='lat')`)\n", @@ -118,7 +118,7 @@ { "cell_type": "code", "execution_count": null, - "id": "33009c7f-5ce2-411f-a164-a50febbe88dc", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -128,7 +128,7 @@ }, { "cell_type": "markdown", - "id": "f6f6bf28-246b-4764-a3fa-06cd8dbfb92c", + "id": "10", "metadata": {}, "source": [ "\n", @@ -140,7 +140,7 @@ { "cell_type": "code", "execution_count": null, - "id": "11dc3c75-91e4-4fa6-b24d-4515c004ccd0", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -150,7 +150,7 @@ }, { "cell_type": "markdown", - "id": "83b3c0ee-a50e-43c6-a01d-534476be91d4", + "id": "12", "metadata": {}, "source": [ "A handful of reductions have been implemented: [mean, sum, std, var](https://docs.xarray.dev/en/stable/api.html#weighted-objects)." diff --git a/fundamentals/04.2_faceting.ipynb b/fundamentals/04.2_faceting.ipynb index 4cb0bad2..bac29344 100644 --- a/fundamentals/04.2_faceting.ipynb +++ b/fundamentals/04.2_faceting.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "029c8020-86b5-4755-8df4-5bcdc9718a67", + "id": "0", "metadata": {}, "source": [ "\n", @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b70ce865-7e33-48e1-8d60-4e8a13b51521", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -36,7 +36,7 @@ { "cell_type": "code", "execution_count": null, - "id": "378222cd-c482-4cad-a1f8-c42b204523fb", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -48,7 +48,7 @@ }, { "cell_type": "markdown", - "id": "e13aa65b-903c-4121-b1e5-0c98e44b8799", + "id": "3", "metadata": {}, "source": [ "Note that the dimensions are now `lat, lon, month`.\n", @@ -68,7 +68,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0a7e7812-73e2-48ae-b204-1b6d0b3a554e", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -80,7 +80,7 @@ }, { "cell_type": "markdown", - "id": "02b8ab90-f9a4-4c24-959a-989f6cfc38d7", + "id": "5", "metadata": {}, "source": [ "## Customizing\n", @@ -91,7 +91,7 @@ { "cell_type": "code", "execution_count": null, - "id": "26c47ed8-3baf-4100-9783-4a2d80f8a500", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -112,7 +112,7 @@ }, { "cell_type": "markdown", - "id": "2b9f72bc-157f-457f-ab1c-a2903e7fbe32", + "id": "7", "metadata": {}, "source": [ "The returned FacetGrid object `fg` has many useful properties and methods e.g.\n", @@ -126,7 +126,7 @@ }, { "cell_type": "markdown", - "id": "7e458790-684d-43f5-af86-af1d26e5de1b", + "id": "8", "metadata": {}, "source": [ "### Exercise\n", @@ -138,7 +138,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8e5c6452-c05d-4f73-8c7e-040ef4e41ea1", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -147,7 +147,7 @@ }, { "cell_type": "markdown", - "id": "510417de-ae22-4c22-8483-564580ae56d2", + "id": "10", "metadata": {}, "source": [ "## Modifying all facets\n", @@ -167,7 +167,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e3395448-9540-4445-837d-6a42dea28990", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -183,7 +183,7 @@ }, { "cell_type": "markdown", - "id": "8d03d9d6-461d-42a1-87bb-aff7d47a3e1b", + "id": "12", "metadata": {}, "source": [ "## Faceting multiple DataArrays\n", @@ -198,7 +198,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e38d3462-1c58-4ac8-b3c5-7fd8d0b6a8b3", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -209,7 +209,7 @@ { "cell_type": "code", "execution_count": null, - "id": "afee72ea-6a73-426c-bc0a-da43bdd7f936", + "id": "14", "metadata": {}, "outputs": [], "source": [ diff --git a/fundamentals/04.3_geographic_plotting.ipynb b/fundamentals/04.3_geographic_plotting.ipynb index eba6e02b..040609dc 100644 --- a/fundamentals/04.3_geographic_plotting.ipynb +++ b/fundamentals/04.3_geographic_plotting.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "ed242a29-6be7-4574-84c1-f87095b07dec", + "id": "0", "metadata": {}, "source": [ "\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4bc84163-5c34-49c5-82a9-0b20ef99fc53", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -37,7 +37,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a1949ff8-4d7d-4f7b-ac78-0dbc24a8295c", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -49,7 +49,7 @@ }, { "cell_type": "markdown", - "id": "adf7f680-8a57-4162-a0cf-f8d03e9581b9", + "id": "3", "metadata": {}, "source": [ "## Basic plot" @@ -58,7 +58,7 @@ { "cell_type": "code", "execution_count": null, - "id": "df6fba2d-8997-4476-9c5a-59d994697802", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -76,7 +76,7 @@ }, { "cell_type": "markdown", - "id": "feaee5df-978d-469e-9a20-aa38240b8a3b", + "id": "5", "metadata": {}, "source": [ "## Faceting maps\n", @@ -89,7 +89,7 @@ { "cell_type": "code", "execution_count": null, - "id": "177448e6-839b-40b2-9e11-8ef32139ec7c", + "id": "6", "metadata": {}, "outputs": [], "source": [ diff --git a/intermediate/01-high-level-computation-patterns.ipynb b/intermediate/01-high-level-computation-patterns.ipynb index 43a7dd5a..7f9f06be 100644 --- a/intermediate/01-high-level-computation-patterns.ipynb +++ b/intermediate/01-high-level-computation-patterns.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "a349a0a5-eeb3-410a-b5d1-f472a8ca14b2", + "id": "0", "metadata": { "slideshow": { "slide_type": "slide" @@ -38,7 +38,7 @@ }, { "cell_type": "markdown", - "id": "623d5170-f32d-4643-9a59-c54768ee7185", + "id": "1", "metadata": { "slideshow": { "slide_type": "slide" @@ -57,7 +57,7 @@ }, { "cell_type": "markdown", - "id": "5f0cda65-cfaa-42ed-bd4d-f290c1e98bb3", + "id": "2", "metadata": { "slideshow": { "slide_type": "subslide" @@ -98,7 +98,7 @@ }, { "cell_type": "markdown", - "id": "71d8581c-1ffb-47a0-b992-12c3997f3586", + "id": "3", "metadata": { "slideshow": { "slide_type": "slide" @@ -112,7 +112,7 @@ { "cell_type": "code", "execution_count": null, - "id": "02a9022f-1503-45a2-b57a-05ebfeb11d16", + "id": "4", "metadata": { "tags": [] }, @@ -135,7 +135,7 @@ { "cell_type": "code", "execution_count": null, - "id": "edc35fa6", + "id": "5", "metadata": { "tags": [] }, @@ -146,7 +146,7 @@ }, { "cell_type": "markdown", - "id": "6ff7edbb-ab97-4bf0-881a-0627230565f3", + "id": "6", "metadata": {}, "source": [ "***\n", @@ -163,7 +163,7 @@ { "cell_type": "code", "execution_count": null, - "id": "70159772", + "id": "7", "metadata": { "tags": [] }, @@ -186,7 +186,7 @@ }, { "cell_type": "markdown", - "id": "d3a992bf", + "id": "8", "metadata": {}, "source": [ "This pattern is the GroupBy pattern.\n", @@ -198,7 +198,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6f1b23fa", + "id": "9", "metadata": { "tags": [] }, @@ -214,7 +214,7 @@ }, { "cell_type": "markdown", - "id": "c1772b16", + "id": "10", "metadata": {}, "source": [ "Writing a for-loop here is not wrong, but it can quickly become cumbersome if you have a complex function to apply and it will take a while to compute on a large dataset (you may even run out of memory). Parallelizing the computation would take a lot of additional work.\n", @@ -225,7 +225,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c53fda41", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -237,7 +237,7 @@ }, { "cell_type": "markdown", - "id": "4f548b71", + "id": "12", "metadata": {}, "source": [ "```{note}\n", @@ -258,7 +258,7 @@ }, { "cell_type": "markdown", - "id": "90832354-d0f3-4d83-a979-23b685203d3e", + "id": "13", "metadata": { "slideshow": { "slide_type": "slide" @@ -274,7 +274,7 @@ { "cell_type": "code", "execution_count": null, - "id": "480771d1-be88-46b9-8fd7-e516109c7720", + "id": "14", "metadata": {}, "outputs": [], "source": [ @@ -284,7 +284,7 @@ { "cell_type": "code", "execution_count": null, - "id": "98d88825-5fe8-4b78-a8ff-b822d6c3f905", + "id": "15", "metadata": { "tags": [] }, @@ -297,7 +297,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4a31afa0-1757-46bb-a07b-63e23d22ee2b", + "id": "16", "metadata": { "tags": [] }, @@ -310,7 +310,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1a7893fd-c473-4ae0-a657-3e67eeb2a846", + "id": "17", "metadata": { "tags": [] }, @@ -323,7 +323,7 @@ { "cell_type": "code", "execution_count": null, - "id": "843985f3-4271-4f82-8ede-92624cd912aa", + "id": "18", "metadata": { "slideshow": { "slide_type": "subslide" @@ -341,7 +341,7 @@ }, { "cell_type": "markdown", - "id": "e9b80381-8a0d-4833-97fa-687bf693ca5a", + "id": "19", "metadata": {}, "source": [ "***\n", @@ -371,7 +371,7 @@ }, { "cell_type": "markdown", - "id": "339bdf89-c7da-4fca-89e1-a6655e65a6a3", + "id": "20", "metadata": { "slideshow": { "slide_type": "subslide" @@ -398,7 +398,7 @@ { "cell_type": "code", "execution_count": null, - "id": "77570af3-0ba3-46ec-9645-2822884710e5", + "id": "21", "metadata": {}, "outputs": [], "source": [ @@ -407,7 +407,7 @@ }, { "cell_type": "markdown", - "id": "144e2cfd-fc84-45d5-8993-05c3a8190a0c", + "id": "22", "metadata": {}, "source": [ "And now smoothed 5 point running mean in lat and lon\n" @@ -416,7 +416,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6bb40a90-ddcb-48f1-bc3f-3cfef18ed1eb", + "id": "23", "metadata": {}, "outputs": [], "source": [ @@ -425,7 +425,7 @@ }, { "cell_type": "markdown", - "id": "b88c116e-ad63-4fea-81a7-bcabc194dee5", + "id": "24", "metadata": { "slideshow": { "slide_type": "subslide" @@ -445,7 +445,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b1610220", + "id": "25", "metadata": {}, "outputs": [], "source": [ @@ -454,7 +454,7 @@ }, { "cell_type": "markdown", - "id": "9ef251aa-ce3c-4318-95ba-470568ebd967", + "id": "26", "metadata": {}, "source": [ "```{exercise}\n", @@ -468,7 +468,7 @@ }, { "cell_type": "markdown", - "id": "a36cbf94-ed41-42c6-8ccf-9278927d395b", + "id": "27", "metadata": { "slideshow": { "slide_type": "subslide" @@ -489,7 +489,7 @@ }, { "cell_type": "markdown", - "id": "d0155b62-d08f-42c6-b467-1af73a7829c0", + "id": "28", "metadata": { "slideshow": { "slide_type": "subslide" @@ -505,7 +505,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d121b3cf-5ce3-481a-9d36-4242debb66f4", + "id": "29", "metadata": {}, "outputs": [], "source": [ @@ -516,7 +516,7 @@ { "cell_type": "code", "execution_count": null, - "id": "01c78b48-2e02-4099-afa5-2490282a4541", + "id": "30", "metadata": {}, "outputs": [], "source": [ @@ -526,7 +526,7 @@ }, { "cell_type": "markdown", - "id": "5d7562a7", + "id": "31", "metadata": {}, "source": [ "```{note}\n", @@ -537,7 +537,7 @@ }, { "cell_type": "markdown", - "id": "5743ba77-def9-4b6f-a777-87014311253d", + "id": "32", "metadata": {}, "source": [ "```{exercise}\n", @@ -557,7 +557,7 @@ }, { "cell_type": "markdown", - "id": "c81f95b1-e1c3-4b28-8b7f-9519c9316e3f", + "id": "33", "metadata": {}, "source": [ "`construct` is clever.\n", @@ -569,7 +569,7 @@ }, { "cell_type": "markdown", - "id": "816929d5-6635-4e93-99fc-79b5729c5491", + "id": "34", "metadata": { "tags": [] }, @@ -582,7 +582,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4cbdafe1-adf4-4c80-97ed-50e4b35033af", + "id": "35", "metadata": {}, "outputs": [], "source": [ @@ -591,7 +591,7 @@ }, { "cell_type": "markdown", - "id": "f75d2a5f-31d0-4943-b70a-06e7c8a30601", + "id": "36", "metadata": { "slideshow": { "slide_type": "subslide" @@ -615,7 +615,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e70c3264-c392-463e-94bb-e0d30c4d4e6b", + "id": "37", "metadata": {}, "outputs": [], "source": [ @@ -625,7 +625,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7a543edc-f378-405c-90af-7e1441ee0c8f", + "id": "38", "metadata": {}, "outputs": [], "source": [ @@ -635,7 +635,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5ff1073d-ef2c-4078-9a91-11679991b3f3", + "id": "39", "metadata": {}, "outputs": [], "source": [ @@ -645,7 +645,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8db703ab-3c3f-4313-b104-4af0d116dd70", + "id": "40", "metadata": {}, "outputs": [], "source": [ @@ -654,7 +654,7 @@ }, { "cell_type": "markdown", - "id": "b30794c7-1aeb-4e13-b6b4-824f23ac07df", + "id": "41", "metadata": { "slideshow": { "slide_type": "subslide" @@ -672,7 +672,7 @@ }, { "cell_type": "markdown", - "id": "4f88d113-86d1-4158-b4e7-f54f98af3c0c", + "id": "42", "metadata": {}, "source": [ "````{solution} coarsen-reduce\n", @@ -687,7 +687,7 @@ }, { "cell_type": "markdown", - "id": "0e7cbd7b-da18-48a3-bd29-708d97cc3bb7", + "id": "43", "metadata": { "slideshow": { "slide_type": "subslide" @@ -707,7 +707,7 @@ { "cell_type": "code", "execution_count": null, - "id": "acd8f398-b958-4cf7-8362-c8bd04e672c2", + "id": "44", "metadata": {}, "outputs": [], "source": [ @@ -722,7 +722,7 @@ { "cell_type": "code", "execution_count": null, - "id": "48f137b0-66d0-4e00-b242-b509b01820eb", + "id": "45", "metadata": {}, "outputs": [], "source": [ @@ -732,7 +732,7 @@ }, { "cell_type": "markdown", - "id": "5dc5c7e7-bc3c-4362-bbd1-6a05801b7c90", + "id": "46", "metadata": {}, "source": [ "Note two things:\n", @@ -747,7 +747,7 @@ { "cell_type": "code", "execution_count": null, - "id": "083563d8-4f7a-471b-87af-718cc8c4b1f2", + "id": "47", "metadata": {}, "outputs": [], "source": [ @@ -756,7 +756,7 @@ }, { "cell_type": "markdown", - "id": "f4e90b49-42e4-411f-9148-bcaf145de26c", + "id": "48", "metadata": {}, "source": [ "This adds values at the end of the array (see the 'nan' at the end of the time coordinate?), which is not so sensible for this\n", @@ -766,7 +766,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ea26f7da-f2ea-4868-aada-f57f49da3b64", + "id": "49", "metadata": {}, "outputs": [], "source": [ @@ -777,7 +777,7 @@ }, { "cell_type": "markdown", - "id": "8174aad1-d6e1-4772-bf23-91e363a92c19", + "id": "50", "metadata": {}, "source": [ "Note that `coarsen` pads with NaNs. For more control over padding, use\n", @@ -787,7 +787,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dc05f396-5c23-4ea0-a1db-926edb9f4baf", + "id": "51", "metadata": {}, "outputs": [], "source": [ @@ -801,7 +801,7 @@ }, { "cell_type": "markdown", - "id": "fbe916a3", + "id": "52", "metadata": {}, "source": [ "```{note}\n", @@ -812,7 +812,7 @@ }, { "cell_type": "markdown", - "id": "db43eb72-fb9f-4d6a-aab3-4617c9c41ab1", + "id": "53", "metadata": {}, "source": [ "```{exercise}\n", @@ -824,7 +824,7 @@ }, { "cell_type": "markdown", - "id": "b668514e-b40c-4c64-98bf-4579747ae6ab", + "id": "54", "metadata": {}, "source": [ "````{solution} reshape\n", @@ -862,7 +862,7 @@ }, { "cell_type": "markdown", - "id": "4de2984e-9c28-4ed7-909f-bab47b6eae49", + "id": "55", "metadata": {}, "source": [ "\n", @@ -875,7 +875,7 @@ }, { "cell_type": "markdown", - "id": "9d907b2b-c9c8-41cb-8af0-756d5c21ffef", + "id": "56", "metadata": {}, "source": [ "````{solution} rolling\n", @@ -896,7 +896,7 @@ }, { "cell_type": "markdown", - "id": "5574cc55-5d2c-47ee-9227-5db6ecde2fbf", + "id": "57", "metadata": {}, "source": [ "### Summary\n", @@ -912,7 +912,7 @@ }, { "cell_type": "markdown", - "id": "25fd132c-5436-4af6-b8ad-75269cb45e75", + "id": "58", "metadata": { "slideshow": { "slide_type": "slide" @@ -958,7 +958,7 @@ { "cell_type": "code", "execution_count": null, - "id": "55c5e475", + "id": "59", "metadata": {}, "outputs": [], "source": [ @@ -969,7 +969,7 @@ { "cell_type": "code", "execution_count": null, - "id": "758d0816-e6fc-4d9b-92aa-3dd293b3c776", + "id": "60", "metadata": {}, "outputs": [], "source": [ @@ -982,7 +982,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a8c8ea6b-721d-4afb-9787-5e143efbb614", + "id": "61", "metadata": {}, "outputs": [], "source": [ @@ -993,7 +993,7 @@ }, { "cell_type": "markdown", - "id": "7a579539-1634-462c-b4d9-ea558fceadfb", + "id": "62", "metadata": {}, "source": [ "Notice that since we have averaged over all the years for each month, our resulting DataArray no longer has a \"year\" coordinate.\n", @@ -1004,7 +1004,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0380fb08-07ff-4aa7-9f97-5144bda372cc", + "id": "63", "metadata": {}, "outputs": [], "source": [ @@ -1013,7 +1013,7 @@ }, { "cell_type": "markdown", - "id": "a6d21727-4c15-4f13-ae53-61d5f4944554", + "id": "64", "metadata": {}, "source": [ "Similarly for binning (remember this is useful when the parameter you are binning over is not \"exact\", like a float),\n" @@ -1022,7 +1022,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4fc6378d-aad3-4abb-ba1b-37842b83b7bd", + "id": "65", "metadata": {}, "outputs": [], "source": [ @@ -1031,7 +1031,7 @@ }, { "cell_type": "markdown", - "id": "fdfd6080-d844-41fe-8a2b-97d2b87df0b9", + "id": "66", "metadata": {}, "source": [ "and resampling...\n" @@ -1040,7 +1040,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e19a68fc-fa4d-4e86-b42b-2218204a5ece", + "id": "67", "metadata": {}, "outputs": [], "source": [ @@ -1049,7 +1049,7 @@ }, { "cell_type": "markdown", - "id": "3763efb3", + "id": "68", "metadata": {}, "source": [ "```{note}\n", @@ -1061,7 +1061,7 @@ }, { "cell_type": "markdown", - "id": "0b2de08d-0b7b-4725-80f3-c94d19d91669", + "id": "69", "metadata": { "slideshow": { "slide_type": "subslide" @@ -1095,7 +1095,7 @@ }, { "cell_type": "markdown", - "id": "21be2221-a19a-4d8e-a80c-d3bb51b466b7", + "id": "70", "metadata": { "slideshow": { "slide_type": "subslide" @@ -1114,7 +1114,7 @@ { "cell_type": "code", "execution_count": null, - "id": "72e67cd4-adf5-4e51-8163-a59ad8f9d5dd", + "id": "71", "metadata": { "tags": [] }, @@ -1126,7 +1126,7 @@ { "cell_type": "code", "execution_count": null, - "id": "99c6a0df-ac18-47d4-98f0-b99189991950", + "id": "72", "metadata": {}, "outputs": [], "source": [ @@ -1136,7 +1136,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9c30397a-38b8-44a6-86fe-d32f99099b31", + "id": "73", "metadata": {}, "outputs": [], "source": [ @@ -1146,7 +1146,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7a7818a7-ccc6-4696-b27c-e905879bd9b8", + "id": "74", "metadata": {}, "outputs": [], "source": [ @@ -1155,7 +1155,7 @@ }, { "cell_type": "markdown", - "id": "db7bd7e6-59cd-4b2a-ac37-2ff4d40d9fc8", + "id": "75", "metadata": {}, "source": [ "#### Construct and use custom labels\n", @@ -1170,7 +1170,7 @@ { "cell_type": "code", "execution_count": null, - "id": "00e9cef3-9484-4ca2-8da4-b5fb9b1dcebc", + "id": "76", "metadata": {}, "outputs": [], "source": [ @@ -1180,7 +1180,7 @@ }, { "cell_type": "markdown", - "id": "9dfcf050-6cc0-4138-94e4-e0eb7d57c0b1", + "id": "77", "metadata": {}, "source": [ "Create a new empty array\n" @@ -1189,7 +1189,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c19ca548-daf4-4419-8dc5-7a6c723c4ec4", + "id": "78", "metadata": {}, "outputs": [], "source": [ @@ -1199,7 +1199,7 @@ }, { "cell_type": "markdown", - "id": "baaa88a5-d375-4386-bfbd-2c0471a30b86", + "id": "79", "metadata": {}, "source": [ "Use `isin` to assign custom seasons,\n" @@ -1208,7 +1208,7 @@ { "cell_type": "code", "execution_count": null, - "id": "25f860b3-566c-417e-b717-372dff3a60fe", + "id": "80", "metadata": {}, "outputs": [], "source": [ @@ -1220,7 +1220,7 @@ }, { "cell_type": "markdown", - "id": "297f4d2f", + "id": "81", "metadata": {}, "source": [ "Turn our new seasonal group array into a DataArray." @@ -1229,7 +1229,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6a72a117", + "id": "82", "metadata": {}, "outputs": [], "source": [ @@ -1240,7 +1240,7 @@ { "cell_type": "code", "execution_count": null, - "id": "33cf5d2f-ba61-4bb8-8e90-9777bf6bf3f3", + "id": "83", "metadata": {}, "outputs": [], "source": [ @@ -1256,7 +1256,7 @@ }, { "cell_type": "markdown", - "id": "7f3097b9-987f-4f9b-9c82-d5c6e879a862", + "id": "84", "metadata": { "slideshow": { "slide_type": "subslide" @@ -1272,7 +1272,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b8263961-faed-43f5-8d67-d578d6163e35", + "id": "85", "metadata": {}, "outputs": [], "source": [ @@ -1282,7 +1282,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0874688b-12c0-4353-9489-879f116c7473", + "id": "86", "metadata": {}, "outputs": [], "source": [ @@ -1293,7 +1293,7 @@ }, { "cell_type": "markdown", - "id": "5edb1818-6d4e-417b-af79-1cd6c9c04122", + "id": "87", "metadata": { "slideshow": { "slide_type": "subslide" @@ -1311,7 +1311,7 @@ { "cell_type": "code", "execution_count": null, - "id": "04e8eb13-2536-404c-ad85-36eae53f458b", + "id": "88", "metadata": {}, "outputs": [], "source": [ @@ -1320,7 +1320,7 @@ }, { "cell_type": "markdown", - "id": "b5724cbb-dd2a-4dc5-9118-7c7dd294755f", + "id": "89", "metadata": { "tags": [] }, @@ -1333,7 +1333,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4fa2442b-ef05-4cff-b83f-938159ab7756", + "id": "90", "metadata": {}, "outputs": [], "source": [ @@ -1342,7 +1342,7 @@ }, { "cell_type": "markdown", - "id": "7cd7ede5-8e57-4099-ab39-b9d75427f125", + "id": "91", "metadata": {}, "source": [ "```{tip}\n", @@ -1352,7 +1352,7 @@ }, { "cell_type": "markdown", - "id": "ed904da0-fb85-4432-8083-ef644209affd", + "id": "92", "metadata": { "tags": [] }, @@ -1371,7 +1371,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2997b547-3f8a-4c08-878e-e3b72be95b95", + "id": "93", "metadata": {}, "outputs": [], "source": [ @@ -1381,7 +1381,7 @@ }, { "cell_type": "markdown", - "id": "8017d842-ff79-47ec-928d-43e3cf4e7b66", + "id": "94", "metadata": {}, "source": [ "`group` is a DataArray containing data for all December days (because the last printed `label` value is `12`, so the last `group` value is for December)." @@ -1390,7 +1390,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ea975415-d8c1-4216-b6e3-9c0c8eb25d6b", + "id": "95", "metadata": { "tags": [] }, @@ -1401,7 +1401,7 @@ }, { "cell_type": "markdown", - "id": "1c0cad35-225b-4622-a978-6113a9ca1d88", + "id": "96", "metadata": {}, "source": [ "Maybe you want a histogram of December temperatures?\n" @@ -1410,7 +1410,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e17ef02d-dae1-475b-a29b-595f910fab9c", + "id": "97", "metadata": {}, "outputs": [], "source": [ @@ -1419,7 +1419,7 @@ }, { "cell_type": "markdown", - "id": "d339c52c", + "id": "98", "metadata": {}, "source": [ "Remember, this example is just to show how you could operate on each group object in a groupby operation. If we wanted to just explore the December (or March) data, we should just filter for it directly:" @@ -1428,7 +1428,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0c4fd9b2", + "id": "99", "metadata": {}, "outputs": [], "source": [ @@ -1437,7 +1437,7 @@ }, { "cell_type": "markdown", - "id": "32dfe5fd-0e8f-4b69-a3c1-03f73c484b6b", + "id": "100", "metadata": { "tags": [] }, @@ -1455,7 +1455,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ffeb4b59-1eaf-4c39-bac5-11646069ea29", + "id": "101", "metadata": { "tags": [] }, @@ -1471,7 +1471,7 @@ }, { "cell_type": "markdown", - "id": "3122e22a-77f0-402f-baf6-111821973250", + "id": "102", "metadata": {}, "source": [ "***" @@ -1479,7 +1479,7 @@ }, { "cell_type": "markdown", - "id": "a37ec2e3-24a0-4306-abe0-a6c04933bd88", + "id": "103", "metadata": {}, "source": [ "## Summary\n", diff --git a/intermediate/cmip6-cloud.ipynb b/intermediate/cmip6-cloud.ipynb index 0dda2a0f..31b45166 100644 --- a/intermediate/cmip6-cloud.ipynb +++ b/intermediate/cmip6-cloud.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "0ebd8a4d-6937-4ad6-9c93-fa944fb389c1", + "id": "0", "metadata": {}, "source": [ "# Accessing remote data stored on the cloud\n", @@ -16,7 +16,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b7533f0e-5dd1-423a-9a04-8ed755d180a2", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -27,7 +27,7 @@ }, { "cell_type": "markdown", - "id": "95002377-b0a6-479f-928d-53b044b390df", + "id": "2", "metadata": {}, "source": [ "## Finding cloud native data\n", @@ -46,7 +46,7 @@ }, { "cell_type": "markdown", - "id": "bc520e32-204f-4f92-bdec-4f678160d6de", + "id": "3", "metadata": {}, "source": [ "### Getting cloud hosted CMIP6 data\n", @@ -63,7 +63,7 @@ }, { "cell_type": "markdown", - "id": "8d12400d-ab5e-420e-b9f5-b61e083dc9ce", + "id": "4", "metadata": {}, "source": [ "First, let's open a CSV containing the list of CMIP6 datasets available" @@ -72,7 +72,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d1d9f94c-dbe3-4151-8ee7-fa182724810b", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -83,7 +83,7 @@ }, { "cell_type": "markdown", - "id": "eb263332-dc60-4bd1-9ef3-cf9612cf09a1", + "id": "6", "metadata": {}, "source": [ "Over 5 million rows! Let's filter it down to the variable and experiment\n", @@ -102,7 +102,7 @@ }, { "cell_type": "markdown", - "id": "9b435c14-fd56-481c-b5f4-781794a1cc1a", + "id": "7", "metadata": {}, "source": [ "Below, we'll filter to CMIP6 experiments matching:\n", @@ -113,7 +113,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2fe50e53-b02f-4a84-bc4a-e1934fe32661", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -123,7 +123,7 @@ }, { "cell_type": "markdown", - "id": "9ddfad3e-d4de-4c0a-be6f-53f1f7928f51", + "id": "9", "metadata": {}, "source": [ "There's 272 modelled scenarios for SSP5.\n", @@ -133,7 +133,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5515186d-8571-439a-b5a8-b8b56aab77f6", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -142,7 +142,7 @@ }, { "cell_type": "markdown", - "id": "b68bcfbb-24c9-420d-b297-44c678b7f8ce", + "id": "11", "metadata": {}, "source": [ "## Reading from the remote Zarr storage" @@ -150,7 +150,7 @@ }, { "cell_type": "markdown", - "id": "b3f5660d-bd46-44f6-8f6d-a62947b6f2c4", + "id": "12", "metadata": {}, "source": [ "In many cases, you'll need to first connect to the cloud provider.\n", @@ -161,7 +161,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a4e6d5e3-35a0-4c31-a1b8-96258cf50974", + "id": "13", "metadata": {}, "outputs": [], "source": [ @@ -170,7 +170,7 @@ }, { "cell_type": "markdown", - "id": "b959f829-e434-4a84-82d2-2f2b24dc84d2", + "id": "14", "metadata": {}, "source": [ "Next, we'll need a mapping to the Google Storage object.\n", @@ -183,7 +183,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e1527d1f-503e-4b0b-8433-794067ed46cc", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -194,7 +194,7 @@ }, { "cell_type": "markdown", - "id": "b694baac-9259-4de8-8eae-ac3cb653d894", + "id": "16", "metadata": {}, "source": [ "With that, we can open the Zarr store like so." @@ -203,7 +203,7 @@ { "cell_type": "code", "execution_count": null, - "id": "74b6d289-a852-4216-a3b6-4483d5ff2854", + "id": "17", "metadata": {}, "outputs": [], "source": [ @@ -213,7 +213,7 @@ }, { "cell_type": "markdown", - "id": "d81a5958-517b-4215-8c02-b1083b4b4fe2", + "id": "18", "metadata": {}, "source": [ "### Selecting time slices\n", @@ -226,7 +226,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1101b455-ba65-4cab-a3b6-bf2601958400", + "id": "19", "metadata": {}, "outputs": [], "source": [ @@ -236,7 +236,7 @@ }, { "cell_type": "markdown", - "id": "fb8d90a2-9883-41da-b26c-7b5547a15270", + "id": "20", "metadata": {}, "source": [ "Sea level change would just be 2100 minus 2015." @@ -245,7 +245,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1f5fa1ee-260c-4ec4-898a-230826f9f2c8", + "id": "21", "metadata": {}, "outputs": [], "source": [ @@ -254,7 +254,7 @@ }, { "cell_type": "markdown", - "id": "0e087f3b-0315-40db-ae03-a3393b49c30e", + "id": "22", "metadata": {}, "source": [ "Note that up to this point, we have not actually downloaded any\n", @@ -268,7 +268,7 @@ { "cell_type": "code", "execution_count": null, - "id": "38c2152e-67e7-449e-8f1a-2d64f63dedda", + "id": "23", "metadata": {}, "outputs": [], "source": [ @@ -277,7 +277,7 @@ }, { "cell_type": "markdown", - "id": "5226729f-07db-4fe6-a980-9a1f630c8277", + "id": "24", "metadata": {}, "source": [ "We can do a quick plot to show how Sea Level is predicted to change\n", @@ -287,7 +287,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8c42ed9f-fc61-4762-9765-3dd553d5c2ad", + "id": "25", "metadata": {}, "outputs": [], "source": [ @@ -296,7 +296,7 @@ }, { "cell_type": "markdown", - "id": "b4361786-c889-4ae7-a704-dcbda50513da", + "id": "26", "metadata": {}, "source": [ "Notice the blue parts between -40 and -60 South where sea level has dropped?\n", @@ -307,7 +307,7 @@ }, { "cell_type": "markdown", - "id": "a87aa0a3-c82e-4da0-a5d0-31e42039feae", + "id": "27", "metadata": {}, "source": [ "That's all! Hopefully this will get you started on accessing more cloud-native datasets!" diff --git a/intermediate/data_cleaning/05.3_ice_velocity.ipynb b/intermediate/data_cleaning/05.3_ice_velocity.ipynb index 5172cb96..e54ff918 100644 --- a/intermediate/data_cleaning/05.3_ice_velocity.ipynb +++ b/intermediate/data_cleaning/05.3_ice_velocity.ipynb @@ -3,7 +3,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "3c29d537", + "id": "0", "metadata": {}, "source": [ "# Re-organize InSAR ice velocity data\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d3a4bbbd", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -37,7 +37,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b14f1125", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -47,7 +47,7 @@ }, { "cell_type": "markdown", - "id": "f78dab41-befb-4805-b8a8-cf64e1696a0e", + "id": "3", "metadata": {}, "source": [ "Take a look at the dataset:" @@ -56,7 +56,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bdc26ac7-78ef-4408-8a92-a03267a9f1bd", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -65,7 +65,7 @@ }, { "cell_type": "markdown", - "id": "98fa5e6b-e49b-4801-93af-fcba542b606c", + "id": "5", "metadata": {}, "source": [ "Check the projection:" @@ -74,7 +74,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f22c2112", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -83,7 +83,7 @@ }, { "cell_type": "markdown", - "id": "dc1916e2-589d-4b2d-ab2c-0675ffb440da", + "id": "7", "metadata": {}, "source": [ "Currently the dimensions on the object are `ny` and `nx` but the object has no coordinates. If we look in the `data_vars` we can see there are two variables named `xaxis` and `yaxis`. It seems like these are the coordinate values that should exist along the `nx` and `ny` dimensions, respectively. Let's confirm that they match the dimensions `nx` and `ny` in length and then assign them as coordinates:" @@ -92,7 +92,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ab4eae6c", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -103,7 +103,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a6b35954", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -113,7 +113,7 @@ }, { "cell_type": "markdown", - "id": "7625fe5c-fa4b-418f-8387-f31b4153e83e", + "id": "10", "metadata": {}, "source": [ "We'll assign the `xaxis` and `yaxis` vars to be coordinates, and drop them from the `data_vars`. We'll first use `swap_dims()` to swap `ny` for `yaxis` and `nx` for `xaxis`. " @@ -122,7 +122,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9709fd19-9722-4c76-ba85-8993410b3f18", + "id": "11", "metadata": {}, "outputs": [], "source": [ @@ -132,7 +132,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6769e922-64fd-4df3-9a93-2331f677b99c", + "id": "12", "metadata": {}, "outputs": [], "source": [ @@ -141,7 +141,7 @@ }, { "cell_type": "markdown", - "id": "b08a2619-1472-4db9-9ed3-0a3a90613870", + "id": "13", "metadata": {}, "source": [ "Rename `yaxis` and `xaxis` and drop the `nx` and `ny` coordinates: " @@ -150,7 +150,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a788e00e-ce69-4528-8f54-ab457526cd32", + "id": "14", "metadata": {}, "outputs": [], "source": [ @@ -160,7 +160,7 @@ { "cell_type": "code", "execution_count": null, - "id": "057e6c9b-9c6d-406f-a8a0-15e8278c3a9e", + "id": "15", "metadata": {}, "outputs": [], "source": [ @@ -169,7 +169,7 @@ }, { "cell_type": "markdown", - "id": "33e1f698-86a4-4daf-829d-c9f60a25d378", + "id": "16", "metadata": {}, "source": [ "Now we have x and y coordinates and 30 data variables. However, the `data_vars` are really only 3 unique variables that exist along a time dimension (with a length of 10). \n", @@ -178,7 +178,7 @@ }, { "cell_type": "markdown", - "id": "cab21058-3105-4cd5-a7fc-33ff10c6e439", + "id": "17", "metadata": {}, "source": [ "Start by making a few objects that we'll use while we're re-organizing. These are: a list of all the variables in the dataset (`var_ls`), a list of the years covered by the dataset that are currently stored in variable names (`yr_ls`) and then finally lists for each variable (`vx_ls`,`vy_ls` and `err_ls`). These are all of the variables in the original dataset that correspond with that main variable group (`vx`, `vy` or `err`)." @@ -187,7 +187,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c7a7c478-75d0-4a1e-931e-bc7b119bea15", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -202,7 +202,7 @@ }, { "cell_type": "markdown", - "id": "29a73217", + "id": "19", "metadata": {}, "source": [ "Now we are going to group the `dataset.data_vars` into `vx`,`vy`, and `err` and prepare to concatenate them along the time dimension. We will perform the same operations for all three variables but we will demonstrate the process for the first variable in several steps, before showing the operation wrapped into one command for the other two variables. There is a great explanation of this kind of step [here](https://towardsdatascience.com/pythonic-way-to-perform-statistics-across-multiple-variables-with-xarray-d0221c78e34a). At the end of this step, for `vx`, `vy` and `err` we will have a list of `xr.DataArrays` that all have a time dimension on the 0-axis. \n", @@ -213,7 +213,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9360bc75", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -222,7 +222,7 @@ }, { "cell_type": "markdown", - "id": "0ed3f37e", + "id": "21", "metadata": {}, "source": [ "You can see that `da_vx_ls` is a `list` object with a length of 10, and each element of the list is a `xr.DataArray` corresponding to `vx` vars in the original `xr.Dataset`" @@ -231,7 +231,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f81b86ff", + "id": "22", "metadata": {}, "outputs": [], "source": [ @@ -242,7 +242,7 @@ }, { "cell_type": "markdown", - "id": "66231382", + "id": "23", "metadata": {}, "source": [ "next, we will add a time dimension to every element of `da_vx_ls`:" @@ -251,7 +251,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e84a673f", + "id": "24", "metadata": {}, "outputs": [], "source": [ @@ -260,7 +260,7 @@ }, { "cell_type": "markdown", - "id": "237b26a0", + "id": "25", "metadata": {}, "source": [ "Now you can see that each list element is an `xr.DataArray` as before, but that there is now a time dimension." @@ -269,7 +269,7 @@ { "cell_type": "code", "execution_count": null, - "id": "12437590", + "id": "26", "metadata": {}, "outputs": [], "source": [ @@ -278,7 +278,7 @@ }, { "cell_type": "markdown", - "id": "2a4d9a4e", + "id": "27", "metadata": {}, "source": [ "Assign time as a coordinate to each `xr.DataArray` in the list: " @@ -287,7 +287,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7e6aabd2", + "id": "28", "metadata": {}, "outputs": [], "source": [ @@ -297,7 +297,7 @@ }, { "cell_type": "markdown", - "id": "76f50162", + "id": "29", "metadata": {}, "source": [ "Time is now a coordinate as well as a dimension and the coordinate value corresponds to the element-order of the list, ie. the first (0-place) element of `da_vx_ls_test` is the `xr.DataArray` containing the `vx1996` variable, and the `time` coord is 0. In the second (1-place) element, the `xr.DataArray` is called `vx2000` and the `time` coord is 1. \n", @@ -308,7 +308,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6d637fdb", + "id": "30", "metadata": {}, "outputs": [], "source": [ @@ -318,7 +318,7 @@ { "cell_type": "code", "execution_count": null, - "id": "28c97f35", + "id": "31", "metadata": {}, "outputs": [], "source": [ @@ -327,7 +327,7 @@ }, { "cell_type": "markdown", - "id": "50f96d66", + "id": "32", "metadata": {}, "source": [ "Now we have a list of `xr.DataArrays` for the `vx` data variable where each `xr.DataArray` has a time dimension and coordinates along the time dimension. This list is ready to be concatenated along the time dimension. \n", @@ -338,7 +338,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a3c05584-c58c-408a-8b90-fa7ab249764c", + "id": "33", "metadata": {}, "outputs": [], "source": [ @@ -349,7 +349,7 @@ }, { "cell_type": "markdown", - "id": "46dd744d-79e1-4b80-ab43-0c93d41903e0", + "id": "34", "metadata": {}, "source": [ "Once we have these lists, we will concatenate them together to a single `xr.DataArray` with `x`,`y` and `time` dimensions. In the above step, when we create the time dimension we assign a stand-in for the time coordinate. In the cell below, we'll use the `yr_ls` object that we created that is a list whose elements are time-aware objects corresponding to the time coordinates (originally in the variable names). The final line in the cell below merges the three `xr.DataArray`s on the common `time` dimension that they now share, so we have a `xr.Dataset` with `x`,`y` and `time` dimensions and `vx`, `vy` and `err` variables." @@ -358,7 +358,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4e151799-b48b-48c4-a735-b79c073ba119", + "id": "35", "metadata": {}, "outputs": [], "source": [ @@ -372,7 +372,7 @@ { "cell_type": "code", "execution_count": null, - "id": "481f87c1-a30e-457d-be96-ebd1066c172e", + "id": "36", "metadata": {}, "outputs": [], "source": [ @@ -381,7 +381,7 @@ }, { "cell_type": "markdown", - "id": "f7d7d811-0852-4069-b192-5c00a60b57d6", + "id": "37", "metadata": {}, "source": [ "We'll add a variable that is magnitude of velocity as well" @@ -390,7 +390,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f710e608-ae05-468a-a6de-91c3e0bfab36", + "id": "38", "metadata": {}, "outputs": [], "source": [ @@ -400,7 +400,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dc414aad-e9eb-43d7-aaa3-1d3e8eeebbfe", + "id": "39", "metadata": {}, "outputs": [], "source": [ @@ -409,7 +409,7 @@ }, { "cell_type": "markdown", - "id": "04fdb920-fafd-4616-b94d-20594ec0a0fa", + "id": "40", "metadata": {}, "source": [ "and add the `attrs` of the original object to our new object, `ds_full`" @@ -418,7 +418,7 @@ { "cell_type": "code", "execution_count": null, - "id": "667f7978-45c3-4b86-bcd7-4d50719f966c", + "id": "41", "metadata": {}, "outputs": [], "source": [ @@ -428,7 +428,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a25bde3d-b32f-43bc-95f1-09c12a0508f0", + "id": "42", "metadata": {}, "outputs": [], "source": [ @@ -437,7 +437,7 @@ }, { "cell_type": "markdown", - "id": "da8ff620-752e-4da5-874e-b125cd1fec57", + "id": "43", "metadata": {}, "source": [ "Checking against original version to make sure it's the same:" @@ -446,7 +446,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2d38061b-b6a7-4301-ba82-ddda26ed0464", + "id": "44", "metadata": {}, "outputs": [], "source": [ @@ -455,7 +455,7 @@ }, { "cell_type": "markdown", - "id": "37326245-6bfd-4448-865f-43ee90796eb5", + "id": "45", "metadata": {}, "source": [ "We can also use `xr.DataArray.equals` function to test if two `xr.DataArrays` are identical to one another. More information [here](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.equals.html). " @@ -464,7 +464,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fd748573-6393-4fa7-a9bd-58be27a214c4", + "id": "46", "metadata": {}, "outputs": [], "source": [ diff --git a/intermediate/hvplot.ipynb b/intermediate/hvplot.ipynb index a35f9081..ddb4bb81 100644 --- a/intermediate/hvplot.ipynb +++ b/intermediate/hvplot.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "68b31548-7f97-4e1b-912a-e026746dd5bf", + "id": "0", "metadata": {}, "source": [ "\n", @@ -26,7 +26,7 @@ { "cell_type": "code", "execution_count": null, - "id": "054cb195-98be-4866-8426-768051248a16", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -38,7 +38,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f23f8b29-32de-47df-beff-dbe9b92675a5", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -47,7 +47,7 @@ }, { "cell_type": "markdown", - "id": "32b094b5-b404-4dc5-b5ff-40165187edb6", + "id": "3", "metadata": {}, "source": [ "## Basics\n", @@ -58,7 +58,7 @@ { "cell_type": "code", "execution_count": null, - "id": "53dfe034-4642-40cf-960e-360f014e44d8", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -68,7 +68,7 @@ { "cell_type": "code", "execution_count": null, - "id": "067403ec-06fd-449f-8c53-9fc24e15b7d2", + "id": "5", "metadata": {}, "outputs": [], "source": [ @@ -79,7 +79,7 @@ { "cell_type": "code", "execution_count": null, - "id": "07877f83-f22a-4ae8-b683-4149b5e12916", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -89,7 +89,7 @@ }, { "cell_type": "markdown", - "id": "3c382d8e-4670-40b4-8cc1-b3e9fd2bb65b", + "id": "7", "metadata": {}, "source": [ "## Interactivity\n", @@ -102,7 +102,7 @@ { "cell_type": "code", "execution_count": null, - "id": "df27f297-9253-4993-af85-e19c687284c8", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -114,7 +114,7 @@ }, { "cell_type": "markdown", - "id": "932c7dd5-8854-4ff6-805c-9b445a74ea64", + "id": "9", "metadata": {}, "source": [ "## Animations\n", @@ -125,7 +125,7 @@ { "cell_type": "code", "execution_count": null, - "id": "532dae58-9ab9-44b7-82b5-a5026538fbca", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -140,7 +140,7 @@ }, { "cell_type": "markdown", - "id": "b986cfc2-391e-4854-a768-10ae6cf93a82", + "id": "11", "metadata": {}, "source": [ "## Geography\n" @@ -149,7 +149,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f4c7dfe0-1f91-4f8f-8021-65b369d4b88e", + "id": "12", "metadata": {}, "outputs": [], "source": [ diff --git a/overview/fundamental-path/index.ipynb b/overview/fundamental-path/index.ipynb index eecb1059..48c3f5fb 100644 --- a/overview/fundamental-path/index.ipynb +++ b/overview/fundamental-path/index.ipynb @@ -3,7 +3,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "6bad0788-4bd2-49bb-818a-4eda1e265cf1", + "id": "0", "metadata": {}, "source": [ "\n", diff --git a/overview/intermediate-path/index.ipynb b/overview/intermediate-path/index.ipynb index c984c0ee..33a6bcd9 100644 --- a/overview/intermediate-path/index.ipynb +++ b/overview/intermediate-path/index.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "6bad0788-4bd2-49bb-818a-4eda1e265cf1", + "id": "0", "metadata": {}, "source": [ "\n", diff --git a/workshops/scipy2023/index.ipynb b/workshops/scipy2023/index.ipynb index 79377d85..3072d80e 100644 --- a/workshops/scipy2023/index.ipynb +++ b/workshops/scipy2023/index.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "6bad0788-4bd2-49bb-818a-4eda1e265cf1", + "id": "0", "metadata": {}, "source": [ "\n",