Skip to content

Instantly share code, notes, and snippets.

@rsignell
Created November 5, 2025 13:33
Show Gist options
  • Select an option

  • Save rsignell/8f5d654738dc811d3d411aa5f725e6ab to your computer and use it in GitHub Desktop.

Select an option

Save rsignell/8f5d654738dc811d3d411aa5f725e6ab to your computer and use it in GitHub Desktop.
CORDEX_access_icechunk_s3.ipynb
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"id": "72058def-9d26-4312-ace2-af39d7d87dcf",
"metadata": {},
"source": [
"# Access Icechunk virtual dataset from CORDEX NetCDF files\n",
"* read CORDEX Arctic Region NetCDF files on S3-compatible storage (OSN)\n",
"* use Icechunk\n",
"* use open_mfdataset\n",
"* The native NetCDF file chunks are tiny (**60kiB**): `Float:(1, 133, 116)`"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "8af6b6a8-728e-4f4c-adbe-4bc1045dc9ce",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<donfig.config_obj.ConfigSet at 0x77d2d3594e10>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import zarr\n",
"zarr.config.set({'async.concurrency': 128})"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "27632d73-826b-4e48-befb-1a5cfaa5c471",
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"import os\n",
"import fsspec\n",
"import icechunk\n",
"import xarray as xr\n",
"\n",
"warnings.filterwarnings(\"ignore\", category=UserWarning)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "bccbad9f-3380-4c57-a3b0-8b9a81173dbc",
"metadata": {},
"outputs": [],
"source": [
"# Define storage\n",
"storage_endpoint = 'https://usgs.osn.mghpcc.org'\n",
"storage_bucket = 'esip'\n",
"storage_name = 'cordex-arctic'\n",
"\n",
"fs = fsspec.filesystem('s3', anon=True, endpoint_url=storage_endpoint)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "0121616e-38e8-4bd2-b581-de25c69797e1",
"metadata": {},
"outputs": [],
"source": [
"flist = fs.glob(f's3://{storage_bucket}/rsignell/cordex/arctic/*.nc')\n",
"flist = [f's3://{f}' for f in flist]"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "72ff27fa-5b44-41e3-b327-1132c9ce3cf6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"19\n",
"s3://esip/rsignell/cordex/arctic/tasmax_ARC-44_ICHEC-EC-EARTH_rcp85_r12i1p1_SMHI-RCA4_v1_day_20960101-21001231.nc\n"
]
}
],
"source": [
"print(len(flist))\n",
"print(flist[-1])"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "b188d383-0bdd-49b3-8dea-7b22415e38bc",
"metadata": {},
"outputs": [],
"source": [
"storage = icechunk.s3_storage(\n",
" bucket=storage_bucket,\n",
" prefix=f\"icechunk/{storage_name}\",\n",
" anonymous=True,\n",
" endpoint_url=storage_endpoint,\n",
" region='not-used', # N/A for Pangeo-EOSC bucket, but required param\n",
" force_path_style=True)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "b55dd170-f73c-4228-8275-98cb48ad08b7",
"metadata": {},
"outputs": [],
"source": [
"config = icechunk.RepositoryConfig.default()\n",
"\n",
"config.set_virtual_chunk_container(\n",
" icechunk.VirtualChunkContainer(\n",
" url_prefix=f\"s3://{storage_bucket}/\",\n",
" store=icechunk.s3_store(region=\"not-used\", anonymous=True, s3_compatible=True, \n",
" force_path_style=True, endpoint_url=storage_endpoint),\n",
" ),\n",
")\n"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "909c5fce-a3a3-4877-887d-03d4a85a95c0",
"metadata": {},
"outputs": [],
"source": [
"credentials = icechunk.containers_credentials(\n",
" {f\"s3://{storage_bucket}/\": icechunk.s3_credentials(anonymous=True)})\n",
"\n",
"read_repo = icechunk.Repository.open(\n",
" storage, config, authorize_virtual_chunk_access=credentials)\n",
"\n",
"read_session = read_repo.readonly_session(\"main\")"
]
},
{
"cell_type": "markdown",
"id": "fc2fb329-0a2b-40dc-9691-c7d64908769d",
"metadata": {},
"source": [
"## Open without specifying dask chunking"
]
},
{
"cell_type": "markdown",
"id": "60ac60ab-b6b2-4ad9-a8b5-089ed643c972",
"metadata": {},
"source": [
"### icechunk"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "b9359522-1b0d-4d63-86b4-73fec872ee42",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 13.9 s, sys: 3.7 s, total: 17.6 s\n",
"Wall time: 15.1 s\n"
]
},
{
"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 notebooks */\n",
"\n",
":root {\n",
" --xr-font-color0: var(\n",
" --jp-content-font-color0,\n",
" var(--pst-color-text-base rgba(0, 0, 0, 1))\n",
" );\n",
" --xr-font-color2: var(\n",
" --jp-content-font-color2,\n",
" var(--pst-color-text-base, rgba(0, 0, 0, 0.54))\n",
" );\n",
" --xr-font-color3: var(\n",
" --jp-content-font-color3,\n",
" var(--pst-color-text-base, rgba(0, 0, 0, 0.38))\n",
" );\n",
" --xr-border-color: var(\n",
" --jp-border-color2,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 10))\n",
" );\n",
" --xr-disabled-color: var(\n",
" --jp-layout-color3,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 40))\n",
" );\n",
" --xr-background-color: var(\n",
" --jp-layout-color0,\n",
" var(--pst-color-on-background, white)\n",
" );\n",
" --xr-background-color-row-even: var(\n",
" --jp-layout-color1,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 5))\n",
" );\n",
" --xr-background-color-row-odd: var(\n",
" --jp-layout-color2,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 15))\n",
" );\n",
"}\n",
"\n",
"html[theme=\"dark\"],\n",
"html[data-theme=\"dark\"],\n",
"body[data-theme=\"dark\"],\n",
"body.vscode-dark {\n",
" --xr-font-color0: var(\n",
" --jp-content-font-color0,\n",
" var(--pst-color-text-base, rgba(255, 255, 255, 1))\n",
" );\n",
" --xr-font-color2: var(\n",
" --jp-content-font-color2,\n",
" var(--pst-color-text-base, rgba(255, 255, 255, 0.54))\n",
" );\n",
" --xr-font-color3: var(\n",
" --jp-content-font-color3,\n",
" var(--pst-color-text-base, rgba(255, 255, 255, 0.38))\n",
" );\n",
" --xr-border-color: var(\n",
" --jp-border-color2,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 10))\n",
" );\n",
" --xr-disabled-color: var(\n",
" --jp-layout-color3,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 40))\n",
" );\n",
" --xr-background-color: var(\n",
" --jp-layout-color0,\n",
" var(--pst-color-on-background, #111111)\n",
" );\n",
" --xr-background-color-row-even: var(\n",
" --jp-layout-color1,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 5))\n",
" );\n",
" --xr-background-color-row-odd: var(\n",
" --jp-layout-color2,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 15))\n",
" );\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
" line-height: 1.6;\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-obj-name,\n",
".xr-group-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-group-name::before {\n",
" content: \"📁\";\n",
" padding-right: 0.3em;\n",
"}\n",
"\n",
".xr-group-name,\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 0 20px 0 20px;\n",
" margin-block-start: 0;\n",
" margin-block-end: 0;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: inline-block;\n",
" opacity: 0;\n",
" height: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
" border: 2px solid transparent !important;\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:focus + label {\n",
" border: 2px solid var(--xr-font-color0) !important;\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",
"}\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-top: 4px;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-group-box {\n",
" display: inline-grid;\n",
" grid-template-columns: 0px 20px auto;\n",
" width: 100%;\n",
"}\n",
"\n",
".xr-group-box-vline {\n",
" grid-column-start: 1;\n",
" border-right: 0.2em solid;\n",
" border-color: var(--xr-border-color);\n",
" width: 0px;\n",
"}\n",
"\n",
".xr-group-box-hline {\n",
" grid-column-start: 2;\n",
" grid-row-start: 1;\n",
" height: 1em;\n",
" width: 20px;\n",
" border-bottom: 0.2em solid;\n",
" border-color: var(--xr-border-color);\n",
"}\n",
"\n",
".xr-group-box-contents {\n",
" grid-column-start: 3;\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",
" border-color: var(--xr-background-color-row-odd);\n",
" margin-bottom: 0;\n",
" padding-top: 2px;\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",
" border-color: var(--xr-background-color-row-even);\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-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\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",
".xr-index-data {\n",
" display: none;\n",
" border-top: 2px dotted var(--xr-background-color);\n",
" padding-bottom: 20px !important;\n",
" padding-top: 10px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in + label,\n",
".xr-var-data-in + label,\n",
".xr-index-data-in + label {\n",
" padding: 0 1px;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-data > pre,\n",
".xr-index-data > pre,\n",
".xr-var-data > table > tbody > tr {\n",
" background-color: transparent !important;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-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",
".xr-no-icon {\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",
"\n",
".xr-var-attrs-in:checked + label > .xr-icon-file-text2,\n",
".xr-var-data-in:checked + label > .xr-icon-database,\n",
".xr-index-data-in:checked + label > .xr-icon-database {\n",
" color: var(--xr-font-color0);\n",
" filter: drop-shadow(1px 1px 5px var(--xr-font-color2));\n",
" stroke-width: 0.8px;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 2GB\n",
"Dimensions: (time: 34698, rlat: 133, rlon: 116)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 278kB 2006-01-01T12:00:00 ... 2100-12-31T1...\n",
" * rlat (rlat) float64 1kB -24.2 -23.76 -23.32 -22.88 ... 33.0 33.44 33.88\n",
" * rlon (rlon) float64 928B -22.88 -22.44 -22.0 ... 26.84 27.28 27.72\n",
" lat (rlat, rlon) float64 123kB ...\n",
" lon (rlat, rlon) float64 123kB ...\n",
" height float64 8B ...\n",
"Data variables:\n",
" tasmax (time, rlat, rlon) float32 2GB ...\n",
"Attributes: (12/22)\n",
" Conventions: CF-1.4\n",
" contact: rossby.cordex@smhi.se\n",
" creation_date: 2013-06-20-T22:16:58Z\n",
" experiment: RCP8.5\n",
" experiment_id: rcp85\n",
" driving_experiment: ICHEC-EC-EARTH, rcp85, r12i1p1\n",
" ... ...\n",
" product: output\n",
" references: http://www.smhi.se/en/Research/Research-d...\n",
" tracking_id: 3f965fbb-e4b1-4835-a0e3-c0150e715af9\n",
" rossby_comment: 201307: CORDEX Arctic 0.44 deg | RCA4 v1 ...\n",
" rossby_run_id: 201307\n",
" rossby_grib_path: /nobackup/rossby16/rossby/joint_exp/corde...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-f00bdd39-4461-4d05-8035-eaa555e04f8e' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-f00bdd39-4461-4d05-8035-eaa555e04f8e' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 34698</li><li><span class='xr-has-index'>rlat</span>: 133</li><li><span class='xr-has-index'>rlon</span>: 116</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-385d0882-1731-4a0c-8eab-0f60a900d617' class='xr-section-summary-in' type='checkbox' checked><label for='section-385d0882-1731-4a0c-8eab-0f60a900d617' class='xr-section-summary' >Coordinates: <span>(6)</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'>2006-01-01T12:00:00 ... 2100-12-...</div><input id='attrs-3cb28cd1-cbb3-4972-bdd4-f6b77a8688ff' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-3cb28cd1-cbb3-4972-bdd4-f6b77a8688ff' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-649c29b3-4f3f-4188-96ba-9cce0da5c884' class='xr-var-data-in' type='checkbox'><label for='data-649c29b3-4f3f-4188-96ba-9cce0da5c884' 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>standard_name :</span></dt><dd>time</dd><dt><span>long_name :</span></dt><dd>time</dd><dt><span>bounds :</span></dt><dd>time_bnds</dd><dt><span>axis :</span></dt><dd>T</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2006-01-01T12:00:00.000000000&#x27;, &#x27;2006-01-02T12:00:00.000000000&#x27;,\n",
" &#x27;2006-01-03T12:00:00.000000000&#x27;, ..., &#x27;2100-12-29T12:00:00.000000000&#x27;,\n",
" &#x27;2100-12-30T12:00:00.000000000&#x27;, &#x27;2100-12-31T12:00:00.000000000&#x27;],\n",
" shape=(34698,), dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>rlat</span></div><div class='xr-var-dims'>(rlat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-24.2 -23.76 -23.32 ... 33.44 33.88</div><input id='attrs-d124678a-f2fb-4a90-8f88-59f583adc4ec' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-d124678a-f2fb-4a90-8f88-59f583adc4ec' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fff724f3-576d-44a8-8402-99b075b85a80' class='xr-var-data-in' type='checkbox'><label for='data-fff724f3-576d-44a8-8402-99b075b85a80' 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>standard_name :</span></dt><dd>grid_latitude</dd><dt><span>long_name :</span></dt><dd>latitude in rotated pole grid</dd><dt><span>units :</span></dt><dd>degrees</dd><dt><span>axis :</span></dt><dd>Y</dd></dl></div><div class='xr-var-data'><pre>array([-24.2 , -23.76, -23.32, -22.88, -22.44, -22. , -21.56, -21.12, -20.68,\n",
" -20.24, -19.8 , -19.36, -18.92, -18.48, -18.04, -17.6 , -17.16, -16.72,\n",
" -16.28, -15.84, -15.4 , -14.96, -14.52, -14.08, -13.64, -13.2 , -12.76,\n",
" -12.32, -11.88, -11.44, -11. , -10.56, -10.12, -9.68, -9.24, -8.8 ,\n",
" -8.36, -7.92, -7.48, -7.04, -6.6 , -6.16, -5.72, -5.28, -4.84,\n",
" -4.4 , -3.96, -3.52, -3.08, -2.64, -2.2 , -1.76, -1.32, -0.88,\n",
" -0.44, 0. , 0.44, 0.88, 1.32, 1.76, 2.2 , 2.64, 3.08,\n",
" 3.52, 3.96, 4.4 , 4.84, 5.28, 5.72, 6.16, 6.6 , 7.04,\n",
" 7.48, 7.92, 8.36, 8.8 , 9.24, 9.68, 10.12, 10.56, 11. ,\n",
" 11.44, 11.88, 12.32, 12.76, 13.2 , 13.64, 14.08, 14.52, 14.96,\n",
" 15.4 , 15.84, 16.28, 16.72, 17.16, 17.6 , 18.04, 18.48, 18.92,\n",
" 19.36, 19.8 , 20.24, 20.68, 21.12, 21.56, 22. , 22.44, 22.88,\n",
" 23.32, 23.76, 24.2 , 24.64, 25.08, 25.52, 25.96, 26.4 , 26.84,\n",
" 27.28, 27.72, 28.16, 28.6 , 29.04, 29.48, 29.92, 30.36, 30.8 ,\n",
" 31.24, 31.68, 32.12, 32.56, 33. , 33.44, 33.88])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>rlon</span></div><div class='xr-var-dims'>(rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-22.88 -22.44 -22.0 ... 27.28 27.72</div><input id='attrs-9d68cf5a-d15c-496d-abf0-f5a650a83bb9' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-9d68cf5a-d15c-496d-abf0-f5a650a83bb9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d8b57be9-c811-4a06-933c-15ae25fe0be3' class='xr-var-data-in' type='checkbox'><label for='data-d8b57be9-c811-4a06-933c-15ae25fe0be3' 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>standard_name :</span></dt><dd>grid_longitude</dd><dt><span>long_name :</span></dt><dd>longitude in rotated pole grid</dd><dt><span>units :</span></dt><dd>degrees</dd><dt><span>axis :</span></dt><dd>X</dd></dl></div><div class='xr-var-data'><pre>array([-22.88, -22.44, -22. , -21.56, -21.12, -20.68, -20.24, -19.8 , -19.36,\n",
" -18.92, -18.48, -18.04, -17.6 , -17.16, -16.72, -16.28, -15.84, -15.4 ,\n",
" -14.96, -14.52, -14.08, -13.64, -13.2 , -12.76, -12.32, -11.88, -11.44,\n",
" -11. , -10.56, -10.12, -9.68, -9.24, -8.8 , -8.36, -7.92, -7.48,\n",
" -7.04, -6.6 , -6.16, -5.72, -5.28, -4.84, -4.4 , -3.96, -3.52,\n",
" -3.08, -2.64, -2.2 , -1.76, -1.32, -0.88, -0.44, 0. , 0.44,\n",
" 0.88, 1.32, 1.76, 2.2 , 2.64, 3.08, 3.52, 3.96, 4.4 ,\n",
" 4.84, 5.28, 5.72, 6.16, 6.6 , 7.04, 7.48, 7.92, 8.36,\n",
" 8.8 , 9.24, 9.68, 10.12, 10.56, 11. , 11.44, 11.88, 12.32,\n",
" 12.76, 13.2 , 13.64, 14.08, 14.52, 14.96, 15.4 , 15.84, 16.28,\n",
" 16.72, 17.16, 17.6 , 18.04, 18.48, 18.92, 19.36, 19.8 , 20.24,\n",
" 20.68, 21.12, 21.56, 22. , 22.44, 22.88, 23.32, 23.76, 24.2 ,\n",
" 24.64, 25.08, 25.52, 25.96, 26.4 , 26.84, 27.28, 27.72])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lat</span></div><div class='xr-var-dims'>(rlat, rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-df5706de-545e-4359-950a-af414c7b8906' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-df5706de-545e-4359-950a-af414c7b8906' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5592c64b-e9bc-492c-9a40-6b7dc68d69b1' class='xr-var-data-in' type='checkbox'><label for='data-5592c64b-e9bc-492c-9a40-6b7dc68d69b1' 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>standard_name :</span></dt><dd>latitude</dd><dt><span>long_name :</span></dt><dd>latitude</dd><dt><span>units :</span></dt><dd>degrees_north</dd></dl></div><div class='xr-var-data'><pre>[15428 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lon</span></div><div class='xr-var-dims'>(rlat, rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-2bce3e0d-47e3-44ed-b977-9210694129bd' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2bce3e0d-47e3-44ed-b977-9210694129bd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b7c2e916-5263-47bf-8691-79a24fea1295' class='xr-var-data-in' type='checkbox'><label for='data-b7c2e916-5263-47bf-8691-79a24fea1295' 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>standard_name :</span></dt><dd>longitude</dd><dt><span>long_name :</span></dt><dd>longitude</dd><dt><span>units :</span></dt><dd>degrees_east</dd></dl></div><div class='xr-var-data'><pre>[15428 values with dtype=float64]</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-4a10f36c-af38-4358-b910-7520882748f9' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-4a10f36c-af38-4358-b910-7520882748f9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-91be76ec-0c39-4b43-9eca-8bc371470a30' class='xr-var-data-in' type='checkbox'><label for='data-91be76ec-0c39-4b43-9eca-8bc371470a30' 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>axis :</span></dt><dd>Z</dd><dt><span>long_name :</span></dt><dd>height</dd><dt><span>positive :</span></dt><dd>up</dd><dt><span>standard_name :</span></dt><dd>height</dd><dt><span>units :</span></dt><dd>m</dd></dl></div><div class='xr-var-data'><pre>[1 values with dtype=float64]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-31628f83-8b7c-4ba3-9a0e-9da5c5363db3' class='xr-section-summary-in' type='checkbox' checked><label for='section-31628f83-8b7c-4ba3-9a0e-9da5c5363db3' class='xr-section-summary' >Data variables: <span>(1)</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>tasmax</span></div><div class='xr-var-dims'>(time, rlat, rlon)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-64330410-ef51-4d76-9065-6462196a818b' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-64330410-ef51-4d76-9065-6462196a818b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4f136895-b1c7-4f36-986a-55615d3e08ba' class='xr-var-data-in' type='checkbox'><label for='data-4f136895-b1c7-4f36-986a-55615d3e08ba' 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>grid_mapping :</span></dt><dd>rotated_pole</dd><dt><span>standard_name :</span></dt><dd>air_temperature</dd><dt><span>long_name :</span></dt><dd>Daily Maximum Near-Surface Air Temperature</dd><dt><span>units :</span></dt><dd>K</dd><dt><span>cell_methods :</span></dt><dd>time: maximum</dd></dl></div><div class='xr-var-data'><pre>[535320744 values with dtype=float32]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-63ce3ff0-35d1-4271-aa83-b871dac9b0d6' class='xr-section-summary-in' type='checkbox' ><label for='section-63ce3ff0-35d1-4271-aa83-b871dac9b0d6' class='xr-section-summary' >Attributes: <span>(22)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>Conventions :</span></dt><dd>CF-1.4</dd><dt><span>contact :</span></dt><dd>rossby.cordex@smhi.se</dd><dt><span>creation_date :</span></dt><dd>2013-06-20-T22:16:58Z</dd><dt><span>experiment :</span></dt><dd>RCP8.5</dd><dt><span>experiment_id :</span></dt><dd>rcp85</dd><dt><span>driving_experiment :</span></dt><dd>ICHEC-EC-EARTH, rcp85, r12i1p1</dd><dt><span>driving_model_id :</span></dt><dd>ICHEC-EC-EARTH</dd><dt><span>driving_model_ensemble_member :</span></dt><dd>r12i1p1</dd><dt><span>driving_experiment_name :</span></dt><dd>rcp85</dd><dt><span>frequency :</span></dt><dd>day</dd><dt><span>institution :</span></dt><dd>Swedish Meteorological and Hydrological Institute, Rossby Centre</dd><dt><span>institute_id :</span></dt><dd>SMHI</dd><dt><span>model_id :</span></dt><dd>SMHI-RCA4</dd><dt><span>rcm_version_id :</span></dt><dd>v1</dd><dt><span>project_id :</span></dt><dd>CORDEX</dd><dt><span>CORDEX_domain :</span></dt><dd>ARC-44</dd><dt><span>product :</span></dt><dd>output</dd><dt><span>references :</span></dt><dd>http://www.smhi.se/en/Research/Research-departments/climate-research-rossby-centre</dd><dt><span>tracking_id :</span></dt><dd>3f965fbb-e4b1-4835-a0e3-c0150e715af9</dd><dt><span>rossby_comment :</span></dt><dd>201307: CORDEX Arctic 0.44 deg | RCA4 v1 | ICHEC-EC-EARTH | r12i1p1 | rcp85 | L40</dd><dt><span>rossby_run_id :</span></dt><dd>201307</dd><dt><span>rossby_grib_path :</span></dt><dd>/nobackup/rossby16/rossby/joint_exp/cordex/201307/raw/</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.Dataset> Size: 2GB\n",
"Dimensions: (time: 34698, rlat: 133, rlon: 116)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 278kB 2006-01-01T12:00:00 ... 2100-12-31T1...\n",
" * rlat (rlat) float64 1kB -24.2 -23.76 -23.32 -22.88 ... 33.0 33.44 33.88\n",
" * rlon (rlon) float64 928B -22.88 -22.44 -22.0 ... 26.84 27.28 27.72\n",
" lat (rlat, rlon) float64 123kB ...\n",
" lon (rlat, rlon) float64 123kB ...\n",
" height float64 8B ...\n",
"Data variables:\n",
" tasmax (time, rlat, rlon) float32 2GB ...\n",
"Attributes: (12/22)\n",
" Conventions: CF-1.4\n",
" contact: rossby.cordex@smhi.se\n",
" creation_date: 2013-06-20-T22:16:58Z\n",
" experiment: RCP8.5\n",
" experiment_id: rcp85\n",
" driving_experiment: ICHEC-EC-EARTH, rcp85, r12i1p1\n",
" ... ...\n",
" product: output\n",
" references: http://www.smhi.se/en/Research/Research-d...\n",
" tracking_id: 3f965fbb-e4b1-4835-a0e3-c0150e715af9\n",
" rossby_comment: 201307: CORDEX Arctic 0.44 deg | RCA4 v1 ...\n",
" rossby_run_id: 201307\n",
" rossby_grib_path: /nobackup/rossby16/rossby/joint_exp/corde..."
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%time\n",
"ds = xr.open_zarr(read_session.store, consolidated=False, zarr_format=3, chunks=None)\n",
"ds"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "caa32d69-ee90-49ab-b525-e06c8cbafeed",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 53 s, sys: 1min 7s, total: 2min\n",
"Wall time: 3min 23s\n"
]
}
],
"source": [
"%%time\n",
"dmean = ds['tasmax'].mean(dim='time').compute()"
]
},
{
"cell_type": "markdown",
"id": "376b3fd3-d017-4f9f-84b8-017c936ab888",
"metadata": {},
"source": [
"### open_mfdataset"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "f0bc46ed-1fd4-4ef1-82c8-e3a9157d70aa",
"metadata": {},
"outputs": [],
"source": [
"flist_open = [fs.open(f) for f in flist]"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "14337c52-f889-4a3f-bccf-de213899dbf0",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 3.08 s, sys: 1.53 s, total: 4.61 s\n",
"Wall time: 5.58 s\n"
]
}
],
"source": [
"%%time\n",
"ds = xr.open_mfdataset(flist_open, concat_dim='time', combine='nested', \n",
" compat='no_conflicts', parallel=True, \n",
" chunks={}, data_vars=None )"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "961b7ce8-7081-4a18-a1ce-4b2750c8d7a3",
"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 notebooks */\n",
"\n",
":root {\n",
" --xr-font-color0: var(\n",
" --jp-content-font-color0,\n",
" var(--pst-color-text-base rgba(0, 0, 0, 1))\n",
" );\n",
" --xr-font-color2: var(\n",
" --jp-content-font-color2,\n",
" var(--pst-color-text-base, rgba(0, 0, 0, 0.54))\n",
" );\n",
" --xr-font-color3: var(\n",
" --jp-content-font-color3,\n",
" var(--pst-color-text-base, rgba(0, 0, 0, 0.38))\n",
" );\n",
" --xr-border-color: var(\n",
" --jp-border-color2,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 10))\n",
" );\n",
" --xr-disabled-color: var(\n",
" --jp-layout-color3,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 40))\n",
" );\n",
" --xr-background-color: var(\n",
" --jp-layout-color0,\n",
" var(--pst-color-on-background, white)\n",
" );\n",
" --xr-background-color-row-even: var(\n",
" --jp-layout-color1,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 5))\n",
" );\n",
" --xr-background-color-row-odd: var(\n",
" --jp-layout-color2,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 15))\n",
" );\n",
"}\n",
"\n",
"html[theme=\"dark\"],\n",
"html[data-theme=\"dark\"],\n",
"body[data-theme=\"dark\"],\n",
"body.vscode-dark {\n",
" --xr-font-color0: var(\n",
" --jp-content-font-color0,\n",
" var(--pst-color-text-base, rgba(255, 255, 255, 1))\n",
" );\n",
" --xr-font-color2: var(\n",
" --jp-content-font-color2,\n",
" var(--pst-color-text-base, rgba(255, 255, 255, 0.54))\n",
" );\n",
" --xr-font-color3: var(\n",
" --jp-content-font-color3,\n",
" var(--pst-color-text-base, rgba(255, 255, 255, 0.38))\n",
" );\n",
" --xr-border-color: var(\n",
" --jp-border-color2,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 10))\n",
" );\n",
" --xr-disabled-color: var(\n",
" --jp-layout-color3,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 40))\n",
" );\n",
" --xr-background-color: var(\n",
" --jp-layout-color0,\n",
" var(--pst-color-on-background, #111111)\n",
" );\n",
" --xr-background-color-row-even: var(\n",
" --jp-layout-color1,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 5))\n",
" );\n",
" --xr-background-color-row-odd: var(\n",
" --jp-layout-color2,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 15))\n",
" );\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
" line-height: 1.6;\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-obj-name,\n",
".xr-group-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-group-name::before {\n",
" content: \"📁\";\n",
" padding-right: 0.3em;\n",
"}\n",
"\n",
".xr-group-name,\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 0 20px 0 20px;\n",
" margin-block-start: 0;\n",
" margin-block-end: 0;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: inline-block;\n",
" opacity: 0;\n",
" height: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
" border: 2px solid transparent !important;\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:focus + label {\n",
" border: 2px solid var(--xr-font-color0) !important;\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",
"}\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-top: 4px;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-group-box {\n",
" display: inline-grid;\n",
" grid-template-columns: 0px 20px auto;\n",
" width: 100%;\n",
"}\n",
"\n",
".xr-group-box-vline {\n",
" grid-column-start: 1;\n",
" border-right: 0.2em solid;\n",
" border-color: var(--xr-border-color);\n",
" width: 0px;\n",
"}\n",
"\n",
".xr-group-box-hline {\n",
" grid-column-start: 2;\n",
" grid-row-start: 1;\n",
" height: 1em;\n",
" width: 20px;\n",
" border-bottom: 0.2em solid;\n",
" border-color: var(--xr-border-color);\n",
"}\n",
"\n",
".xr-group-box-contents {\n",
" grid-column-start: 3;\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",
" border-color: var(--xr-background-color-row-odd);\n",
" margin-bottom: 0;\n",
" padding-top: 2px;\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",
" border-color: var(--xr-background-color-row-even);\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-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\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",
".xr-index-data {\n",
" display: none;\n",
" border-top: 2px dotted var(--xr-background-color);\n",
" padding-bottom: 20px !important;\n",
" padding-top: 10px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in + label,\n",
".xr-var-data-in + label,\n",
".xr-index-data-in + label {\n",
" padding: 0 1px;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-data > pre,\n",
".xr-index-data > pre,\n",
".xr-var-data > table > tbody > tr {\n",
" background-color: transparent !important;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-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",
".xr-no-icon {\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",
"\n",
".xr-var-attrs-in:checked + label > .xr-icon-file-text2,\n",
".xr-var-data-in:checked + label > .xr-icon-database,\n",
".xr-index-data-in:checked + label > .xr-icon-database {\n",
" color: var(--xr-font-color0);\n",
" filter: drop-shadow(1px 1px 5px var(--xr-font-color2));\n",
" stroke-width: 0.8px;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;tasmax&#x27; (time: 34698, rlat: 133, rlon: 116)&gt; Size: 2GB\n",
"dask.array&lt;concatenate, shape=(34698, 133, 116), dtype=float32, chunksize=(1, 133, 116), chunktype=numpy.ndarray&gt;\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 278kB 2006-01-01T12:00:00 ... 2100-12-31T1...\n",
" * rlat (rlat) float64 1kB -24.2 -23.76 -23.32 -22.88 ... 33.0 33.44 33.88\n",
" * rlon (rlon) float64 928B -22.88 -22.44 -22.0 ... 26.84 27.28 27.72\n",
" height float64 8B 2.0\n",
" lon (rlat, rlon) float64 123kB dask.array&lt;chunksize=(133, 116), meta=np.ndarray&gt;\n",
" lat (rlat, rlon) float64 123kB dask.array&lt;chunksize=(133, 116), meta=np.ndarray&gt;\n",
"Attributes:\n",
" grid_mapping: rotated_pole\n",
" standard_name: air_temperature\n",
" long_name: Daily Maximum Near-Surface Air Temperature\n",
" units: K\n",
" cell_methods: time: maximum</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-obj-name'>&#x27;tasmax&#x27;</div><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 34698</li><li><span class='xr-has-index'>rlat</span>: 133</li><li><span class='xr-has-index'>rlon</span>: 116</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-3672954d-c260-48b5-b79a-1181e494784b' class='xr-array-in' type='checkbox' checked><label for='section-3672954d-c260-48b5-b79a-1181e494784b' 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, 133, 116), meta=np.ndarray&gt;</span></div><div class='xr-array-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\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.99 GiB </td>\n",
" <td> 60.27 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (34698, 133, 116) </td>\n",
" <td> (1, 133, 116) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 34698 chunks in 39 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"156\" 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=\"17\" y1=\"7\" x2=\"17\" y2=\"32\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"36\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"40\" />\n",
" <line x1=\"28\" y1=\"18\" x2=\"28\" y2=\"43\" />\n",
" <line x1=\"32\" y1=\"22\" x2=\"32\" y2=\"47\" />\n",
" <line x1=\"36\" y1=\"26\" x2=\"36\" y2=\"51\" />\n",
" <line x1=\"39\" y1=\"29\" x2=\"39\" y2=\"55\" />\n",
" <line x1=\"43\" y1=\"33\" x2=\"43\" 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=\"54\" y1=\"44\" x2=\"54\" y2=\"69\" />\n",
" <line x1=\"58\" y1=\"48\" x2=\"58\" y2=\"73\" />\n",
" <line x1=\"62\" y1=\"52\" x2=\"62\" y2=\"77\" />\n",
" <line x1=\"65\" y1=\"55\" x2=\"65\" y2=\"81\" />\n",
" <line x1=\"69\" y1=\"59\" x2=\"69\" y2=\"84\" />\n",
" <line x1=\"73\" y1=\"63\" x2=\"73\" y2=\"88\" />\n",
" <line x1=\"76\" y1=\"66\" x2=\"76\" y2=\"92\" />\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.00085180870013 10.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"35\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"39\" y2=\"3\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"42\" y2=\"7\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"46\" y2=\"11\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"50\" y2=\"14\" />\n",
" <line x1=\"28\" y1=\"18\" x2=\"53\" y2=\"18\" />\n",
" <line x1=\"32\" y1=\"22\" x2=\"57\" y2=\"22\" />\n",
" <line x1=\"36\" y1=\"26\" x2=\"61\" y2=\"26\" />\n",
" <line x1=\"39\" y1=\"29\" x2=\"65\" y2=\"29\" />\n",
" <line x1=\"43\" y1=\"33\" x2=\"68\" y2=\"33\" />\n",
" <line x1=\"47\" y1=\"37\" x2=\"72\" y2=\"37\" />\n",
" <line x1=\"50\" y1=\"40\" x2=\"76\" y2=\"40\" />\n",
" <line x1=\"54\" y1=\"44\" x2=\"79\" y2=\"44\" />\n",
" <line x1=\"58\" y1=\"48\" x2=\"83\" y2=\"48\" />\n",
" <line x1=\"62\" y1=\"52\" x2=\"87\" y2=\"52\" />\n",
" <line x1=\"65\" y1=\"55\" x2=\"91\" y2=\"55\" />\n",
" <line x1=\"69\" y1=\"59\" x2=\"94\" y2=\"59\" />\n",
" <line x1=\"73\" y1=\"63\" x2=\"98\" y2=\"63\" />\n",
" <line x1=\"76\" y1=\"66\" x2=\"102\" y2=\"66\" />\n",
" <line x1=\"80\" y1=\"70\" x2=\"106\" 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=\"35\" y1=\"0\" x2=\"106\" y2=\"70\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 35.41261651458248,0.0 106.00085180870013,70.58823529411765 80.58823529411765,70.58823529411765\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"80\" y1=\"70\" x2=\"106\" y2=\"70\" style=\"stroke-width:2\" />\n",
" <line x1=\"80\" y1=\"96\" x2=\"106\" 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=\"106\" y1=\"70\" x2=\"106\" y2=\"96\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"80.58823529411765,70.58823529411765 106.00085180870013,70.58823529411765 106.00085180870013,96.00085180870013 80.58823529411765,96.00085180870013\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"93.294544\" y=\"116.000852\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >116</text>\n",
" <text x=\"126.000852\" y=\"83.294544\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,126.000852,83.294544)\">133</text>\n",
" <text x=\"35.294118\" y=\"80.706734\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,35.294118,80.706734)\">34698</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></div></li><li class='xr-section-item'><input id='section-ef0da3bf-0388-41e2-9c68-dd6cf315c371' class='xr-section-summary-in' type='checkbox' checked><label for='section-ef0da3bf-0388-41e2-9c68-dd6cf315c371' class='xr-section-summary' >Coordinates: <span>(6)</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'>2006-01-01T12:00:00 ... 2100-12-...</div><input id='attrs-aad9debe-5b2d-4ab1-be1d-3eb66294cf9d' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-aad9debe-5b2d-4ab1-be1d-3eb66294cf9d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bf50eb35-3c7d-453f-b891-d0829f9326cd' class='xr-var-data-in' type='checkbox'><label for='data-bf50eb35-3c7d-453f-b891-d0829f9326cd' 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>standard_name :</span></dt><dd>time</dd><dt><span>long_name :</span></dt><dd>time</dd><dt><span>bounds :</span></dt><dd>time_bnds</dd><dt><span>axis :</span></dt><dd>T</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2006-01-01T12:00:00.000000000&#x27;, &#x27;2006-01-02T12:00:00.000000000&#x27;,\n",
" &#x27;2006-01-03T12:00:00.000000000&#x27;, ..., &#x27;2100-12-29T12:00:00.000000000&#x27;,\n",
" &#x27;2100-12-30T12:00:00.000000000&#x27;, &#x27;2100-12-31T12:00:00.000000000&#x27;],\n",
" shape=(34698,), dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>rlat</span></div><div class='xr-var-dims'>(rlat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-24.2 -23.76 -23.32 ... 33.44 33.88</div><input id='attrs-1f0f2956-3c03-4f30-a8a0-2f55f0efeb26' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-1f0f2956-3c03-4f30-a8a0-2f55f0efeb26' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b6609bc7-f0dc-4820-a09a-40e5697fc97c' class='xr-var-data-in' type='checkbox'><label for='data-b6609bc7-f0dc-4820-a09a-40e5697fc97c' 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>standard_name :</span></dt><dd>grid_latitude</dd><dt><span>long_name :</span></dt><dd>latitude in rotated pole grid</dd><dt><span>units :</span></dt><dd>degrees</dd><dt><span>axis :</span></dt><dd>Y</dd></dl></div><div class='xr-var-data'><pre>array([-24.2 , -23.76, -23.32, -22.88, -22.44, -22. , -21.56, -21.12, -20.68,\n",
" -20.24, -19.8 , -19.36, -18.92, -18.48, -18.04, -17.6 , -17.16, -16.72,\n",
" -16.28, -15.84, -15.4 , -14.96, -14.52, -14.08, -13.64, -13.2 , -12.76,\n",
" -12.32, -11.88, -11.44, -11. , -10.56, -10.12, -9.68, -9.24, -8.8 ,\n",
" -8.36, -7.92, -7.48, -7.04, -6.6 , -6.16, -5.72, -5.28, -4.84,\n",
" -4.4 , -3.96, -3.52, -3.08, -2.64, -2.2 , -1.76, -1.32, -0.88,\n",
" -0.44, 0. , 0.44, 0.88, 1.32, 1.76, 2.2 , 2.64, 3.08,\n",
" 3.52, 3.96, 4.4 , 4.84, 5.28, 5.72, 6.16, 6.6 , 7.04,\n",
" 7.48, 7.92, 8.36, 8.8 , 9.24, 9.68, 10.12, 10.56, 11. ,\n",
" 11.44, 11.88, 12.32, 12.76, 13.2 , 13.64, 14.08, 14.52, 14.96,\n",
" 15.4 , 15.84, 16.28, 16.72, 17.16, 17.6 , 18.04, 18.48, 18.92,\n",
" 19.36, 19.8 , 20.24, 20.68, 21.12, 21.56, 22. , 22.44, 22.88,\n",
" 23.32, 23.76, 24.2 , 24.64, 25.08, 25.52, 25.96, 26.4 , 26.84,\n",
" 27.28, 27.72, 28.16, 28.6 , 29.04, 29.48, 29.92, 30.36, 30.8 ,\n",
" 31.24, 31.68, 32.12, 32.56, 33. , 33.44, 33.88])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>rlon</span></div><div class='xr-var-dims'>(rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-22.88 -22.44 -22.0 ... 27.28 27.72</div><input id='attrs-62bbdc7c-a706-4b17-bd82-0e24f35875ec' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-62bbdc7c-a706-4b17-bd82-0e24f35875ec' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-14810a0c-4eac-4a69-bf98-e04b009f7bae' class='xr-var-data-in' type='checkbox'><label for='data-14810a0c-4eac-4a69-bf98-e04b009f7bae' 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>standard_name :</span></dt><dd>grid_longitude</dd><dt><span>long_name :</span></dt><dd>longitude in rotated pole grid</dd><dt><span>units :</span></dt><dd>degrees</dd><dt><span>axis :</span></dt><dd>X</dd></dl></div><div class='xr-var-data'><pre>array([-22.88, -22.44, -22. , -21.56, -21.12, -20.68, -20.24, -19.8 , -19.36,\n",
" -18.92, -18.48, -18.04, -17.6 , -17.16, -16.72, -16.28, -15.84, -15.4 ,\n",
" -14.96, -14.52, -14.08, -13.64, -13.2 , -12.76, -12.32, -11.88, -11.44,\n",
" -11. , -10.56, -10.12, -9.68, -9.24, -8.8 , -8.36, -7.92, -7.48,\n",
" -7.04, -6.6 , -6.16, -5.72, -5.28, -4.84, -4.4 , -3.96, -3.52,\n",
" -3.08, -2.64, -2.2 , -1.76, -1.32, -0.88, -0.44, 0. , 0.44,\n",
" 0.88, 1.32, 1.76, 2.2 , 2.64, 3.08, 3.52, 3.96, 4.4 ,\n",
" 4.84, 5.28, 5.72, 6.16, 6.6 , 7.04, 7.48, 7.92, 8.36,\n",
" 8.8 , 9.24, 9.68, 10.12, 10.56, 11. , 11.44, 11.88, 12.32,\n",
" 12.76, 13.2 , 13.64, 14.08, 14.52, 14.96, 15.4 , 15.84, 16.28,\n",
" 16.72, 17.16, 17.6 , 18.04, 18.48, 18.92, 19.36, 19.8 , 20.24,\n",
" 20.68, 21.12, 21.56, 22. , 22.44, 22.88, 23.32, 23.76, 24.2 ,\n",
" 24.64, 25.08, 25.52, 25.96, 26.4 , 26.84, 27.28, 27.72])</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'>2.0</div><input id='attrs-0d331dbf-a52e-42dc-bf4a-e2bcae44995b' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0d331dbf-a52e-42dc-bf4a-e2bcae44995b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c6c7b659-9c5b-4632-af14-ee45a6b568a3' class='xr-var-data-in' type='checkbox'><label for='data-c6c7b659-9c5b-4632-af14-ee45a6b568a3' 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>axis :</span></dt><dd>Z</dd><dt><span>long_name :</span></dt><dd>height</dd><dt><span>positive :</span></dt><dd>up</dd><dt><span>standard_name :</span></dt><dd>height</dd><dt><span>units :</span></dt><dd>m</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>lon</span></div><div class='xr-var-dims'>(rlat, rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(133, 116), meta=np.ndarray&gt;</div><input id='attrs-394fee91-5c38-4b02-863b-62998ab1cafe' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-394fee91-5c38-4b02-863b-62998ab1cafe' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bcdcf116-eda4-4f79-a85c-eb4536e68df7' class='xr-var-data-in' type='checkbox'><label for='data-bcdcf116-eda4-4f79-a85c-eb4536e68df7' 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>standard_name :</span></dt><dd>longitude</dd><dt><span>long_name :</span></dt><dd>longitude</dd><dt><span>units :</span></dt><dd>degrees_east</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\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> 120.53 kiB </td>\n",
" <td> 120.53 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (133, 116) </td>\n",
" <td> (133, 116) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 90 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"154\" height=\"170\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"104\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"120\" x2=\"104\" y2=\"120\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"120\" style=\"stroke-width:2\" />\n",
" <line x1=\"104\" y1=\"0\" x2=\"104\" y2=\"120\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 104.66165413533835,0.0 104.66165413533835,120.0 0.0,120.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"52.330827\" y=\"140.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >116</text>\n",
" <text x=\"124.661654\" y=\"60.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,124.661654,60.000000)\">133</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lat</span></div><div class='xr-var-dims'>(rlat, rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(133, 116), meta=np.ndarray&gt;</div><input id='attrs-35380865-0da0-4c1d-beb9-caf87b044a6c' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-35380865-0da0-4c1d-beb9-caf87b044a6c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1d08f3a7-f6bc-495a-a845-cca476909908' class='xr-var-data-in' type='checkbox'><label for='data-1d08f3a7-f6bc-495a-a845-cca476909908' 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>standard_name :</span></dt><dd>latitude</dd><dt><span>long_name :</span></dt><dd>latitude</dd><dt><span>units :</span></dt><dd>degrees_north</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\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> 120.53 kiB </td>\n",
" <td> 120.53 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (133, 116) </td>\n",
" <td> (133, 116) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 90 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"154\" height=\"170\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"104\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"120\" x2=\"104\" y2=\"120\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"120\" style=\"stroke-width:2\" />\n",
" <line x1=\"104\" y1=\"0\" x2=\"104\" y2=\"120\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 104.66165413533835,0.0 104.66165413533835,120.0 0.0,120.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"52.330827\" y=\"140.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >116</text>\n",
" <text x=\"124.661654\" y=\"60.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,124.661654,60.000000)\">133</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-8a096eed-c240-4f9b-b99f-e6a4085722fb' class='xr-section-summary-in' type='checkbox' checked><label for='section-8a096eed-c240-4f9b-b99f-e6a4085722fb' class='xr-section-summary' >Attributes: <span>(5)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>grid_mapping :</span></dt><dd>rotated_pole</dd><dt><span>standard_name :</span></dt><dd>air_temperature</dd><dt><span>long_name :</span></dt><dd>Daily Maximum Near-Surface Air Temperature</dd><dt><span>units :</span></dt><dd>K</dd><dt><span>cell_methods :</span></dt><dd>time: maximum</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'tasmax' (time: 34698, rlat: 133, rlon: 116)> Size: 2GB\n",
"dask.array<concatenate, shape=(34698, 133, 116), dtype=float32, chunksize=(1, 133, 116), chunktype=numpy.ndarray>\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 278kB 2006-01-01T12:00:00 ... 2100-12-31T1...\n",
" * rlat (rlat) float64 1kB -24.2 -23.76 -23.32 -22.88 ... 33.0 33.44 33.88\n",
" * rlon (rlon) float64 928B -22.88 -22.44 -22.0 ... 26.84 27.28 27.72\n",
" height float64 8B 2.0\n",
" lon (rlat, rlon) float64 123kB dask.array<chunksize=(133, 116), meta=np.ndarray>\n",
" lat (rlat, rlon) float64 123kB dask.array<chunksize=(133, 116), meta=np.ndarray>\n",
"Attributes:\n",
" grid_mapping: rotated_pole\n",
" standard_name: air_temperature\n",
" long_name: Daily Maximum Near-Surface Air Temperature\n",
" units: K\n",
" cell_methods: time: maximum"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"da = ds['tasmax']\n",
"da"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "53ca5eab-554b-454d-b007-66af7884e708",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 2min 14s, sys: 8.7 s, total: 2min 23s\n",
"Wall time: 2min 10s\n"
]
}
],
"source": [
"%%time\n",
"dmean = da.mean(dim='time').compute()"
]
},
{
"cell_type": "markdown",
"id": "bb41ab29-5548-4855-9f62-ced11008c061",
"metadata": {},
"source": [
"## Try telling Dask to read more chunks at once"
]
},
{
"cell_type": "markdown",
"id": "36c9553f-1b39-482e-ad2a-d78dcaaa5729",
"metadata": {},
"source": [
"#### Icechunk"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "056b7ca4-67fa-4385-b412-49348136cd8d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 13 s, sys: 3.87 s, total: 16.8 s\n",
"Wall time: 13.8 s\n"
]
},
{
"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 notebooks */\n",
"\n",
":root {\n",
" --xr-font-color0: var(\n",
" --jp-content-font-color0,\n",
" var(--pst-color-text-base rgba(0, 0, 0, 1))\n",
" );\n",
" --xr-font-color2: var(\n",
" --jp-content-font-color2,\n",
" var(--pst-color-text-base, rgba(0, 0, 0, 0.54))\n",
" );\n",
" --xr-font-color3: var(\n",
" --jp-content-font-color3,\n",
" var(--pst-color-text-base, rgba(0, 0, 0, 0.38))\n",
" );\n",
" --xr-border-color: var(\n",
" --jp-border-color2,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 10))\n",
" );\n",
" --xr-disabled-color: var(\n",
" --jp-layout-color3,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 40))\n",
" );\n",
" --xr-background-color: var(\n",
" --jp-layout-color0,\n",
" var(--pst-color-on-background, white)\n",
" );\n",
" --xr-background-color-row-even: var(\n",
" --jp-layout-color1,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 5))\n",
" );\n",
" --xr-background-color-row-odd: var(\n",
" --jp-layout-color2,\n",
" hsl(from var(--pst-color-on-background, white) h s calc(l - 15))\n",
" );\n",
"}\n",
"\n",
"html[theme=\"dark\"],\n",
"html[data-theme=\"dark\"],\n",
"body[data-theme=\"dark\"],\n",
"body.vscode-dark {\n",
" --xr-font-color0: var(\n",
" --jp-content-font-color0,\n",
" var(--pst-color-text-base, rgba(255, 255, 255, 1))\n",
" );\n",
" --xr-font-color2: var(\n",
" --jp-content-font-color2,\n",
" var(--pst-color-text-base, rgba(255, 255, 255, 0.54))\n",
" );\n",
" --xr-font-color3: var(\n",
" --jp-content-font-color3,\n",
" var(--pst-color-text-base, rgba(255, 255, 255, 0.38))\n",
" );\n",
" --xr-border-color: var(\n",
" --jp-border-color2,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 10))\n",
" );\n",
" --xr-disabled-color: var(\n",
" --jp-layout-color3,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 40))\n",
" );\n",
" --xr-background-color: var(\n",
" --jp-layout-color0,\n",
" var(--pst-color-on-background, #111111)\n",
" );\n",
" --xr-background-color-row-even: var(\n",
" --jp-layout-color1,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 5))\n",
" );\n",
" --xr-background-color-row-odd: var(\n",
" --jp-layout-color2,\n",
" hsl(from var(--pst-color-on-background, #111111) h s calc(l + 15))\n",
" );\n",
"}\n",
"\n",
".xr-wrap {\n",
" display: block !important;\n",
" min-width: 300px;\n",
" max-width: 700px;\n",
" line-height: 1.6;\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-obj-name,\n",
".xr-group-name {\n",
" margin-left: 2px;\n",
" margin-right: 10px;\n",
"}\n",
"\n",
".xr-group-name::before {\n",
" content: \"📁\";\n",
" padding-right: 0.3em;\n",
"}\n",
"\n",
".xr-group-name,\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 0 20px 0 20px;\n",
" margin-block-start: 0;\n",
" margin-block-end: 0;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: inline-block;\n",
" opacity: 0;\n",
" height: 0;\n",
" margin: 0;\n",
"}\n",
"\n",
".xr-section-item input + label {\n",
" color: var(--xr-disabled-color);\n",
" border: 2px solid transparent !important;\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:focus + label {\n",
" border: 2px solid var(--xr-font-color0) !important;\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",
"}\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-top: 4px;\n",
" margin-bottom: 5px;\n",
"}\n",
"\n",
".xr-section-summary-in:checked ~ .xr-section-details {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-group-box {\n",
" display: inline-grid;\n",
" grid-template-columns: 0px 20px auto;\n",
" width: 100%;\n",
"}\n",
"\n",
".xr-group-box-vline {\n",
" grid-column-start: 1;\n",
" border-right: 0.2em solid;\n",
" border-color: var(--xr-border-color);\n",
" width: 0px;\n",
"}\n",
"\n",
".xr-group-box-hline {\n",
" grid-column-start: 2;\n",
" grid-row-start: 1;\n",
" height: 1em;\n",
" width: 20px;\n",
" border-bottom: 0.2em solid;\n",
" border-color: var(--xr-border-color);\n",
"}\n",
"\n",
".xr-group-box-contents {\n",
" grid-column-start: 3;\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",
" border-color: var(--xr-background-color-row-odd);\n",
" margin-bottom: 0;\n",
" padding-top: 2px;\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",
" border-color: var(--xr-background-color-row-even);\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-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\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",
".xr-index-data {\n",
" display: none;\n",
" border-top: 2px dotted var(--xr-background-color);\n",
" padding-bottom: 20px !important;\n",
" padding-top: 10px !important;\n",
"}\n",
"\n",
".xr-var-attrs-in + label,\n",
".xr-var-data-in + label,\n",
".xr-index-data-in + label {\n",
" padding: 0 1px;\n",
"}\n",
"\n",
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
".xr-var-data-in:checked ~ .xr-var-data,\n",
".xr-index-data-in:checked ~ .xr-index-data {\n",
" display: block;\n",
"}\n",
"\n",
".xr-var-data > table {\n",
" float: right;\n",
"}\n",
"\n",
".xr-var-data > pre,\n",
".xr-index-data > pre,\n",
".xr-var-data > table > tbody > tr {\n",
" background-color: transparent !important;\n",
"}\n",
"\n",
".xr-var-name span,\n",
".xr-var-data,\n",
".xr-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-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",
".xr-no-icon {\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",
"\n",
".xr-var-attrs-in:checked + label > .xr-icon-file-text2,\n",
".xr-var-data-in:checked + label > .xr-icon-database,\n",
".xr-index-data-in:checked + label > .xr-icon-database {\n",
" color: var(--xr-font-color0);\n",
" filter: drop-shadow(1px 1px 5px var(--xr-font-color2));\n",
" stroke-width: 0.8px;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 2GB\n",
"Dimensions: (time: 34698, rlat: 133, rlon: 116)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 278kB 2006-01-01T12:00:00 ... 2100-12-31T1...\n",
" * rlat (rlat) float64 1kB -24.2 -23.76 -23.32 -22.88 ... 33.0 33.44 33.88\n",
" * rlon (rlon) float64 928B -22.88 -22.44 -22.0 ... 26.84 27.28 27.72\n",
" height float64 8B ...\n",
" lat (rlat, rlon) float64 123kB dask.array&lt;chunksize=(133, 116), meta=np.ndarray&gt;\n",
" lon (rlat, rlon) float64 123kB dask.array&lt;chunksize=(133, 116), meta=np.ndarray&gt;\n",
"Data variables:\n",
" tasmax (time, rlat, rlon) float32 2GB dask.array&lt;chunksize=(1000, 133, 116), meta=np.ndarray&gt;\n",
"Attributes: (12/22)\n",
" Conventions: CF-1.4\n",
" contact: rossby.cordex@smhi.se\n",
" creation_date: 2013-06-20-T22:16:58Z\n",
" experiment: RCP8.5\n",
" experiment_id: rcp85\n",
" driving_experiment: ICHEC-EC-EARTH, rcp85, r12i1p1\n",
" ... ...\n",
" product: output\n",
" references: http://www.smhi.se/en/Research/Research-d...\n",
" tracking_id: 3f965fbb-e4b1-4835-a0e3-c0150e715af9\n",
" rossby_comment: 201307: CORDEX Arctic 0.44 deg | RCA4 v1 ...\n",
" rossby_run_id: 201307\n",
" rossby_grib_path: /nobackup/rossby16/rossby/joint_exp/corde...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e8546350-c81f-43fe-bef7-ee2b49f86f3e' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e8546350-c81f-43fe-bef7-ee2b49f86f3e' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 34698</li><li><span class='xr-has-index'>rlat</span>: 133</li><li><span class='xr-has-index'>rlon</span>: 116</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-a8b7a176-0482-4067-890e-30dc89bccb0b' class='xr-section-summary-in' type='checkbox' checked><label for='section-a8b7a176-0482-4067-890e-30dc89bccb0b' class='xr-section-summary' >Coordinates: <span>(6)</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'>2006-01-01T12:00:00 ... 2100-12-...</div><input id='attrs-5ba0de9e-5767-4a9a-b235-a6bd2eeb69c7' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-5ba0de9e-5767-4a9a-b235-a6bd2eeb69c7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-185f6c1e-d3cf-48d9-bc25-f9e66304203a' class='xr-var-data-in' type='checkbox'><label for='data-185f6c1e-d3cf-48d9-bc25-f9e66304203a' 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>standard_name :</span></dt><dd>time</dd><dt><span>long_name :</span></dt><dd>time</dd><dt><span>bounds :</span></dt><dd>time_bnds</dd><dt><span>axis :</span></dt><dd>T</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2006-01-01T12:00:00.000000000&#x27;, &#x27;2006-01-02T12:00:00.000000000&#x27;,\n",
" &#x27;2006-01-03T12:00:00.000000000&#x27;, ..., &#x27;2100-12-29T12:00:00.000000000&#x27;,\n",
" &#x27;2100-12-30T12:00:00.000000000&#x27;, &#x27;2100-12-31T12:00:00.000000000&#x27;],\n",
" shape=(34698,), dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>rlat</span></div><div class='xr-var-dims'>(rlat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-24.2 -23.76 -23.32 ... 33.44 33.88</div><input id='attrs-e9f93df7-23c6-4bc8-93b7-8834422d0645' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-e9f93df7-23c6-4bc8-93b7-8834422d0645' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a78e457c-9c3c-4b06-be57-d80f98cc57a0' class='xr-var-data-in' type='checkbox'><label for='data-a78e457c-9c3c-4b06-be57-d80f98cc57a0' 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>standard_name :</span></dt><dd>grid_latitude</dd><dt><span>long_name :</span></dt><dd>latitude in rotated pole grid</dd><dt><span>units :</span></dt><dd>degrees</dd><dt><span>axis :</span></dt><dd>Y</dd></dl></div><div class='xr-var-data'><pre>array([-24.2 , -23.76, -23.32, -22.88, -22.44, -22. , -21.56, -21.12, -20.68,\n",
" -20.24, -19.8 , -19.36, -18.92, -18.48, -18.04, -17.6 , -17.16, -16.72,\n",
" -16.28, -15.84, -15.4 , -14.96, -14.52, -14.08, -13.64, -13.2 , -12.76,\n",
" -12.32, -11.88, -11.44, -11. , -10.56, -10.12, -9.68, -9.24, -8.8 ,\n",
" -8.36, -7.92, -7.48, -7.04, -6.6 , -6.16, -5.72, -5.28, -4.84,\n",
" -4.4 , -3.96, -3.52, -3.08, -2.64, -2.2 , -1.76, -1.32, -0.88,\n",
" -0.44, 0. , 0.44, 0.88, 1.32, 1.76, 2.2 , 2.64, 3.08,\n",
" 3.52, 3.96, 4.4 , 4.84, 5.28, 5.72, 6.16, 6.6 , 7.04,\n",
" 7.48, 7.92, 8.36, 8.8 , 9.24, 9.68, 10.12, 10.56, 11. ,\n",
" 11.44, 11.88, 12.32, 12.76, 13.2 , 13.64, 14.08, 14.52, 14.96,\n",
" 15.4 , 15.84, 16.28, 16.72, 17.16, 17.6 , 18.04, 18.48, 18.92,\n",
" 19.36, 19.8 , 20.24, 20.68, 21.12, 21.56, 22. , 22.44, 22.88,\n",
" 23.32, 23.76, 24.2 , 24.64, 25.08, 25.52, 25.96, 26.4 , 26.84,\n",
" 27.28, 27.72, 28.16, 28.6 , 29.04, 29.48, 29.92, 30.36, 30.8 ,\n",
" 31.24, 31.68, 32.12, 32.56, 33. , 33.44, 33.88])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>rlon</span></div><div class='xr-var-dims'>(rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-22.88 -22.44 -22.0 ... 27.28 27.72</div><input id='attrs-9d663b13-c2c9-413a-879b-87a27530ba68' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-9d663b13-c2c9-413a-879b-87a27530ba68' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-40da91ea-a592-40e3-a6b6-b4b1b40ce868' class='xr-var-data-in' type='checkbox'><label for='data-40da91ea-a592-40e3-a6b6-b4b1b40ce868' 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>standard_name :</span></dt><dd>grid_longitude</dd><dt><span>long_name :</span></dt><dd>longitude in rotated pole grid</dd><dt><span>units :</span></dt><dd>degrees</dd><dt><span>axis :</span></dt><dd>X</dd></dl></div><div class='xr-var-data'><pre>array([-22.88, -22.44, -22. , -21.56, -21.12, -20.68, -20.24, -19.8 , -19.36,\n",
" -18.92, -18.48, -18.04, -17.6 , -17.16, -16.72, -16.28, -15.84, -15.4 ,\n",
" -14.96, -14.52, -14.08, -13.64, -13.2 , -12.76, -12.32, -11.88, -11.44,\n",
" -11. , -10.56, -10.12, -9.68, -9.24, -8.8 , -8.36, -7.92, -7.48,\n",
" -7.04, -6.6 , -6.16, -5.72, -5.28, -4.84, -4.4 , -3.96, -3.52,\n",
" -3.08, -2.64, -2.2 , -1.76, -1.32, -0.88, -0.44, 0. , 0.44,\n",
" 0.88, 1.32, 1.76, 2.2 , 2.64, 3.08, 3.52, 3.96, 4.4 ,\n",
" 4.84, 5.28, 5.72, 6.16, 6.6 , 7.04, 7.48, 7.92, 8.36,\n",
" 8.8 , 9.24, 9.68, 10.12, 10.56, 11. , 11.44, 11.88, 12.32,\n",
" 12.76, 13.2 , 13.64, 14.08, 14.52, 14.96, 15.4 , 15.84, 16.28,\n",
" 16.72, 17.16, 17.6 , 18.04, 18.48, 18.92, 19.36, 19.8 , 20.24,\n",
" 20.68, 21.12, 21.56, 22. , 22.44, 22.88, 23.32, 23.76, 24.2 ,\n",
" 24.64, 25.08, 25.52, 25.96, 26.4 , 26.84, 27.28, 27.72])</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-d7f0d87a-0d88-4752-8ca2-4152062f506c' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-d7f0d87a-0d88-4752-8ca2-4152062f506c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c2328418-2a84-4256-8253-47e6408d16fc' class='xr-var-data-in' type='checkbox'><label for='data-c2328418-2a84-4256-8253-47e6408d16fc' 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>axis :</span></dt><dd>Z</dd><dt><span>long_name :</span></dt><dd>height</dd><dt><span>positive :</span></dt><dd>up</dd><dt><span>standard_name :</span></dt><dd>height</dd><dt><span>units :</span></dt><dd>m</dd></dl></div><div class='xr-var-data'><pre>[1 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lat</span></div><div class='xr-var-dims'>(rlat, rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(133, 116), meta=np.ndarray&gt;</div><input id='attrs-a17dffb3-0321-4e03-b81f-c2142442f73f' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-a17dffb3-0321-4e03-b81f-c2142442f73f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0c7a36a3-e1fb-4c08-abb7-6ca52445b305' class='xr-var-data-in' type='checkbox'><label for='data-0c7a36a3-e1fb-4c08-abb7-6ca52445b305' 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>standard_name :</span></dt><dd>latitude</dd><dt><span>long_name :</span></dt><dd>latitude</dd><dt><span>units :</span></dt><dd>degrees_north</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\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> 120.53 kiB </td>\n",
" <td> 120.53 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (133, 116) </td>\n",
" <td> (133, 116) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"154\" height=\"170\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"104\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"120\" x2=\"104\" y2=\"120\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"120\" style=\"stroke-width:2\" />\n",
" <line x1=\"104\" y1=\"0\" x2=\"104\" y2=\"120\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 104.66165413533835,0.0 104.66165413533835,120.0 0.0,120.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"52.330827\" y=\"140.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >116</text>\n",
" <text x=\"124.661654\" y=\"60.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,124.661654,60.000000)\">133</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lon</span></div><div class='xr-var-dims'>(rlat, rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(133, 116), meta=np.ndarray&gt;</div><input id='attrs-f8bd9ac4-113b-46ca-b39a-49748a38f918' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-f8bd9ac4-113b-46ca-b39a-49748a38f918' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-de30872a-e0ba-4a3b-8942-8f083e37821a' class='xr-var-data-in' type='checkbox'><label for='data-de30872a-e0ba-4a3b-8942-8f083e37821a' 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>standard_name :</span></dt><dd>longitude</dd><dt><span>long_name :</span></dt><dd>longitude</dd><dt><span>units :</span></dt><dd>degrees_east</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\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> 120.53 kiB </td>\n",
" <td> 120.53 kiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (133, 116) </td>\n",
" <td> (133, 116) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"154\" height=\"170\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"104\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"0\" y1=\"120\" x2=\"104\" y2=\"120\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"120\" style=\"stroke-width:2\" />\n",
" <line x1=\"104\" y1=\"0\" x2=\"104\" y2=\"120\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"0.0,0.0 104.66165413533835,0.0 104.66165413533835,120.0 0.0,120.0\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"52.330827\" y=\"140.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >116</text>\n",
" <text x=\"124.661654\" y=\"60.000000\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,124.661654,60.000000)\">133</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-31eba466-6743-45a5-ab7f-58c5374cd6bf' class='xr-section-summary-in' type='checkbox' checked><label for='section-31eba466-6743-45a5-ab7f-58c5374cd6bf' class='xr-section-summary' >Data variables: <span>(1)</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>tasmax</span></div><div class='xr-var-dims'>(time, rlat, rlon)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1000, 133, 116), meta=np.ndarray&gt;</div><input id='attrs-d5e5d769-2b9c-49e6-8304-25a154db79d2' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-d5e5d769-2b9c-49e6-8304-25a154db79d2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ea65ee67-7ec4-46a0-a098-5010c49106d3' class='xr-var-data-in' type='checkbox'><label for='data-ea65ee67-7ec4-46a0-a098-5010c49106d3' 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>grid_mapping :</span></dt><dd>rotated_pole</dd><dt><span>standard_name :</span></dt><dd>air_temperature</dd><dt><span>long_name :</span></dt><dd>Daily Maximum Near-Surface Air Temperature</dd><dt><span>units :</span></dt><dd>K</dd><dt><span>cell_methods :</span></dt><dd>time: maximum</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\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.99 GiB </td>\n",
" <td> 58.85 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (34698, 133, 116) </td>\n",
" <td> (1000, 133, 116) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 35 chunks in 2 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"156\" 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=\"12\" y1=\"2\" x2=\"12\" y2=\"27\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"31\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"20\" y2=\"35\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"39\" />\n",
" <line x1=\"28\" y1=\"18\" x2=\"28\" y2=\"43\" />\n",
" <line x1=\"32\" y1=\"22\" x2=\"32\" y2=\"47\" />\n",
" <line x1=\"34\" y1=\"24\" x2=\"34\" y2=\"49\" />\n",
" <line x1=\"38\" y1=\"28\" x2=\"38\" y2=\"53\" />\n",
" <line x1=\"42\" y1=\"32\" x2=\"42\" y2=\"57\" />\n",
" <line x1=\"46\" y1=\"36\" x2=\"46\" y2=\"62\" />\n",
" <line x1=\"50\" y1=\"40\" x2=\"50\" y2=\"66\" />\n",
" <line x1=\"54\" y1=\"44\" x2=\"54\" y2=\"70\" />\n",
" <line x1=\"56\" y1=\"46\" x2=\"56\" y2=\"72\" />\n",
" <line x1=\"60\" y1=\"50\" x2=\"60\" y2=\"76\" />\n",
" <line x1=\"64\" y1=\"54\" x2=\"64\" y2=\"80\" />\n",
" <line x1=\"68\" y1=\"58\" x2=\"68\" y2=\"84\" />\n",
" <line x1=\"73\" y1=\"63\" x2=\"73\" y2=\"88\" />\n",
" <line x1=\"77\" y1=\"67\" x2=\"77\" y2=\"92\" />\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.00085180870013 10.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"35\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"37\" y2=\"2\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"41\" y2=\"6\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"45\" y2=\"10\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"49\" y2=\"14\" />\n",
" <line x1=\"28\" y1=\"18\" x2=\"53\" y2=\"18\" />\n",
" <line x1=\"32\" y1=\"22\" x2=\"57\" y2=\"22\" />\n",
" <line x1=\"34\" y1=\"24\" x2=\"59\" y2=\"24\" />\n",
" <line x1=\"38\" y1=\"28\" x2=\"63\" y2=\"28\" />\n",
" <line x1=\"42\" y1=\"32\" x2=\"67\" y2=\"32\" />\n",
" <line x1=\"46\" y1=\"36\" x2=\"72\" y2=\"36\" />\n",
" <line x1=\"50\" y1=\"40\" x2=\"76\" y2=\"40\" />\n",
" <line x1=\"54\" y1=\"44\" x2=\"80\" y2=\"44\" />\n",
" <line x1=\"56\" y1=\"46\" x2=\"82\" y2=\"46\" />\n",
" <line x1=\"60\" y1=\"50\" x2=\"86\" y2=\"50\" />\n",
" <line x1=\"64\" y1=\"54\" x2=\"90\" y2=\"54\" />\n",
" <line x1=\"68\" y1=\"58\" x2=\"94\" y2=\"58\" />\n",
" <line x1=\"73\" y1=\"63\" x2=\"98\" y2=\"63\" />\n",
" <line x1=\"77\" y1=\"67\" x2=\"102\" y2=\"67\" />\n",
" <line x1=\"80\" y1=\"70\" x2=\"106\" 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=\"35\" y1=\"0\" x2=\"106\" y2=\"70\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 35.41261651458248,0.0 106.00085180870013,70.58823529411765 80.58823529411765,70.58823529411765\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"80\" y1=\"70\" x2=\"106\" y2=\"70\" style=\"stroke-width:2\" />\n",
" <line x1=\"80\" y1=\"96\" x2=\"106\" 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=\"106\" y1=\"70\" x2=\"106\" y2=\"96\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"80.58823529411765,70.58823529411765 106.00085180870013,70.58823529411765 106.00085180870013,96.00085180870013 80.58823529411765,96.00085180870013\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"93.294544\" y=\"116.000852\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >116</text>\n",
" <text x=\"126.000852\" y=\"83.294544\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,126.000852,83.294544)\">133</text>\n",
" <text x=\"35.294118\" y=\"80.706734\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,35.294118,80.706734)\">34698</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-19403bb7-a351-482b-9fcd-f986797ddc70' class='xr-section-summary-in' type='checkbox' ><label for='section-19403bb7-a351-482b-9fcd-f986797ddc70' class='xr-section-summary' >Attributes: <span>(22)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>Conventions :</span></dt><dd>CF-1.4</dd><dt><span>contact :</span></dt><dd>rossby.cordex@smhi.se</dd><dt><span>creation_date :</span></dt><dd>2013-06-20-T22:16:58Z</dd><dt><span>experiment :</span></dt><dd>RCP8.5</dd><dt><span>experiment_id :</span></dt><dd>rcp85</dd><dt><span>driving_experiment :</span></dt><dd>ICHEC-EC-EARTH, rcp85, r12i1p1</dd><dt><span>driving_model_id :</span></dt><dd>ICHEC-EC-EARTH</dd><dt><span>driving_model_ensemble_member :</span></dt><dd>r12i1p1</dd><dt><span>driving_experiment_name :</span></dt><dd>rcp85</dd><dt><span>frequency :</span></dt><dd>day</dd><dt><span>institution :</span></dt><dd>Swedish Meteorological and Hydrological Institute, Rossby Centre</dd><dt><span>institute_id :</span></dt><dd>SMHI</dd><dt><span>model_id :</span></dt><dd>SMHI-RCA4</dd><dt><span>rcm_version_id :</span></dt><dd>v1</dd><dt><span>project_id :</span></dt><dd>CORDEX</dd><dt><span>CORDEX_domain :</span></dt><dd>ARC-44</dd><dt><span>product :</span></dt><dd>output</dd><dt><span>references :</span></dt><dd>http://www.smhi.se/en/Research/Research-departments/climate-research-rossby-centre</dd><dt><span>tracking_id :</span></dt><dd>3f965fbb-e4b1-4835-a0e3-c0150e715af9</dd><dt><span>rossby_comment :</span></dt><dd>201307: CORDEX Arctic 0.44 deg | RCA4 v1 | ICHEC-EC-EARTH | r12i1p1 | rcp85 | L40</dd><dt><span>rossby_run_id :</span></dt><dd>201307</dd><dt><span>rossby_grib_path :</span></dt><dd>/nobackup/rossby16/rossby/joint_exp/cordex/201307/raw/</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.Dataset> Size: 2GB\n",
"Dimensions: (time: 34698, rlat: 133, rlon: 116)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 278kB 2006-01-01T12:00:00 ... 2100-12-31T1...\n",
" * rlat (rlat) float64 1kB -24.2 -23.76 -23.32 -22.88 ... 33.0 33.44 33.88\n",
" * rlon (rlon) float64 928B -22.88 -22.44 -22.0 ... 26.84 27.28 27.72\n",
" height float64 8B ...\n",
" lat (rlat, rlon) float64 123kB dask.array<chunksize=(133, 116), meta=np.ndarray>\n",
" lon (rlat, rlon) float64 123kB dask.array<chunksize=(133, 116), meta=np.ndarray>\n",
"Data variables:\n",
" tasmax (time, rlat, rlon) float32 2GB dask.array<chunksize=(1000, 133, 116), meta=np.ndarray>\n",
"Attributes: (12/22)\n",
" Conventions: CF-1.4\n",
" contact: rossby.cordex@smhi.se\n",
" creation_date: 2013-06-20-T22:16:58Z\n",
" experiment: RCP8.5\n",
" experiment_id: rcp85\n",
" driving_experiment: ICHEC-EC-EARTH, rcp85, r12i1p1\n",
" ... ...\n",
" product: output\n",
" references: http://www.smhi.se/en/Research/Research-d...\n",
" tracking_id: 3f965fbb-e4b1-4835-a0e3-c0150e715af9\n",
" rossby_comment: 201307: CORDEX Arctic 0.44 deg | RCA4 v1 ...\n",
" rossby_run_id: 201307\n",
" rossby_grib_path: /nobackup/rossby16/rossby/joint_exp/corde..."
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%time\n",
"ds = xr.open_zarr(read_session.store, consolidated=False, zarr_format=3, chunks={'time':1000})\n",
"ds"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "89a2ebda-9971-4f4f-a8b0-c438068ee16c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 52.1 s, sys: 49 s, total: 1min 41s\n",
"Wall time: 43 s\n"
]
}
],
"source": [
"%%time\n",
"dmean = ds['tasmax'].mean(dim='time').compute()"
]
},
{
"cell_type": "markdown",
"id": "c7cacc76-4e21-474b-8ee5-693ea6d7cb3c",
"metadata": {},
"source": [
"### open_mfdataset"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "0d195678-3b63-4cfd-9725-a1fa141932f2",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 1.78 s, sys: 273 ms, total: 2.05 s\n",
"Wall time: 1.78 s\n"
]
}
],
"source": [
"%%time\n",
"ds = xr.open_mfdataset(flist_open, concat_dim='time', combine='nested', \n",
" compat='no_conflicts', parallel=True, \n",
" chunks={'time':1000}, data_vars=None )"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "0a2fa5e4-0dc3-4760-9fcf-fd0895f46075",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 6.48 s, sys: 29.6 s, total: 36 s\n",
"Wall time: 16.5 s\n"
]
}
],
"source": [
"%%time\n",
"dmean = ds['tasmax'].mean(dim='time').compute()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f40716f1-638f-4d2d-a105-8198861accff",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"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.13.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment