Skip to content

Instantly share code, notes, and snippets.

@ScottWales
Created September 7, 2021 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ScottWales/205460f23ca4490b82578cb12ac07e7c to your computer and use it in GitHub Desktop.
Save ScottWales/205460f23ca4490b82578cb12ac07e7c to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"id": "1e184e4f-7400-4544-98cc-fdc135d0f215",
"metadata": {},
"source": [
"# Percentile climatology with a window\n",
"\n",
"We'd like to caluclate a 90th percentile climatology of a dataset, with the added complexity that rather than just grouping all the Jan 1st of each year together we want to add a window of 15 days either side, so that the Jan 1st result is the 90th percentile of all the Dec 16th to Jan 16th of all years."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "2b562969-06f7-4005-b085-c541e340cb8f",
"metadata": {},
"outputs": [],
"source": [
"# Imports\n",
"import xarray"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "a6e294e4-8acd-4793-89cd-5197d61043a4",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px;\">Client</h3>\n",
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-982468aa-0f71-11ec-89ad-fa163eaaaec0</p>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
"\n",
" <tr>\n",
" \n",
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n",
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> distributed.LocalCluster</td>\n",
" \n",
" </tr>\n",
"\n",
" \n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Dashboard: </strong> <a href=\"/node/ood-vn8/17103/proxy/8787/status\" target=\"_blank\">/node/ood-vn8/17103/proxy/8787/status</a>\n",
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" \n",
"\n",
" </table>\n",
"\n",
" \n",
" <details>\n",
" <summary style=\"margin-bottom: 20px;\"><h3 style=\"display: inline;\">Cluster Info</h3></summary>\n",
" <div class=\"jp-RenderedHTMLCommon jp-RenderedHTML jp-mod-trusted jp-OutputArea-output\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\">\n",
" </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px; margin-top: 0px;\">LocalCluster</h3>\n",
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">3fc6f855</p>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Dashboard:</strong> <a href=\"/node/ood-vn8/17103/proxy/8787/status\" target=\"_blank\">/node/ood-vn8/17103/proxy/8787/status</a>\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Workers:</strong> 4\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads:</strong> 4\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total memory:</strong> 11.23 GiB\n",
" </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <td style=\"text-align: left;\"><strong>Status:</strong> running</td>\n",
" <td style=\"text-align: left;\"><strong>Using processes:</strong> True</td>\n",
"</tr>\n",
"\n",
" \n",
" </table>\n",
"\n",
" <details>\n",
" <summary style=\"margin-bottom: 20px;\">\n",
" <h3 style=\"display: inline;\">Scheduler Info</h3>\n",
" </summary>\n",
"\n",
" <div style=\"\">\n",
" <div>\n",
" <div style=\"width: 24px; height: 24px; background-color: #FFF7E5; border: 3px solid #FF6132; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px;\">Scheduler</h3>\n",
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Scheduler-1357819f-28e0-4388-8de3-a2cf2fa7def9</p>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Comm:</strong> tcp://127.0.0.1:44551\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Workers:</strong> 4\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Dashboard:</strong> <a href=\"/node/ood-vn8/17103/proxy/8787/status\" target=\"_blank\">/node/ood-vn8/17103/proxy/8787/status</a>\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads:</strong> 4\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Started:</strong> Just now\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total memory:</strong> 11.23 GiB\n",
" </td>\n",
" </tr>\n",
" </table>\n",
" </div>\n",
" </div>\n",
"\n",
" <details style=\"margin-left: 48px;\">\n",
" <summary style=\"margin-bottom: 20px;\">\n",
" <h3 style=\"display: inline;\">Workers</h3>\n",
" </summary>\n",
"\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 0</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Comm: </strong> tcp://10.0.128.136:40323\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 1\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Dashboard: </strong> <a href=\"/node/ood-vn8/17103/proxy/33999/status\" target=\"_blank\">/node/ood-vn8/17103/proxy/33999/status</a>\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 2.81 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Nanny: </strong> tcp://127.0.0.1:45285\n",
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
" <strong>Local directory: </strong> /local/w35/saw562/tmp/dask-worker-space/worker-gguw326_\n",
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 1</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Comm: </strong> tcp://10.0.128.136:35241\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 1\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Dashboard: </strong> <a href=\"/node/ood-vn8/17103/proxy/45751/status\" target=\"_blank\">/node/ood-vn8/17103/proxy/45751/status</a>\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 2.81 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Nanny: </strong> tcp://127.0.0.1:43429\n",
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
" <strong>Local directory: </strong> /local/w35/saw562/tmp/dask-worker-space/worker-19ps26cb\n",
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 2</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Comm: </strong> tcp://10.0.128.136:36907\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 1\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Dashboard: </strong> <a href=\"/node/ood-vn8/17103/proxy/46587/status\" target=\"_blank\">/node/ood-vn8/17103/proxy/46587/status</a>\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 2.81 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Nanny: </strong> tcp://127.0.0.1:45357\n",
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
" <strong>Local directory: </strong> /local/w35/saw562/tmp/dask-worker-space/worker-gftvk908\n",
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
" <div style=\"margin-bottom: 20px;\">\n",
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <details>\n",
" <summary>\n",
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 3</h4>\n",
" </summary>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Comm: </strong> tcp://10.0.128.136:41941\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Total threads: </strong> 1\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Dashboard: </strong> <a href=\"/node/ood-vn8/17103/proxy/45603/status\" target=\"_blank\">/node/ood-vn8/17103/proxy/45603/status</a>\n",
" </td>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Memory: </strong> 2.81 GiB\n",
" </td>\n",
" </tr>\n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Nanny: </strong> tcp://127.0.0.1:46317\n",
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" <tr>\n",
" <td colspan=\"2\" style=\"text-align: left;\">\n",
" <strong>Local directory: </strong> /local/w35/saw562/tmp/dask-worker-space/worker-c0pfsb5n\n",
" </td>\n",
" </tr>\n",
"\n",
" \n",
"\n",
" \n",
"\n",
" </table>\n",
" </details>\n",
" </div>\n",
" </div>\n",
" \n",
"\n",
" </details>\n",
"</div>\n",
"\n",
" </details>\n",
" </div>\n",
"</div>\n",
" </details>\n",
" \n",
"\n",
" </div>\n",
"</div>"
],
"text/plain": [
"<Client: 'tcp://127.0.0.1:44551' processes=4 threads=4, memory=11.23 GiB>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Start a dask client\n",
"import climtas.nci\n",
"climtas.nci.Client()"
]
},
{
"cell_type": "markdown",
"id": "98e79c4b-8fd2-4cf4-817e-66f06958cd4d",
"metadata": {},
"source": [
"## Sample data\n",
"\n",
"For the demo I'll use ACCESS CMIP6 surface temperature. I've chosen a chunking in time as that's usually how the data is laid out in the file - you have the whole grid for Jan 1st, then the whole grid for Jan 2nd and so on. It's faster to read data if it's close together in the file, so we don't want to hop all over getting all the times for a single grid point.\n",
"\n",
"The chunk size is aiming to get the chunk bytes in the array table to very roughly around 100 mb - 30 mb is fine for this (I chose 300 to start with because that's roughly a year)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "321a8607-6572-443c-8686-1cda143eb50d",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2 {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;tas&#x27; (time: 13149, lat: 145, lon: 192)&gt;\n",
"dask.array&lt;open_dataset-de3bca054c2ed43774883de8240854a6tas, shape=(13149, 145, 192), dtype=float32, chunksize=(300, 145, 192), chunktype=numpy.ndarray&gt;\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1979-01-01T12:00:00 ... 2014-12-31T12:00:00\n",
" * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n",
" * lon (lon) float64 0.0 1.875 3.75 5.625 7.5 ... 352.5 354.4 356.2 358.1\n",
" height float64 ...\n",
"Attributes:\n",
" standard_name: air_temperature\n",
" long_name: Near-Surface Air Temperature\n",
" comment: near-surface (usually, 2 meter) air temperature\n",
" units: K\n",
" cell_methods: area: time: mean\n",
" cell_measures: area: areacella\n",
" history: 2019-11-14T05:08:45Z altered by CMOR: Treated scalar dime...</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'tas'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 13149</li><li><span class='xr-has-index'>lat</span>: 145</li><li><span class='xr-has-index'>lon</span>: 192</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-4cb5784f-c94a-4f79-9486-cd2506344ec3' class='xr-array-in' type='checkbox' checked><label for='section-4cb5784f-c94a-4f79-9486-cd2506344ec3' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>dask.array&lt;chunksize=(300, 145, 192), meta=np.ndarray&gt;</span></div><div class='xr-array-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table>\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 1.36 GiB </td>\n",
" <td> 31.86 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (13149, 145, 192) </td>\n",
" <td> (300, 145, 192) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Count </th>\n",
" <td> 45 Tasks </td>\n",
" <td> 44 Chunks </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Type </th>\n",
" <td> float32 </td>\n",
" <td> numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"157\" height=\"146\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"80\" y2=\"70\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"25\" x2=\"80\" y2=\"96\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"13\" y2=\"29\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"32\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"35\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"40\" />\n",
" <line x1=\"27\" y1=\"17\" x2=\"27\" y2=\"43\" />\n",
" <line x1=\"30\" y1=\"20\" x2=\"30\" y2=\"46\" />\n",
" <line x1=\"35\" y1=\"25\" x2=\"35\" y2=\"51\" />\n",
" <line x1=\"38\" y1=\"28\" x2=\"38\" y2=\"54\" />\n",
" <line x1=\"42\" y1=\"32\" x2=\"42\" y2=\"58\" />\n",
" <line x1=\"47\" y1=\"37\" x2=\"47\" y2=\"62\" />\n",
" <line x1=\"50\" y1=\"40\" x2=\"50\" y2=\"66\" />\n",
" <line x1=\"53\" y1=\"43\" x2=\"53\" y2=\"69\" />\n",
" <line x1=\"58\" y1=\"48\" x2=\"58\" y2=\"74\" />\n",
" <line x1=\"61\" y1=\"51\" x2=\"61\" y2=\"77\" />\n",
" <line x1=\"64\" y1=\"54\" x2=\"64\" y2=\"80\" />\n",
" <line x1=\"69\" y1=\"59\" x2=\"69\" y2=\"85\" />\n",
" <line x1=\"72\" y1=\"62\" x2=\"72\" y2=\"88\" />\n",
" <line x1=\"76\" y1=\"66\" x2=\"76\" y2=\"91\" />\n",
" <line x1=\"80\" y1=\"70\" x2=\"80\" y2=\"96\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 80.58823529411765,70.58823529411765 80.58823529411765,96.4752308288603 10.0,25.886995534742653\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"37\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"40\" y2=\"3\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"43\" y2=\"6\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"46\" y2=\"9\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"51\" y2=\"14\" />\n",
" <line x1=\"27\" y1=\"17\" x2=\"55\" y2=\"17\" />\n",
" <line x1=\"30\" y1=\"20\" x2=\"58\" y2=\"20\" />\n",
" <line x1=\"35\" y1=\"25\" x2=\"63\" y2=\"25\" />\n",
" <line x1=\"38\" y1=\"28\" x2=\"66\" y2=\"28\" />\n",
" <line x1=\"42\" y1=\"32\" x2=\"69\" y2=\"32\" />\n",
" <line x1=\"47\" y1=\"37\" x2=\"74\" y2=\"37\" />\n",
" <line x1=\"50\" y1=\"40\" x2=\"77\" y2=\"40\" />\n",
" <line x1=\"53\" y1=\"43\" x2=\"80\" y2=\"43\" />\n",
" <line x1=\"58\" y1=\"48\" x2=\"85\" y2=\"48\" />\n",
" <line x1=\"61\" y1=\"51\" x2=\"88\" y2=\"51\" />\n",
" <line x1=\"64\" y1=\"54\" x2=\"92\" y2=\"54\" />\n",
" <line x1=\"69\" y1=\"59\" x2=\"96\" y2=\"59\" />\n",
" <line x1=\"72\" y1=\"62\" x2=\"100\" y2=\"62\" />\n",
" <line x1=\"76\" y1=\"66\" x2=\"103\" y2=\"66\" />\n",
" <line x1=\"80\" y1=\"70\" x2=\"107\" y2=\"70\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"80\" y2=\"70\" style=\"stroke-width:2\" />\n",
" <line x1=\"37\" y1=\"0\" x2=\"107\" y2=\"70\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 37.31605633819747,0.0 107.90429163231512,70.58823529411765 80.58823529411765,70.58823529411765\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"80\" y1=\"70\" x2=\"107\" y2=\"70\" style=\"stroke-width:2\" />\n",
" <line x1=\"80\" y1=\"96\" x2=\"107\" y2=\"96\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"80\" y1=\"70\" x2=\"80\" y2=\"96\" style=\"stroke-width:2\" />\n",
" <line x1=\"107\" y1=\"70\" x2=\"107\" y2=\"96\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"80.58823529411765,70.58823529411765 107.90429163231512,70.58823529411765 107.90429163231512,96.4752308288603 80.58823529411765,96.4752308288603\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"94.246263\" y=\"116.475231\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >192</text>\n",
" <text x=\"127.904292\" y=\"83.531733\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,127.904292,83.531733)\">145</text>\n",
" <text x=\"35.294118\" y=\"81.181113\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,35.294118,81.181113)\">13149</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></div></li><li class='xr-section-item'><input id='section-0ce47da2-21e4-453f-9408-a167bf09d55e' class='xr-section-summary-in' type='checkbox' checked><label for='section-0ce47da2-21e4-453f-9408-a167bf09d55e' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>1979-01-01T12:00:00 ... 2014-12-...</div><input id='attrs-2691ccd2-63ec-45bc-a969-d4a97fb7d44a' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2691ccd2-63ec-45bc-a969-d4a97fb7d44a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e8bf78f7-8813-45ca-a277-15f6419081de' class='xr-var-data-in' type='checkbox'><label for='data-e8bf78f7-8813-45ca-a277-15f6419081de' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>time_bnds</dd><dt><span>axis :</span></dt><dd>T</dd><dt><span>long_name :</span></dt><dd>time</dd><dt><span>standard_name :</span></dt><dd>time</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;1979-01-01T12:00:00.000000000&#x27;, &#x27;1979-01-02T12:00:00.000000000&#x27;,\n",
" &#x27;1979-01-03T12:00:00.000000000&#x27;, ..., &#x27;2014-12-29T12:00:00.000000000&#x27;,\n",
" &#x27;2014-12-30T12:00:00.000000000&#x27;, &#x27;2014-12-31T12:00:00.000000000&#x27;],\n",
" dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lat</span></div><div class='xr-var-dims'>(lat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-90.0 -88.75 -87.5 ... 88.75 90.0</div><input id='attrs-f2041cf1-2de3-4956-a6bc-ae02548d6aca' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-f2041cf1-2de3-4956-a6bc-ae02548d6aca' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-77c6473f-99c1-4daa-b015-5af128fdd5b6' class='xr-var-data-in' type='checkbox'><label for='data-77c6473f-99c1-4daa-b015-5af128fdd5b6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>lat_bnds</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>long_name :</span></dt><dd>Latitude</dd><dt><span>standard_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><pre>array([-90. , -88.75, -87.5 , -86.25, -85. , -83.75, -82.5 , -81.25, -80. ,\n",
" -78.75, -77.5 , -76.25, -75. , -73.75, -72.5 , -71.25, -70. , -68.75,\n",
" -67.5 , -66.25, -65. , -63.75, -62.5 , -61.25, -60. , -58.75, -57.5 ,\n",
" -56.25, -55. , -53.75, -52.5 , -51.25, -50. , -48.75, -47.5 , -46.25,\n",
" -45. , -43.75, -42.5 , -41.25, -40. , -38.75, -37.5 , -36.25, -35. ,\n",
" -33.75, -32.5 , -31.25, -30. , -28.75, -27.5 , -26.25, -25. , -23.75,\n",
" -22.5 , -21.25, -20. , -18.75, -17.5 , -16.25, -15. , -13.75, -12.5 ,\n",
" -11.25, -10. , -8.75, -7.5 , -6.25, -5. , -3.75, -2.5 , -1.25,\n",
" 0. , 1.25, 2.5 , 3.75, 5. , 6.25, 7.5 , 8.75, 10. ,\n",
" 11.25, 12.5 , 13.75, 15. , 16.25, 17.5 , 18.75, 20. , 21.25,\n",
" 22.5 , 23.75, 25. , 26.25, 27.5 , 28.75, 30. , 31.25, 32.5 ,\n",
" 33.75, 35. , 36.25, 37.5 , 38.75, 40. , 41.25, 42.5 , 43.75,\n",
" 45. , 46.25, 47.5 , 48.75, 50. , 51.25, 52.5 , 53.75, 55. ,\n",
" 56.25, 57.5 , 58.75, 60. , 61.25, 62.5 , 63.75, 65. , 66.25,\n",
" 67.5 , 68.75, 70. , 71.25, 72.5 , 73.75, 75. , 76.25, 77.5 ,\n",
" 78.75, 80. , 81.25, 82.5 , 83.75, 85. , 86.25, 87.5 , 88.75,\n",
" 90. ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lon</span></div><div class='xr-var-dims'>(lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.875 3.75 ... 356.2 358.1</div><input id='attrs-f2160e65-f907-42a7-b897-d7c2a7e39c5c' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-f2160e65-f907-42a7-b897-d7c2a7e39c5c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-48b331b9-57c7-412d-8471-e50228c0a7f8' class='xr-var-data-in' type='checkbox'><label for='data-48b331b9-57c7-412d-8471-e50228c0a7f8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>lon_bnds</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>long_name :</span></dt><dd>Longitude</dd><dt><span>standard_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><pre>array([ 0. , 1.875, 3.75 , 5.625, 7.5 , 9.375, 11.25 , 13.125,\n",
" 15. , 16.875, 18.75 , 20.625, 22.5 , 24.375, 26.25 , 28.125,\n",
" 30. , 31.875, 33.75 , 35.625, 37.5 , 39.375, 41.25 , 43.125,\n",
" 45. , 46.875, 48.75 , 50.625, 52.5 , 54.375, 56.25 , 58.125,\n",
" 60. , 61.875, 63.75 , 65.625, 67.5 , 69.375, 71.25 , 73.125,\n",
" 75. , 76.875, 78.75 , 80.625, 82.5 , 84.375, 86.25 , 88.125,\n",
" 90. , 91.875, 93.75 , 95.625, 97.5 , 99.375, 101.25 , 103.125,\n",
" 105. , 106.875, 108.75 , 110.625, 112.5 , 114.375, 116.25 , 118.125,\n",
" 120. , 121.875, 123.75 , 125.625, 127.5 , 129.375, 131.25 , 133.125,\n",
" 135. , 136.875, 138.75 , 140.625, 142.5 , 144.375, 146.25 , 148.125,\n",
" 150. , 151.875, 153.75 , 155.625, 157.5 , 159.375, 161.25 , 163.125,\n",
" 165. , 166.875, 168.75 , 170.625, 172.5 , 174.375, 176.25 , 178.125,\n",
" 180. , 181.875, 183.75 , 185.625, 187.5 , 189.375, 191.25 , 193.125,\n",
" 195. , 196.875, 198.75 , 200.625, 202.5 , 204.375, 206.25 , 208.125,\n",
" 210. , 211.875, 213.75 , 215.625, 217.5 , 219.375, 221.25 , 223.125,\n",
" 225. , 226.875, 228.75 , 230.625, 232.5 , 234.375, 236.25 , 238.125,\n",
" 240. , 241.875, 243.75 , 245.625, 247.5 , 249.375, 251.25 , 253.125,\n",
" 255. , 256.875, 258.75 , 260.625, 262.5 , 264.375, 266.25 , 268.125,\n",
" 270. , 271.875, 273.75 , 275.625, 277.5 , 279.375, 281.25 , 283.125,\n",
" 285. , 286.875, 288.75 , 290.625, 292.5 , 294.375, 296.25 , 298.125,\n",
" 300. , 301.875, 303.75 , 305.625, 307.5 , 309.375, 311.25 , 313.125,\n",
" 315. , 316.875, 318.75 , 320.625, 322.5 , 324.375, 326.25 , 328.125,\n",
" 330. , 331.875, 333.75 , 335.625, 337.5 , 339.375, 341.25 , 343.125,\n",
" 345. , 346.875, 348.75 , 350.625, 352.5 , 354.375, 356.25 , 358.125])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>height</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-b82f44b7-274c-4684-869c-73cf184c6349' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-b82f44b7-274c-4684-869c-73cf184c6349' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ebd531a4-6ab7-459e-9fa8-bdcdfc141831' class='xr-var-data-in' type='checkbox'><label for='data-ebd531a4-6ab7-459e-9fa8-bdcdfc141831' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>m</dd><dt><span>axis :</span></dt><dd>Z</dd><dt><span>positive :</span></dt><dd>up</dd><dt><span>long_name :</span></dt><dd>height</dd><dt><span>standard_name :</span></dt><dd>height</dd></dl></div><div class='xr-var-data'><pre>array(2.)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8d5eae4b-3854-4e3d-a98a-8c96bf0ceb52' class='xr-section-summary-in' type='checkbox' checked><label for='section-8d5eae4b-3854-4e3d-a98a-8c96bf0ceb52' class='xr-section-summary' >Attributes: <span>(7)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>air_temperature</dd><dt><span>long_name :</span></dt><dd>Near-Surface Air Temperature</dd><dt><span>comment :</span></dt><dd>near-surface (usually, 2 meter) air temperature</dd><dt><span>units :</span></dt><dd>K</dd><dt><span>cell_methods :</span></dt><dd>area: time: mean</dd><dt><span>cell_measures :</span></dt><dd>area: areacella</dd><dt><span>history :</span></dt><dd>2019-11-14T05:08:45Z altered by CMOR: Treated scalar dimension: &#x27;height&#x27;. 2019-11-14T05:08:45Z altered by CMOR: replaced missing value flag (-1.07374e+09) with standard missing value (1e+20).</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'tas' (time: 13149, lat: 145, lon: 192)>\n",
"dask.array<open_dataset-de3bca054c2ed43774883de8240854a6tas, shape=(13149, 145, 192), dtype=float32, chunksize=(300, 145, 192), chunktype=numpy.ndarray>\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1979-01-01T12:00:00 ... 2014-12-31T12:00:00\n",
" * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n",
" * lon (lon) float64 0.0 1.875 3.75 5.625 7.5 ... 352.5 354.4 356.2 358.1\n",
" height float64 ...\n",
"Attributes:\n",
" standard_name: air_temperature\n",
" long_name: Near-Surface Air Temperature\n",
" comment: near-surface (usually, 2 meter) air temperature\n",
" units: K\n",
" cell_methods: area: time: mean\n",
" cell_measures: area: areacella\n",
" history: 2019-11-14T05:08:45Z altered by CMOR: Treated scalar dime..."
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ds = xarray.open_mfdataset('/g/data/fs38/publications/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/amip/r1i1p1f1/day/tas/gn/latest/*.nc', chunks={'time': 300})\n",
"ds.tas"
]
},
{
"cell_type": "markdown",
"id": "9e6698f7-cecd-4e69-abe5-f0faea8f94c1",
"metadata": {},
"source": [
"## 31 day window\n",
"\n",
"We'll start out with the windowing, gathering together 15 days either side of each day. We can do this with '.rolling()'. We give it the total size of the window, here 31 for the day plus 15 days either side."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "f9b98d5b-c7ee-4ed0-b144-aab91fbd97ce",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"DataArrayRolling [time->31(center)]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ds.tas.rolling(time=31, center=True)"
]
},
{
"cell_type": "markdown",
"id": "3ce23719-5f8b-45cd-b781-502106eaeda4",
"metadata": {},
"source": [
"if we liked we could get stats for each window just by calling '.mean()' etc. here. We're wanting to do something a bit more complex however with a climatology, so we'll use the `construct()` function. This rearranges the array to add a new axis that contains all of the samples for the window"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "044b4bac-7a91-4870-a62a-5ab07cd61d61",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2 {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;tas&#x27; (time: 13149, lat: 145, lon: 192, window: 31)&gt;\n",
"dask.array&lt;sliding_window_view, shape=(13149, 145, 192, 31), dtype=float32, chunksize=(315, 145, 192, 31), chunktype=numpy.ndarray&gt;\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1979-01-01T12:00:00 ... 2014-12-31T12:00:00\n",
" * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n",
" * lon (lon) float64 0.0 1.875 3.75 5.625 7.5 ... 352.5 354.4 356.2 358.1\n",
" height float64 ...\n",
"Dimensions without coordinates: window\n",
"Attributes:\n",
" standard_name: air_temperature\n",
" long_name: Near-Surface Air Temperature\n",
" comment: near-surface (usually, 2 meter) air temperature\n",
" units: K\n",
" cell_methods: area: time: mean\n",
" cell_measures: area: areacella\n",
" history: 2019-11-14T05:08:45Z altered by CMOR: Treated scalar dime...</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'tas'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 13149</li><li><span class='xr-has-index'>lat</span>: 145</li><li><span class='xr-has-index'>lon</span>: 192</li><li><span>window</span>: 31</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-3a8ae8ea-23b1-4a9e-b489-d608696ad0d7' class='xr-array-in' type='checkbox' checked><label for='section-3a8ae8ea-23b1-4a9e-b489-d608696ad0d7' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>dask.array&lt;chunksize=(315, 145, 192, 31), meta=np.ndarray&gt;</span></div><div class='xr-array-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table>\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 42.28 GiB </td>\n",
" <td> 1.01 GiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (13149, 145, 192, 31) </td>\n",
" <td> (315, 145, 192, 31) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Count </th>\n",
" <td> 363 Tasks </td>\n",
" <td> 45 Chunks </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Type </th>\n",
" <td> float32 </td>\n",
" <td> numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"470\" height=\"92\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"2\" y1=\"0\" x2=\"2\" y2=\"25\" />\n",
" <line x1=\"5\" y1=\"0\" x2=\"5\" y2=\"25\" />\n",
" <line x1=\"11\" y1=\"0\" x2=\"11\" y2=\"25\" />\n",
" <line x1=\"13\" y1=\"0\" x2=\"13\" y2=\"25\" />\n",
" <line x1=\"19\" y1=\"0\" x2=\"19\" y2=\"25\" />\n",
" <line x1=\"22\" y1=\"0\" x2=\"22\" y2=\"25\" />\n",
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n",
" <line x1=\"30\" y1=\"0\" x2=\"30\" y2=\"25\" />\n",
" <line x1=\"32\" y1=\"0\" x2=\"32\" y2=\"25\" />\n",
" <line x1=\"38\" y1=\"0\" x2=\"38\" y2=\"25\" />\n",
" <line x1=\"41\" y1=\"0\" x2=\"41\" y2=\"25\" />\n",
" <line x1=\"43\" y1=\"0\" x2=\"43\" y2=\"25\" />\n",
" <line x1=\"49\" y1=\"0\" x2=\"49\" y2=\"25\" />\n",
" <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n",
" <line x1=\"57\" y1=\"0\" x2=\"57\" y2=\"25\" />\n",
" <line x1=\"60\" y1=\"0\" x2=\"60\" y2=\"25\" />\n",
" <line x1=\"63\" y1=\"0\" x2=\"63\" y2=\"25\" />\n",
" <line x1=\"68\" y1=\"0\" x2=\"68\" y2=\"25\" />\n",
" <line x1=\"71\" y1=\"0\" x2=\"71\" y2=\"25\" />\n",
" <line x1=\"76\" y1=\"0\" x2=\"76\" y2=\"25\" />\n",
" <line x1=\"79\" y1=\"0\" x2=\"79\" y2=\"25\" />\n",
" <line x1=\"82\" y1=\"0\" x2=\"82\" y2=\"25\" />\n",
" <line x1=\"87\" y1=\"0\" x2=\"87\" y2=\"25\" />\n",
" <line x1=\"90\" y1=\"0\" x2=\"90\" y2=\"25\" />\n",
" <line x1=\"95\" y1=\"0\" x2=\"95\" y2=\"25\" />\n",
" <line x1=\"98\" y1=\"0\" x2=\"98\" y2=\"25\" />\n",
" <line x1=\"101\" y1=\"0\" x2=\"101\" y2=\"25\" />\n",
" <line x1=\"106\" y1=\"0\" x2=\"106\" y2=\"25\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"109\" y2=\"25\" />\n",
" <line x1=\"115\" y1=\"0\" x2=\"115\" y2=\"25\" />\n",
" <line x1=\"117\" y1=\"0\" x2=\"117\" y2=\"25\" />\n",
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >13149</text>\n",
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n",
"\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"190\" y1=\"0\" x2=\"205\" y2=\"15\" style=\"stroke-width:2\" />\n",
" <line x1=\"190\" y1=\"27\" x2=\"205\" y2=\"42\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"190\" y1=\"0\" x2=\"190\" y2=\"27\" style=\"stroke-width:2\" />\n",
" <line x1=\"205\" y1=\"15\" x2=\"205\" y2=\"42\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"190.0,0.0 205.22764443220157,15.227644432201561 205.22764443220157,42.54370077039903 190.0,27.31605633819747\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"190\" y1=\"0\" x2=\"215\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"205\" y1=\"15\" x2=\"230\" y2=\"15\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"190\" y1=\"0\" x2=\"205\" y2=\"15\" style=\"stroke-width:2\" />\n",
" <line x1=\"215\" y1=\"0\" x2=\"230\" y2=\"15\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"190.0,0.0 215.41261651458248,0.0 230.64026094678405,15.227644432201561 205.22764443220157,15.227644432201561\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"205\" y1=\"15\" x2=\"230\" y2=\"15\" style=\"stroke-width:2\" />\n",
" <line x1=\"205\" y1=\"42\" x2=\"230\" y2=\"42\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"205\" y1=\"15\" x2=\"205\" y2=\"42\" style=\"stroke-width:2\" />\n",
" <line x1=\"230\" y1=\"15\" x2=\"230\" y2=\"42\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"205.22764443220157,15.227644432201561 230.64026094678405,15.227644432201561 230.64026094678405,42.54370077039903 205.22764443220157,42.54370077039903\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"217.933953\" y=\"62.543701\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >31</text>\n",
" <text x=\"250.640261\" y=\"28.885673\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,250.640261,28.885673)\">192</text>\n",
" <text x=\"187.613822\" y=\"54.929879\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,187.613822,54.929879)\">145</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></div></li><li class='xr-section-item'><input id='section-d28abff4-2e81-4b57-95e1-15ec0b84f12c' class='xr-section-summary-in' type='checkbox' checked><label for='section-d28abff4-2e81-4b57-95e1-15ec0b84f12c' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>1979-01-01T12:00:00 ... 2014-12-...</div><input id='attrs-7832879b-2e51-49f0-8ac4-72e4a8b5bf27' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-7832879b-2e51-49f0-8ac4-72e4a8b5bf27' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b0b62fb5-b3fd-4ce7-a115-0da06d32d892' class='xr-var-data-in' type='checkbox'><label for='data-b0b62fb5-b3fd-4ce7-a115-0da06d32d892' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>time_bnds</dd><dt><span>axis :</span></dt><dd>T</dd><dt><span>long_name :</span></dt><dd>time</dd><dt><span>standard_name :</span></dt><dd>time</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;1979-01-01T12:00:00.000000000&#x27;, &#x27;1979-01-02T12:00:00.000000000&#x27;,\n",
" &#x27;1979-01-03T12:00:00.000000000&#x27;, ..., &#x27;2014-12-29T12:00:00.000000000&#x27;,\n",
" &#x27;2014-12-30T12:00:00.000000000&#x27;, &#x27;2014-12-31T12:00:00.000000000&#x27;],\n",
" dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lat</span></div><div class='xr-var-dims'>(lat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-90.0 -88.75 -87.5 ... 88.75 90.0</div><input id='attrs-ac4e5fdc-93ab-4abb-afae-0a19d82e73a7' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ac4e5fdc-93ab-4abb-afae-0a19d82e73a7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4a1082f6-3b51-439b-9ac8-da46d0b37a91' class='xr-var-data-in' type='checkbox'><label for='data-4a1082f6-3b51-439b-9ac8-da46d0b37a91' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>lat_bnds</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>long_name :</span></dt><dd>Latitude</dd><dt><span>standard_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><pre>array([-90. , -88.75, -87.5 , -86.25, -85. , -83.75, -82.5 , -81.25, -80. ,\n",
" -78.75, -77.5 , -76.25, -75. , -73.75, -72.5 , -71.25, -70. , -68.75,\n",
" -67.5 , -66.25, -65. , -63.75, -62.5 , -61.25, -60. , -58.75, -57.5 ,\n",
" -56.25, -55. , -53.75, -52.5 , -51.25, -50. , -48.75, -47.5 , -46.25,\n",
" -45. , -43.75, -42.5 , -41.25, -40. , -38.75, -37.5 , -36.25, -35. ,\n",
" -33.75, -32.5 , -31.25, -30. , -28.75, -27.5 , -26.25, -25. , -23.75,\n",
" -22.5 , -21.25, -20. , -18.75, -17.5 , -16.25, -15. , -13.75, -12.5 ,\n",
" -11.25, -10. , -8.75, -7.5 , -6.25, -5. , -3.75, -2.5 , -1.25,\n",
" 0. , 1.25, 2.5 , 3.75, 5. , 6.25, 7.5 , 8.75, 10. ,\n",
" 11.25, 12.5 , 13.75, 15. , 16.25, 17.5 , 18.75, 20. , 21.25,\n",
" 22.5 , 23.75, 25. , 26.25, 27.5 , 28.75, 30. , 31.25, 32.5 ,\n",
" 33.75, 35. , 36.25, 37.5 , 38.75, 40. , 41.25, 42.5 , 43.75,\n",
" 45. , 46.25, 47.5 , 48.75, 50. , 51.25, 52.5 , 53.75, 55. ,\n",
" 56.25, 57.5 , 58.75, 60. , 61.25, 62.5 , 63.75, 65. , 66.25,\n",
" 67.5 , 68.75, 70. , 71.25, 72.5 , 73.75, 75. , 76.25, 77.5 ,\n",
" 78.75, 80. , 81.25, 82.5 , 83.75, 85. , 86.25, 87.5 , 88.75,\n",
" 90. ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lon</span></div><div class='xr-var-dims'>(lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.875 3.75 ... 356.2 358.1</div><input id='attrs-c88bba81-7227-4084-9d33-9c106eca001b' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-c88bba81-7227-4084-9d33-9c106eca001b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-09510775-55e7-49ee-80d9-25620128f0c3' class='xr-var-data-in' type='checkbox'><label for='data-09510775-55e7-49ee-80d9-25620128f0c3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>lon_bnds</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>long_name :</span></dt><dd>Longitude</dd><dt><span>standard_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><pre>array([ 0. , 1.875, 3.75 , 5.625, 7.5 , 9.375, 11.25 , 13.125,\n",
" 15. , 16.875, 18.75 , 20.625, 22.5 , 24.375, 26.25 , 28.125,\n",
" 30. , 31.875, 33.75 , 35.625, 37.5 , 39.375, 41.25 , 43.125,\n",
" 45. , 46.875, 48.75 , 50.625, 52.5 , 54.375, 56.25 , 58.125,\n",
" 60. , 61.875, 63.75 , 65.625, 67.5 , 69.375, 71.25 , 73.125,\n",
" 75. , 76.875, 78.75 , 80.625, 82.5 , 84.375, 86.25 , 88.125,\n",
" 90. , 91.875, 93.75 , 95.625, 97.5 , 99.375, 101.25 , 103.125,\n",
" 105. , 106.875, 108.75 , 110.625, 112.5 , 114.375, 116.25 , 118.125,\n",
" 120. , 121.875, 123.75 , 125.625, 127.5 , 129.375, 131.25 , 133.125,\n",
" 135. , 136.875, 138.75 , 140.625, 142.5 , 144.375, 146.25 , 148.125,\n",
" 150. , 151.875, 153.75 , 155.625, 157.5 , 159.375, 161.25 , 163.125,\n",
" 165. , 166.875, 168.75 , 170.625, 172.5 , 174.375, 176.25 , 178.125,\n",
" 180. , 181.875, 183.75 , 185.625, 187.5 , 189.375, 191.25 , 193.125,\n",
" 195. , 196.875, 198.75 , 200.625, 202.5 , 204.375, 206.25 , 208.125,\n",
" 210. , 211.875, 213.75 , 215.625, 217.5 , 219.375, 221.25 , 223.125,\n",
" 225. , 226.875, 228.75 , 230.625, 232.5 , 234.375, 236.25 , 238.125,\n",
" 240. , 241.875, 243.75 , 245.625, 247.5 , 249.375, 251.25 , 253.125,\n",
" 255. , 256.875, 258.75 , 260.625, 262.5 , 264.375, 266.25 , 268.125,\n",
" 270. , 271.875, 273.75 , 275.625, 277.5 , 279.375, 281.25 , 283.125,\n",
" 285. , 286.875, 288.75 , 290.625, 292.5 , 294.375, 296.25 , 298.125,\n",
" 300. , 301.875, 303.75 , 305.625, 307.5 , 309.375, 311.25 , 313.125,\n",
" 315. , 316.875, 318.75 , 320.625, 322.5 , 324.375, 326.25 , 328.125,\n",
" 330. , 331.875, 333.75 , 335.625, 337.5 , 339.375, 341.25 , 343.125,\n",
" 345. , 346.875, 348.75 , 350.625, 352.5 , 354.375, 356.25 , 358.125])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>height</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-7e46a844-6277-479e-b800-ba105b3204c3' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-7e46a844-6277-479e-b800-ba105b3204c3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f686f3dc-2e36-4c8c-a0f6-4c42f7feff61' class='xr-var-data-in' type='checkbox'><label for='data-f686f3dc-2e36-4c8c-a0f6-4c42f7feff61' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>m</dd><dt><span>axis :</span></dt><dd>Z</dd><dt><span>positive :</span></dt><dd>up</dd><dt><span>long_name :</span></dt><dd>height</dd><dt><span>standard_name :</span></dt><dd>height</dd></dl></div><div class='xr-var-data'><pre>array(2.)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-4c6cc1d5-95ba-411e-806d-6fb42f7f55be' class='xr-section-summary-in' type='checkbox' checked><label for='section-4c6cc1d5-95ba-411e-806d-6fb42f7f55be' class='xr-section-summary' >Attributes: <span>(7)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>air_temperature</dd><dt><span>long_name :</span></dt><dd>Near-Surface Air Temperature</dd><dt><span>comment :</span></dt><dd>near-surface (usually, 2 meter) air temperature</dd><dt><span>units :</span></dt><dd>K</dd><dt><span>cell_methods :</span></dt><dd>area: time: mean</dd><dt><span>cell_measures :</span></dt><dd>area: areacella</dd><dt><span>history :</span></dt><dd>2019-11-14T05:08:45Z altered by CMOR: Treated scalar dimension: &#x27;height&#x27;. 2019-11-14T05:08:45Z altered by CMOR: replaced missing value flag (-1.07374e+09) with standard missing value (1e+20).</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'tas' (time: 13149, lat: 145, lon: 192, window: 31)>\n",
"dask.array<sliding_window_view, shape=(13149, 145, 192, 31), dtype=float32, chunksize=(315, 145, 192, 31), chunktype=numpy.ndarray>\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1979-01-01T12:00:00 ... 2014-12-31T12:00:00\n",
" * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n",
" * lon (lon) float64 0.0 1.875 3.75 5.625 7.5 ... 352.5 354.4 356.2 358.1\n",
" height float64 ...\n",
"Dimensions without coordinates: window\n",
"Attributes:\n",
" standard_name: air_temperature\n",
" long_name: Near-Surface Air Temperature\n",
" comment: near-surface (usually, 2 meter) air temperature\n",
" units: K\n",
" cell_methods: area: time: mean\n",
" cell_measures: area: areacella\n",
" history: 2019-11-14T05:08:45Z altered by CMOR: Treated scalar dime..."
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ds.tas.rolling(time=31, center=True).construct(time='window')"
]
},
{
"cell_type": "markdown",
"id": "7a7be872-eb2e-4224-842a-08bd22986ed8",
"metadata": {},
"source": [
"See how at the top there is now a 'window' dimension of length 31? That's all of the samples in the window for that (time, lat, lon) location. Calling `ds.tas.rolling(time=31, center=True).mean()` is equivalent to `ds.tas.rolling(time=31, center=True).construct(time='window').mean('window')`\n",
"\n",
"Let's save this as a variable"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "91701e74-8381-4170-aa72-681d1ce712ed",
"metadata": {},
"outputs": [],
"source": [
"tas_window = ds.tas.rolling(time=31, center=True).construct(time='window')"
]
},
{
"cell_type": "markdown",
"id": "d5240db4-9ac7-44f8-88c0-389be21593e5",
"metadata": {},
"source": [
"## Percentile climatology\n",
"\n",
"To calculate the climatology in xarray we use `.groupby('time.dayofyear')`. This groups the days by number of days since the start of the year, so for leap years Feb 29th will be grouped together with Mar 1st of non leap-years."
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "7fa9435b-83eb-4b01-a36e-5b698e0b014c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"DataArrayGroupBy, grouped over 'dayofyear'\n",
"366 groups with labels 1, 2, 3, 4, 5, ..., 363, 364, 365, 366."
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tas_window.groupby('time.dayofyear')"
]
},
{
"cell_type": "markdown",
"id": "1d1e4e13-a763-4864-8078-9ccc04117ad5",
"metadata": {},
"source": [
"If we look at a single day of year here, you can see that we've got two axes we need to gather over. 'time' is now the 36 years in the dataset, and 'window' is the nearby days."
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "1b9a3abd-e122-46e5-9e66-e8ce0959dcb8",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2 {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;tas&#x27; (time: 36, lat: 145, lon: 192, window: 31)&gt;\n",
"dask.array&lt;getitem, shape=(36, 145, 192, 31), dtype=float32, chunksize=(1, 145, 192, 31), chunktype=numpy.ndarray&gt;\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1979-01-01T12:00:00 ... 2014-01-01T12:00:00\n",
" * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n",
" * lon (lon) float64 0.0 1.875 3.75 5.625 7.5 ... 352.5 354.4 356.2 358.1\n",
" height float64 ...\n",
"Dimensions without coordinates: window\n",
"Attributes:\n",
" standard_name: air_temperature\n",
" long_name: Near-Surface Air Temperature\n",
" comment: near-surface (usually, 2 meter) air temperature\n",
" units: K\n",
" cell_methods: area: time: mean\n",
" cell_measures: area: areacella\n",
" history: 2019-11-14T05:08:45Z altered by CMOR: Treated scalar dime...</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'tas'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 36</li><li><span class='xr-has-index'>lat</span>: 145</li><li><span class='xr-has-index'>lon</span>: 192</li><li><span>window</span>: 31</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-824f6513-c269-416c-b633-0d3360ab6a4a' class='xr-array-in' type='checkbox' checked><label for='section-824f6513-c269-416c-b633-0d3360ab6a4a' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>dask.array&lt;chunksize=(1, 145, 192, 31), meta=np.ndarray&gt;</span></div><div class='xr-array-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table>\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 118.52 MiB </td>\n",
" <td> 3.29 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (36, 145, 192, 31) </td>\n",
" <td> (1, 145, 192, 31) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Count </th>\n",
" <td> 399 Tasks </td>\n",
" <td> 36 Chunks </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Type </th>\n",
" <td> float32 </td>\n",
" <td> numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"366\" height=\"223\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"41\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"25\" x2=\"41\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
" <line x1=\"1\" y1=\"0\" x2=\"1\" y2=\"25\" />\n",
" <line x1=\"2\" y1=\"0\" x2=\"2\" y2=\"25\" />\n",
" <line x1=\"3\" y1=\"0\" x2=\"3\" y2=\"25\" />\n",
" <line x1=\"4\" y1=\"0\" x2=\"4\" y2=\"25\" />\n",
" <line x1=\"5\" y1=\"0\" x2=\"5\" y2=\"25\" />\n",
" <line x1=\"6\" y1=\"0\" x2=\"6\" y2=\"25\" />\n",
" <line x1=\"8\" y1=\"0\" x2=\"8\" y2=\"25\" />\n",
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"25\" />\n",
" <line x1=\"11\" y1=\"0\" x2=\"11\" y2=\"25\" />\n",
" <line x1=\"12\" y1=\"0\" x2=\"12\" y2=\"25\" />\n",
" <line x1=\"13\" y1=\"0\" x2=\"13\" y2=\"25\" />\n",
" <line x1=\"15\" y1=\"0\" x2=\"15\" y2=\"25\" />\n",
" <line x1=\"16\" y1=\"0\" x2=\"16\" y2=\"25\" />\n",
" <line x1=\"17\" y1=\"0\" x2=\"17\" y2=\"25\" />\n",
" <line x1=\"18\" y1=\"0\" x2=\"18\" y2=\"25\" />\n",
" <line x1=\"20\" y1=\"0\" x2=\"20\" y2=\"25\" />\n",
" <line x1=\"22\" y1=\"0\" x2=\"22\" y2=\"25\" />\n",
" <line x1=\"23\" y1=\"0\" x2=\"23\" y2=\"25\" />\n",
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n",
" <line x1=\"25\" y1=\"0\" x2=\"25\" y2=\"25\" />\n",
" <line x1=\"26\" y1=\"0\" x2=\"26\" y2=\"25\" />\n",
" <line x1=\"27\" y1=\"0\" x2=\"27\" y2=\"25\" />\n",
" <line x1=\"28\" y1=\"0\" x2=\"28\" y2=\"25\" />\n",
" <line x1=\"31\" y1=\"0\" x2=\"31\" y2=\"25\" />\n",
" <line x1=\"32\" y1=\"0\" x2=\"32\" y2=\"25\" />\n",
" <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"34\" y2=\"25\" />\n",
" <line x1=\"35\" y1=\"0\" x2=\"35\" y2=\"25\" />\n",
" <line x1=\"37\" y1=\"0\" x2=\"37\" y2=\"25\" />\n",
" <line x1=\"38\" y1=\"0\" x2=\"38\" y2=\"25\" />\n",
" <line x1=\"39\" y1=\"0\" x2=\"39\" y2=\"25\" />\n",
" <line x1=\"41\" y1=\"0\" x2=\"41\" y2=\"25\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 41.732654866844676,0.0 41.732654866844676,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"20.866327\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >36</text>\n",
" <text x=\"61.732655\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,61.732655,12.706308)\">1</text>\n",
"\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"111\" y1=\"0\" x2=\"164\" y2=\"53\" style=\"stroke-width:2\" />\n",
" <line x1=\"111\" y1=\"120\" x2=\"164\" y2=\"173\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"111\" y1=\"0\" x2=\"111\" y2=\"120\" style=\"stroke-width:2\" />\n",
" <line x1=\"164\" y1=\"53\" x2=\"164\" y2=\"173\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"111.0,0.0 164.30882352941177,53.30882352941177 164.30882352941177,173.30882352941177 111.0,120.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"111\" y1=\"0\" x2=\"152\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"164\" y1=\"53\" x2=\"205\" y2=\"53\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"111\" y1=\"0\" x2=\"164\" y2=\"53\" style=\"stroke-width:2\" />\n",
" <line x1=\"152\" y1=\"0\" x2=\"205\" y2=\"53\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"111.0,0.0 152.0563152214281,0.0 205.36513875083986,53.30882352941177 164.30882352941177,53.30882352941177\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"164\" y1=\"53\" x2=\"205\" y2=\"53\" style=\"stroke-width:2\" />\n",
" <line x1=\"164\" y1=\"173\" x2=\"205\" y2=\"173\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"164\" y1=\"53\" x2=\"164\" y2=\"173\" style=\"stroke-width:2\" />\n",
" <line x1=\"205\" y1=\"53\" x2=\"205\" y2=\"173\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"164.30882352941177,53.30882352941177 205.36513875083986,53.30882352941177 205.36513875083986,173.30882352941177 164.30882352941177,173.30882352941177\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"184.836981\" y=\"193.308824\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >31</text>\n",
" <text x=\"225.365139\" y=\"113.308824\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,225.365139,113.308824)\">192</text>\n",
" <text x=\"127.654412\" y=\"166.654412\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,127.654412,166.654412)\">145</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></div></li><li class='xr-section-item'><input id='section-0ff6a1af-0e89-433a-a9ab-4b29009be693' class='xr-section-summary-in' type='checkbox' checked><label for='section-0ff6a1af-0e89-433a-a9ab-4b29009be693' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>1979-01-01T12:00:00 ... 2014-01-...</div><input id='attrs-6f0fffbc-7a38-46a4-ba01-1420dbecebda' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-6f0fffbc-7a38-46a4-ba01-1420dbecebda' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-25c15266-c7e3-4a3d-9cce-00311d3b1465' class='xr-var-data-in' type='checkbox'><label for='data-25c15266-c7e3-4a3d-9cce-00311d3b1465' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>time_bnds</dd><dt><span>axis :</span></dt><dd>T</dd><dt><span>long_name :</span></dt><dd>time</dd><dt><span>standard_name :</span></dt><dd>time</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;1979-01-01T12:00:00.000000000&#x27;, &#x27;1980-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;1981-01-01T12:00:00.000000000&#x27;, &#x27;1982-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;1983-01-01T12:00:00.000000000&#x27;, &#x27;1984-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;1985-01-01T12:00:00.000000000&#x27;, &#x27;1986-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;1987-01-01T12:00:00.000000000&#x27;, &#x27;1988-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;1989-01-01T12:00:00.000000000&#x27;, &#x27;1990-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;1991-01-01T12:00:00.000000000&#x27;, &#x27;1992-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;1993-01-01T12:00:00.000000000&#x27;, &#x27;1994-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;1995-01-01T12:00:00.000000000&#x27;, &#x27;1996-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;1997-01-01T12:00:00.000000000&#x27;, &#x27;1998-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;1999-01-01T12:00:00.000000000&#x27;, &#x27;2000-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;2001-01-01T12:00:00.000000000&#x27;, &#x27;2002-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;2003-01-01T12:00:00.000000000&#x27;, &#x27;2004-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;2005-01-01T12:00:00.000000000&#x27;, &#x27;2006-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;2007-01-01T12:00:00.000000000&#x27;, &#x27;2008-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;2009-01-01T12:00:00.000000000&#x27;, &#x27;2010-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;2011-01-01T12:00:00.000000000&#x27;, &#x27;2012-01-01T12:00:00.000000000&#x27;,\n",
" &#x27;2013-01-01T12:00:00.000000000&#x27;, &#x27;2014-01-01T12:00:00.000000000&#x27;],\n",
" dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lat</span></div><div class='xr-var-dims'>(lat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-90.0 -88.75 -87.5 ... 88.75 90.0</div><input id='attrs-0acdb78c-2536-4f6c-ada2-6e74cb013468' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0acdb78c-2536-4f6c-ada2-6e74cb013468' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c01c2dbe-ffde-45cc-9043-a03914aafb41' class='xr-var-data-in' type='checkbox'><label for='data-c01c2dbe-ffde-45cc-9043-a03914aafb41' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>lat_bnds</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>long_name :</span></dt><dd>Latitude</dd><dt><span>standard_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><pre>array([-90. , -88.75, -87.5 , -86.25, -85. , -83.75, -82.5 , -81.25, -80. ,\n",
" -78.75, -77.5 , -76.25, -75. , -73.75, -72.5 , -71.25, -70. , -68.75,\n",
" -67.5 , -66.25, -65. , -63.75, -62.5 , -61.25, -60. , -58.75, -57.5 ,\n",
" -56.25, -55. , -53.75, -52.5 , -51.25, -50. , -48.75, -47.5 , -46.25,\n",
" -45. , -43.75, -42.5 , -41.25, -40. , -38.75, -37.5 , -36.25, -35. ,\n",
" -33.75, -32.5 , -31.25, -30. , -28.75, -27.5 , -26.25, -25. , -23.75,\n",
" -22.5 , -21.25, -20. , -18.75, -17.5 , -16.25, -15. , -13.75, -12.5 ,\n",
" -11.25, -10. , -8.75, -7.5 , -6.25, -5. , -3.75, -2.5 , -1.25,\n",
" 0. , 1.25, 2.5 , 3.75, 5. , 6.25, 7.5 , 8.75, 10. ,\n",
" 11.25, 12.5 , 13.75, 15. , 16.25, 17.5 , 18.75, 20. , 21.25,\n",
" 22.5 , 23.75, 25. , 26.25, 27.5 , 28.75, 30. , 31.25, 32.5 ,\n",
" 33.75, 35. , 36.25, 37.5 , 38.75, 40. , 41.25, 42.5 , 43.75,\n",
" 45. , 46.25, 47.5 , 48.75, 50. , 51.25, 52.5 , 53.75, 55. ,\n",
" 56.25, 57.5 , 58.75, 60. , 61.25, 62.5 , 63.75, 65. , 66.25,\n",
" 67.5 , 68.75, 70. , 71.25, 72.5 , 73.75, 75. , 76.25, 77.5 ,\n",
" 78.75, 80. , 81.25, 82.5 , 83.75, 85. , 86.25, 87.5 , 88.75,\n",
" 90. ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lon</span></div><div class='xr-var-dims'>(lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.875 3.75 ... 356.2 358.1</div><input id='attrs-ad06bbd1-2c4a-4471-b472-08f5d7f11a02' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ad06bbd1-2c4a-4471-b472-08f5d7f11a02' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-52f7a30e-b7f4-482c-a6ae-bd188a97467e' class='xr-var-data-in' type='checkbox'><label for='data-52f7a30e-b7f4-482c-a6ae-bd188a97467e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>lon_bnds</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>long_name :</span></dt><dd>Longitude</dd><dt><span>standard_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><pre>array([ 0. , 1.875, 3.75 , 5.625, 7.5 , 9.375, 11.25 , 13.125,\n",
" 15. , 16.875, 18.75 , 20.625, 22.5 , 24.375, 26.25 , 28.125,\n",
" 30. , 31.875, 33.75 , 35.625, 37.5 , 39.375, 41.25 , 43.125,\n",
" 45. , 46.875, 48.75 , 50.625, 52.5 , 54.375, 56.25 , 58.125,\n",
" 60. , 61.875, 63.75 , 65.625, 67.5 , 69.375, 71.25 , 73.125,\n",
" 75. , 76.875, 78.75 , 80.625, 82.5 , 84.375, 86.25 , 88.125,\n",
" 90. , 91.875, 93.75 , 95.625, 97.5 , 99.375, 101.25 , 103.125,\n",
" 105. , 106.875, 108.75 , 110.625, 112.5 , 114.375, 116.25 , 118.125,\n",
" 120. , 121.875, 123.75 , 125.625, 127.5 , 129.375, 131.25 , 133.125,\n",
" 135. , 136.875, 138.75 , 140.625, 142.5 , 144.375, 146.25 , 148.125,\n",
" 150. , 151.875, 153.75 , 155.625, 157.5 , 159.375, 161.25 , 163.125,\n",
" 165. , 166.875, 168.75 , 170.625, 172.5 , 174.375, 176.25 , 178.125,\n",
" 180. , 181.875, 183.75 , 185.625, 187.5 , 189.375, 191.25 , 193.125,\n",
" 195. , 196.875, 198.75 , 200.625, 202.5 , 204.375, 206.25 , 208.125,\n",
" 210. , 211.875, 213.75 , 215.625, 217.5 , 219.375, 221.25 , 223.125,\n",
" 225. , 226.875, 228.75 , 230.625, 232.5 , 234.375, 236.25 , 238.125,\n",
" 240. , 241.875, 243.75 , 245.625, 247.5 , 249.375, 251.25 , 253.125,\n",
" 255. , 256.875, 258.75 , 260.625, 262.5 , 264.375, 266.25 , 268.125,\n",
" 270. , 271.875, 273.75 , 275.625, 277.5 , 279.375, 281.25 , 283.125,\n",
" 285. , 286.875, 288.75 , 290.625, 292.5 , 294.375, 296.25 , 298.125,\n",
" 300. , 301.875, 303.75 , 305.625, 307.5 , 309.375, 311.25 , 313.125,\n",
" 315. , 316.875, 318.75 , 320.625, 322.5 , 324.375, 326.25 , 328.125,\n",
" 330. , 331.875, 333.75 , 335.625, 337.5 , 339.375, 341.25 , 343.125,\n",
" 345. , 346.875, 348.75 , 350.625, 352.5 , 354.375, 356.25 , 358.125])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>height</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-40fc8976-57fc-4358-ad34-77b6c2d72166' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-40fc8976-57fc-4358-ad34-77b6c2d72166' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e5858549-5aab-414d-b633-9e065893401b' class='xr-var-data-in' type='checkbox'><label for='data-e5858549-5aab-414d-b633-9e065893401b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>m</dd><dt><span>axis :</span></dt><dd>Z</dd><dt><span>positive :</span></dt><dd>up</dd><dt><span>long_name :</span></dt><dd>height</dd><dt><span>standard_name :</span></dt><dd>height</dd></dl></div><div class='xr-var-data'><pre>array(2.)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-37dc554a-b02b-4787-9f28-2b096d2e8809' class='xr-section-summary-in' type='checkbox' checked><label for='section-37dc554a-b02b-4787-9f28-2b096d2e8809' class='xr-section-summary' >Attributes: <span>(7)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>air_temperature</dd><dt><span>long_name :</span></dt><dd>Near-Surface Air Temperature</dd><dt><span>comment :</span></dt><dd>near-surface (usually, 2 meter) air temperature</dd><dt><span>units :</span></dt><dd>K</dd><dt><span>cell_methods :</span></dt><dd>area: time: mean</dd><dt><span>cell_measures :</span></dt><dd>area: areacella</dd><dt><span>history :</span></dt><dd>2019-11-14T05:08:45Z altered by CMOR: Treated scalar dimension: &#x27;height&#x27;. 2019-11-14T05:08:45Z altered by CMOR: replaced missing value flag (-1.07374e+09) with standard missing value (1e+20).</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'tas' (time: 36, lat: 145, lon: 192, window: 31)>\n",
"dask.array<getitem, shape=(36, 145, 192, 31), dtype=float32, chunksize=(1, 145, 192, 31), chunktype=numpy.ndarray>\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1979-01-01T12:00:00 ... 2014-01-01T12:00:00\n",
" * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n",
" * lon (lon) float64 0.0 1.875 3.75 5.625 7.5 ... 352.5 354.4 356.2 358.1\n",
" height float64 ...\n",
"Dimensions without coordinates: window\n",
"Attributes:\n",
" standard_name: air_temperature\n",
" long_name: Near-Surface Air Temperature\n",
" comment: near-surface (usually, 2 meter) air temperature\n",
" units: K\n",
" cell_methods: area: time: mean\n",
" cell_measures: area: areacella\n",
" history: 2019-11-14T05:08:45Z altered by CMOR: Treated scalar dime..."
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for doy, data in tas_window.groupby('time.dayofyear'):\n",
" display(data)\n",
" break"
]
},
{
"cell_type": "markdown",
"id": "78180dcb-31d8-4660-ad71-82e9ad5ad53d",
"metadata": {},
"source": [
"If we just wanted the mean we could do"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "6bc41c61-dc23-4385-9360-3f16f2075f6b",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2 {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;tas&#x27; (dayofyear: 366, lat: 145, lon: 192)&gt;\n",
"dask.array&lt;stack, shape=(366, 145, 192), dtype=float32, chunksize=(1, 145, 192), chunktype=numpy.ndarray&gt;\n",
"Coordinates:\n",
" * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n",
" * lon (lon) float64 0.0 1.875 3.75 5.625 ... 352.5 354.4 356.2 358.1\n",
" height float64 ...\n",
" * dayofyear (dayofyear) int64 1 2 3 4 5 6 7 8 ... 360 361 362 363 364 365 366</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'tas'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>dayofyear</span>: 366</li><li><span class='xr-has-index'>lat</span>: 145</li><li><span class='xr-has-index'>lon</span>: 192</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-358fc3ae-5886-41aa-9205-06e306d9796c' class='xr-array-in' type='checkbox' checked><label for='section-358fc3ae-5886-41aa-9205-06e306d9796c' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>dask.array&lt;chunksize=(1, 145, 192), meta=np.ndarray&gt;</span></div><div class='xr-array-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table>\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 38.87 MiB </td>\n",
" <td> 108.75 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (366, 145, 192) </td>\n",
" <td> (1, 145, 192) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Count </th>\n",
" <td> 40908 Tasks </td>\n",
" <td> 366 Chunks </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Type </th>\n",
" <td> float32 </td>\n",
" <td> numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"193\" height=\"168\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"80\" y2=\"70\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"47\" x2=\"80\" y2=\"118\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"47\" style=\"stroke-width:2\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"13\" y2=\"51\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"17\" y2=\"54\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"20\" y2=\"58\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"62\" />\n",
" <line x1=\"28\" y1=\"18\" x2=\"28\" y2=\"66\" />\n",
" <line x1=\"32\" y1=\"22\" x2=\"32\" y2=\"69\" />\n",
" <line x1=\"35\" y1=\"25\" x2=\"35\" y2=\"73\" />\n",
" <line x1=\"39\" y1=\"29\" x2=\"39\" y2=\"77\" />\n",
" <line x1=\"43\" y1=\"33\" x2=\"43\" y2=\"80\" />\n",
" <line x1=\"47\" y1=\"37\" x2=\"47\" y2=\"84\" />\n",
" <line x1=\"50\" y1=\"40\" x2=\"50\" y2=\"88\" />\n",
" <line x1=\"54\" y1=\"44\" x2=\"54\" y2=\"92\" />\n",
" <line x1=\"58\" y1=\"48\" x2=\"58\" y2=\"95\" />\n",
" <line x1=\"61\" y1=\"51\" x2=\"61\" y2=\"99\" />\n",
" <line x1=\"65\" y1=\"55\" x2=\"65\" y2=\"103\" />\n",
" <line x1=\"69\" y1=\"59\" x2=\"69\" y2=\"106\" />\n",
" <line x1=\"73\" y1=\"63\" x2=\"73\" y2=\"110\" />\n",
" <line x1=\"76\" y1=\"66\" x2=\"76\" y2=\"114\" />\n",
" <line x1=\"80\" y1=\"70\" x2=\"80\" y2=\"118\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 80.58823529411765,70.58823529411765 80.58823529411765,118.12921890067503 10.0,47.540983606557376\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"72\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"76\" y2=\"3\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"80\" y2=\"7\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"83\" y2=\"10\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"87\" y2=\"14\" />\n",
" <line x1=\"28\" y1=\"18\" x2=\"91\" y2=\"18\" />\n",
" <line x1=\"32\" y1=\"22\" x2=\"95\" y2=\"22\" />\n",
" <line x1=\"35\" y1=\"25\" x2=\"98\" y2=\"25\" />\n",
" <line x1=\"39\" y1=\"29\" x2=\"102\" y2=\"29\" />\n",
" <line x1=\"43\" y1=\"33\" x2=\"106\" y2=\"33\" />\n",
" <line x1=\"47\" y1=\"37\" x2=\"109\" y2=\"37\" />\n",
" <line x1=\"50\" y1=\"40\" x2=\"113\" y2=\"40\" />\n",
" <line x1=\"54\" y1=\"44\" x2=\"117\" y2=\"44\" />\n",
" <line x1=\"58\" y1=\"48\" x2=\"121\" y2=\"48\" />\n",
" <line x1=\"61\" y1=\"51\" x2=\"124\" y2=\"51\" />\n",
" <line x1=\"65\" y1=\"55\" x2=\"128\" y2=\"55\" />\n",
" <line x1=\"69\" y1=\"59\" x2=\"132\" y2=\"59\" />\n",
" <line x1=\"73\" y1=\"63\" x2=\"136\" y2=\"63\" />\n",
" <line x1=\"76\" y1=\"66\" x2=\"139\" y2=\"66\" />\n",
" <line x1=\"80\" y1=\"70\" x2=\"143\" y2=\"70\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"80\" y2=\"70\" style=\"stroke-width:2\" />\n",
" <line x1=\"72\" y1=\"0\" x2=\"143\" y2=\"70\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 72.95081967213113,0.0 143.53905496624878,70.58823529411765 80.58823529411765,70.58823529411765\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"80\" y1=\"70\" x2=\"143\" y2=\"70\" style=\"stroke-width:2\" />\n",
" <line x1=\"80\" y1=\"118\" x2=\"143\" y2=\"118\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"80\" y1=\"70\" x2=\"80\" y2=\"118\" style=\"stroke-width:2\" />\n",
" <line x1=\"143\" y1=\"70\" x2=\"143\" y2=\"118\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"80.58823529411765,70.58823529411765 143.53905496624878,70.58823529411765 143.53905496624878,118.12921890067503 80.58823529411765,118.12921890067503\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"112.063645\" y=\"138.129219\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >192</text>\n",
" <text x=\"163.539055\" y=\"94.358727\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,163.539055,94.358727)\">145</text>\n",
" <text x=\"35.294118\" y=\"102.835101\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,35.294118,102.835101)\">366</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></div></li><li class='xr-section-item'><input id='section-0ddbb8a7-8e75-4b19-b5dd-4800007f37cb' class='xr-section-summary-in' type='checkbox' checked><label for='section-0ddbb8a7-8e75-4b19-b5dd-4800007f37cb' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lat</span></div><div class='xr-var-dims'>(lat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-90.0 -88.75 -87.5 ... 88.75 90.0</div><input id='attrs-650d2fc2-4c3d-4537-b061-768155ecd33b' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-650d2fc2-4c3d-4537-b061-768155ecd33b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0254642c-e988-44d4-bbe9-e1bed44787ca' class='xr-var-data-in' type='checkbox'><label for='data-0254642c-e988-44d4-bbe9-e1bed44787ca' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>lat_bnds</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>long_name :</span></dt><dd>Latitude</dd><dt><span>standard_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><pre>array([-90. , -88.75, -87.5 , -86.25, -85. , -83.75, -82.5 , -81.25, -80. ,\n",
" -78.75, -77.5 , -76.25, -75. , -73.75, -72.5 , -71.25, -70. , -68.75,\n",
" -67.5 , -66.25, -65. , -63.75, -62.5 , -61.25, -60. , -58.75, -57.5 ,\n",
" -56.25, -55. , -53.75, -52.5 , -51.25, -50. , -48.75, -47.5 , -46.25,\n",
" -45. , -43.75, -42.5 , -41.25, -40. , -38.75, -37.5 , -36.25, -35. ,\n",
" -33.75, -32.5 , -31.25, -30. , -28.75, -27.5 , -26.25, -25. , -23.75,\n",
" -22.5 , -21.25, -20. , -18.75, -17.5 , -16.25, -15. , -13.75, -12.5 ,\n",
" -11.25, -10. , -8.75, -7.5 , -6.25, -5. , -3.75, -2.5 , -1.25,\n",
" 0. , 1.25, 2.5 , 3.75, 5. , 6.25, 7.5 , 8.75, 10. ,\n",
" 11.25, 12.5 , 13.75, 15. , 16.25, 17.5 , 18.75, 20. , 21.25,\n",
" 22.5 , 23.75, 25. , 26.25, 27.5 , 28.75, 30. , 31.25, 32.5 ,\n",
" 33.75, 35. , 36.25, 37.5 , 38.75, 40. , 41.25, 42.5 , 43.75,\n",
" 45. , 46.25, 47.5 , 48.75, 50. , 51.25, 52.5 , 53.75, 55. ,\n",
" 56.25, 57.5 , 58.75, 60. , 61.25, 62.5 , 63.75, 65. , 66.25,\n",
" 67.5 , 68.75, 70. , 71.25, 72.5 , 73.75, 75. , 76.25, 77.5 ,\n",
" 78.75, 80. , 81.25, 82.5 , 83.75, 85. , 86.25, 87.5 , 88.75,\n",
" 90. ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lon</span></div><div class='xr-var-dims'>(lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.875 3.75 ... 356.2 358.1</div><input id='attrs-6cd51c3b-d8e4-4243-a1f0-6d39f3f8471f' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-6cd51c3b-d8e4-4243-a1f0-6d39f3f8471f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-cc049e36-84a3-4b11-af5a-3b6470160763' class='xr-var-data-in' type='checkbox'><label for='data-cc049e36-84a3-4b11-af5a-3b6470160763' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>lon_bnds</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>long_name :</span></dt><dd>Longitude</dd><dt><span>standard_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><pre>array([ 0. , 1.875, 3.75 , 5.625, 7.5 , 9.375, 11.25 , 13.125,\n",
" 15. , 16.875, 18.75 , 20.625, 22.5 , 24.375, 26.25 , 28.125,\n",
" 30. , 31.875, 33.75 , 35.625, 37.5 , 39.375, 41.25 , 43.125,\n",
" 45. , 46.875, 48.75 , 50.625, 52.5 , 54.375, 56.25 , 58.125,\n",
" 60. , 61.875, 63.75 , 65.625, 67.5 , 69.375, 71.25 , 73.125,\n",
" 75. , 76.875, 78.75 , 80.625, 82.5 , 84.375, 86.25 , 88.125,\n",
" 90. , 91.875, 93.75 , 95.625, 97.5 , 99.375, 101.25 , 103.125,\n",
" 105. , 106.875, 108.75 , 110.625, 112.5 , 114.375, 116.25 , 118.125,\n",
" 120. , 121.875, 123.75 , 125.625, 127.5 , 129.375, 131.25 , 133.125,\n",
" 135. , 136.875, 138.75 , 140.625, 142.5 , 144.375, 146.25 , 148.125,\n",
" 150. , 151.875, 153.75 , 155.625, 157.5 , 159.375, 161.25 , 163.125,\n",
" 165. , 166.875, 168.75 , 170.625, 172.5 , 174.375, 176.25 , 178.125,\n",
" 180. , 181.875, 183.75 , 185.625, 187.5 , 189.375, 191.25 , 193.125,\n",
" 195. , 196.875, 198.75 , 200.625, 202.5 , 204.375, 206.25 , 208.125,\n",
" 210. , 211.875, 213.75 , 215.625, 217.5 , 219.375, 221.25 , 223.125,\n",
" 225. , 226.875, 228.75 , 230.625, 232.5 , 234.375, 236.25 , 238.125,\n",
" 240. , 241.875, 243.75 , 245.625, 247.5 , 249.375, 251.25 , 253.125,\n",
" 255. , 256.875, 258.75 , 260.625, 262.5 , 264.375, 266.25 , 268.125,\n",
" 270. , 271.875, 273.75 , 275.625, 277.5 , 279.375, 281.25 , 283.125,\n",
" 285. , 286.875, 288.75 , 290.625, 292.5 , 294.375, 296.25 , 298.125,\n",
" 300. , 301.875, 303.75 , 305.625, 307.5 , 309.375, 311.25 , 313.125,\n",
" 315. , 316.875, 318.75 , 320.625, 322.5 , 324.375, 326.25 , 328.125,\n",
" 330. , 331.875, 333.75 , 335.625, 337.5 , 339.375, 341.25 , 343.125,\n",
" 345. , 346.875, 348.75 , 350.625, 352.5 , 354.375, 356.25 , 358.125])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>height</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-7ae5107f-d3d0-4965-9bf1-cf5e6ac68845' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-7ae5107f-d3d0-4965-9bf1-cf5e6ac68845' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d867f0d0-8d3b-433f-baa9-249a5d84793d' class='xr-var-data-in' type='checkbox'><label for='data-d867f0d0-8d3b-433f-baa9-249a5d84793d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>m</dd><dt><span>axis :</span></dt><dd>Z</dd><dt><span>positive :</span></dt><dd>up</dd><dt><span>long_name :</span></dt><dd>height</dd><dt><span>standard_name :</span></dt><dd>height</dd></dl></div><div class='xr-var-data'><pre>array(2.)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>dayofyear</span></div><div class='xr-var-dims'>(dayofyear)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 2 3 4 5 6 ... 362 363 364 365 366</div><input id='attrs-91b18465-73d0-4774-92ed-761bb1da3b1b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-91b18465-73d0-4774-92ed-761bb1da3b1b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-264b6f8a-80fb-4354-8fed-029731c00e69' class='xr-var-data-in' type='checkbox'><label for='data-264b6f8a-80fb-4354-8fed-029731c00e69' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 1, 2, 3, ..., 364, 365, 366])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ca7903ff-8957-4f37-9f8a-f8fa3def4248' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-ca7903ff-8957-4f37-9f8a-f8fa3def4248' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'tas' (dayofyear: 366, lat: 145, lon: 192)>\n",
"dask.array<stack, shape=(366, 145, 192), dtype=float32, chunksize=(1, 145, 192), chunktype=numpy.ndarray>\n",
"Coordinates:\n",
" * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n",
" * lon (lon) float64 0.0 1.875 3.75 5.625 ... 352.5 354.4 356.2 358.1\n",
" height float64 ...\n",
" * dayofyear (dayofyear) int64 1 2 3 4 5 6 7 8 ... 360 361 362 363 364 365 366"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tas_window.groupby('time.dayofyear').mean(['time', 'window'])"
]
},
{
"cell_type": "markdown",
"id": "8b4b8c4a-226f-4a43-b63f-e1e99c683fe1",
"metadata": {},
"source": [
"If we try the same with quantile (xarray's version of percentile) however we get an error"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "f263a9b9-ae15-4e5f-89aa-84ef16c4c78c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ERROR: dimension time on 0th function argument to apply_ufunc with dask='parallelized' consists of multiple chunks, but is also a core dimension. To fix, either rechunk into a single dask array chunk along this dimension, i.e., ``.chunk(dict(time=-1))``, or pass ``allow_rechunk=True`` in ``dask_gufunc_kwargs`` but beware that this may significantly increase memory usage.\n"
]
}
],
"source": [
"try:\n",
" tas_window.groupby('time.dayofyear').quantile(0.9, ['time', 'window'])\n",
"except Exception as e:\n",
" print('ERROR:', e)"
]
},
{
"cell_type": "markdown",
"id": "569860d1-46c1-4ae5-9eb5-964008bf5583",
"metadata": {},
"source": [
"Percentiles are hard to calculate on large distributed datasets - you need to have the entire dataset in memory, sort the data, then find the value at whatever percent along the sorted data. We need to help out Dask by manually loading the data we need for each calculation, so we'll go back to a loop and call '.load()' at each day of year, storing the result in a list."
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "ad1e4059-20a4-4720-9e24-b581a597f5b8",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 52min 1s, sys: 5min 31s, total: 57min 32s\n",
"Wall time: 1h 18min 1s\n"
]
}
],
"source": [
"%%time\n",
"\n",
"result = []\n",
"\n",
"for doy, data in tas_window.groupby('time.dayofyear'):\n",
" percentile = data.load().quantile(0.9, ['time', 'window'])\n",
" \n",
" result.append(percentile)"
]
},
{
"cell_type": "markdown",
"id": "872dc3b0-89dc-4453-9194-2de3e7219308",
"metadata": {},
"source": [
"Once that's finished the values in the list can be combined with xarray.concat"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "6f2e404d-ea89-4d38-987a-5a30ad9d4cfd",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=dark],\n",
"body.vscode-dark {\n",
" --xr-font-color0: rgba(255, 255, 255, 1);\n",
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
" --xr-border-color: #1F1F1F;\n",
" --xr-disabled-color: #515151;\n",
" --xr-background-color: #111111;\n",
" --xr-background-color-row-even: #111111;\n",
" --xr-background-color-row-odd: #313131;\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
"}\n",
"\n",
".xr-text-repr-fallback {\n",
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
" display: none;\n",
"}\n",
"\n",
".xr-header {\n",
" padding-top: 6px;\n",
" padding-bottom: 6px;\n",
" margin-bottom: 4px;\n",
" border-bottom: solid 1px var(--xr-border-color);\n",
"}\n",
"\n",
".xr-header > div,\n",
".xr-header > ul {\n",
" display: inline;\n",
" margin-top: 0;\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-obj-type,\n",
".xr-array-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-obj-type {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-sections {\n",
" padding-left: 0 !important;\n",
" display: grid;\n",
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label {\n",
" cursor: pointer;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-item input:enabled + label:hover {\n",
" color: var(--xr-font-color0);\n",
"}\n",
"\n",
".xr-section-summary {\n",
" grid-column: 1;\n",
" color: var(--xr-font-color2);\n",
" font-weight: 500;\n",
"}\n",
"\n",
".xr-section-summary > span {\n",
" display: inline-block;\n",
" padding-left: 0.5em;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label {\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-section-summary-in + label:before {\n",
" display: inline-block;\n",
" content: '►';\n",
" font-size: 11px;\n",
" width: 15px;\n",
" text-align: center;\n",
"}\n",
"\n",
".xr-section-summary-in:disabled + label:before {\n",
" color: var(--xr-disabled-color);\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label:before {\n",
" content: '▼';\n",
"}\n",
"\n",
".xr-section-summary-in:checked + label > span {\n",
" display: none;\n",
"}\n",
"\n",
".xr-section-summary,\n",
".xr-section-inline-details {\n",
" padding-top: 4px;\n",
" padding-bottom: 4px;\n",
"}\n",
"\n",
".xr-section-inline-details {\n",
" grid-column: 2 / -1;\n",
"}\n",
"\n",
".xr-section-details {\n",
" display: none;\n",
" grid-column: 1 / -1;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-array-wrap {\n",
" grid-column: 1 / -1;\n",
" display: grid;\n",
" grid-template-columns: 20px auto;\n",
"}\n",
"\n",
".xr-array-wrap > label {\n",
" grid-column: 1;\n",
" vertical-align: top;\n",
"}\n",
"\n",
".xr-preview {\n",
" color: var(--xr-font-color3);\n",
"}\n",
"\n",
".xr-array-preview,\n",
".xr-array-data {\n",
" padding: 0 5px !important;\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-array-data,\n",
".xr-array-in:checked ~ .xr-array-preview {\n",
" display: none;\n",
"}\n",
"\n",
".xr-array-in:checked ~ .xr-array-data,\n",
".xr-array-preview {\n",
" display: inline-block;\n",
"}\n",
"\n",
".xr-dim-list {\n",
" display: inline-block !important;\n",
" list-style: none;\n",
" padding: 0 !important;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list li {\n",
" display: inline-block;\n",
" padding: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-dim-list:before {\n",
" content: '(';\n",
"}\n",
"\n",
".xr-dim-list:after {\n",
" content: ')';\n",
"}\n",
"\n",
".xr-dim-list li:not(:last-child):after {\n",
" content: ',';\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-has-index {\n",
" font-weight: bold;\n",
"}\n",
"\n",
".xr-var-list,\n",
".xr-var-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-var-item > div,\n",
".xr-var-item label,\n",
".xr-var-item > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-even);\n",
" margin-bottom: 0;\n",
"}\n",
"\n",
".xr-var-item > .xr-var-name:hover span {\n",
" padding-right: 5px;\n",
"}\n",
"\n",
".xr-var-list > li:nth-child(odd) > div,\n",
".xr-var-list > li:nth-child(odd) > label,\n",
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
" background-color: var(--xr-background-color-row-odd);\n",
"}\n",
"\n",
".xr-var-name {\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-var-dims {\n",
" grid-column: 2;\n",
"}\n",
"\n",
".xr-var-dtype {\n",
" grid-column: 3;\n",
" text-align: right;\n",
" color: var(--xr-font-color2);\n",
"}\n",
"\n",
".xr-var-preview {\n",
" grid-column: 4;\n",
"}\n",
"\n",
".xr-var-name,\n",
".xr-var-dims,\n",
".xr-var-dtype,\n",
".xr-preview,\n",
".xr-attrs dt {\n",
" white-space: nowrap;\n",
" overflow: hidden;\n",
" text-overflow: ellipsis;\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-var-name:hover,\n",
".xr-var-dims:hover,\n",
".xr-var-dtype:hover,\n",
".xr-attrs dt:hover {\n",
" overflow: visible;\n",
" width: auto;\n",
" z-index: 1;\n",
"}\n",
"\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" display: none;\n",
" background-color: var(--xr-background-color) !important;\n",
" padding-bottom: 5px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data {\n",
" grid-column: 1 / -1;\n",
"}\n",
"\n",
"dl.xr-attrs {\n",
" padding: 0;\n",
" margin: 0;\n",
" display: grid;\n",
" grid-template-columns: 125px auto;\n",
"}\n",
"\n",
".xr-attrs dt,\n",
".xr-attrs dd {\n",
" padding: 0;\n",
" margin: 0;\n",
" float: left;\n",
" padding-right: 10px;\n",
" width: auto;\n",
"}\n",
"\n",
".xr-attrs dt {\n",
" font-weight: normal;\n",
" grid-column: 1;\n",
"}\n",
"\n",
".xr-attrs dt:hover span {\n",
" display: inline-block;\n",
" background: var(--xr-background-color);\n",
" padding-right: 10px;\n",
"}\n",
"\n",
".xr-attrs dd {\n",
" grid-column: 2;\n",
" white-space: pre-wrap;\n",
" word-break: break-all;\n",
"}\n",
"\n",
".xr-icon-database,\n",
".xr-icon-file-text2 {\n",
" display: inline-block;\n",
" vertical-align: middle;\n",
" width: 1em;\n",
" height: 1.5em !important;\n",
" stroke-width: 0;\n",
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;tas&#x27; (dayofyear: 366, lat: 145, lon: 192)&gt;\n",
"array([[[250.67286682, 250.67286682, 250.67286682, ..., 250.67286682,\n",
" 250.67286682, 250.67286682],\n",
" [251.57595825, 251.54759216, 251.49716187, ..., 251.66184998,\n",
" 251.64952087, 251.61529541],\n",
" [252.19511414, 252.02455139, 251.96104431, ..., 252.57232666,\n",
" 252.41696167, 252.32958984],\n",
" ...,\n",
" [255.79222107, 255.88395691, 256.19177246, ..., 255.33990479,\n",
" 255.59410095, 255.73428345],\n",
" [254.41465759, 254.30558777, 254.33512878, ..., 254.36961365,\n",
" 254.33735657, 254.32498169],\n",
" [252.45547485, 252.45547485, 252.45547485, ..., 252.45547485,\n",
" 252.45547485, 252.45547485]],\n",
"\n",
" [[250.6728241 , 250.6728241 , 250.6728241 , ..., 250.6728241 ,\n",
" 250.6728241 , 250.6728241 ],\n",
" [251.59952393, 251.54962463, 251.53194733, ..., 251.68025208,\n",
" 251.64960327, 251.61642151],\n",
" [252.20888824, 252.06634064, 251.96010895, ..., 252.58323059,\n",
" 252.44898682, 252.3343277 ],\n",
"...\n",
" [255.82539368, 255.98866272, 256.29229736, ..., 255.67448425,\n",
" 255.68865967, 255.80763245],\n",
" [254.47499084, 254.69308472, 254.74490356, ..., 254.39610291,\n",
" 254.50894165, 254.38670349],\n",
" [252.46173096, 252.46173096, 252.46173096, ..., 252.46173096,\n",
" 252.46173096, 252.46173096]],\n",
"\n",
" [[251.06691589, 251.06691589, 251.06691589, ..., 251.06691589,\n",
" 251.06691589, 251.06691589],\n",
" [251.23405151, 251.20076904, 251.19150391, ..., 251.38855896,\n",
" 251.34030457, 251.29734802],\n",
" [251.88744507, 251.86525269, 251.8250824 , ..., 252.6361908 ,\n",
" 252.57929688, 252.17391968],\n",
" ...,\n",
" [254.95679626, 255.5537323 , 255.38959045, ..., 254.92901306,\n",
" 254.91663208, 254.88747559],\n",
" [254.23662109, 254.21036072, 254.17580261, ..., 253.96891174,\n",
" 254.10254822, 254.2250061 ],\n",
" [252.87672119, 252.87672119, 252.87672119, ..., 252.87672119,\n",
" 252.87672119, 252.87672119]]])\n",
"Coordinates:\n",
" * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n",
" * lon (lon) float64 0.0 1.875 3.75 5.625 7.5 ... 352.5 354.4 356.2 358.1\n",
" quantile float64 0.9\n",
"Dimensions without coordinates: dayofyear</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'tas'</div><ul class='xr-dim-list'><li><span>dayofyear</span>: 366</li><li><span class='xr-has-index'>lat</span>: 145</li><li><span class='xr-has-index'>lon</span>: 192</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-f1a476b0-46ee-494b-928f-a53250ae1f80' class='xr-array-in' type='checkbox' checked><label for='section-f1a476b0-46ee-494b-928f-a53250ae1f80' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>250.7 250.7 250.7 250.7 250.7 250.7 ... 252.9 252.9 252.9 252.9 252.9</span></div><div class='xr-array-data'><pre>array([[[250.67286682, 250.67286682, 250.67286682, ..., 250.67286682,\n",
" 250.67286682, 250.67286682],\n",
" [251.57595825, 251.54759216, 251.49716187, ..., 251.66184998,\n",
" 251.64952087, 251.61529541],\n",
" [252.19511414, 252.02455139, 251.96104431, ..., 252.57232666,\n",
" 252.41696167, 252.32958984],\n",
" ...,\n",
" [255.79222107, 255.88395691, 256.19177246, ..., 255.33990479,\n",
" 255.59410095, 255.73428345],\n",
" [254.41465759, 254.30558777, 254.33512878, ..., 254.36961365,\n",
" 254.33735657, 254.32498169],\n",
" [252.45547485, 252.45547485, 252.45547485, ..., 252.45547485,\n",
" 252.45547485, 252.45547485]],\n",
"\n",
" [[250.6728241 , 250.6728241 , 250.6728241 , ..., 250.6728241 ,\n",
" 250.6728241 , 250.6728241 ],\n",
" [251.59952393, 251.54962463, 251.53194733, ..., 251.68025208,\n",
" 251.64960327, 251.61642151],\n",
" [252.20888824, 252.06634064, 251.96010895, ..., 252.58323059,\n",
" 252.44898682, 252.3343277 ],\n",
"...\n",
" [255.82539368, 255.98866272, 256.29229736, ..., 255.67448425,\n",
" 255.68865967, 255.80763245],\n",
" [254.47499084, 254.69308472, 254.74490356, ..., 254.39610291,\n",
" 254.50894165, 254.38670349],\n",
" [252.46173096, 252.46173096, 252.46173096, ..., 252.46173096,\n",
" 252.46173096, 252.46173096]],\n",
"\n",
" [[251.06691589, 251.06691589, 251.06691589, ..., 251.06691589,\n",
" 251.06691589, 251.06691589],\n",
" [251.23405151, 251.20076904, 251.19150391, ..., 251.38855896,\n",
" 251.34030457, 251.29734802],\n",
" [251.88744507, 251.86525269, 251.8250824 , ..., 252.6361908 ,\n",
" 252.57929688, 252.17391968],\n",
" ...,\n",
" [254.95679626, 255.5537323 , 255.38959045, ..., 254.92901306,\n",
" 254.91663208, 254.88747559],\n",
" [254.23662109, 254.21036072, 254.17580261, ..., 253.96891174,\n",
" 254.10254822, 254.2250061 ],\n",
" [252.87672119, 252.87672119, 252.87672119, ..., 252.87672119,\n",
" 252.87672119, 252.87672119]]])</pre></div></div></li><li class='xr-section-item'><input id='section-49c69f6d-3ecf-4219-adc8-e8ef15433884' class='xr-section-summary-in' type='checkbox' checked><label for='section-49c69f6d-3ecf-4219-adc8-e8ef15433884' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lat</span></div><div class='xr-var-dims'>(lat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-90.0 -88.75 -87.5 ... 88.75 90.0</div><input id='attrs-e151dd95-f4fc-4ad6-892b-8bfc1a988f5e' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-e151dd95-f4fc-4ad6-892b-8bfc1a988f5e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0b25dce9-aec5-41e4-ba4b-3ce0595a2ffa' class='xr-var-data-in' type='checkbox'><label for='data-0b25dce9-aec5-41e4-ba4b-3ce0595a2ffa' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>lat_bnds</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>long_name :</span></dt><dd>Latitude</dd><dt><span>standard_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><pre>array([-90. , -88.75, -87.5 , -86.25, -85. , -83.75, -82.5 , -81.25, -80. ,\n",
" -78.75, -77.5 , -76.25, -75. , -73.75, -72.5 , -71.25, -70. , -68.75,\n",
" -67.5 , -66.25, -65. , -63.75, -62.5 , -61.25, -60. , -58.75, -57.5 ,\n",
" -56.25, -55. , -53.75, -52.5 , -51.25, -50. , -48.75, -47.5 , -46.25,\n",
" -45. , -43.75, -42.5 , -41.25, -40. , -38.75, -37.5 , -36.25, -35. ,\n",
" -33.75, -32.5 , -31.25, -30. , -28.75, -27.5 , -26.25, -25. , -23.75,\n",
" -22.5 , -21.25, -20. , -18.75, -17.5 , -16.25, -15. , -13.75, -12.5 ,\n",
" -11.25, -10. , -8.75, -7.5 , -6.25, -5. , -3.75, -2.5 , -1.25,\n",
" 0. , 1.25, 2.5 , 3.75, 5. , 6.25, 7.5 , 8.75, 10. ,\n",
" 11.25, 12.5 , 13.75, 15. , 16.25, 17.5 , 18.75, 20. , 21.25,\n",
" 22.5 , 23.75, 25. , 26.25, 27.5 , 28.75, 30. , 31.25, 32.5 ,\n",
" 33.75, 35. , 36.25, 37.5 , 38.75, 40. , 41.25, 42.5 , 43.75,\n",
" 45. , 46.25, 47.5 , 48.75, 50. , 51.25, 52.5 , 53.75, 55. ,\n",
" 56.25, 57.5 , 58.75, 60. , 61.25, 62.5 , 63.75, 65. , 66.25,\n",
" 67.5 , 68.75, 70. , 71.25, 72.5 , 73.75, 75. , 76.25, 77.5 ,\n",
" 78.75, 80. , 81.25, 82.5 , 83.75, 85. , 86.25, 87.5 , 88.75,\n",
" 90. ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lon</span></div><div class='xr-var-dims'>(lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.875 3.75 ... 356.2 358.1</div><input id='attrs-09bc7280-0857-4d25-9e56-d63ecd8dddb8' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-09bc7280-0857-4d25-9e56-d63ecd8dddb8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8587aa19-7056-4894-be1a-add2636be934' class='xr-var-data-in' type='checkbox'><label for='data-8587aa19-7056-4894-be1a-add2636be934' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>bounds :</span></dt><dd>lon_bnds</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>long_name :</span></dt><dd>Longitude</dd><dt><span>standard_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><pre>array([ 0. , 1.875, 3.75 , 5.625, 7.5 , 9.375, 11.25 , 13.125,\n",
" 15. , 16.875, 18.75 , 20.625, 22.5 , 24.375, 26.25 , 28.125,\n",
" 30. , 31.875, 33.75 , 35.625, 37.5 , 39.375, 41.25 , 43.125,\n",
" 45. , 46.875, 48.75 , 50.625, 52.5 , 54.375, 56.25 , 58.125,\n",
" 60. , 61.875, 63.75 , 65.625, 67.5 , 69.375, 71.25 , 73.125,\n",
" 75. , 76.875, 78.75 , 80.625, 82.5 , 84.375, 86.25 , 88.125,\n",
" 90. , 91.875, 93.75 , 95.625, 97.5 , 99.375, 101.25 , 103.125,\n",
" 105. , 106.875, 108.75 , 110.625, 112.5 , 114.375, 116.25 , 118.125,\n",
" 120. , 121.875, 123.75 , 125.625, 127.5 , 129.375, 131.25 , 133.125,\n",
" 135. , 136.875, 138.75 , 140.625, 142.5 , 144.375, 146.25 , 148.125,\n",
" 150. , 151.875, 153.75 , 155.625, 157.5 , 159.375, 161.25 , 163.125,\n",
" 165. , 166.875, 168.75 , 170.625, 172.5 , 174.375, 176.25 , 178.125,\n",
" 180. , 181.875, 183.75 , 185.625, 187.5 , 189.375, 191.25 , 193.125,\n",
" 195. , 196.875, 198.75 , 200.625, 202.5 , 204.375, 206.25 , 208.125,\n",
" 210. , 211.875, 213.75 , 215.625, 217.5 , 219.375, 221.25 , 223.125,\n",
" 225. , 226.875, 228.75 , 230.625, 232.5 , 234.375, 236.25 , 238.125,\n",
" 240. , 241.875, 243.75 , 245.625, 247.5 , 249.375, 251.25 , 253.125,\n",
" 255. , 256.875, 258.75 , 260.625, 262.5 , 264.375, 266.25 , 268.125,\n",
" 270. , 271.875, 273.75 , 275.625, 277.5 , 279.375, 281.25 , 283.125,\n",
" 285. , 286.875, 288.75 , 290.625, 292.5 , 294.375, 296.25 , 298.125,\n",
" 300. , 301.875, 303.75 , 305.625, 307.5 , 309.375, 311.25 , 313.125,\n",
" 315. , 316.875, 318.75 , 320.625, 322.5 , 324.375, 326.25 , 328.125,\n",
" 330. , 331.875, 333.75 , 335.625, 337.5 , 339.375, 341.25 , 343.125,\n",
" 345. , 346.875, 348.75 , 350.625, 352.5 , 354.375, 356.25 , 358.125])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>quantile</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9</div><input id='attrs-ddf97b3d-0537-43f0-9249-906d454ee056' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ddf97b3d-0537-43f0-9249-906d454ee056' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1b774477-4aca-42a6-91e8-251046305898' class='xr-var-data-in' type='checkbox'><label for='data-1b774477-4aca-42a6-91e8-251046305898' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array(0.9)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-bd34a062-e07d-4aa8-b9fd-a037d6059328' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-bd34a062-e07d-4aa8-b9fd-a037d6059328' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'tas' (dayofyear: 366, lat: 145, lon: 192)>\n",
"array([[[250.67286682, 250.67286682, 250.67286682, ..., 250.67286682,\n",
" 250.67286682, 250.67286682],\n",
" [251.57595825, 251.54759216, 251.49716187, ..., 251.66184998,\n",
" 251.64952087, 251.61529541],\n",
" [252.19511414, 252.02455139, 251.96104431, ..., 252.57232666,\n",
" 252.41696167, 252.32958984],\n",
" ...,\n",
" [255.79222107, 255.88395691, 256.19177246, ..., 255.33990479,\n",
" 255.59410095, 255.73428345],\n",
" [254.41465759, 254.30558777, 254.33512878, ..., 254.36961365,\n",
" 254.33735657, 254.32498169],\n",
" [252.45547485, 252.45547485, 252.45547485, ..., 252.45547485,\n",
" 252.45547485, 252.45547485]],\n",
"\n",
" [[250.6728241 , 250.6728241 , 250.6728241 , ..., 250.6728241 ,\n",
" 250.6728241 , 250.6728241 ],\n",
" [251.59952393, 251.54962463, 251.53194733, ..., 251.68025208,\n",
" 251.64960327, 251.61642151],\n",
" [252.20888824, 252.06634064, 251.96010895, ..., 252.58323059,\n",
" 252.44898682, 252.3343277 ],\n",
"...\n",
" [255.82539368, 255.98866272, 256.29229736, ..., 255.67448425,\n",
" 255.68865967, 255.80763245],\n",
" [254.47499084, 254.69308472, 254.74490356, ..., 254.39610291,\n",
" 254.50894165, 254.38670349],\n",
" [252.46173096, 252.46173096, 252.46173096, ..., 252.46173096,\n",
" 252.46173096, 252.46173096]],\n",
"\n",
" [[251.06691589, 251.06691589, 251.06691589, ..., 251.06691589,\n",
" 251.06691589, 251.06691589],\n",
" [251.23405151, 251.20076904, 251.19150391, ..., 251.38855896,\n",
" 251.34030457, 251.29734802],\n",
" [251.88744507, 251.86525269, 251.8250824 , ..., 252.6361908 ,\n",
" 252.57929688, 252.17391968],\n",
" ...,\n",
" [254.95679626, 255.5537323 , 255.38959045, ..., 254.92901306,\n",
" 254.91663208, 254.88747559],\n",
" [254.23662109, 254.21036072, 254.17580261, ..., 253.96891174,\n",
" 254.10254822, 254.2250061 ],\n",
" [252.87672119, 252.87672119, 252.87672119, ..., 252.87672119,\n",
" 252.87672119, 252.87672119]]])\n",
"Coordinates:\n",
" * lat (lat) float64 -90.0 -88.75 -87.5 -86.25 ... 86.25 87.5 88.75 90.0\n",
" * lon (lon) float64 0.0 1.875 3.75 5.625 7.5 ... 352.5 354.4 356.2 358.1\n",
" quantile float64 0.9\n",
"Dimensions without coordinates: dayofyear"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"percentile_climatology = xarray.concat(result, dim='dayofyear')\n",
"percentile_climatology"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:analysis3-21.07]",
"language": "python",
"name": "conda-env-analysis3-21.07-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment