Created
September 19, 2023 14:38
-
-
Save rsignell-usgs/ac71d39cc17c09a04c61d298085d037e to your computer and use it in GitHub Desktop.
global_adcirc.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Hurricane Ike Maximum Water Levels\n", | |
"Compute the maximum water level during Hurricane Ike on a 18 million element triangular mesh storm surge model. Plot the results using [HoloViz](https://holoviz.org/) TriMesh rendering with Datashader. " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import xarray as xr\n", | |
"import numpy as np\n", | |
"import pandas as pd\n", | |
"import fsspec" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Read the data using the cloud-friendly zarr data format" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"fs = fsspec.filesystem('s3', anon=False, requester_pays=True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"fs_osn = fsspec.filesystem('s3', anon=True, client_kwargs=dict(endpoint_url='https://ncsa.osn.xsede.org'))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"ncfile_on_s3 = 's3://floodid-louisiana-model-data/gstofs/sample_run/fort.63.nc'" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"2.781632181" | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"fs.size(ncfile_on_s3)/1e9 #GB" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"CPU times: user 2.88 s, sys: 196 ms, total: 3.07 s\n", | |
"Wall time: 5.12 s\n" | |
] | |
} | |
], | |
"source": [ | |
"%%time\n", | |
"ds = xr.open_dataset(fs.open(ncfile_on_s3), drop_variables=['nvel'], chunks={'time':1, 'node':511400})" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"{'chunksizes': (1, 511400),\n", | |
" 'fletcher32': False,\n", | |
" 'shuffle': True,\n", | |
" 'zlib': True,\n", | |
" 'complevel': 2,\n", | |
" 'source': '<File-like object S3FileSystem, floodid-louisiana-model-data/gstofs/sample_run/fort.63.nc>',\n", | |
" 'original_shape': (40, 12784991),\n", | |
" 'dtype': dtype('<f8'),\n", | |
" '_FillValue': -99999.0,\n", | |
" 'coordinates': 'time y x'}" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ds.zeta.encoding" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
"<defs>\n", | |
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"</symbol>\n", | |
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"</symbol>\n", | |
"</defs>\n", | |
"</svg>\n", | |
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
" *\n", | |
" */\n", | |
"\n", | |
":root {\n", | |
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
" --xr-background-color: var(--jp-layout-color0, white);\n", | |
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
"}\n", | |
"\n", | |
"html[theme=dark],\n", | |
"body[data-theme=dark],\n", | |
"body.vscode-dark {\n", | |
" --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
" --xr-border-color: #1F1F1F;\n", | |
" --xr-disabled-color: #515151;\n", | |
" --xr-background-color: #111111;\n", | |
" --xr-background-color-row-even: #111111;\n", | |
" --xr-background-color-row-odd: #313131;\n", | |
"}\n", | |
"\n", | |
".xr-wrap {\n", | |
" display: block !important;\n", | |
" min-width: 300px;\n", | |
" max-width: 700px;\n", | |
"}\n", | |
"\n", | |
".xr-text-repr-fallback {\n", | |
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-header {\n", | |
" padding-top: 6px;\n", | |
" padding-bottom: 6px;\n", | |
" margin-bottom: 4px;\n", | |
" border-bottom: solid 1px var(--xr-border-color);\n", | |
"}\n", | |
"\n", | |
".xr-header > div,\n", | |
".xr-header > ul {\n", | |
" display: inline;\n", | |
" margin-top: 0;\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type,\n", | |
".xr-array-name {\n", | |
" margin-left: 2px;\n", | |
" margin-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-sections {\n", | |
" padding-left: 0 !important;\n", | |
" display: grid;\n", | |
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n", | |
"}\n", | |
"\n", | |
".xr-section-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input + label {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label {\n", | |
" cursor: pointer;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label:hover {\n", | |
" color: var(--xr-font-color0);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary {\n", | |
" grid-column: 1;\n", | |
" color: var(--xr-font-color2);\n", | |
" font-weight: 500;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary > span {\n", | |
" display: inline-block;\n", | |
" padding-left: 0.5em;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in + label:before {\n", | |
" display: inline-block;\n", | |
" content: '►';\n", | |
" font-size: 11px;\n", | |
" width: 15px;\n", | |
" text-align: center;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label:before {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label:before {\n", | |
" content: '▼';\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label > span {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary,\n", | |
".xr-section-inline-details {\n", | |
" padding-top: 4px;\n", | |
" padding-bottom: 4px;\n", | |
"}\n", | |
"\n", | |
".xr-section-inline-details {\n", | |
" grid-column: 2 / -1;\n", | |
"}\n", | |
"\n", | |
".xr-section-details {\n", | |
" display: none;\n", | |
" grid-column: 1 / -1;\n", | |
" margin-bottom: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap {\n", | |
" grid-column: 1 / -1;\n", | |
" display: grid;\n", | |
" grid-template-columns: 20px auto;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap > label {\n", | |
" grid-column: 1;\n", | |
" vertical-align: top;\n", | |
"}\n", | |
"\n", | |
".xr-preview {\n", | |
" color: var(--xr-font-color3);\n", | |
"}\n", | |
"\n", | |
".xr-array-preview,\n", | |
".xr-array-data {\n", | |
" padding: 0 5px !important;\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-array-data,\n", | |
".xr-array-in:checked ~ .xr-array-preview {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-array-in:checked ~ .xr-array-data,\n", | |
".xr-array-preview {\n", | |
" display: inline-block;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list {\n", | |
" display: inline-block !important;\n", | |
" list-style: none;\n", | |
" padding: 0 !important;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li {\n", | |
" display: inline-block;\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:before {\n", | |
" content: '(';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:after {\n", | |
" content: ')';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li:not(:last-child):after {\n", | |
" content: ',';\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-has-index {\n", | |
" font-weight: bold;\n", | |
"}\n", | |
"\n", | |
".xr-var-list,\n", | |
".xr-var-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > div,\n", | |
".xr-var-item label,\n", | |
".xr-var-item > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-even);\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > .xr-var-name:hover span {\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-var-list > li:nth-child(odd) > div,\n", | |
".xr-var-list > li:nth-child(odd) > label,\n", | |
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-odd);\n", | |
"}\n", | |
"\n", | |
".xr-var-name {\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-dims {\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-var-dtype {\n", | |
" grid-column: 3;\n", | |
" text-align: right;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-preview {\n", | |
" grid-column: 4;\n", | |
"}\n", | |
"\n", | |
".xr-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", | |
" background-color: var(--xr-background-color) !important;\n", | |
" padding-bottom: 5px !important;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
".xr-var-data-in:checked ~ .xr-var-data,\n", | |
".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-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", | |
"</style><pre class='xr-text-repr-fallback'><xarray.DataArray 'zeta' (time: 40, node: 12784991)>\n", | |
"dask.array<open_dataset-9d8ed5545d2239c017b6d200f9ff4ff0zeta, shape=(40, 12784991), dtype=float64, chunksize=(1, 511400), chunktype=numpy.ndarray>\n", | |
"Coordinates:\n", | |
" * time (time) datetime64[ns] 2016-09-01T12:00:00 2016-09-02 ... 2016-09-21\n", | |
" x (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
" y (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
"Dimensions without coordinates: node\n", | |
"Attributes:\n", | |
" long_name: water surface elevation above geoid\n", | |
" standard_name: sea_surface_height_above_geoid\n", | |
" location: node\n", | |
" mesh: adcirc_mesh\n", | |
" units: m</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'zeta'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 40</li><li><span>node</span>: 12784991</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-2e2bcd26-e105-48b4-9173-ffde19a2f5c9' class='xr-array-in' type='checkbox' checked><label for='section-2e2bcd26-e105-48b4-9173-ffde19a2f5c9' 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<chunksize=(1, 511400), meta=np.ndarray></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> 3.81 GiB </td>\n", | |
" <td> 3.90 MiB </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Shape </th>\n", | |
" <td> (40, 12784991) </td>\n", | |
" <td> (1, 511400) </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Dask graph </th>\n", | |
" <td colspan=\"2\"> 1000 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=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"0\" y1=\"1\" x2=\"120\" y2=\"1\" />\n", | |
" <line x1=\"0\" y1=\"2\" x2=\"120\" y2=\"2\" />\n", | |
" <line x1=\"0\" y1=\"3\" x2=\"120\" y2=\"3\" />\n", | |
" <line x1=\"0\" y1=\"5\" x2=\"120\" y2=\"5\" />\n", | |
" <line x1=\"0\" y1=\"6\" x2=\"120\" y2=\"6\" />\n", | |
" <line x1=\"0\" y1=\"7\" x2=\"120\" y2=\"7\" />\n", | |
" <line x1=\"0\" y1=\"8\" x2=\"120\" y2=\"8\" />\n", | |
" <line x1=\"0\" y1=\"10\" x2=\"120\" y2=\"10\" />\n", | |
" <line x1=\"0\" y1=\"11\" x2=\"120\" y2=\"11\" />\n", | |
" <line x1=\"0\" y1=\"13\" x2=\"120\" y2=\"13\" />\n", | |
" <line x1=\"0\" y1=\"14\" x2=\"120\" y2=\"14\" />\n", | |
" <line x1=\"0\" y1=\"15\" x2=\"120\" y2=\"15\" />\n", | |
" <line x1=\"0\" y1=\"17\" x2=\"120\" y2=\"17\" />\n", | |
" <line x1=\"0\" y1=\"18\" x2=\"120\" y2=\"18\" />\n", | |
" <line x1=\"0\" y1=\"19\" x2=\"120\" y2=\"19\" />\n", | |
" <line x1=\"0\" y1=\"20\" x2=\"120\" y2=\"20\" />\n", | |
" <line x1=\"0\" y1=\"22\" x2=\"120\" y2=\"22\" />\n", | |
" <line x1=\"0\" y1=\"23\" x2=\"120\" y2=\"23\" />\n", | |
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"4\" y1=\"0\" x2=\"4\" y2=\"25\" />\n", | |
" <line x1=\"9\" y1=\"0\" x2=\"9\" y2=\"25\" />\n", | |
" <line x1=\"14\" y1=\"0\" x2=\"14\" y2=\"25\" />\n", | |
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n", | |
" <line x1=\"28\" y1=\"0\" x2=\"28\" y2=\"25\" />\n", | |
" <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n", | |
" <line x1=\"43\" y1=\"0\" x2=\"43\" y2=\"25\" />\n", | |
" <line x1=\"48\" y1=\"0\" x2=\"48\" y2=\"25\" />\n", | |
" <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n", | |
" <line x1=\"62\" y1=\"0\" x2=\"62\" y2=\"25\" />\n", | |
" <line x1=\"67\" y1=\"0\" x2=\"67\" y2=\"25\" />\n", | |
" <line x1=\"72\" y1=\"0\" x2=\"72\" y2=\"25\" />\n", | |
" <line x1=\"81\" y1=\"0\" x2=\"81\" y2=\"25\" />\n", | |
" <line x1=\"86\" y1=\"0\" x2=\"86\" y2=\"25\" />\n", | |
" <line x1=\"91\" y1=\"0\" x2=\"91\" y2=\"25\" />\n", | |
" <line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"25\" />\n", | |
" <line x1=\"105\" y1=\"0\" x2=\"105\" y2=\"25\" />\n", | |
" <line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"25\" />\n", | |
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >12784991</text>\n", | |
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">40</text>\n", | |
"</svg>\n", | |
" </td>\n", | |
" </tr>\n", | |
"</table></div></div></li><li class='xr-section-item'><input id='section-de83a7e5-f36d-4f81-8d8e-27b7fe982bd8' class='xr-section-summary-in' type='checkbox' checked><label for='section-de83a7e5-f36d-4f81-8d8e-27b7fe982bd8' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>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'>2016-09-01T12:00:00 ... 2016-09-21</div><input id='attrs-c7dcf30a-061c-44c5-a8e9-a5a9c8ce5f54' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-c7dcf30a-061c-44c5-a8e9-a5a9c8ce5f54' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-281d6788-672d-4c1e-b913-3a4d369f468e' class='xr-var-data-in' type='checkbox'><label for='data-281d6788-672d-4c1e-b913-3a4d369f468e' 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>long_name :</span></dt><dd>model time</dd><dt><span>standard_name :</span></dt><dd>time</dd><dt><span>base_date :</span></dt><dd>2016-09-01 00:00:00 UTC</dd></dl></div><div class='xr-var-data'><pre>array(['2016-09-01T12:00:00.000000000', '2016-09-02T00:00:00.000000000',\n", | |
" '2016-09-02T12:00:00.000000000', '2016-09-03T00:00:00.000000000',\n", | |
" '2016-09-03T12:00:00.000000000', '2016-09-04T00:00:00.000000000',\n", | |
" '2016-09-04T12:00:00.000000000', '2016-09-05T00:00:00.000000000',\n", | |
" '2016-09-05T12:00:00.000000000', '2016-09-06T00:00:00.000000000',\n", | |
" '2016-09-06T12:00:00.000000000', '2016-09-07T00:00:00.000000000',\n", | |
" '2016-09-07T12:00:00.000000000', '2016-09-08T00:00:00.000000000',\n", | |
" '2016-09-08T12:00:00.000000000', '2016-09-09T00:00:00.000000000',\n", | |
" '2016-09-09T12:00:00.000000000', '2016-09-10T00:00:00.000000000',\n", | |
" '2016-09-10T12:00:00.000000000', '2016-09-11T00:00:00.000000000',\n", | |
" '2016-09-11T12:00:00.000000000', '2016-09-12T00:00:00.000000000',\n", | |
" '2016-09-12T12:00:00.000000000', '2016-09-13T00:00:00.000000000',\n", | |
" '2016-09-13T12:00:00.000000000', '2016-09-14T00:00:00.000000000',\n", | |
" '2016-09-14T12:00:00.000000000', '2016-09-15T00:00:00.000000000',\n", | |
" '2016-09-15T12:00:00.000000000', '2016-09-16T00:00:00.000000000',\n", | |
" '2016-09-16T12:00:00.000000000', '2016-09-17T00:00:00.000000000',\n", | |
" '2016-09-17T12:00:00.000000000', '2016-09-18T00:00:00.000000000',\n", | |
" '2016-09-18T12:00:00.000000000', '2016-09-19T00:00:00.000000000',\n", | |
" '2016-09-19T12:00:00.000000000', '2016-09-20T00:00:00.000000000',\n", | |
" '2016-09-20T12:00:00.000000000', '2016-09-21T00:00:00.000000000'],\n", | |
" dtype='datetime64[ns]')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>x</span></div><div class='xr-var-dims'>(node)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(511400,), meta=np.ndarray></div><input id='attrs-16662a93-073a-4139-bfd6-50aab40ee743' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-16662a93-073a-4139-bfd6-50aab40ee743' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9d61b667-5b37-4345-856e-7a2eca40624f' class='xr-var-data-in' type='checkbox'><label for='data-9d61b667-5b37-4345-856e-7a2eca40624f' 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>long_name :</span></dt><dd>longitude</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>positive :</span></dt><dd>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> 97.54 MiB </td>\n", | |
" <td> 3.90 MiB </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Shape </th>\n", | |
" <td> (12784991,) </td>\n", | |
" <td> (511400,) </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Dask graph </th>\n", | |
" <td colspan=\"2\"> 25 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=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"4\" y1=\"0\" x2=\"4\" y2=\"25\" />\n", | |
" <line x1=\"9\" y1=\"0\" x2=\"9\" y2=\"25\" />\n", | |
" <line x1=\"14\" y1=\"0\" x2=\"14\" y2=\"25\" />\n", | |
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n", | |
" <line x1=\"28\" y1=\"0\" x2=\"28\" y2=\"25\" />\n", | |
" <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n", | |
" <line x1=\"43\" y1=\"0\" x2=\"43\" y2=\"25\" />\n", | |
" <line x1=\"48\" y1=\"0\" x2=\"48\" y2=\"25\" />\n", | |
" <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n", | |
" <line x1=\"62\" y1=\"0\" x2=\"62\" y2=\"25\" />\n", | |
" <line x1=\"67\" y1=\"0\" x2=\"67\" y2=\"25\" />\n", | |
" <line x1=\"72\" y1=\"0\" x2=\"72\" y2=\"25\" />\n", | |
" <line x1=\"81\" y1=\"0\" x2=\"81\" y2=\"25\" />\n", | |
" <line x1=\"86\" y1=\"0\" x2=\"86\" y2=\"25\" />\n", | |
" <line x1=\"91\" y1=\"0\" x2=\"91\" y2=\"25\" />\n", | |
" <line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"25\" />\n", | |
" <line x1=\"105\" y1=\"0\" x2=\"105\" y2=\"25\" />\n", | |
" <line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"25\" />\n", | |
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >12784991</text>\n", | |
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n", | |
"</svg>\n", | |
" </td>\n", | |
" </tr>\n", | |
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y</span></div><div class='xr-var-dims'>(node)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(511400,), meta=np.ndarray></div><input id='attrs-a72db894-163d-49cd-a6a0-2ef0706c2233' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-a72db894-163d-49cd-a6a0-2ef0706c2233' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-706cc58d-88f8-4000-982c-1d68a2c34ba3' class='xr-var-data-in' type='checkbox'><label for='data-706cc58d-88f8-4000-982c-1d68a2c34ba3' 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>long_name :</span></dt><dd>latitude</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>positive :</span></dt><dd>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> 97.54 MiB </td>\n", | |
" <td> 3.90 MiB </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Shape </th>\n", | |
" <td> (12784991,) </td>\n", | |
" <td> (511400,) </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Dask graph </th>\n", | |
" <td colspan=\"2\"> 25 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=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"4\" y1=\"0\" x2=\"4\" y2=\"25\" />\n", | |
" <line x1=\"9\" y1=\"0\" x2=\"9\" y2=\"25\" />\n", | |
" <line x1=\"14\" y1=\"0\" x2=\"14\" y2=\"25\" />\n", | |
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n", | |
" <line x1=\"28\" y1=\"0\" x2=\"28\" y2=\"25\" />\n", | |
" <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n", | |
" <line x1=\"43\" y1=\"0\" x2=\"43\" y2=\"25\" />\n", | |
" <line x1=\"48\" y1=\"0\" x2=\"48\" y2=\"25\" />\n", | |
" <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n", | |
" <line x1=\"62\" y1=\"0\" x2=\"62\" y2=\"25\" />\n", | |
" <line x1=\"67\" y1=\"0\" x2=\"67\" y2=\"25\" />\n", | |
" <line x1=\"72\" y1=\"0\" x2=\"72\" y2=\"25\" />\n", | |
" <line x1=\"81\" y1=\"0\" x2=\"81\" y2=\"25\" />\n", | |
" <line x1=\"86\" y1=\"0\" x2=\"86\" y2=\"25\" />\n", | |
" <line x1=\"91\" y1=\"0\" x2=\"91\" y2=\"25\" />\n", | |
" <line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"25\" />\n", | |
" <line x1=\"105\" y1=\"0\" x2=\"105\" y2=\"25\" />\n", | |
" <line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"25\" />\n", | |
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >12784991</text>\n", | |
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n", | |
"</svg>\n", | |
" </td>\n", | |
" </tr>\n", | |
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-97f30d1c-68f0-43a2-9714-b0e883405683' class='xr-section-summary-in' type='checkbox' ><label for='section-97f30d1c-68f0-43a2-9714-b0e883405683' class='xr-section-summary' >Indexes: <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-index-name'><div>time</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-eff741e0-3a47-4aab-8f82-bca89d9a938b' class='xr-index-data-in' type='checkbox'/><label for='index-eff741e0-3a47-4aab-8f82-bca89d9a938b' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex(['2016-09-01 12:00:00', '2016-09-02 00:00:00',\n", | |
" '2016-09-02 12:00:00', '2016-09-03 00:00:00',\n", | |
" '2016-09-03 12:00:00', '2016-09-04 00:00:00',\n", | |
" '2016-09-04 12:00:00', '2016-09-05 00:00:00',\n", | |
" '2016-09-05 12:00:00', '2016-09-06 00:00:00',\n", | |
" '2016-09-06 12:00:00', '2016-09-07 00:00:00',\n", | |
" '2016-09-07 12:00:00', '2016-09-08 00:00:00',\n", | |
" '2016-09-08 12:00:00', '2016-09-09 00:00:00',\n", | |
" '2016-09-09 12:00:00', '2016-09-10 00:00:00',\n", | |
" '2016-09-10 12:00:00', '2016-09-11 00:00:00',\n", | |
" '2016-09-11 12:00:00', '2016-09-12 00:00:00',\n", | |
" '2016-09-12 12:00:00', '2016-09-13 00:00:00',\n", | |
" '2016-09-13 12:00:00', '2016-09-14 00:00:00',\n", | |
" '2016-09-14 12:00:00', '2016-09-15 00:00:00',\n", | |
" '2016-09-15 12:00:00', '2016-09-16 00:00:00',\n", | |
" '2016-09-16 12:00:00', '2016-09-17 00:00:00',\n", | |
" '2016-09-17 12:00:00', '2016-09-18 00:00:00',\n", | |
" '2016-09-18 12:00:00', '2016-09-19 00:00:00',\n", | |
" '2016-09-19 12:00:00', '2016-09-20 00:00:00',\n", | |
" '2016-09-20 12:00:00', '2016-09-21 00:00:00'],\n", | |
" dtype='datetime64[ns]', name='time', freq=None))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-be4405c8-bf4a-4f8c-be5b-49064392c12a' class='xr-section-summary-in' type='checkbox' checked><label for='section-be4405c8-bf4a-4f8c-be5b-49064392c12a' 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>long_name :</span></dt><dd>water surface elevation above geoid</dd><dt><span>standard_name :</span></dt><dd>sea_surface_height_above_geoid</dd><dt><span>location :</span></dt><dd>node</dd><dt><span>mesh :</span></dt><dd>adcirc_mesh</dd><dt><span>units :</span></dt><dd>m</dd></dl></div></li></ul></div></div>" | |
], | |
"text/plain": [ | |
"<xarray.DataArray 'zeta' (time: 40, node: 12784991)>\n", | |
"dask.array<open_dataset-9d8ed5545d2239c017b6d200f9ff4ff0zeta, shape=(40, 12784991), dtype=float64, chunksize=(1, 511400), chunktype=numpy.ndarray>\n", | |
"Coordinates:\n", | |
" * time (time) datetime64[ns] 2016-09-01T12:00:00 2016-09-02 ... 2016-09-21\n", | |
" x (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
" y (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
"Dimensions without coordinates: node\n", | |
"Attributes:\n", | |
" long_name: water surface elevation above geoid\n", | |
" standard_name: sea_surface_height_above_geoid\n", | |
" location: node\n", | |
" mesh: adcirc_mesh\n", | |
" units: m" | |
] | |
}, | |
"execution_count": 8, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ds.zeta" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#fs = fsspec.filesystem('s3', anon=True, skip_instance_cache=True, client_kwargs={'endpoint_url': 'https://renc.osn.xsede.org'})\n", | |
"#ds = xr.open_dataset(fs.get_mapper('s3://rsignellbucket2/esip/adcirc/ike'), engine='zarr',\n", | |
"# backend_kwargs=dict(consolidated=False), chunks={'time':90})" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#fs = fsspec.filesystem('s3', anon=True, skip_instance_cache=True, client_kwargs={'endpoint_url': 'https://mghp.osn.xsede.org'})\n", | |
"#ds = xr.open_dataset(fs.get_mapper('s3://rsignellbucket1/esip/adcirc/ike'), engine='zarr',\n", | |
"# backend_kwargs=dict(consolidated=False), chunks={'time':90})" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
"<defs>\n", | |
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"</symbol>\n", | |
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"</symbol>\n", | |
"</defs>\n", | |
"</svg>\n", | |
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
" *\n", | |
" */\n", | |
"\n", | |
":root {\n", | |
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
" --xr-background-color: var(--jp-layout-color0, white);\n", | |
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
"}\n", | |
"\n", | |
"html[theme=dark],\n", | |
"body[data-theme=dark],\n", | |
"body.vscode-dark {\n", | |
" --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
" --xr-border-color: #1F1F1F;\n", | |
" --xr-disabled-color: #515151;\n", | |
" --xr-background-color: #111111;\n", | |
" --xr-background-color-row-even: #111111;\n", | |
" --xr-background-color-row-odd: #313131;\n", | |
"}\n", | |
"\n", | |
".xr-wrap {\n", | |
" display: block !important;\n", | |
" min-width: 300px;\n", | |
" max-width: 700px;\n", | |
"}\n", | |
"\n", | |
".xr-text-repr-fallback {\n", | |
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-header {\n", | |
" padding-top: 6px;\n", | |
" padding-bottom: 6px;\n", | |
" margin-bottom: 4px;\n", | |
" border-bottom: solid 1px var(--xr-border-color);\n", | |
"}\n", | |
"\n", | |
".xr-header > div,\n", | |
".xr-header > ul {\n", | |
" display: inline;\n", | |
" margin-top: 0;\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type,\n", | |
".xr-array-name {\n", | |
" margin-left: 2px;\n", | |
" margin-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-sections {\n", | |
" padding-left: 0 !important;\n", | |
" display: grid;\n", | |
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n", | |
"}\n", | |
"\n", | |
".xr-section-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input + label {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label {\n", | |
" cursor: pointer;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label:hover {\n", | |
" color: var(--xr-font-color0);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary {\n", | |
" grid-column: 1;\n", | |
" color: var(--xr-font-color2);\n", | |
" font-weight: 500;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary > span {\n", | |
" display: inline-block;\n", | |
" padding-left: 0.5em;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in + label:before {\n", | |
" display: inline-block;\n", | |
" content: '►';\n", | |
" font-size: 11px;\n", | |
" width: 15px;\n", | |
" text-align: center;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label:before {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label:before {\n", | |
" content: '▼';\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label > span {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary,\n", | |
".xr-section-inline-details {\n", | |
" padding-top: 4px;\n", | |
" padding-bottom: 4px;\n", | |
"}\n", | |
"\n", | |
".xr-section-inline-details {\n", | |
" grid-column: 2 / -1;\n", | |
"}\n", | |
"\n", | |
".xr-section-details {\n", | |
" display: none;\n", | |
" grid-column: 1 / -1;\n", | |
" margin-bottom: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap {\n", | |
" grid-column: 1 / -1;\n", | |
" display: grid;\n", | |
" grid-template-columns: 20px auto;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap > label {\n", | |
" grid-column: 1;\n", | |
" vertical-align: top;\n", | |
"}\n", | |
"\n", | |
".xr-preview {\n", | |
" color: var(--xr-font-color3);\n", | |
"}\n", | |
"\n", | |
".xr-array-preview,\n", | |
".xr-array-data {\n", | |
" padding: 0 5px !important;\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-array-data,\n", | |
".xr-array-in:checked ~ .xr-array-preview {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-array-in:checked ~ .xr-array-data,\n", | |
".xr-array-preview {\n", | |
" display: inline-block;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list {\n", | |
" display: inline-block !important;\n", | |
" list-style: none;\n", | |
" padding: 0 !important;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li {\n", | |
" display: inline-block;\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:before {\n", | |
" content: '(';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:after {\n", | |
" content: ')';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li:not(:last-child):after {\n", | |
" content: ',';\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-has-index {\n", | |
" font-weight: bold;\n", | |
"}\n", | |
"\n", | |
".xr-var-list,\n", | |
".xr-var-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > div,\n", | |
".xr-var-item label,\n", | |
".xr-var-item > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-even);\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > .xr-var-name:hover span {\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-var-list > li:nth-child(odd) > div,\n", | |
".xr-var-list > li:nth-child(odd) > label,\n", | |
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-odd);\n", | |
"}\n", | |
"\n", | |
".xr-var-name {\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-dims {\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-var-dtype {\n", | |
" grid-column: 3;\n", | |
" text-align: right;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-preview {\n", | |
" grid-column: 4;\n", | |
"}\n", | |
"\n", | |
".xr-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", | |
" background-color: var(--xr-background-color) !important;\n", | |
" padding-bottom: 5px !important;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
".xr-var-data-in:checked ~ .xr-var-data,\n", | |
".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-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", | |
"</style><pre class='xr-text-repr-fallback'><xarray.DataArray 'zeta' (time: 40, node: 12784991)>\n", | |
"dask.array<open_dataset-9d8ed5545d2239c017b6d200f9ff4ff0zeta, shape=(40, 12784991), dtype=float64, chunksize=(1, 511400), chunktype=numpy.ndarray>\n", | |
"Coordinates:\n", | |
" * time (time) datetime64[ns] 2016-09-01T12:00:00 2016-09-02 ... 2016-09-21\n", | |
" x (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
" y (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
"Dimensions without coordinates: node\n", | |
"Attributes:\n", | |
" long_name: water surface elevation above geoid\n", | |
" standard_name: sea_surface_height_above_geoid\n", | |
" location: node\n", | |
" mesh: adcirc_mesh\n", | |
" units: m</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'zeta'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 40</li><li><span>node</span>: 12784991</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-7003663c-0614-43fb-b7f1-922cbe2a228f' class='xr-array-in' type='checkbox' checked><label for='section-7003663c-0614-43fb-b7f1-922cbe2a228f' 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<chunksize=(1, 511400), meta=np.ndarray></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> 3.81 GiB </td>\n", | |
" <td> 3.90 MiB </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Shape </th>\n", | |
" <td> (40, 12784991) </td>\n", | |
" <td> (1, 511400) </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Dask graph </th>\n", | |
" <td colspan=\"2\"> 1000 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=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"0\" y1=\"1\" x2=\"120\" y2=\"1\" />\n", | |
" <line x1=\"0\" y1=\"2\" x2=\"120\" y2=\"2\" />\n", | |
" <line x1=\"0\" y1=\"3\" x2=\"120\" y2=\"3\" />\n", | |
" <line x1=\"0\" y1=\"5\" x2=\"120\" y2=\"5\" />\n", | |
" <line x1=\"0\" y1=\"6\" x2=\"120\" y2=\"6\" />\n", | |
" <line x1=\"0\" y1=\"7\" x2=\"120\" y2=\"7\" />\n", | |
" <line x1=\"0\" y1=\"8\" x2=\"120\" y2=\"8\" />\n", | |
" <line x1=\"0\" y1=\"10\" x2=\"120\" y2=\"10\" />\n", | |
" <line x1=\"0\" y1=\"11\" x2=\"120\" y2=\"11\" />\n", | |
" <line x1=\"0\" y1=\"13\" x2=\"120\" y2=\"13\" />\n", | |
" <line x1=\"0\" y1=\"14\" x2=\"120\" y2=\"14\" />\n", | |
" <line x1=\"0\" y1=\"15\" x2=\"120\" y2=\"15\" />\n", | |
" <line x1=\"0\" y1=\"17\" x2=\"120\" y2=\"17\" />\n", | |
" <line x1=\"0\" y1=\"18\" x2=\"120\" y2=\"18\" />\n", | |
" <line x1=\"0\" y1=\"19\" x2=\"120\" y2=\"19\" />\n", | |
" <line x1=\"0\" y1=\"20\" x2=\"120\" y2=\"20\" />\n", | |
" <line x1=\"0\" y1=\"22\" x2=\"120\" y2=\"22\" />\n", | |
" <line x1=\"0\" y1=\"23\" x2=\"120\" y2=\"23\" />\n", | |
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"4\" y1=\"0\" x2=\"4\" y2=\"25\" />\n", | |
" <line x1=\"9\" y1=\"0\" x2=\"9\" y2=\"25\" />\n", | |
" <line x1=\"14\" y1=\"0\" x2=\"14\" y2=\"25\" />\n", | |
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n", | |
" <line x1=\"28\" y1=\"0\" x2=\"28\" y2=\"25\" />\n", | |
" <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n", | |
" <line x1=\"43\" y1=\"0\" x2=\"43\" y2=\"25\" />\n", | |
" <line x1=\"48\" y1=\"0\" x2=\"48\" y2=\"25\" />\n", | |
" <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n", | |
" <line x1=\"62\" y1=\"0\" x2=\"62\" y2=\"25\" />\n", | |
" <line x1=\"67\" y1=\"0\" x2=\"67\" y2=\"25\" />\n", | |
" <line x1=\"72\" y1=\"0\" x2=\"72\" y2=\"25\" />\n", | |
" <line x1=\"81\" y1=\"0\" x2=\"81\" y2=\"25\" />\n", | |
" <line x1=\"86\" y1=\"0\" x2=\"86\" y2=\"25\" />\n", | |
" <line x1=\"91\" y1=\"0\" x2=\"91\" y2=\"25\" />\n", | |
" <line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"25\" />\n", | |
" <line x1=\"105\" y1=\"0\" x2=\"105\" y2=\"25\" />\n", | |
" <line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"25\" />\n", | |
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >12784991</text>\n", | |
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">40</text>\n", | |
"</svg>\n", | |
" </td>\n", | |
" </tr>\n", | |
"</table></div></div></li><li class='xr-section-item'><input id='section-ef8c23e2-f091-4967-b5aa-aa09d09dfa5a' class='xr-section-summary-in' type='checkbox' checked><label for='section-ef8c23e2-f091-4967-b5aa-aa09d09dfa5a' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>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'>2016-09-01T12:00:00 ... 2016-09-21</div><input id='attrs-4a900930-9e77-4193-8d00-9392df968dce' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-4a900930-9e77-4193-8d00-9392df968dce' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-41a279dd-1428-459a-818b-7f083c9632ea' class='xr-var-data-in' type='checkbox'><label for='data-41a279dd-1428-459a-818b-7f083c9632ea' 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>long_name :</span></dt><dd>model time</dd><dt><span>standard_name :</span></dt><dd>time</dd><dt><span>base_date :</span></dt><dd>2016-09-01 00:00:00 UTC</dd></dl></div><div class='xr-var-data'><pre>array(['2016-09-01T12:00:00.000000000', '2016-09-02T00:00:00.000000000',\n", | |
" '2016-09-02T12:00:00.000000000', '2016-09-03T00:00:00.000000000',\n", | |
" '2016-09-03T12:00:00.000000000', '2016-09-04T00:00:00.000000000',\n", | |
" '2016-09-04T12:00:00.000000000', '2016-09-05T00:00:00.000000000',\n", | |
" '2016-09-05T12:00:00.000000000', '2016-09-06T00:00:00.000000000',\n", | |
" '2016-09-06T12:00:00.000000000', '2016-09-07T00:00:00.000000000',\n", | |
" '2016-09-07T12:00:00.000000000', '2016-09-08T00:00:00.000000000',\n", | |
" '2016-09-08T12:00:00.000000000', '2016-09-09T00:00:00.000000000',\n", | |
" '2016-09-09T12:00:00.000000000', '2016-09-10T00:00:00.000000000',\n", | |
" '2016-09-10T12:00:00.000000000', '2016-09-11T00:00:00.000000000',\n", | |
" '2016-09-11T12:00:00.000000000', '2016-09-12T00:00:00.000000000',\n", | |
" '2016-09-12T12:00:00.000000000', '2016-09-13T00:00:00.000000000',\n", | |
" '2016-09-13T12:00:00.000000000', '2016-09-14T00:00:00.000000000',\n", | |
" '2016-09-14T12:00:00.000000000', '2016-09-15T00:00:00.000000000',\n", | |
" '2016-09-15T12:00:00.000000000', '2016-09-16T00:00:00.000000000',\n", | |
" '2016-09-16T12:00:00.000000000', '2016-09-17T00:00:00.000000000',\n", | |
" '2016-09-17T12:00:00.000000000', '2016-09-18T00:00:00.000000000',\n", | |
" '2016-09-18T12:00:00.000000000', '2016-09-19T00:00:00.000000000',\n", | |
" '2016-09-19T12:00:00.000000000', '2016-09-20T00:00:00.000000000',\n", | |
" '2016-09-20T12:00:00.000000000', '2016-09-21T00:00:00.000000000'],\n", | |
" dtype='datetime64[ns]')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>x</span></div><div class='xr-var-dims'>(node)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(511400,), meta=np.ndarray></div><input id='attrs-35b19260-55d0-4dd0-ac35-30ac200b6ae6' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-35b19260-55d0-4dd0-ac35-30ac200b6ae6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-45a71996-d4d2-4b85-a472-0e75147310ad' class='xr-var-data-in' type='checkbox'><label for='data-45a71996-d4d2-4b85-a472-0e75147310ad' 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>long_name :</span></dt><dd>longitude</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>positive :</span></dt><dd>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> 97.54 MiB </td>\n", | |
" <td> 3.90 MiB </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Shape </th>\n", | |
" <td> (12784991,) </td>\n", | |
" <td> (511400,) </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Dask graph </th>\n", | |
" <td colspan=\"2\"> 25 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=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"4\" y1=\"0\" x2=\"4\" y2=\"25\" />\n", | |
" <line x1=\"9\" y1=\"0\" x2=\"9\" y2=\"25\" />\n", | |
" <line x1=\"14\" y1=\"0\" x2=\"14\" y2=\"25\" />\n", | |
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n", | |
" <line x1=\"28\" y1=\"0\" x2=\"28\" y2=\"25\" />\n", | |
" <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n", | |
" <line x1=\"43\" y1=\"0\" x2=\"43\" y2=\"25\" />\n", | |
" <line x1=\"48\" y1=\"0\" x2=\"48\" y2=\"25\" />\n", | |
" <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n", | |
" <line x1=\"62\" y1=\"0\" x2=\"62\" y2=\"25\" />\n", | |
" <line x1=\"67\" y1=\"0\" x2=\"67\" y2=\"25\" />\n", | |
" <line x1=\"72\" y1=\"0\" x2=\"72\" y2=\"25\" />\n", | |
" <line x1=\"81\" y1=\"0\" x2=\"81\" y2=\"25\" />\n", | |
" <line x1=\"86\" y1=\"0\" x2=\"86\" y2=\"25\" />\n", | |
" <line x1=\"91\" y1=\"0\" x2=\"91\" y2=\"25\" />\n", | |
" <line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"25\" />\n", | |
" <line x1=\"105\" y1=\"0\" x2=\"105\" y2=\"25\" />\n", | |
" <line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"25\" />\n", | |
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >12784991</text>\n", | |
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n", | |
"</svg>\n", | |
" </td>\n", | |
" </tr>\n", | |
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y</span></div><div class='xr-var-dims'>(node)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(511400,), meta=np.ndarray></div><input id='attrs-2a05b1fd-8543-4bee-b4b5-53d128d6bb75' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2a05b1fd-8543-4bee-b4b5-53d128d6bb75' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3a6ce7e5-40ce-48d9-8f59-ea119ed0e809' class='xr-var-data-in' type='checkbox'><label for='data-3a6ce7e5-40ce-48d9-8f59-ea119ed0e809' 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>long_name :</span></dt><dd>latitude</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>positive :</span></dt><dd>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> 97.54 MiB </td>\n", | |
" <td> 3.90 MiB </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Shape </th>\n", | |
" <td> (12784991,) </td>\n", | |
" <td> (511400,) </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Dask graph </th>\n", | |
" <td colspan=\"2\"> 25 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=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"4\" y1=\"0\" x2=\"4\" y2=\"25\" />\n", | |
" <line x1=\"9\" y1=\"0\" x2=\"9\" y2=\"25\" />\n", | |
" <line x1=\"14\" y1=\"0\" x2=\"14\" y2=\"25\" />\n", | |
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n", | |
" <line x1=\"28\" y1=\"0\" x2=\"28\" y2=\"25\" />\n", | |
" <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n", | |
" <line x1=\"43\" y1=\"0\" x2=\"43\" y2=\"25\" />\n", | |
" <line x1=\"48\" y1=\"0\" x2=\"48\" y2=\"25\" />\n", | |
" <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n", | |
" <line x1=\"62\" y1=\"0\" x2=\"62\" y2=\"25\" />\n", | |
" <line x1=\"67\" y1=\"0\" x2=\"67\" y2=\"25\" />\n", | |
" <line x1=\"72\" y1=\"0\" x2=\"72\" y2=\"25\" />\n", | |
" <line x1=\"81\" y1=\"0\" x2=\"81\" y2=\"25\" />\n", | |
" <line x1=\"86\" y1=\"0\" x2=\"86\" y2=\"25\" />\n", | |
" <line x1=\"91\" y1=\"0\" x2=\"91\" y2=\"25\" />\n", | |
" <line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"25\" />\n", | |
" <line x1=\"105\" y1=\"0\" x2=\"105\" y2=\"25\" />\n", | |
" <line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"25\" />\n", | |
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >12784991</text>\n", | |
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n", | |
"</svg>\n", | |
" </td>\n", | |
" </tr>\n", | |
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-790bd809-bfca-4beb-a073-b5356a0dfd47' class='xr-section-summary-in' type='checkbox' ><label for='section-790bd809-bfca-4beb-a073-b5356a0dfd47' class='xr-section-summary' >Indexes: <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-index-name'><div>time</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-30649ebd-2ab3-4013-bfae-08ac9f295976' class='xr-index-data-in' type='checkbox'/><label for='index-30649ebd-2ab3-4013-bfae-08ac9f295976' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex(['2016-09-01 12:00:00', '2016-09-02 00:00:00',\n", | |
" '2016-09-02 12:00:00', '2016-09-03 00:00:00',\n", | |
" '2016-09-03 12:00:00', '2016-09-04 00:00:00',\n", | |
" '2016-09-04 12:00:00', '2016-09-05 00:00:00',\n", | |
" '2016-09-05 12:00:00', '2016-09-06 00:00:00',\n", | |
" '2016-09-06 12:00:00', '2016-09-07 00:00:00',\n", | |
" '2016-09-07 12:00:00', '2016-09-08 00:00:00',\n", | |
" '2016-09-08 12:00:00', '2016-09-09 00:00:00',\n", | |
" '2016-09-09 12:00:00', '2016-09-10 00:00:00',\n", | |
" '2016-09-10 12:00:00', '2016-09-11 00:00:00',\n", | |
" '2016-09-11 12:00:00', '2016-09-12 00:00:00',\n", | |
" '2016-09-12 12:00:00', '2016-09-13 00:00:00',\n", | |
" '2016-09-13 12:00:00', '2016-09-14 00:00:00',\n", | |
" '2016-09-14 12:00:00', '2016-09-15 00:00:00',\n", | |
" '2016-09-15 12:00:00', '2016-09-16 00:00:00',\n", | |
" '2016-09-16 12:00:00', '2016-09-17 00:00:00',\n", | |
" '2016-09-17 12:00:00', '2016-09-18 00:00:00',\n", | |
" '2016-09-18 12:00:00', '2016-09-19 00:00:00',\n", | |
" '2016-09-19 12:00:00', '2016-09-20 00:00:00',\n", | |
" '2016-09-20 12:00:00', '2016-09-21 00:00:00'],\n", | |
" dtype='datetime64[ns]', name='time', freq=None))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-755a25cb-8996-40c4-b180-38bbd77ceeb6' class='xr-section-summary-in' type='checkbox' checked><label for='section-755a25cb-8996-40c4-b180-38bbd77ceeb6' 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>long_name :</span></dt><dd>water surface elevation above geoid</dd><dt><span>standard_name :</span></dt><dd>sea_surface_height_above_geoid</dd><dt><span>location :</span></dt><dd>node</dd><dt><span>mesh :</span></dt><dd>adcirc_mesh</dd><dt><span>units :</span></dt><dd>m</dd></dl></div></li></ul></div></div>" | |
], | |
"text/plain": [ | |
"<xarray.DataArray 'zeta' (time: 40, node: 12784991)>\n", | |
"dask.array<open_dataset-9d8ed5545d2239c017b6d200f9ff4ff0zeta, shape=(40, 12784991), dtype=float64, chunksize=(1, 511400), chunktype=numpy.ndarray>\n", | |
"Coordinates:\n", | |
" * time (time) datetime64[ns] 2016-09-01T12:00:00 2016-09-02 ... 2016-09-21\n", | |
" x (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
" y (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
"Dimensions without coordinates: node\n", | |
"Attributes:\n", | |
" long_name: water surface elevation above geoid\n", | |
" standard_name: sea_surface_height_above_geoid\n", | |
" location: node\n", | |
" mesh: adcirc_mesh\n", | |
" units: m" | |
] | |
}, | |
"execution_count": 11, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ds['zeta']" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"How many GB of sea surface height data do we have?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"4.09119712" | |
] | |
}, | |
"execution_count": 12, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ds['zeta'].nbytes/1.e9" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Use a Dask Cluster to speed up calculations" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Use a Dask Distributed LocalCluster" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#from dask.distributed import LocalCluster, Client" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#cluster = LocalCluster()\n", | |
"#client = Client(cluster)\n", | |
"#client" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#client.close()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"We want to take the maximum over the time dimension. Let's use a Dask cluster to distribute the memory and compute load, getting our work done faster!" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 16, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import os\n", | |
"import configparser\n", | |
"\n", | |
"def set_credentials(profile='default', region='us-west-2', endpoint=None, cfile=None):\n", | |
" # Set AWS environment variables based on profile from the user credentials file\n", | |
" cp = configparser.ConfigParser()\n", | |
" if not cfile:\n", | |
" cfile=os.path.expanduser('~/.aws/credentials')\n", | |
" if not endpoint:\n", | |
" endpoint=f's3.{region}.amazonaws.com'\n", | |
" cp.read(cfile)\n", | |
" os.environ['aws_access_key_id'.upper()] = cp[profile]['aws_access_key_id'] \n", | |
" os.environ['aws_secret_access_key'.upper()] = cp[profile]['aws_secret_access_key'] \n", | |
" os.environ['aws_s3_endpoint'.upper()] = endpoint\n", | |
" os.environ['aws_region'.upper()] = region" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"set_credentials()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"os.environ.update()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from dask_gateway import Gateway\n", | |
"import os\n", | |
"# instantiate dask gateway\n", | |
"gateway = Gateway()\n", | |
"\n", | |
"# specify cluster options\n", | |
"options = gateway.cluster_options()\n", | |
"options.conda_environment='users/users-pangeo'\n", | |
"options.profile = 'Medium Worker' # 2 threads/worker\n", | |
"\n", | |
"# set environment variables for cluster workers (including AWS credential environment variables)\n", | |
"options.environment_vars = dict(os.environ)\n", | |
"\n", | |
"# create new cluster\n", | |
"cluster = gateway.new_cluster(options)\n", | |
"\n", | |
"# get the client for the cluster\n", | |
"client = cluster.get_client()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 20, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"CPU times: user 2.43 ms, sys: 0 ns, total: 2.43 ms\n", | |
"Wall time: 6.34 ms\n" | |
] | |
} | |
], | |
"source": [ | |
"%%time\n", | |
"n_workers=30\n", | |
"cluster.scale(n_workers)\n", | |
"#client.wait_for_workers(n_workers=n_workers)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 21, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\"> </div>\n", | |
" <div style=\"margin-left: 48px;\">\n", | |
" <h3 style=\"margin-bottom: 0px;\">Client</h3>\n", | |
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-81ec0e33-56f8-11ee-828e-b6b13b65153d</p>\n", | |
" <table style=\"width: 100%; text-align: left;\">\n", | |
"\n", | |
" <tr>\n", | |
" \n", | |
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n", | |
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> dask_gateway.GatewayCluster</td>\n", | |
" \n", | |
" </tr>\n", | |
"\n", | |
" \n", | |
" <tr>\n", | |
" <td style=\"text-align: left;\">\n", | |
" <strong>Dashboard: </strong> <a href=\"https://nebari.esipfed.org/gateway/clusters/dev.bdfaccdf504b4547bb4a802489537821/status\" target=\"_blank\">https://nebari.esipfed.org/gateway/clusters/dev.bdfaccdf504b4547bb4a802489537821/status</a>\n", | |
" </td>\n", | |
" <td style=\"text-align: left;\"></td>\n", | |
" </tr>\n", | |
" \n", | |
"\n", | |
" </table>\n", | |
"\n", | |
" \n", | |
"\n", | |
" \n", | |
" <details>\n", | |
" <summary style=\"margin-bottom: 20px;\"><h3 style=\"display: inline;\">Cluster Info</h3></summary>\n", | |
" <div style='background-color: #f2f2f2; display: inline-block; padding: 10px; border: 1px solid #999999;'>\n", | |
" <h3>GatewayCluster</h3>\n", | |
" <ul>\n", | |
" <li><b>Name: </b>dev.bdfaccdf504b4547bb4a802489537821\n", | |
" <li><b>Dashboard: </b><a href='https://nebari.esipfed.org/gateway/clusters/dev.bdfaccdf504b4547bb4a802489537821/status' target='_blank'>https://nebari.esipfed.org/gateway/clusters/dev.bdfaccdf504b4547bb4a802489537821/status</a>\n", | |
" </ul>\n", | |
"</div>\n", | |
"\n", | |
" </details>\n", | |
" \n", | |
"\n", | |
" </div>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
"<Client: 'tls://10.10.106.121:8786' processes=0 threads=0, memory=0 B>" | |
] | |
}, | |
"execution_count": 21, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"client" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#client.close()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Find the maximum water level at each grid cell over the entire storm\n", | |
"This is the compute intensive step, reading all the elevation data" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"CPU times: user 609 ms, sys: 416 ms, total: 1.02 s\n", | |
"Wall time: 2min\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 jupyterlab.\n", | |
" *\n", | |
" */\n", | |
"\n", | |
":root {\n", | |
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
" --xr-background-color: var(--jp-layout-color0, white);\n", | |
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
"}\n", | |
"\n", | |
"html[theme=dark],\n", | |
"body[data-theme=dark],\n", | |
"body.vscode-dark {\n", | |
" --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
" --xr-border-color: #1F1F1F;\n", | |
" --xr-disabled-color: #515151;\n", | |
" --xr-background-color: #111111;\n", | |
" --xr-background-color-row-even: #111111;\n", | |
" --xr-background-color-row-odd: #313131;\n", | |
"}\n", | |
"\n", | |
".xr-wrap {\n", | |
" display: block !important;\n", | |
" min-width: 300px;\n", | |
" max-width: 700px;\n", | |
"}\n", | |
"\n", | |
".xr-text-repr-fallback {\n", | |
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-header {\n", | |
" padding-top: 6px;\n", | |
" padding-bottom: 6px;\n", | |
" margin-bottom: 4px;\n", | |
" border-bottom: solid 1px var(--xr-border-color);\n", | |
"}\n", | |
"\n", | |
".xr-header > div,\n", | |
".xr-header > ul {\n", | |
" display: inline;\n", | |
" margin-top: 0;\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type,\n", | |
".xr-array-name {\n", | |
" margin-left: 2px;\n", | |
" margin-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-sections {\n", | |
" padding-left: 0 !important;\n", | |
" display: grid;\n", | |
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n", | |
"}\n", | |
"\n", | |
".xr-section-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input + label {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label {\n", | |
" cursor: pointer;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label:hover {\n", | |
" color: var(--xr-font-color0);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary {\n", | |
" grid-column: 1;\n", | |
" color: var(--xr-font-color2);\n", | |
" font-weight: 500;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary > span {\n", | |
" display: inline-block;\n", | |
" padding-left: 0.5em;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in + label:before {\n", | |
" display: inline-block;\n", | |
" content: '►';\n", | |
" font-size: 11px;\n", | |
" width: 15px;\n", | |
" text-align: center;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label:before {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label:before {\n", | |
" content: '▼';\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label > span {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary,\n", | |
".xr-section-inline-details {\n", | |
" padding-top: 4px;\n", | |
" padding-bottom: 4px;\n", | |
"}\n", | |
"\n", | |
".xr-section-inline-details {\n", | |
" grid-column: 2 / -1;\n", | |
"}\n", | |
"\n", | |
".xr-section-details {\n", | |
" display: none;\n", | |
" grid-column: 1 / -1;\n", | |
" margin-bottom: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap {\n", | |
" grid-column: 1 / -1;\n", | |
" display: grid;\n", | |
" grid-template-columns: 20px auto;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap > label {\n", | |
" grid-column: 1;\n", | |
" vertical-align: top;\n", | |
"}\n", | |
"\n", | |
".xr-preview {\n", | |
" color: var(--xr-font-color3);\n", | |
"}\n", | |
"\n", | |
".xr-array-preview,\n", | |
".xr-array-data {\n", | |
" padding: 0 5px !important;\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-array-data,\n", | |
".xr-array-in:checked ~ .xr-array-preview {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-array-in:checked ~ .xr-array-data,\n", | |
".xr-array-preview {\n", | |
" display: inline-block;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list {\n", | |
" display: inline-block !important;\n", | |
" list-style: none;\n", | |
" padding: 0 !important;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li {\n", | |
" display: inline-block;\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:before {\n", | |
" content: '(';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:after {\n", | |
" content: ')';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li:not(:last-child):after {\n", | |
" content: ',';\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-has-index {\n", | |
" font-weight: bold;\n", | |
"}\n", | |
"\n", | |
".xr-var-list,\n", | |
".xr-var-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > div,\n", | |
".xr-var-item label,\n", | |
".xr-var-item > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-even);\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > .xr-var-name:hover span {\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-var-list > li:nth-child(odd) > div,\n", | |
".xr-var-list > li:nth-child(odd) > label,\n", | |
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-odd);\n", | |
"}\n", | |
"\n", | |
".xr-var-name {\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-dims {\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-var-dtype {\n", | |
" grid-column: 3;\n", | |
" text-align: right;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-preview {\n", | |
" grid-column: 4;\n", | |
"}\n", | |
"\n", | |
".xr-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", | |
" background-color: var(--xr-background-color) !important;\n", | |
" padding-bottom: 5px !important;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
".xr-var-data-in:checked ~ .xr-var-data,\n", | |
".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-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", | |
"</style><pre class='xr-text-repr-fallback'><xarray.DataArray 'zeta' (node: 12784991)>\n", | |
"array([nan, nan, nan, ..., nan, nan, nan])\n", | |
"Coordinates:\n", | |
" x (node) float64 -73.68 -73.68 -73.68 -73.68 ... -90.07 -90.07 -90.07\n", | |
" y (node) float64 42.75 42.75 42.75 42.75 ... 30.03 30.03 30.03 30.03\n", | |
"Dimensions without coordinates: node</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'zeta'</div><ul class='xr-dim-list'><li><span>node</span>: 12784991</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-d1cbe03c-a07c-4f1b-94c7-efd24809c1a7' class='xr-array-in' type='checkbox' checked><label for='section-d1cbe03c-a07c-4f1b-94c7-efd24809c1a7' 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>nan nan nan nan nan nan nan nan ... nan nan nan nan nan nan nan nan</span></div><div class='xr-array-data'><pre>array([nan, nan, nan, ..., nan, nan, nan])</pre></div></div></li><li class='xr-section-item'><input id='section-debe042d-d0b8-4481-942b-dd5190ae8e44' class='xr-section-summary-in' type='checkbox' checked><label for='section-debe042d-d0b8-4481-942b-dd5190ae8e44' class='xr-section-summary' >Coordinates: <span>(2)</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>x</span></div><div class='xr-var-dims'>(node)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-73.68 -73.68 ... -90.07 -90.07</div><input id='attrs-fa29bf63-5290-40a8-985e-e655f11d9845' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-fa29bf63-5290-40a8-985e-e655f11d9845' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f690758c-3805-4749-a4fa-a52c0aafe92c' class='xr-var-data-in' type='checkbox'><label for='data-f690758c-3805-4749-a4fa-a52c0aafe92c' 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>long_name :</span></dt><dd>longitude</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>positive :</span></dt><dd>east</dd></dl></div><div class='xr-var-data'><pre>array([-73.68031409, -73.67945506, -73.6817845 , ..., -90.07315326,\n", | |
" -90.07274919, -90.07417811])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y</span></div><div class='xr-var-dims'>(node)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>42.75 42.75 42.75 ... 30.03 30.03</div><input id='attrs-33a16573-6ba2-457d-9419-774d99bdb14c' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-33a16573-6ba2-457d-9419-774d99bdb14c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a64cb1ef-a00e-4700-a9c0-c6739e4bd249' class='xr-var-data-in' type='checkbox'><label for='data-a64cb1ef-a00e-4700-a9c0-c6739e4bd249' 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>long_name :</span></dt><dd>latitude</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>positive :</span></dt><dd>north</dd></dl></div><div class='xr-var-data'><pre>array([42.75262564, 42.75110441, 42.75268602, ..., 30.02664339,\n", | |
" 30.0281029 , 30.02739188])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-4f04ba80-6750-4955-8801-2f884bdbc117' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-4f04ba80-6750-4955-8801-2f884bdbc117' class='xr-section-summary' title='Expand/collapse section'>Indexes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-227a81c4-2be8-4604-88dc-bc36f1bb6710' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-227a81c4-2be8-4604-88dc-bc36f1bb6710' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>" | |
], | |
"text/plain": [ | |
"<xarray.DataArray 'zeta' (node: 12784991)>\n", | |
"array([nan, nan, nan, ..., nan, nan, nan])\n", | |
"Coordinates:\n", | |
" x (node) float64 -73.68 -73.68 -73.68 -73.68 ... -90.07 -90.07 -90.07\n", | |
" y (node) float64 42.75 42.75 42.75 42.75 ... 30.03 30.03 30.03 30.03\n", | |
"Dimensions without coordinates: node" | |
] | |
}, | |
"execution_count": 23, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"%%time\n", | |
"max_var = ds['zeta'].max(dim='time').compute()\n", | |
"max_var" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Visualize data on mesh using HoloViz.org tools" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 24, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"application/javascript": [ | |
"(function(root) {\n", | |
" function now() {\n", | |
" return new Date();\n", | |
" }\n", | |
"\n", | |
" var force = true;\n", | |
" var py_version = '3.2.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n", | |
" var is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1;\n", | |
" var reloading = false;\n", | |
" var Bokeh = root.Bokeh;\n", | |
" var bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n", | |
"\n", | |
" if (typeof (root._bokeh_timeout) === \"undefined\" || force) {\n", | |
" root._bokeh_timeout = Date.now() + 5000;\n", | |
" root._bokeh_failed_load = false;\n", | |
" }\n", | |
"\n", | |
" function run_callbacks() {\n", | |
" try {\n", | |
" root._bokeh_onload_callbacks.forEach(function(callback) {\n", | |
" if (callback != null)\n", | |
" callback();\n", | |
" });\n", | |
" } finally {\n", | |
" delete root._bokeh_onload_callbacks;\n", | |
" }\n", | |
" console.debug(\"Bokeh: all callbacks have finished\");\n", | |
" }\n", | |
"\n", | |
" function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n", | |
" if (css_urls == null) css_urls = [];\n", | |
" if (js_urls == null) js_urls = [];\n", | |
" if (js_modules == null) js_modules = [];\n", | |
" if (js_exports == null) js_exports = {};\n", | |
"\n", | |
" root._bokeh_onload_callbacks.push(callback);\n", | |
"\n", | |
" if (root._bokeh_is_loading > 0) {\n", | |
" console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", | |
" return null;\n", | |
" }\n", | |
" if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n", | |
" run_callbacks();\n", | |
" return null;\n", | |
" }\n", | |
" if (!reloading) {\n", | |
" console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
" }\n", | |
"\n", | |
" function on_load() {\n", | |
" root._bokeh_is_loading--;\n", | |
" if (root._bokeh_is_loading === 0) {\n", | |
" console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n", | |
" run_callbacks()\n", | |
" }\n", | |
" }\n", | |
" window._bokeh_on_load = on_load\n", | |
"\n", | |
" function on_error() {\n", | |
" console.error(\"failed to load \" + url);\n", | |
" }\n", | |
"\n", | |
" var skip = [];\n", | |
" if (window.requirejs) {\n", | |
" window.requirejs.config({'packages': {}, 'paths': {'jspanel': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/jspanel', 'jspanel-modal': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/modal/jspanel.modal', 'jspanel-tooltip': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/tooltip/jspanel.tooltip', 'jspanel-hint': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/hint/jspanel.hint', 'jspanel-layout': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/layout/jspanel.layout', 'jspanel-contextmenu': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/contextmenu/jspanel.contextmenu', 'jspanel-dock': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/dock/jspanel.dock', 'gridstack': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/gridstack-all', 'notyf': 'https://cdn.jsdelivr.net/npm/notyf@3/notyf.min'}, 'shim': {'jspanel': {'exports': 'jsPanel'}, 'gridstack': {'exports': 'GridStack'}}});\n", | |
" require([\"jspanel\"], function(jsPanel) {\n", | |
"\twindow.jsPanel = jsPanel\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-modal\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-tooltip\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-hint\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-layout\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-contextmenu\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-dock\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"gridstack\"], function(GridStack) {\n", | |
"\twindow.GridStack = GridStack\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"notyf\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" root._bokeh_is_loading = css_urls.length + 9;\n", | |
" } else {\n", | |
" root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n", | |
" }\n", | |
"\n", | |
" var existing_stylesheets = []\n", | |
" var links = document.getElementsByTagName('link')\n", | |
" for (var i = 0; i < links.length; i++) {\n", | |
" var link = links[i]\n", | |
" if (link.href != null) {\n", | |
"\texisting_stylesheets.push(link.href)\n", | |
" }\n", | |
" }\n", | |
" for (var i = 0; i < css_urls.length; i++) {\n", | |
" var url = css_urls[i];\n", | |
" if (existing_stylesheets.indexOf(url) !== -1) {\n", | |
"\ton_load()\n", | |
"\tcontinue;\n", | |
" }\n", | |
" const element = document.createElement(\"link\");\n", | |
" element.onload = on_load;\n", | |
" element.onerror = on_error;\n", | |
" element.rel = \"stylesheet\";\n", | |
" element.type = \"text/css\";\n", | |
" element.href = url;\n", | |
" console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n", | |
" document.body.appendChild(element);\n", | |
" } if (((window['jsPanel'] !== undefined) && (!(window['jsPanel'] instanceof HTMLElement))) || window.requirejs) {\n", | |
" var urls = ['https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/jspanel.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/modal/jspanel.modal.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/tooltip/jspanel.tooltip.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/hint/jspanel.hint.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/layout/jspanel.layout.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/contextmenu/jspanel.contextmenu.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/dock/jspanel.dock.js'];\n", | |
" for (var i = 0; i < urls.length; i++) {\n", | |
" skip.push(urls[i])\n", | |
" }\n", | |
" } if (((window['GridStack'] !== undefined) && (!(window['GridStack'] instanceof HTMLElement))) || window.requirejs) {\n", | |
" var urls = ['https://cdn.holoviz.org/panel/1.2.1/dist/bundled/gridstack/[email protected]/dist/gridstack-all.js'];\n", | |
" for (var i = 0; i < urls.length; i++) {\n", | |
" skip.push(urls[i])\n", | |
" }\n", | |
" } if (((window['Notyf'] !== undefined) && (!(window['Notyf'] instanceof HTMLElement))) || window.requirejs) {\n", | |
" var urls = ['https://cdn.holoviz.org/panel/1.2.1/dist/bundled/notificationarea/notyf@3/notyf.min.js'];\n", | |
" for (var i = 0; i < urls.length; i++) {\n", | |
" skip.push(urls[i])\n", | |
" }\n", | |
" } var existing_scripts = []\n", | |
" var scripts = document.getElementsByTagName('script')\n", | |
" for (var i = 0; i < scripts.length; i++) {\n", | |
" var script = scripts[i]\n", | |
" if (script.src != null) {\n", | |
"\texisting_scripts.push(script.src)\n", | |
" }\n", | |
" }\n", | |
" for (var i = 0; i < js_urls.length; i++) {\n", | |
" var url = js_urls[i];\n", | |
" if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n", | |
"\tif (!window.requirejs) {\n", | |
"\t on_load();\n", | |
"\t}\n", | |
"\tcontinue;\n", | |
" }\n", | |
" var element = document.createElement('script');\n", | |
" element.onload = on_load;\n", | |
" element.onerror = on_error;\n", | |
" element.async = false;\n", | |
" element.src = url;\n", | |
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
" document.head.appendChild(element);\n", | |
" }\n", | |
" for (var i = 0; i < js_modules.length; i++) {\n", | |
" var url = js_modules[i];\n", | |
" if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n", | |
"\tif (!window.requirejs) {\n", | |
"\t on_load();\n", | |
"\t}\n", | |
"\tcontinue;\n", | |
" }\n", | |
" var element = document.createElement('script');\n", | |
" element.onload = on_load;\n", | |
" element.onerror = on_error;\n", | |
" element.async = false;\n", | |
" element.src = url;\n", | |
" element.type = \"module\";\n", | |
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
" document.head.appendChild(element);\n", | |
" }\n", | |
" for (const name in js_exports) {\n", | |
" var url = js_exports[name];\n", | |
" if (skip.indexOf(url) >= 0 || root[name] != null) {\n", | |
"\tif (!window.requirejs) {\n", | |
"\t on_load();\n", | |
"\t}\n", | |
"\tcontinue;\n", | |
" }\n", | |
" var element = document.createElement('script');\n", | |
" element.onerror = on_error;\n", | |
" element.async = false;\n", | |
" element.type = \"module\";\n", | |
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
" element.textContent = `\n", | |
" import ${name} from \"${url}\"\n", | |
" window.${name} = ${name}\n", | |
" window._bokeh_on_load()\n", | |
" `\n", | |
" document.head.appendChild(element);\n", | |
" }\n", | |
" if (!js_urls.length && !js_modules.length) {\n", | |
" on_load()\n", | |
" }\n", | |
" };\n", | |
"\n", | |
" function inject_raw_css(css) {\n", | |
" const element = document.createElement(\"style\");\n", | |
" element.appendChild(document.createTextNode(css));\n", | |
" document.body.appendChild(element);\n", | |
" }\n", | |
"\n", | |
" var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.2.2.min.js\", \"https://cdn.holoviz.org/panel/1.2.1/dist/panel.min.js\", \"https://cdn.jsdelivr.net/npm/@holoviz/[email protected]/dist/geoviews.min.js\"];\n", | |
" var js_modules = [];\n", | |
" var js_exports = {};\n", | |
" var css_urls = [];\n", | |
" var inline_js = [ function(Bokeh) {\n", | |
" Bokeh.set_log_level(\"info\");\n", | |
" },\n", | |
"function(Bokeh) {} // ensure no trailing comma for IE\n", | |
" ];\n", | |
"\n", | |
" function run_inline_js() {\n", | |
" if ((root.Bokeh !== undefined) || (force === true)) {\n", | |
" for (var i = 0; i < inline_js.length; i++) {\n", | |
" inline_js[i].call(root, root.Bokeh);\n", | |
" }\n", | |
" // Cache old bokeh versions\n", | |
" if (Bokeh != undefined && !reloading) {\n", | |
"\tvar NewBokeh = root.Bokeh;\n", | |
"\tif (Bokeh.versions === undefined) {\n", | |
"\t Bokeh.versions = new Map();\n", | |
"\t}\n", | |
"\tif (NewBokeh.version !== Bokeh.version) {\n", | |
"\t Bokeh.versions.set(NewBokeh.version, NewBokeh)\n", | |
"\t}\n", | |
"\troot.Bokeh = Bokeh;\n", | |
" }} else if (Date.now() < root._bokeh_timeout) {\n", | |
" setTimeout(run_inline_js, 100);\n", | |
" } else if (!root._bokeh_failed_load) {\n", | |
" console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", | |
" root._bokeh_failed_load = true;\n", | |
" }\n", | |
" root._bokeh_is_initializing = false\n", | |
" }\n", | |
"\n", | |
" function load_or_wait() {\n", | |
" // Implement a backoff loop that tries to ensure we do not load multiple\n", | |
" // versions of Bokeh and its dependencies at the same time.\n", | |
" // In recent versions we use the root._bokeh_is_initializing flag\n", | |
" // to determine whether there is an ongoing attempt to initialize\n", | |
" // bokeh, however for backward compatibility we also try to ensure\n", | |
" // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n", | |
" // before older versions are fully initialized.\n", | |
" if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n", | |
" root._bokeh_is_initializing = false;\n", | |
" root._bokeh_onload_callbacks = undefined;\n", | |
" console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n", | |
" load_or_wait();\n", | |
" } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n", | |
" setTimeout(load_or_wait, 100);\n", | |
" } else {\n", | |
" Bokeh = root.Bokeh;\n", | |
" bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n", | |
" root._bokeh_is_initializing = true\n", | |
" root._bokeh_onload_callbacks = []\n", | |
" if (!reloading && (!bokeh_loaded || is_dev)) {\n", | |
"\troot.Bokeh = undefined;\n", | |
" }\n", | |
" load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n", | |
"\tconsole.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n", | |
"\trun_inline_js();\n", | |
" });\n", | |
" }\n", | |
" }\n", | |
" // Give older versions of the autoload script a head-start to ensure\n", | |
" // they initialize before we start loading newer version.\n", | |
" setTimeout(load_or_wait, 100)\n", | |
"}(window));" | |
], | |
"application/vnd.holoviews_load.v0+json": "(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n var py_version = '3.2.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n var is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1;\n var reloading = false;\n var Bokeh = root.Bokeh;\n var bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n\n if (typeof (root._bokeh_timeout) === \"undefined\" || force) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n run_callbacks();\n return null;\n }\n if (!reloading) {\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error() {\n console.error(\"failed to load \" + url);\n }\n\n var skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {'jspanel': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/jspanel', 'jspanel-modal': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/modal/jspanel.modal', 'jspanel-tooltip': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/tooltip/jspanel.tooltip', 'jspanel-hint': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/hint/jspanel.hint', 'jspanel-layout': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/layout/jspanel.layout', 'jspanel-contextmenu': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/contextmenu/jspanel.contextmenu', 'jspanel-dock': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/extensions/dock/jspanel.dock', 'gridstack': 'https://cdn.jsdelivr.net/npm/[email protected]/dist/gridstack-all', 'notyf': 'https://cdn.jsdelivr.net/npm/notyf@3/notyf.min'}, 'shim': {'jspanel': {'exports': 'jsPanel'}, 'gridstack': {'exports': 'GridStack'}}});\n require([\"jspanel\"], function(jsPanel) {\n\twindow.jsPanel = jsPanel\n\ton_load()\n })\n require([\"jspanel-modal\"], function() {\n\ton_load()\n })\n require([\"jspanel-tooltip\"], function() {\n\ton_load()\n })\n require([\"jspanel-hint\"], function() {\n\ton_load()\n })\n require([\"jspanel-layout\"], function() {\n\ton_load()\n })\n require([\"jspanel-contextmenu\"], function() {\n\ton_load()\n })\n require([\"jspanel-dock\"], function() {\n\ton_load()\n })\n require([\"gridstack\"], function(GridStack) {\n\twindow.GridStack = GridStack\n\ton_load()\n })\n require([\"notyf\"], function() {\n\ton_load()\n })\n root._bokeh_is_loading = css_urls.length + 9;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n var existing_stylesheets = []\n var links = document.getElementsByTagName('link')\n for (var i = 0; i < links.length; i++) {\n var link = links[i]\n if (link.href != null) {\n\texisting_stylesheets.push(link.href)\n }\n }\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n if (existing_stylesheets.indexOf(url) !== -1) {\n\ton_load()\n\tcontinue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } if (((window['jsPanel'] !== undefined) && (!(window['jsPanel'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/jspanel.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/modal/jspanel.modal.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/tooltip/jspanel.tooltip.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/hint/jspanel.hint.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/layout/jspanel.layout.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/contextmenu/jspanel.contextmenu.js', 'https://cdn.holoviz.org/panel/1.2.1/dist/bundled/floatpanel/[email protected]/dist/extensions/dock/jspanel.dock.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['GridStack'] !== undefined) && (!(window['GridStack'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.1/dist/bundled/gridstack/[email protected]/dist/gridstack-all.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['Notyf'] !== undefined) && (!(window['Notyf'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.1/dist/bundled/notificationarea/notyf@3/notyf.min.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } var existing_scripts = []\n var scripts = document.getElementsByTagName('script')\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n\texisting_scripts.push(script.src)\n }\n }\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (var i = 0; i < js_modules.length; i++) {\n var url = js_modules[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (const name in js_exports) {\n var url = js_exports[name];\n if (skip.indexOf(url) >= 0 || root[name] != null) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onerror = on_error;\n element.async = false;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n element.textContent = `\n import ${name} from \"${url}\"\n window.${name} = ${name}\n window._bokeh_on_load()\n `\n document.head.appendChild(element);\n }\n if (!js_urls.length && !js_modules.length) {\n on_load()\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.2.2.min.js\", \"https://cdn.holoviz.org/panel/1.2.1/dist/panel.min.js\", \"https://cdn.jsdelivr.net/npm/@holoviz/[email protected]/dist/geoviews.min.js\"];\n var js_modules = [];\n var js_exports = {};\n var css_urls = [];\n var inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n ];\n\n function run_inline_js() {\n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n // Cache old bokeh versions\n if (Bokeh != undefined && !reloading) {\n\tvar NewBokeh = root.Bokeh;\n\tif (Bokeh.versions === undefined) {\n\t Bokeh.versions = new Map();\n\t}\n\tif (NewBokeh.version !== Bokeh.version) {\n\t Bokeh.versions.set(NewBokeh.version, NewBokeh)\n\t}\n\troot.Bokeh = Bokeh;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n }\n root._bokeh_is_initializing = false\n }\n\n function load_or_wait() {\n // Implement a backoff loop that tries to ensure we do not load multiple\n // versions of Bokeh and its dependencies at the same time.\n // In recent versions we use the root._bokeh_is_initializing flag\n // to determine whether there is an ongoing attempt to initialize\n // bokeh, however for backward compatibility we also try to ensure\n // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n // before older versions are fully initialized.\n if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n root._bokeh_is_initializing = false;\n root._bokeh_onload_callbacks = undefined;\n console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n load_or_wait();\n } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n setTimeout(load_or_wait, 100);\n } else {\n Bokeh = root.Bokeh;\n bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n root._bokeh_is_initializing = true\n root._bokeh_onload_callbacks = []\n if (!reloading && (!bokeh_loaded || is_dev)) {\n\troot.Bokeh = undefined;\n }\n load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n\tconsole.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n\trun_inline_js();\n });\n }\n }\n // Give older versions of the autoload script a head-start to ensure\n // they initialize before we start loading newer version.\n setTimeout(load_or_wait, 100)\n}(window));" | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"application/javascript": [ | |
"\n", | |
"if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n", | |
" window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n", | |
"}\n", | |
"\n", | |
"\n", | |
" function JupyterCommManager() {\n", | |
" }\n", | |
"\n", | |
" JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n", | |
" if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n", | |
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n", | |
" comm_manager.register_target(comm_id, function(comm) {\n", | |
" comm.on_msg(msg_handler);\n", | |
" });\n", | |
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n", | |
" window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n", | |
" comm.onMsg = msg_handler;\n", | |
" });\n", | |
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n", | |
" google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n", | |
" var messages = comm.messages[Symbol.asyncIterator]();\n", | |
" function processIteratorResult(result) {\n", | |
" var message = result.value;\n", | |
" console.log(message)\n", | |
" var content = {data: message.data, comm_id};\n", | |
" var buffers = []\n", | |
" for (var buffer of message.buffers || []) {\n", | |
" buffers.push(new DataView(buffer))\n", | |
" }\n", | |
" var metadata = message.metadata || {};\n", | |
" var msg = {content, buffers, metadata}\n", | |
" msg_handler(msg);\n", | |
" return messages.next().then(processIteratorResult);\n", | |
" }\n", | |
" return messages.next().then(processIteratorResult);\n", | |
" })\n", | |
" }\n", | |
" }\n", | |
"\n", | |
" JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n", | |
" if (comm_id in window.PyViz.comms) {\n", | |
" return window.PyViz.comms[comm_id];\n", | |
" } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n", | |
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n", | |
" var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n", | |
" if (msg_handler) {\n", | |
" comm.on_msg(msg_handler);\n", | |
" }\n", | |
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n", | |
" var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n", | |
" comm.open();\n", | |
" if (msg_handler) {\n", | |
" comm.onMsg = msg_handler;\n", | |
" }\n", | |
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n", | |
" var comm_promise = google.colab.kernel.comms.open(comm_id)\n", | |
" comm_promise.then((comm) => {\n", | |
" window.PyViz.comms[comm_id] = comm;\n", | |
" if (msg_handler) {\n", | |
" var messages = comm.messages[Symbol.asyncIterator]();\n", | |
" function processIteratorResult(result) {\n", | |
" var message = result.value;\n", | |
" var content = {data: message.data};\n", | |
" var metadata = message.metadata || {comm_id};\n", | |
" var msg = {content, metadata}\n", | |
" msg_handler(msg);\n", | |
" return messages.next().then(processIteratorResult);\n", | |
" }\n", | |
" return messages.next().then(processIteratorResult);\n", | |
" }\n", | |
" }) \n", | |
" var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n", | |
" return comm_promise.then((comm) => {\n", | |
" comm.send(data, metadata, buffers, disposeOnDone);\n", | |
" });\n", | |
" };\n", | |
" var comm = {\n", | |
" send: sendClosure\n", | |
" };\n", | |
" }\n", | |
" window.PyViz.comms[comm_id] = comm;\n", | |
" return comm;\n", | |
" }\n", | |
" window.PyViz.comm_manager = new JupyterCommManager();\n", | |
" \n", | |
"\n", | |
"\n", | |
"var JS_MIME_TYPE = 'application/javascript';\n", | |
"var HTML_MIME_TYPE = 'text/html';\n", | |
"var EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\n", | |
"var CLASS_NAME = 'output';\n", | |
"\n", | |
"/**\n", | |
" * Render data to the DOM node\n", | |
" */\n", | |
"function render(props, node) {\n", | |
" var div = document.createElement(\"div\");\n", | |
" var script = document.createElement(\"script\");\n", | |
" node.appendChild(div);\n", | |
" node.appendChild(script);\n", | |
"}\n", | |
"\n", | |
"/**\n", | |
" * Handle when a new output is added\n", | |
" */\n", | |
"function handle_add_output(event, handle) {\n", | |
" var output_area = handle.output_area;\n", | |
" var output = handle.output;\n", | |
" if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", | |
" return\n", | |
" }\n", | |
" var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", | |
" var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", | |
" if (id !== undefined) {\n", | |
" var nchildren = toinsert.length;\n", | |
" var html_node = toinsert[nchildren-1].children[0];\n", | |
" html_node.innerHTML = output.data[HTML_MIME_TYPE];\n", | |
" var scripts = [];\n", | |
" var nodelist = html_node.querySelectorAll(\"script\");\n", | |
" for (var i in nodelist) {\n", | |
" if (nodelist.hasOwnProperty(i)) {\n", | |
" scripts.push(nodelist[i])\n", | |
" }\n", | |
" }\n", | |
"\n", | |
" scripts.forEach( function (oldScript) {\n", | |
" var newScript = document.createElement(\"script\");\n", | |
" var attrs = [];\n", | |
" var nodemap = oldScript.attributes;\n", | |
" for (var j in nodemap) {\n", | |
" if (nodemap.hasOwnProperty(j)) {\n", | |
" attrs.push(nodemap[j])\n", | |
" }\n", | |
" }\n", | |
" attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n", | |
" newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n", | |
" oldScript.parentNode.replaceChild(newScript, oldScript);\n", | |
" });\n", | |
" if (JS_MIME_TYPE in output.data) {\n", | |
" toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n", | |
" }\n", | |
" output_area._hv_plot_id = id;\n", | |
" if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n", | |
" window.PyViz.plot_index[id] = Bokeh.index[id];\n", | |
" } else {\n", | |
" window.PyViz.plot_index[id] = null;\n", | |
" }\n", | |
" } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", | |
" var bk_div = document.createElement(\"div\");\n", | |
" bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", | |
" var script_attrs = bk_div.children[0].attributes;\n", | |
" for (var i = 0; i < script_attrs.length; i++) {\n", | |
" toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n", | |
" }\n", | |
" // store reference to server id on output_area\n", | |
" output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", | |
" }\n", | |
"}\n", | |
"\n", | |
"/**\n", | |
" * Handle when an output is cleared or removed\n", | |
" */\n", | |
"function handle_clear_output(event, handle) {\n", | |
" var id = handle.cell.output_area._hv_plot_id;\n", | |
" var server_id = handle.cell.output_area._bokeh_server_id;\n", | |
" if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n", | |
" var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n", | |
" if (server_id !== null) {\n", | |
" comm.send({event_type: 'server_delete', 'id': server_id});\n", | |
" return;\n", | |
" } else if (comm !== null) {\n", | |
" comm.send({event_type: 'delete', 'id': id});\n", | |
" }\n", | |
" delete PyViz.plot_index[id];\n", | |
" if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n", | |
" var doc = window.Bokeh.index[id].model.document\n", | |
" doc.clear();\n", | |
" const i = window.Bokeh.documents.indexOf(doc);\n", | |
" if (i > -1) {\n", | |
" window.Bokeh.documents.splice(i, 1);\n", | |
" }\n", | |
" }\n", | |
"}\n", | |
"\n", | |
"/**\n", | |
" * Handle kernel restart event\n", | |
" */\n", | |
"function handle_kernel_cleanup(event, handle) {\n", | |
" delete PyViz.comms[\"hv-extension-comm\"];\n", | |
" window.PyViz.plot_index = {}\n", | |
"}\n", | |
"\n", | |
"/**\n", | |
" * Handle update_display_data messages\n", | |
" */\n", | |
"function handle_update_output(event, handle) {\n", | |
" handle_clear_output(event, {cell: {output_area: handle.output_area}})\n", | |
" handle_add_output(event, handle)\n", | |
"}\n", | |
"\n", | |
"function register_renderer(events, OutputArea) {\n", | |
" function append_mime(data, metadata, element) {\n", | |
" // create a DOM node to render to\n", | |
" var toinsert = this.create_output_subarea(\n", | |
" metadata,\n", | |
" CLASS_NAME,\n", | |
" EXEC_MIME_TYPE\n", | |
" );\n", | |
" this.keyboard_manager.register_events(toinsert);\n", | |
" // Render to node\n", | |
" var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", | |
" render(props, toinsert[0]);\n", | |
" element.append(toinsert);\n", | |
" return toinsert\n", | |
" }\n", | |
"\n", | |
" events.on('output_added.OutputArea', handle_add_output);\n", | |
" events.on('output_updated.OutputArea', handle_update_output);\n", | |
" events.on('clear_output.CodeCell', handle_clear_output);\n", | |
" events.on('delete.Cell', handle_clear_output);\n", | |
" events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n", | |
"\n", | |
" OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", | |
" safe: true,\n", | |
" index: 0\n", | |
" });\n", | |
"}\n", | |
"\n", | |
"if (window.Jupyter !== undefined) {\n", | |
" try {\n", | |
" var events = require('base/js/events');\n", | |
" var OutputArea = require('notebook/js/outputarea').OutputArea;\n", | |
" if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", | |
" register_renderer(events, OutputArea);\n", | |
" }\n", | |
" } catch(err) {\n", | |
" }\n", | |
"}\n" | |
], | |
"application/vnd.holoviews_load.v0+json": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n var output_area = handle.output_area;\n var output = handle.output;\n if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n return\n }\n var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n if (id !== undefined) {\n var nchildren = toinsert.length;\n var html_node = toinsert[nchildren-1].children[0];\n html_node.innerHTML = output.data[HTML_MIME_TYPE];\n var scripts = [];\n var nodelist = html_node.querySelectorAll(\"script\");\n for (var i in nodelist) {\n if (nodelist.hasOwnProperty(i)) {\n scripts.push(nodelist[i])\n }\n }\n\n scripts.forEach( function (oldScript) {\n var newScript = document.createElement(\"script\");\n var attrs = [];\n var nodemap = oldScript.attributes;\n for (var j in nodemap) {\n if (nodemap.hasOwnProperty(j)) {\n attrs.push(nodemap[j])\n }\n }\n attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n if (JS_MIME_TYPE in output.data) {\n toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n }\n output_area._hv_plot_id = id;\n if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n window.PyViz.plot_index[id] = Bokeh.index[id];\n } else {\n window.PyViz.plot_index[id] = null;\n }\n } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n var bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n var script_attrs = bk_div.children[0].attributes;\n for (var i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n}\n\n/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n var id = handle.cell.output_area._hv_plot_id;\n var server_id = handle.cell.output_area._bokeh_server_id;\n if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n if (server_id !== null) {\n comm.send({event_type: 'server_delete', 'id': server_id});\n return;\n } else if (comm !== null) {\n comm.send({event_type: 'delete', 'id': id});\n }\n delete PyViz.plot_index[id];\n if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n var doc = window.Bokeh.index[id].model.document\n doc.clear();\n const i = window.Bokeh.documents.indexOf(doc);\n if (i > -1) {\n window.Bokeh.documents.splice(i, 1);\n }\n }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n delete PyViz.comms[\"hv-extension-comm\"];\n window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n var toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[0]);\n element.append(toinsert);\n return toinsert\n }\n\n events.on('output_added.OutputArea', handle_add_output);\n events.on('output_updated.OutputArea', handle_update_output);\n events.on('clear_output.CodeCell', handle_clear_output);\n events.on('delete.Cell', handle_clear_output);\n events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n safe: true,\n index: 0\n });\n}\n\nif (window.Jupyter !== undefined) {\n try {\n var events = require('base/js/events');\n var OutputArea = require('notebook/js/outputarea').OutputArea;\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n } catch(err) {\n }\n}\n" | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"text/html": [ | |
"<style>*[data-root-id],\n", | |
"*[data-root-id] > * {\n", | |
" box-sizing: border-box;\n", | |
" font-family: var(--jp-ui-font-family);\n", | |
" font-size: var(--jp-ui-font-size1);\n", | |
" color: var(--vscode-editor-foreground, var(--jp-ui-font-color1));\n", | |
"}\n", | |
"\n", | |
"/* Override VSCode background color */\n", | |
".cell-output-ipywidget-background:has(\n", | |
" > .cell-output-ipywidget-background > .lm-Widget > *[data-root-id]\n", | |
" ),\n", | |
".cell-output-ipywidget-background:has(> .lm-Widget > *[data-root-id]) {\n", | |
" background-color: transparent !important;\n", | |
"}\n", | |
"</style>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"import numpy as np\n", | |
"import geoviews as gv\n", | |
"import hvplot.xarray\n", | |
"import holoviews.operation.datashader as dshade" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 25, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"dshade.datashade.precompute = True" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 26, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#max_var = ds['zeta'].isel(time=20)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 27, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"CPU times: user 4.47 s, sys: 1.23 s, total: 5.7 s\n", | |
"Wall time: 25.5 s\n" | |
] | |
} | |
], | |
"source": [ | |
"%%time\n", | |
"v = np.vstack((ds['x'], ds['y'], max_var)).T\n", | |
"verts = pd.DataFrame(v, columns=['x','y','vmax'])\n", | |
"points = gv.operation.project_points(gv.Points(verts, vdims=['vmax']))\n", | |
"tris = pd.DataFrame(ds['element'].values.astype('int')-1, columns=['v0','v1','v2'])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"tiles = gv.tile_sources.OSM" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 29, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"trimesh = gv.TriMesh((tris, points), label='ADCIRC Global Water Level (m)')\n", | |
"mesh = dshade.rasterize(trimesh).opts(cmap='turbo', colorbar=True, width=650, height=500)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": {}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"tiles * mesh" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Extract a time series at a specified lon, lat location" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Because Xarray does not yet understand that `x` and `y` are coordinate variables on this triangular mesh, we create our own simple function to find the closest point. If we had a lot of these, we could use a more fancy tree algorithm." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 31, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
"<defs>\n", | |
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"</symbol>\n", | |
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"</symbol>\n", | |
"</defs>\n", | |
"</svg>\n", | |
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
" *\n", | |
" */\n", | |
"\n", | |
":root {\n", | |
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
" --xr-background-color: var(--jp-layout-color0, white);\n", | |
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
"}\n", | |
"\n", | |
"html[theme=dark],\n", | |
"body[data-theme=dark],\n", | |
"body.vscode-dark {\n", | |
" --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
" --xr-border-color: #1F1F1F;\n", | |
" --xr-disabled-color: #515151;\n", | |
" --xr-background-color: #111111;\n", | |
" --xr-background-color-row-even: #111111;\n", | |
" --xr-background-color-row-odd: #313131;\n", | |
"}\n", | |
"\n", | |
".xr-wrap {\n", | |
" display: block !important;\n", | |
" min-width: 300px;\n", | |
" max-width: 700px;\n", | |
"}\n", | |
"\n", | |
".xr-text-repr-fallback {\n", | |
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-header {\n", | |
" padding-top: 6px;\n", | |
" padding-bottom: 6px;\n", | |
" margin-bottom: 4px;\n", | |
" border-bottom: solid 1px var(--xr-border-color);\n", | |
"}\n", | |
"\n", | |
".xr-header > div,\n", | |
".xr-header > ul {\n", | |
" display: inline;\n", | |
" margin-top: 0;\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type,\n", | |
".xr-array-name {\n", | |
" margin-left: 2px;\n", | |
" margin-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-sections {\n", | |
" padding-left: 0 !important;\n", | |
" display: grid;\n", | |
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n", | |
"}\n", | |
"\n", | |
".xr-section-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input + label {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label {\n", | |
" cursor: pointer;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label:hover {\n", | |
" color: var(--xr-font-color0);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary {\n", | |
" grid-column: 1;\n", | |
" color: var(--xr-font-color2);\n", | |
" font-weight: 500;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary > span {\n", | |
" display: inline-block;\n", | |
" padding-left: 0.5em;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in + label:before {\n", | |
" display: inline-block;\n", | |
" content: '►';\n", | |
" font-size: 11px;\n", | |
" width: 15px;\n", | |
" text-align: center;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label:before {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label:before {\n", | |
" content: '▼';\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label > span {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary,\n", | |
".xr-section-inline-details {\n", | |
" padding-top: 4px;\n", | |
" padding-bottom: 4px;\n", | |
"}\n", | |
"\n", | |
".xr-section-inline-details {\n", | |
" grid-column: 2 / -1;\n", | |
"}\n", | |
"\n", | |
".xr-section-details {\n", | |
" display: none;\n", | |
" grid-column: 1 / -1;\n", | |
" margin-bottom: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap {\n", | |
" grid-column: 1 / -1;\n", | |
" display: grid;\n", | |
" grid-template-columns: 20px auto;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap > label {\n", | |
" grid-column: 1;\n", | |
" vertical-align: top;\n", | |
"}\n", | |
"\n", | |
".xr-preview {\n", | |
" color: var(--xr-font-color3);\n", | |
"}\n", | |
"\n", | |
".xr-array-preview,\n", | |
".xr-array-data {\n", | |
" padding: 0 5px !important;\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-array-data,\n", | |
".xr-array-in:checked ~ .xr-array-preview {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-array-in:checked ~ .xr-array-data,\n", | |
".xr-array-preview {\n", | |
" display: inline-block;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list {\n", | |
" display: inline-block !important;\n", | |
" list-style: none;\n", | |
" padding: 0 !important;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li {\n", | |
" display: inline-block;\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:before {\n", | |
" content: '(';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:after {\n", | |
" content: ')';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li:not(:last-child):after {\n", | |
" content: ',';\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-has-index {\n", | |
" font-weight: bold;\n", | |
"}\n", | |
"\n", | |
".xr-var-list,\n", | |
".xr-var-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > div,\n", | |
".xr-var-item label,\n", | |
".xr-var-item > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-even);\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > .xr-var-name:hover span {\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-var-list > li:nth-child(odd) > div,\n", | |
".xr-var-list > li:nth-child(odd) > label,\n", | |
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-odd);\n", | |
"}\n", | |
"\n", | |
".xr-var-name {\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-dims {\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-var-dtype {\n", | |
" grid-column: 3;\n", | |
" text-align: right;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-preview {\n", | |
" grid-column: 4;\n", | |
"}\n", | |
"\n", | |
".xr-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", | |
" background-color: var(--xr-background-color) !important;\n", | |
" padding-bottom: 5px !important;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
".xr-var-data-in:checked ~ .xr-var-data,\n", | |
".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-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", | |
"</style><pre class='xr-text-repr-fallback'><xarray.DataArray 'zeta' (time: 40, node: 12784991)>\n", | |
"dask.array<open_dataset-9d8ed5545d2239c017b6d200f9ff4ff0zeta, shape=(40, 12784991), dtype=float64, chunksize=(1, 511400), chunktype=numpy.ndarray>\n", | |
"Coordinates:\n", | |
" * time (time) datetime64[ns] 2016-09-01T12:00:00 2016-09-02 ... 2016-09-21\n", | |
" x (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
" y (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
"Dimensions without coordinates: node\n", | |
"Attributes:\n", | |
" long_name: water surface elevation above geoid\n", | |
" standard_name: sea_surface_height_above_geoid\n", | |
" location: node\n", | |
" mesh: adcirc_mesh\n", | |
" units: m</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'zeta'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 40</li><li><span>node</span>: 12784991</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-c72b11d9-c526-431c-b3c9-ad1711c46199' class='xr-array-in' type='checkbox' checked><label for='section-c72b11d9-c526-431c-b3c9-ad1711c46199' 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<chunksize=(1, 511400), meta=np.ndarray></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> 3.81 GiB </td>\n", | |
" <td> 3.90 MiB </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Shape </th>\n", | |
" <td> (40, 12784991) </td>\n", | |
" <td> (1, 511400) </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Dask graph </th>\n", | |
" <td colspan=\"2\"> 1000 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=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"0\" y1=\"1\" x2=\"120\" y2=\"1\" />\n", | |
" <line x1=\"0\" y1=\"2\" x2=\"120\" y2=\"2\" />\n", | |
" <line x1=\"0\" y1=\"3\" x2=\"120\" y2=\"3\" />\n", | |
" <line x1=\"0\" y1=\"5\" x2=\"120\" y2=\"5\" />\n", | |
" <line x1=\"0\" y1=\"6\" x2=\"120\" y2=\"6\" />\n", | |
" <line x1=\"0\" y1=\"7\" x2=\"120\" y2=\"7\" />\n", | |
" <line x1=\"0\" y1=\"8\" x2=\"120\" y2=\"8\" />\n", | |
" <line x1=\"0\" y1=\"10\" x2=\"120\" y2=\"10\" />\n", | |
" <line x1=\"0\" y1=\"11\" x2=\"120\" y2=\"11\" />\n", | |
" <line x1=\"0\" y1=\"13\" x2=\"120\" y2=\"13\" />\n", | |
" <line x1=\"0\" y1=\"14\" x2=\"120\" y2=\"14\" />\n", | |
" <line x1=\"0\" y1=\"15\" x2=\"120\" y2=\"15\" />\n", | |
" <line x1=\"0\" y1=\"17\" x2=\"120\" y2=\"17\" />\n", | |
" <line x1=\"0\" y1=\"18\" x2=\"120\" y2=\"18\" />\n", | |
" <line x1=\"0\" y1=\"19\" x2=\"120\" y2=\"19\" />\n", | |
" <line x1=\"0\" y1=\"20\" x2=\"120\" y2=\"20\" />\n", | |
" <line x1=\"0\" y1=\"22\" x2=\"120\" y2=\"22\" />\n", | |
" <line x1=\"0\" y1=\"23\" x2=\"120\" y2=\"23\" />\n", | |
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"4\" y1=\"0\" x2=\"4\" y2=\"25\" />\n", | |
" <line x1=\"9\" y1=\"0\" x2=\"9\" y2=\"25\" />\n", | |
" <line x1=\"14\" y1=\"0\" x2=\"14\" y2=\"25\" />\n", | |
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n", | |
" <line x1=\"28\" y1=\"0\" x2=\"28\" y2=\"25\" />\n", | |
" <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n", | |
" <line x1=\"43\" y1=\"0\" x2=\"43\" y2=\"25\" />\n", | |
" <line x1=\"48\" y1=\"0\" x2=\"48\" y2=\"25\" />\n", | |
" <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n", | |
" <line x1=\"62\" y1=\"0\" x2=\"62\" y2=\"25\" />\n", | |
" <line x1=\"67\" y1=\"0\" x2=\"67\" y2=\"25\" />\n", | |
" <line x1=\"72\" y1=\"0\" x2=\"72\" y2=\"25\" />\n", | |
" <line x1=\"81\" y1=\"0\" x2=\"81\" y2=\"25\" />\n", | |
" <line x1=\"86\" y1=\"0\" x2=\"86\" y2=\"25\" />\n", | |
" <line x1=\"91\" y1=\"0\" x2=\"91\" y2=\"25\" />\n", | |
" <line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"25\" />\n", | |
" <line x1=\"105\" y1=\"0\" x2=\"105\" y2=\"25\" />\n", | |
" <line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"25\" />\n", | |
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >12784991</text>\n", | |
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">40</text>\n", | |
"</svg>\n", | |
" </td>\n", | |
" </tr>\n", | |
"</table></div></div></li><li class='xr-section-item'><input id='section-1c291efb-ccaa-43ec-a43e-af848ed20587' class='xr-section-summary-in' type='checkbox' checked><label for='section-1c291efb-ccaa-43ec-a43e-af848ed20587' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>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'>2016-09-01T12:00:00 ... 2016-09-21</div><input id='attrs-0dc8c673-ab96-49a6-bdcc-6e33ec2a110e' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0dc8c673-ab96-49a6-bdcc-6e33ec2a110e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f5360892-03dc-496d-8394-cc5d2c86f113' class='xr-var-data-in' type='checkbox'><label for='data-f5360892-03dc-496d-8394-cc5d2c86f113' 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>long_name :</span></dt><dd>model time</dd><dt><span>standard_name :</span></dt><dd>time</dd><dt><span>base_date :</span></dt><dd>2016-09-01 00:00:00 UTC</dd></dl></div><div class='xr-var-data'><pre>array(['2016-09-01T12:00:00.000000000', '2016-09-02T00:00:00.000000000',\n", | |
" '2016-09-02T12:00:00.000000000', '2016-09-03T00:00:00.000000000',\n", | |
" '2016-09-03T12:00:00.000000000', '2016-09-04T00:00:00.000000000',\n", | |
" '2016-09-04T12:00:00.000000000', '2016-09-05T00:00:00.000000000',\n", | |
" '2016-09-05T12:00:00.000000000', '2016-09-06T00:00:00.000000000',\n", | |
" '2016-09-06T12:00:00.000000000', '2016-09-07T00:00:00.000000000',\n", | |
" '2016-09-07T12:00:00.000000000', '2016-09-08T00:00:00.000000000',\n", | |
" '2016-09-08T12:00:00.000000000', '2016-09-09T00:00:00.000000000',\n", | |
" '2016-09-09T12:00:00.000000000', '2016-09-10T00:00:00.000000000',\n", | |
" '2016-09-10T12:00:00.000000000', '2016-09-11T00:00:00.000000000',\n", | |
" '2016-09-11T12:00:00.000000000', '2016-09-12T00:00:00.000000000',\n", | |
" '2016-09-12T12:00:00.000000000', '2016-09-13T00:00:00.000000000',\n", | |
" '2016-09-13T12:00:00.000000000', '2016-09-14T00:00:00.000000000',\n", | |
" '2016-09-14T12:00:00.000000000', '2016-09-15T00:00:00.000000000',\n", | |
" '2016-09-15T12:00:00.000000000', '2016-09-16T00:00:00.000000000',\n", | |
" '2016-09-16T12:00:00.000000000', '2016-09-17T00:00:00.000000000',\n", | |
" '2016-09-17T12:00:00.000000000', '2016-09-18T00:00:00.000000000',\n", | |
" '2016-09-18T12:00:00.000000000', '2016-09-19T00:00:00.000000000',\n", | |
" '2016-09-19T12:00:00.000000000', '2016-09-20T00:00:00.000000000',\n", | |
" '2016-09-20T12:00:00.000000000', '2016-09-21T00:00:00.000000000'],\n", | |
" dtype='datetime64[ns]')</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>x</span></div><div class='xr-var-dims'>(node)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(511400,), meta=np.ndarray></div><input id='attrs-ff916769-f8f7-403d-ae33-b02137b98c2e' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ff916769-f8f7-403d-ae33-b02137b98c2e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-77f5191d-e8db-4d41-9eb0-29c52f7561d1' class='xr-var-data-in' type='checkbox'><label for='data-77f5191d-e8db-4d41-9eb0-29c52f7561d1' 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>long_name :</span></dt><dd>longitude</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>positive :</span></dt><dd>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> 97.54 MiB </td>\n", | |
" <td> 3.90 MiB </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Shape </th>\n", | |
" <td> (12784991,) </td>\n", | |
" <td> (511400,) </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Dask graph </th>\n", | |
" <td colspan=\"2\"> 25 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=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"4\" y1=\"0\" x2=\"4\" y2=\"25\" />\n", | |
" <line x1=\"9\" y1=\"0\" x2=\"9\" y2=\"25\" />\n", | |
" <line x1=\"14\" y1=\"0\" x2=\"14\" y2=\"25\" />\n", | |
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n", | |
" <line x1=\"28\" y1=\"0\" x2=\"28\" y2=\"25\" />\n", | |
" <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n", | |
" <line x1=\"43\" y1=\"0\" x2=\"43\" y2=\"25\" />\n", | |
" <line x1=\"48\" y1=\"0\" x2=\"48\" y2=\"25\" />\n", | |
" <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n", | |
" <line x1=\"62\" y1=\"0\" x2=\"62\" y2=\"25\" />\n", | |
" <line x1=\"67\" y1=\"0\" x2=\"67\" y2=\"25\" />\n", | |
" <line x1=\"72\" y1=\"0\" x2=\"72\" y2=\"25\" />\n", | |
" <line x1=\"81\" y1=\"0\" x2=\"81\" y2=\"25\" />\n", | |
" <line x1=\"86\" y1=\"0\" x2=\"86\" y2=\"25\" />\n", | |
" <line x1=\"91\" y1=\"0\" x2=\"91\" y2=\"25\" />\n", | |
" <line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"25\" />\n", | |
" <line x1=\"105\" y1=\"0\" x2=\"105\" y2=\"25\" />\n", | |
" <line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"25\" />\n", | |
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >12784991</text>\n", | |
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n", | |
"</svg>\n", | |
" </td>\n", | |
" </tr>\n", | |
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y</span></div><div class='xr-var-dims'>(node)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array<chunksize=(511400,), meta=np.ndarray></div><input id='attrs-2efffb62-a94c-400f-8c01-55619492fb47' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2efffb62-a94c-400f-8c01-55619492fb47' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d53e88c8-ee07-46ad-9b49-c61840a35c67' class='xr-var-data-in' type='checkbox'><label for='data-d53e88c8-ee07-46ad-9b49-c61840a35c67' 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>long_name :</span></dt><dd>latitude</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>positive :</span></dt><dd>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> 97.54 MiB </td>\n", | |
" <td> 3.90 MiB </td>\n", | |
" </tr>\n", | |
" \n", | |
" <tr>\n", | |
" <th> Shape </th>\n", | |
" <td> (12784991,) </td>\n", | |
" <td> (511400,) </td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th> Dask graph </th>\n", | |
" <td colspan=\"2\"> 25 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=\"170\" height=\"75\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n", | |
"\n", | |
" <!-- Horizontal lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Vertical lines -->\n", | |
" <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
" <line x1=\"4\" y1=\"0\" x2=\"4\" y2=\"25\" />\n", | |
" <line x1=\"9\" y1=\"0\" x2=\"9\" y2=\"25\" />\n", | |
" <line x1=\"14\" y1=\"0\" x2=\"14\" y2=\"25\" />\n", | |
" <line x1=\"24\" y1=\"0\" x2=\"24\" y2=\"25\" />\n", | |
" <line x1=\"28\" y1=\"0\" x2=\"28\" y2=\"25\" />\n", | |
" <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n", | |
" <line x1=\"43\" y1=\"0\" x2=\"43\" y2=\"25\" />\n", | |
" <line x1=\"48\" y1=\"0\" x2=\"48\" y2=\"25\" />\n", | |
" <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n", | |
" <line x1=\"62\" y1=\"0\" x2=\"62\" y2=\"25\" />\n", | |
" <line x1=\"67\" y1=\"0\" x2=\"67\" y2=\"25\" />\n", | |
" <line x1=\"72\" y1=\"0\" x2=\"72\" y2=\"25\" />\n", | |
" <line x1=\"81\" y1=\"0\" x2=\"81\" y2=\"25\" />\n", | |
" <line x1=\"86\" y1=\"0\" x2=\"86\" y2=\"25\" />\n", | |
" <line x1=\"91\" y1=\"0\" x2=\"91\" y2=\"25\" />\n", | |
" <line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"25\" />\n", | |
" <line x1=\"105\" y1=\"0\" x2=\"105\" y2=\"25\" />\n", | |
" <line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"25\" />\n", | |
" <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n", | |
"\n", | |
" <!-- Colored Rectangle -->\n", | |
" <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n", | |
"\n", | |
" <!-- Text -->\n", | |
" <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >12784991</text>\n", | |
" <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n", | |
"</svg>\n", | |
" </td>\n", | |
" </tr>\n", | |
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-8995d556-edf4-48d8-b231-0c0e36cee7b6' class='xr-section-summary-in' type='checkbox' ><label for='section-8995d556-edf4-48d8-b231-0c0e36cee7b6' class='xr-section-summary' >Indexes: <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-index-name'><div>time</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-2fa909a5-85c2-49e5-b1aa-df5c687aed37' class='xr-index-data-in' type='checkbox'/><label for='index-2fa909a5-85c2-49e5-b1aa-df5c687aed37' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex(['2016-09-01 12:00:00', '2016-09-02 00:00:00',\n", | |
" '2016-09-02 12:00:00', '2016-09-03 00:00:00',\n", | |
" '2016-09-03 12:00:00', '2016-09-04 00:00:00',\n", | |
" '2016-09-04 12:00:00', '2016-09-05 00:00:00',\n", | |
" '2016-09-05 12:00:00', '2016-09-06 00:00:00',\n", | |
" '2016-09-06 12:00:00', '2016-09-07 00:00:00',\n", | |
" '2016-09-07 12:00:00', '2016-09-08 00:00:00',\n", | |
" '2016-09-08 12:00:00', '2016-09-09 00:00:00',\n", | |
" '2016-09-09 12:00:00', '2016-09-10 00:00:00',\n", | |
" '2016-09-10 12:00:00', '2016-09-11 00:00:00',\n", | |
" '2016-09-11 12:00:00', '2016-09-12 00:00:00',\n", | |
" '2016-09-12 12:00:00', '2016-09-13 00:00:00',\n", | |
" '2016-09-13 12:00:00', '2016-09-14 00:00:00',\n", | |
" '2016-09-14 12:00:00', '2016-09-15 00:00:00',\n", | |
" '2016-09-15 12:00:00', '2016-09-16 00:00:00',\n", | |
" '2016-09-16 12:00:00', '2016-09-17 00:00:00',\n", | |
" '2016-09-17 12:00:00', '2016-09-18 00:00:00',\n", | |
" '2016-09-18 12:00:00', '2016-09-19 00:00:00',\n", | |
" '2016-09-19 12:00:00', '2016-09-20 00:00:00',\n", | |
" '2016-09-20 12:00:00', '2016-09-21 00:00:00'],\n", | |
" dtype='datetime64[ns]', name='time', freq=None))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-5918acfc-9e31-47d6-9eeb-6b1e80cb3670' class='xr-section-summary-in' type='checkbox' checked><label for='section-5918acfc-9e31-47d6-9eeb-6b1e80cb3670' 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>long_name :</span></dt><dd>water surface elevation above geoid</dd><dt><span>standard_name :</span></dt><dd>sea_surface_height_above_geoid</dd><dt><span>location :</span></dt><dd>node</dd><dt><span>mesh :</span></dt><dd>adcirc_mesh</dd><dt><span>units :</span></dt><dd>m</dd></dl></div></li></ul></div></div>" | |
], | |
"text/plain": [ | |
"<xarray.DataArray 'zeta' (time: 40, node: 12784991)>\n", | |
"dask.array<open_dataset-9d8ed5545d2239c017b6d200f9ff4ff0zeta, shape=(40, 12784991), dtype=float64, chunksize=(1, 511400), chunktype=numpy.ndarray>\n", | |
"Coordinates:\n", | |
" * time (time) datetime64[ns] 2016-09-01T12:00:00 2016-09-02 ... 2016-09-21\n", | |
" x (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
" y (node) float64 dask.array<chunksize=(511400,), meta=np.ndarray>\n", | |
"Dimensions without coordinates: node\n", | |
"Attributes:\n", | |
" long_name: water surface elevation above geoid\n", | |
" standard_name: sea_surface_height_above_geoid\n", | |
" location: node\n", | |
" mesh: adcirc_mesh\n", | |
" units: m" | |
] | |
}, | |
"execution_count": 31, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ds['zeta']" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 32, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# find the indices of the points in (x,y) closest to the points in (xi,yi)\n", | |
"def nearxy(x,y,xi,yi):\n", | |
" ind = np.ones(len(xi),dtype=int)\n", | |
" for i in range(len(xi)):\n", | |
" dist = np.sqrt((x-xi[i])**2+(y-yi[i])**2)\n", | |
" ind[i] = dist.argmin()\n", | |
" return ind" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"ds['x'].min().values" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 40, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#just offshore of Galveston\n", | |
"lat = 29.0329856\n", | |
"lon = -95.1535041" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 41, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"ind = nearxy(ds['x'].values,ds['y'].values,[lon], [lat])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 42, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": {}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"application/vnd.holoviews_exec.v0+json": "", | |
"text/html": [ | |
"<div id='p1166'>\n", | |
" <div id=\"b1718d7b-9d7b-4101-89fd-0cd9f31920a5\" data-root-id=\"p1166\" style=\"display: contents;\"></div>\n", | |
"</div>\n", | |
"<script type=\"application/javascript\">(function(root) {\n", | |
" var docs_json = {\"1fdab919-d7be-44f1-831f-30a263d1ab80\":{\"version\":\"3.2.2\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Row\",\"id\":\"p1166\",\"attributes\":{\"name\":\"Row02152\",\"tags\":[\"embedded\"],\"stylesheets\":[\"\\n:host(.pn-loading.pn-arc):before, .pn-loading.pn-arc:before {\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6IG5vbmU7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYzNjM2MzIiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij4gICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjFzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICA8L2NpcmNsZT48L3N2Zz4=\\\");\\n background-size: auto calc(min(50%, 400px));\\n}\",{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1169\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.2.1/dist/css/loading.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1233\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.2.1/dist/css/listpanel.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1167\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.2.1/dist/bundled/theme/default.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1168\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.2.1/dist/bundled/theme/native.css\"}}],\"min_width\":700,\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\",\"children\":[{\"type\":\"object\",\"name\":\"Spacer\",\"id\":\"p1170\",\"attributes\":{\"name\":\"HSpacer02163\",\"stylesheets\":[\"\\n:host(.pn-loading.pn-arc):before, .pn-loading.pn-arc:before {\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6IG5vbmU7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYzNjM2MzIiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij4gICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjFzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICA8L2NpcmNsZT48L3N2Zz4=\\\");\\n background-size: auto calc(min(50%, 400px));\\n}\",{\"id\":\"p1169\"},{\"id\":\"p1167\"},{\"id\":\"p1168\"}],\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\"}},{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1178\",\"attributes\":{\"width\":700,\"height\":300,\"margin\":[5,10],\"sizing_mode\":\"fixed\",\"align\":\"start\",\"x_range\":{\"type\":\"object\",\"name\":\"Range1d\",\"id\":\"p1171\",\"attributes\":{\"tags\":[[[\"time\",\"model time\",null]],[]],\"start\":1472731200000.0,\"end\":1474416000000.0,\"reset_start\":1472731200000.0,\"reset_end\":1474416000000.0}},\"y_range\":{\"type\":\"object\",\"name\":\"Range1d\",\"id\":\"p1172\",\"attributes\":{\"tags\":[[[\"zeta\",\"water surface elevation above geoid\",\"m\"]],{\"type\":\"map\",\"entries\":[[\"invert_yaxis\",false],[\"autorange\",false]]}],\"start\":-0.3230270981917042,\"end\":0.2665703061224051,\"reset_start\":-0.3230270981917042,\"reset_end\":0.2665703061224051}},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1188\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1189\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1181\",\"attributes\":{\"text\":\"x = -95.15 [degrees_east], y = 29.03 [degrees_n...\",\"text_color\":\"black\",\"text_font_size\":\"12pt\"}},\"renderers\":[{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1226\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1217\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1218\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1219\"},\"data\":{\"type\":\"map\",\"entries\":[[\"time\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AACg61ludUIAAIAeg251QgAAYFGsbnVCAABAhNVudUIAACC3/m51QgAAAOonb3VCAADgHFFvdUIAAMBPem91QgAAoIKjb3VCAACAtcxvdUIAAGDo9W91QgAAQBsfcHVCAAAgTkhwdUIAAACBcXB1QgAA4LOacHVCAADA5sNwdUIAAKAZ7XB1QgAAgEwWcXVCAABgfz9xdUIAAECyaHF1QgAAIOWRcXVCAAAAGLtxdUIAAOBK5HF1QgAAwH0NcnVCAACgsDZydUIAAIDjX3J1QgAAYBaJcnVCAABASbJydUIAACB823J1QgAAAK8Ec3VCAADg4S1zdUIAAMAUV3N1QgAAoEeAc3VCAACAeqlzdUIAAGCt0nN1QgAAQOD7c3VCAAAgEyV0dUIAAABGTnR1QgAA4Hh3dHVCAADAq6B0dUI=\"},\"shape\":[40],\"dtype\":\"float64\",\"order\":\"little\"}],[\"zeta\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"brv//sZkRD8yt4hWbKeMv8M409gLOnA/VSXddoNomr9mwFLfkr6fP6fS8WwKvHO/y0stg/C8nj/Vj2Yhy2OgPzk09wONJaQ/sxQRRaGqoz87uNOztQqqP36ESMMYrZ4/cA2VSBJrrz9Jx7KSjHCJP4JZtV8MCbE/XDc4AJf9n79l/PZIyeiyP03Ja1FW8re/yyfPGmcatj+xkOotzijFv9M8ngf0w7k/vCZXeRYbzb/zqfME0Ue9P/kZUmVw+NC/3yOO7PCGvz/+VuueeofRv9NL8QR/Mb0/iJS3Vyyiz79m+MlQJJa2P4VQMLfR3sa/Wywbeo7aqT+NuXu5Zgq0v/e8mOLPk4o/UbCPQ4l9pT9Uu8WXU16Dv02qi8MgU8M/jzW+CoexeL9RF3p/Z8rLP5FRBixEj5k/1R0NWPvUyz8=\"},\"shape\":[40],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1227\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1228\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1223\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"zeta\"},\"line_color\":\"#30a2da\",\"line_width\":2}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1229\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"zeta\"},\"line_color\":\"#30a2da\",\"line_width\":2}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1224\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"zeta\"},\"line_color\":\"#30a2da\",\"line_alpha\":0.1,\"line_width\":2}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1225\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"zeta\"},\"line_color\":\"#30a2da\",\"line_alpha\":0.2,\"line_width\":2}}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1187\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1176\",\"attributes\":{\"tags\":[\"hv_created\"],\"zoom_together\":\"none\"}},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1177\",\"attributes\":{\"tags\":[\"hv_created\"],\"renderers\":[{\"id\":\"p1226\"}],\"tooltips\":[[\"model time\",\"@{time}{%F %T}\"],[\"water surface elevation above geoid (m)\",\"@{zeta}\"]],\"formatters\":{\"type\":\"map\",\"entries\":[[\"@{time}\",\"datetime\"]]}}},{\"type\":\"object\",\"name\":\"SaveTool\",\"id\":\"p1212\"},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1213\"},{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1214\",\"attributes\":{\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1215\",\"attributes\":{\"syncable\":false,\"level\":\"overlay\",\"visible\":false,\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"bottom_units\":\"canvas\",\"top_units\":\"canvas\",\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1216\"}],\"active_drag\":{\"id\":\"p1213\"},\"active_scroll\":{\"id\":\"p1176\"}}},\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1207\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1208\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1209\"},\"axis_label\":\"water surface elevation above geoid (m)\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1210\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"DatetimeAxis\",\"id\":\"p1190\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"DatetimeTicker\",\"id\":\"p1191\",\"attributes\":{\"num_minor_ticks\":5,\"tickers\":[{\"type\":\"object\",\"name\":\"AdaptiveTicker\",\"id\":\"p1192\",\"attributes\":{\"num_minor_ticks\":0,\"mantissas\":[1,2,5],\"max_interval\":500.0}},{\"type\":\"object\",\"name\":\"AdaptiveTicker\",\"id\":\"p1193\",\"attributes\":{\"num_minor_ticks\":0,\"base\":60,\"mantissas\":[1,2,5,10,15,20,30],\"min_interval\":1000.0,\"max_interval\":1800000.0}},{\"type\":\"object\",\"name\":\"AdaptiveTicker\",\"id\":\"p1194\",\"attributes\":{\"num_minor_ticks\":0,\"base\":24,\"mantissas\":[1,2,4,6,8,12],\"min_interval\":3600000.0,\"max_interval\":43200000.0}},{\"type\":\"object\",\"name\":\"DaysTicker\",\"id\":\"p1195\",\"attributes\":{\"days\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]}},{\"type\":\"object\",\"name\":\"DaysTicker\",\"id\":\"p1196\",\"attributes\":{\"days\":[1,4,7,10,13,16,19,22,25,28]}},{\"type\":\"object\",\"name\":\"DaysTicker\",\"id\":\"p1197\",\"attributes\":{\"days\":[1,8,15,22]}},{\"type\":\"object\",\"name\":\"DaysTicker\",\"id\":\"p1198\",\"attributes\":{\"days\":[1,15]}},{\"type\":\"object\",\"name\":\"MonthsTicker\",\"id\":\"p1199\",\"attributes\":{\"months\":[0,1,2,3,4,5,6,7,8,9,10,11]}},{\"type\":\"object\",\"name\":\"MonthsTicker\",\"id\":\"p1200\",\"attributes\":{\"months\":[0,2,4,6,8,10]}},{\"type\":\"object\",\"name\":\"MonthsTicker\",\"id\":\"p1201\",\"attributes\":{\"months\":[0,4,8]}},{\"type\":\"object\",\"name\":\"MonthsTicker\",\"id\":\"p1202\",\"attributes\":{\"months\":[0,6]}},{\"type\":\"object\",\"name\":\"YearsTicker\",\"id\":\"p1203\"}]}},\"formatter\":{\"type\":\"object\",\"name\":\"DatetimeTickFormatter\",\"id\":\"p1204\"},\"axis_label\":\"model time\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1205\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1206\",\"attributes\":{\"axis\":{\"id\":\"p1190\"},\"ticker\":{\"id\":\"p1191\"}}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1211\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1207\"},\"ticker\":{\"id\":\"p1208\"}}}],\"min_border_top\":10,\"min_border_bottom\":10,\"min_border_left\":10,\"min_border_right\":10,\"output_backend\":\"webgl\"}},{\"type\":\"object\",\"name\":\"Spacer\",\"id\":\"p1231\",\"attributes\":{\"name\":\"HSpacer02166\",\"stylesheets\":[\"\\n:host(.pn-loading.pn-arc):before, .pn-loading.pn-arc:before {\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6IG5vbmU7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYzNjM2MzIiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij4gICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjFzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICA8L2NpcmNsZT48L3N2Zz4=\\\");\\n background-size: auto calc(min(50%, 400px));\\n}\",{\"id\":\"p1169\"},{\"id\":\"p1167\"},{\"id\":\"p1168\"}],\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\"}}]}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"mode\",\"kind\":\"Any\",\"default\":\"warn\"},{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationAreaBase1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"BootstrapTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"MaterialTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]}]}};\n", | |
" var render_items = [{\"docid\":\"1fdab919-d7be-44f1-831f-30a263d1ab80\",\"roots\":{\"p1166\":\"b1718d7b-9d7b-4101-89fd-0cd9f31920a5\"},\"root_ids\":[\"p1166\"]}];\n", | |
" var docs = Object.values(docs_json)\n", | |
" if (!docs) {\n", | |
" return\n", | |
" }\n", | |
" const py_version = docs[0].version.replace('rc', '-rc.').replace('.dev', '-dev.')\n", | |
" const is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1\n", | |
" function embed_document(root) {\n", | |
" var Bokeh = get_bokeh(root)\n", | |
" Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", | |
" for (const render_item of render_items) {\n", | |
" for (const root_id of render_item.root_ids) {\n", | |
"\tconst id_el = document.getElementById(root_id)\n", | |
"\tif (id_el.children.length && (id_el.children[0].className === 'bk-root')) {\n", | |
"\t const root_el = id_el.children[0]\n", | |
"\t root_el.id = root_el.id + '-rendered'\n", | |
"\t}\n", | |
" }\n", | |
" }\n", | |
" }\n", | |
" function get_bokeh(root) {\n", | |
" if (root.Bokeh === undefined) {\n", | |
" return null\n", | |
" } else if (root.Bokeh.version !== py_version && !is_dev) {\n", | |
" if (root.Bokeh.versions === undefined || !root.Bokeh.versions.has(py_version)) {\n", | |
"\treturn null\n", | |
" }\n", | |
" return root.Bokeh.versions.get(py_version);\n", | |
" } else if (root.Bokeh.version === py_version) {\n", | |
" return root.Bokeh\n", | |
" }\n", | |
" return null\n", | |
" }\n", | |
" function is_loaded(root) {\n", | |
" var Bokeh = get_bokeh(root)\n", | |
" return (Bokeh != null && Bokeh.Panel !== undefined)\n", | |
" }\n", | |
" if (is_loaded(root)) {\n", | |
" embed_document(root);\n", | |
" } else {\n", | |
" var attempts = 0;\n", | |
" var timer = setInterval(function(root) {\n", | |
" if (is_loaded(root)) {\n", | |
" clearInterval(timer);\n", | |
" embed_document(root);\n", | |
" } else if (document.readyState == \"complete\") {\n", | |
" attempts++;\n", | |
" if (attempts > 200) {\n", | |
" clearInterval(timer);\n", | |
"\t var Bokeh = get_bokeh(root)\n", | |
"\t if (Bokeh == null || Bokeh.Panel == null) {\n", | |
" console.warn(\"Panel: ERROR: Unable to run Panel code because Bokeh or Panel library is missing\");\n", | |
"\t } else {\n", | |
"\t console.warn(\"Panel: WARNING: Attempting to render but not all required libraries could be resolved.\")\n", | |
"\t embed_document(root)\n", | |
"\t }\n", | |
" }\n", | |
" }\n", | |
" }, 25, root)\n", | |
" }\n", | |
"})(window);</script>" | |
], | |
"text/plain": [ | |
":Curve [time] (zeta)" | |
] | |
}, | |
"execution_count": 42, | |
"metadata": { | |
"application/vnd.holoviews_exec.v0+json": { | |
"id": "p1166" | |
} | |
}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ds['zeta'][:,ind].hvplot(x='time', grid=True)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Be a good citizen and shutdown your cluster if you are done using it" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 36, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"/home/conda/users/226e91a965d185c2173ace6d0daf5747b886d5f2b5299f8dbce39e2e7fb456a3-20230830-192612-585397-241-pangeo/lib/python3.10/site-packages/dask_gateway/client.py:1014: RuntimeWarning: coroutine 'rpc.close_rpc' was never awaited\n", | |
" self.scheduler_comm.close_rpc()\n" | |
] | |
} | |
], | |
"source": [ | |
"cluster.shutdown()" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "users-users-pangeo", | |
"language": "python", | |
"name": "conda-env-users-users-pangeo-py" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.10.12" | |
}, | |
"widgets": { | |
"application/vnd.jupyter.widget-state+json": { | |
"state": {}, | |
"version_major": 2, | |
"version_minor": 0 | |
} | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment