Last active
July 18, 2021 05:23
-
-
Save suvarchal/13dadf9c1b65a7394f706b858f3e5418 to your computer and use it in GitHub Desktop.
Generate FESOM2 mesh information for spatial subsets
This file contains 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": [ | |
"Use a `suvi_dataset_fixes` branch of pyfesom2 for this example, to upgrade your current installation simply use:\n", | |
"\n", | |
"`pip install --upgrade git+https://github.com/FESOM/pyfesom2@suvi_dataset_fixes`" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2021-07-18T05:21:55.542240Z", | |
"start_time": "2021-07-18T05:21:53.676828Z" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"import pyfesom2\n", | |
"import xarray as xr" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2021-07-18T05:21:55.562436Z", | |
"start_time": "2021-07-18T05:21:55.543870Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"/home/suvarchal/AWI/triangulation_exps/pi-grid/pickle_mesh_py3_fesom2\n", | |
"The usepickle == True)\n", | |
"The pickle file for FESOM2 exists.\n", | |
"The mesh will be loaded from /home/suvarchal/AWI/triangulation_exps/pi-grid/pickle_mesh_py3_fesom2\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.vscode-dark {\n", | |
" --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
" --xr-border-color: #1F1F1F;\n", | |
" --xr-disabled-color: #515151;\n", | |
" --xr-background-color: #111111;\n", | |
" --xr-background-color-row-even: #111111;\n", | |
" --xr-background-color-row-odd: #313131;\n", | |
"}\n", | |
"\n", | |
".xr-wrap {\n", | |
" display: block;\n", | |
" min-width: 300px;\n", | |
" max-width: 700px;\n", | |
"}\n", | |
"\n", | |
".xr-text-repr-fallback {\n", | |
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-header {\n", | |
" padding-top: 6px;\n", | |
" padding-bottom: 6px;\n", | |
" margin-bottom: 4px;\n", | |
" border-bottom: solid 1px var(--xr-border-color);\n", | |
"}\n", | |
"\n", | |
".xr-header > div,\n", | |
".xr-header > ul {\n", | |
" display: inline;\n", | |
" margin-top: 0;\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type,\n", | |
".xr-array-name {\n", | |
" margin-left: 2px;\n", | |
" margin-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-sections {\n", | |
" padding-left: 0 !important;\n", | |
" display: grid;\n", | |
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n", | |
"}\n", | |
"\n", | |
".xr-section-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input + label {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label {\n", | |
" cursor: pointer;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label:hover {\n", | |
" color: var(--xr-font-color0);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary {\n", | |
" grid-column: 1;\n", | |
" color: var(--xr-font-color2);\n", | |
" font-weight: 500;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary > span {\n", | |
" display: inline-block;\n", | |
" padding-left: 0.5em;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in + label:before {\n", | |
" display: inline-block;\n", | |
" content: '►';\n", | |
" font-size: 11px;\n", | |
" width: 15px;\n", | |
" text-align: center;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label:before {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label:before {\n", | |
" content: '▼';\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label > span {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary,\n", | |
".xr-section-inline-details {\n", | |
" padding-top: 4px;\n", | |
" padding-bottom: 4px;\n", | |
"}\n", | |
"\n", | |
".xr-section-inline-details {\n", | |
" grid-column: 2 / -1;\n", | |
"}\n", | |
"\n", | |
".xr-section-details {\n", | |
" display: none;\n", | |
" grid-column: 1 / -1;\n", | |
" margin-bottom: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap {\n", | |
" grid-column: 1 / -1;\n", | |
" display: grid;\n", | |
" grid-template-columns: 20px auto;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap > label {\n", | |
" grid-column: 1;\n", | |
" vertical-align: top;\n", | |
"}\n", | |
"\n", | |
".xr-preview {\n", | |
" color: var(--xr-font-color3);\n", | |
"}\n", | |
"\n", | |
".xr-array-preview,\n", | |
".xr-array-data {\n", | |
" padding: 0 5px !important;\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-array-data,\n", | |
".xr-array-in:checked ~ .xr-array-preview {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-array-in:checked ~ .xr-array-data,\n", | |
".xr-array-preview {\n", | |
" display: inline-block;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list {\n", | |
" display: inline-block !important;\n", | |
" list-style: none;\n", | |
" padding: 0 !important;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li {\n", | |
" display: inline-block;\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:before {\n", | |
" content: '(';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:after {\n", | |
" content: ')';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li:not(:last-child):after {\n", | |
" content: ',';\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-has-index {\n", | |
" font-weight: bold;\n", | |
"}\n", | |
"\n", | |
".xr-var-list,\n", | |
".xr-var-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > div,\n", | |
".xr-var-item label,\n", | |
".xr-var-item > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-even);\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > .xr-var-name:hover span {\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-var-list > li:nth-child(odd) > div,\n", | |
".xr-var-list > li:nth-child(odd) > label,\n", | |
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-odd);\n", | |
"}\n", | |
"\n", | |
".xr-var-name {\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-dims {\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-var-dtype {\n", | |
" grid-column: 3;\n", | |
" text-align: right;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-preview {\n", | |
" grid-column: 4;\n", | |
"}\n", | |
"\n", | |
".xr-var-name,\n", | |
".xr-var-dims,\n", | |
".xr-var-dtype,\n", | |
".xr-preview,\n", | |
".xr-attrs dt {\n", | |
" white-space: nowrap;\n", | |
" overflow: hidden;\n", | |
" text-overflow: ellipsis;\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-var-name:hover,\n", | |
".xr-var-dims:hover,\n", | |
".xr-var-dtype:hover,\n", | |
".xr-attrs dt:hover {\n", | |
" overflow: visible;\n", | |
" width: auto;\n", | |
" z-index: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs,\n", | |
".xr-var-data {\n", | |
" display: none;\n", | |
" background-color: var(--xr-background-color) !important;\n", | |
" padding-bottom: 5px !important;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
".xr-var-data-in:checked ~ .xr-var-data {\n", | |
" display: block;\n", | |
"}\n", | |
"\n", | |
".xr-var-data > table {\n", | |
" float: right;\n", | |
"}\n", | |
"\n", | |
".xr-var-name span,\n", | |
".xr-var-data,\n", | |
".xr-attrs {\n", | |
" padding-left: 25px !important;\n", | |
"}\n", | |
"\n", | |
".xr-attrs,\n", | |
".xr-var-attrs,\n", | |
".xr-var-data {\n", | |
" grid-column: 1 / -1;\n", | |
"}\n", | |
"\n", | |
"dl.xr-attrs {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" display: grid;\n", | |
" grid-template-columns: 125px auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt,\n", | |
".xr-attrs dd {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" float: left;\n", | |
" padding-right: 10px;\n", | |
" width: auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt {\n", | |
" font-weight: normal;\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt:hover span {\n", | |
" display: inline-block;\n", | |
" background: var(--xr-background-color);\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dd {\n", | |
" grid-column: 2;\n", | |
" white-space: pre-wrap;\n", | |
" word-break: break-all;\n", | |
"}\n", | |
"\n", | |
".xr-icon-database,\n", | |
".xr-icon-file-text2 {\n", | |
" display: inline-block;\n", | |
" vertical-align: middle;\n", | |
" width: 1em;\n", | |
" height: 1.5em !important;\n", | |
" stroke-width: 0;\n", | |
" stroke: currentColor;\n", | |
" fill: currentColor;\n", | |
"}\n", | |
"</style><pre class='xr-text-repr-fallback'><xarray.Dataset>\n", | |
"Dimensions: (nelem: 5839, nod2: 3140, nz: 48, nz1: 47, three: 3)\n", | |
"Coordinates:\n", | |
" lon (nod2) float64 -60.6 -60.73 -62.15 -60.71 ... 127.2 122.0 124.5\n", | |
" lat (nod2) float64 74.28 73.91 74.05 74.63 ... -66.25 -66.73 -66.46\n", | |
" faces (nelem, three) uint32 0 11 1 1 11 9 ... 3134 3133 3139 3136 3137\n", | |
" * nz (nz) float64 0.0 5.0 10.0 20.0 ... 5.4e+03 5.65e+03 6e+03 6.25e+03\n", | |
" * nz1 (nz1) float64 2.5 7.5 15.0 25.0 ... 5.525e+03 5.825e+03 6.125e+03\n", | |
"Dimensions without coordinates: nelem, nod2, three\n", | |
"Data variables:\n", | |
" *empty*\n", | |
"Attributes:\n", | |
" Conventions: CF-1.7</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-b7433c82-7570-4319-8c3e-3931edf45048' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-b7433c82-7570-4319-8c3e-3931edf45048' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>nelem</span>: 5839</li><li><span>nod2</span>: 3140</li><li><span class='xr-has-index'>nz</span>: 48</li><li><span class='xr-has-index'>nz1</span>: 47</li><li><span>three</span>: 3</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-8fcd9b1b-175c-4373-8145-1bae845ac5f7' class='xr-section-summary-in' type='checkbox' checked><label for='section-8fcd9b1b-175c-4373-8145-1bae845ac5f7' class='xr-section-summary' >Coordinates: <span>(5)</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>lon</span></div><div class='xr-var-dims'>(nod2)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-60.6 -60.73 -62.15 ... 122.0 124.5</div><input id='attrs-0952fb5e-74e7-4cfb-9401-644d45d0d67a' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0952fb5e-74e7-4cfb-9401-644d45d0d67a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-902bb0d4-8c73-4bec-a1bd-9301e62685f6' class='xr-var-data-in' type='checkbox'><label for='data-902bb0d4-8c73-4bec-a1bd-9301e62685f6' 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>units :</span></dt><dd>degrees_east</dd></dl></div><div class='xr-var-data'><pre>array([-60.6011834, -60.7301373, -62.1527131, ..., 127.2248174,\n", | |
" 121.9987517, 124.5142243])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lat</span></div><div class='xr-var-dims'>(nod2)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>74.28 73.91 74.05 ... -66.73 -66.46</div><input id='attrs-01d4521f-1412-4fa4-9fab-0f464efc0921' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-01d4521f-1412-4fa4-9fab-0f464efc0921' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-66647d0c-b854-429c-b28d-07cc59e7f5fd' class='xr-var-data-in' type='checkbox'><label for='data-66647d0c-b854-429c-b28d-07cc59e7f5fd' 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>units :</span></dt><dd>degrees_north</dd></dl></div><div class='xr-var-data'><pre>array([ 74.28292396, 73.91183809, 74.05145544, ..., -66.24740724,\n", | |
" -66.73281897, -66.46269918])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>faces</span></div><div class='xr-var-dims'>(nelem, three)</div><div class='xr-var-dtype'>uint32</div><div class='xr-var-preview xr-preview'>0 11 1 1 11 ... 3133 3139 3136 3137</div><input id='attrs-8fa7901c-b6ef-4131-8425-ce6259b2f871' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8fa7901c-b6ef-4131-8425-ce6259b2f871' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-093c16dc-6edf-41ab-9f4c-5ba23aec40d5' class='xr-var-data-in' type='checkbox'><label for='data-093c16dc-6edf-41ab-9f4c-5ba23aec40d5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0, 11, 1],\n", | |
" [ 1, 11, 9],\n", | |
" [ 1, 9, 8],\n", | |
" ...,\n", | |
" [3138, 3135, 3139],\n", | |
" [3138, 3134, 3133],\n", | |
" [3139, 3136, 3137]], dtype=uint32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>nz</span></div><div class='xr-var-dims'>(nz)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 5.0 10.0 ... 6e+03 6.25e+03</div><input id='attrs-3dc1a330-b204-4d0d-a2a6-f8109b179e4e' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-3dc1a330-b204-4d0d-a2a6-f8109b179e4e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0879b819-788f-40d8-aa93-05fa4895046a' class='xr-var-data-in' type='checkbox'><label for='data-0879b819-788f-40d8-aa93-05fa4895046a' 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>depth</dd><dt><span>units :</span></dt><dd>m</dd></dl></div><div class='xr-var-data'><pre>array([0.00e+00, 5.00e+00, 1.00e+01, 2.00e+01, 3.00e+01, 4.00e+01, 5.00e+01,\n", | |
" 6.00e+01, 7.00e+01, 8.00e+01, 9.00e+01, 1.00e+02, 1.15e+02, 1.35e+02,\n", | |
" 1.60e+02, 1.90e+02, 2.30e+02, 2.80e+02, 3.40e+02, 4.10e+02, 4.90e+02,\n", | |
" 5.80e+02, 6.80e+02, 7.90e+02, 9.10e+02, 1.04e+03, 1.18e+03, 1.33e+03,\n", | |
" 1.50e+03, 1.70e+03, 1.92e+03, 2.15e+03, 2.40e+03, 2.65e+03, 2.90e+03,\n", | |
" 3.15e+03, 3.40e+03, 3.65e+03, 3.90e+03, 4.15e+03, 4.40e+03, 4.65e+03,\n", | |
" 4.90e+03, 5.15e+03, 5.40e+03, 5.65e+03, 6.00e+03, 6.25e+03])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>nz1</span></div><div class='xr-var-dims'>(nz1)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.5 7.5 ... 5.825e+03 6.125e+03</div><input id='attrs-282c7822-4715-46e9-a0f5-6f247bf28c26' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-282c7822-4715-46e9-a0f5-6f247bf28c26' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-69828563-7092-4356-82ca-2092a01869db' class='xr-var-data-in' type='checkbox'><label for='data-69828563-7092-4356-82ca-2092a01869db' 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>depth at half level</dd><dt><span>units :</span></dt><dd>m</dd><dt><span>positive :</span></dt><dd>down</dd><dt><span>axis :</span></dt><dd>Z</dd></dl></div><div class='xr-var-data'><pre>array([2.500e+00, 7.500e+00, 1.500e+01, 2.500e+01, 3.500e+01, 4.500e+01,\n", | |
" 5.500e+01, 6.500e+01, 7.500e+01, 8.500e+01, 9.500e+01, 1.075e+02,\n", | |
" 1.250e+02, 1.475e+02, 1.750e+02, 2.100e+02, 2.550e+02, 3.100e+02,\n", | |
" 3.750e+02, 4.500e+02, 5.350e+02, 6.300e+02, 7.350e+02, 8.500e+02,\n", | |
" 9.750e+02, 1.110e+03, 1.255e+03, 1.415e+03, 1.600e+03, 1.810e+03,\n", | |
" 2.035e+03, 2.275e+03, 2.525e+03, 2.775e+03, 3.025e+03, 3.275e+03,\n", | |
" 3.525e+03, 3.775e+03, 4.025e+03, 4.275e+03, 4.525e+03, 4.775e+03,\n", | |
" 5.025e+03, 5.275e+03, 5.525e+03, 5.825e+03, 6.125e+03])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-b13b1432-cd60-4893-97ab-8cdbd8a231a7' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-b13b1432-cd60-4893-97ab-8cdbd8a231a7' class='xr-section-summary' title='Expand/collapse section'>Data variables: <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-b927c833-4034-4a87-8fab-27149d9367a1' class='xr-section-summary-in' type='checkbox' checked><label for='section-b927c833-4034-4a87-8fab-27149d9367a1' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>Conventions :</span></dt><dd>CF-1.7</dd></dl></div></li></ul></div></div>" | |
], | |
"text/plain": [ | |
"<xarray.Dataset>\n", | |
"Dimensions: (nelem: 5839, nod2: 3140, nz: 48, nz1: 47, three: 3)\n", | |
"Coordinates:\n", | |
" lon (nod2) float64 -60.6 -60.73 -62.15 -60.71 ... 127.2 122.0 124.5\n", | |
" lat (nod2) float64 74.28 73.91 74.05 74.63 ... -66.25 -66.73 -66.46\n", | |
" faces (nelem, three) uint32 0 11 1 1 11 9 ... 3134 3133 3139 3136 3137\n", | |
" * nz (nz) float64 0.0 5.0 10.0 20.0 ... 5.4e+03 5.65e+03 6e+03 6.25e+03\n", | |
" * nz1 (nz1) float64 2.5 7.5 15.0 25.0 ... 5.525e+03 5.825e+03 6.125e+03\n", | |
"Dimensions without coordinates: nelem, nod2, three\n", | |
"Data variables:\n", | |
" *empty*\n", | |
"Attributes:\n", | |
" Conventions: CF-1.7" | |
] | |
}, | |
"execution_count": 2, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# generate coordinate dataset from mesh info\n", | |
"pi_grid=pyfesom2.datasets.fesom_mesh_to_xr('./pi-grid') # path to grid dir containing nod2D.out ...\n", | |
"pi_grid" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2021-07-18T05:21:55.577537Z", | |
"start_time": "2021-07-18T05:21:55.564014Z" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"pi_mdiag=xr.open_dataset(\"pi-grid/fesom.mesh.diag.nc\") # path to mesh diag file" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2021-07-18T05:21:55.590104Z", | |
"start_time": "2021-07-18T05:21:55.579098Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
"<defs>\n", | |
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"</symbol>\n", | |
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"</symbol>\n", | |
"</defs>\n", | |
"</svg>\n", | |
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
" *\n", | |
" */\n", | |
"\n", | |
":root {\n", | |
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
" --xr-background-color: var(--jp-layout-color0, white);\n", | |
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
"}\n", | |
"\n", | |
"html[theme=dark],\n", | |
"body.vscode-dark {\n", | |
" --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
" --xr-border-color: #1F1F1F;\n", | |
" --xr-disabled-color: #515151;\n", | |
" --xr-background-color: #111111;\n", | |
" --xr-background-color-row-even: #111111;\n", | |
" --xr-background-color-row-odd: #313131;\n", | |
"}\n", | |
"\n", | |
".xr-wrap {\n", | |
" display: block;\n", | |
" min-width: 300px;\n", | |
" max-width: 700px;\n", | |
"}\n", | |
"\n", | |
".xr-text-repr-fallback {\n", | |
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-header {\n", | |
" padding-top: 6px;\n", | |
" padding-bottom: 6px;\n", | |
" margin-bottom: 4px;\n", | |
" border-bottom: solid 1px var(--xr-border-color);\n", | |
"}\n", | |
"\n", | |
".xr-header > div,\n", | |
".xr-header > ul {\n", | |
" display: inline;\n", | |
" margin-top: 0;\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type,\n", | |
".xr-array-name {\n", | |
" margin-left: 2px;\n", | |
" margin-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-sections {\n", | |
" padding-left: 0 !important;\n", | |
" display: grid;\n", | |
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n", | |
"}\n", | |
"\n", | |
".xr-section-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input + label {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label {\n", | |
" cursor: pointer;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label:hover {\n", | |
" color: var(--xr-font-color0);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary {\n", | |
" grid-column: 1;\n", | |
" color: var(--xr-font-color2);\n", | |
" font-weight: 500;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary > span {\n", | |
" display: inline-block;\n", | |
" padding-left: 0.5em;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in + label:before {\n", | |
" display: inline-block;\n", | |
" content: '►';\n", | |
" font-size: 11px;\n", | |
" width: 15px;\n", | |
" text-align: center;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label:before {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label:before {\n", | |
" content: '▼';\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label > span {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary,\n", | |
".xr-section-inline-details {\n", | |
" padding-top: 4px;\n", | |
" padding-bottom: 4px;\n", | |
"}\n", | |
"\n", | |
".xr-section-inline-details {\n", | |
" grid-column: 2 / -1;\n", | |
"}\n", | |
"\n", | |
".xr-section-details {\n", | |
" display: none;\n", | |
" grid-column: 1 / -1;\n", | |
" margin-bottom: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap {\n", | |
" grid-column: 1 / -1;\n", | |
" display: grid;\n", | |
" grid-template-columns: 20px auto;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap > label {\n", | |
" grid-column: 1;\n", | |
" vertical-align: top;\n", | |
"}\n", | |
"\n", | |
".xr-preview {\n", | |
" color: var(--xr-font-color3);\n", | |
"}\n", | |
"\n", | |
".xr-array-preview,\n", | |
".xr-array-data {\n", | |
" padding: 0 5px !important;\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-array-data,\n", | |
".xr-array-in:checked ~ .xr-array-preview {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-array-in:checked ~ .xr-array-data,\n", | |
".xr-array-preview {\n", | |
" display: inline-block;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list {\n", | |
" display: inline-block !important;\n", | |
" list-style: none;\n", | |
" padding: 0 !important;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li {\n", | |
" display: inline-block;\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:before {\n", | |
" content: '(';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:after {\n", | |
" content: ')';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li:not(:last-child):after {\n", | |
" content: ',';\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-has-index {\n", | |
" font-weight: bold;\n", | |
"}\n", | |
"\n", | |
".xr-var-list,\n", | |
".xr-var-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > div,\n", | |
".xr-var-item label,\n", | |
".xr-var-item > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-even);\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > .xr-var-name:hover span {\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-var-list > li:nth-child(odd) > div,\n", | |
".xr-var-list > li:nth-child(odd) > label,\n", | |
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-odd);\n", | |
"}\n", | |
"\n", | |
".xr-var-name {\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-dims {\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-var-dtype {\n", | |
" grid-column: 3;\n", | |
" text-align: right;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-preview {\n", | |
" grid-column: 4;\n", | |
"}\n", | |
"\n", | |
".xr-var-name,\n", | |
".xr-var-dims,\n", | |
".xr-var-dtype,\n", | |
".xr-preview,\n", | |
".xr-attrs dt {\n", | |
" white-space: nowrap;\n", | |
" overflow: hidden;\n", | |
" text-overflow: ellipsis;\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-var-name:hover,\n", | |
".xr-var-dims:hover,\n", | |
".xr-var-dtype:hover,\n", | |
".xr-attrs dt:hover {\n", | |
" overflow: visible;\n", | |
" width: auto;\n", | |
" z-index: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs,\n", | |
".xr-var-data {\n", | |
" display: none;\n", | |
" background-color: var(--xr-background-color) !important;\n", | |
" padding-bottom: 5px !important;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
".xr-var-data-in:checked ~ .xr-var-data {\n", | |
" display: block;\n", | |
"}\n", | |
"\n", | |
".xr-var-data > table {\n", | |
" float: right;\n", | |
"}\n", | |
"\n", | |
".xr-var-name span,\n", | |
".xr-var-data,\n", | |
".xr-attrs {\n", | |
" padding-left: 25px !important;\n", | |
"}\n", | |
"\n", | |
".xr-attrs,\n", | |
".xr-var-attrs,\n", | |
".xr-var-data {\n", | |
" grid-column: 1 / -1;\n", | |
"}\n", | |
"\n", | |
"dl.xr-attrs {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" display: grid;\n", | |
" grid-template-columns: 125px auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt,\n", | |
".xr-attrs dd {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" float: left;\n", | |
" padding-right: 10px;\n", | |
" width: auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt {\n", | |
" font-weight: normal;\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt:hover span {\n", | |
" display: inline-block;\n", | |
" background: var(--xr-background-color);\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dd {\n", | |
" grid-column: 2;\n", | |
" white-space: pre-wrap;\n", | |
" word-break: break-all;\n", | |
"}\n", | |
"\n", | |
".xr-icon-database,\n", | |
".xr-icon-file-text2 {\n", | |
" display: inline-block;\n", | |
" vertical-align: middle;\n", | |
" width: 1em;\n", | |
" height: 1.5em !important;\n", | |
" stroke-width: 0;\n", | |
" stroke: currentColor;\n", | |
" fill: currentColor;\n", | |
"}\n", | |
"</style><pre class='xr-text-repr-fallback'><xarray.Dataset>\n", | |
"Dimensions: (nelem: 5839, nod2: 3140, nz: 48)\n", | |
"Dimensions without coordinates: nelem, nod2, nz\n", | |
"Data variables:\n", | |
" nlevels_nod2D (nod2) int32 23 22 22 23 23 23 29 32 ... 29 20 29 29 23 21 22\n", | |
" nod_area (nod2, nz) float64 ...\n", | |
" elem_area (nelem) float64 7.572e+08 7.279e+08 ... 7.767e+09 6.581e+09</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-15cb99dc-e6c9-4dba-8fc8-902c07fe449f' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-15cb99dc-e6c9-4dba-8fc8-902c07fe449f' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>nelem</span>: 5839</li><li><span>nod2</span>: 3140</li><li><span>nz</span>: 48</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-3778f779-5248-47e4-a465-c310385ee025' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-3778f779-5248-47e4-a465-c310385ee025' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <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-7011e37e-1b42-49b9-ab70-6c4b21bfecaa' class='xr-section-summary-in' type='checkbox' checked><label for='section-7011e37e-1b42-49b9-ab70-6c4b21bfecaa' class='xr-section-summary' >Data variables: <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>nlevels_nod2D</span></div><div class='xr-var-dims'>(nod2)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-0fb1bf86-525e-4ac3-8a53-d18db878015c' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0fb1bf86-525e-4ac3-8a53-d18db878015c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d84015bb-bee1-4184-802c-73cb8a496cef' class='xr-var-data-in' type='checkbox'><label for='data-d84015bb-bee1-4184-802c-73cb8a496cef' 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>number of levels below nodes</dd></dl></div><div class='xr-var-data'><pre>array([23, 22, 22, ..., 23, 21, 22], dtype=int32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>nod_area</span></div><div class='xr-var-dims'>(nod2, nz)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-71b65b4c-0a10-4e13-9911-7a911fe99c34' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-71b65b4c-0a10-4e13-9911-7a911fe99c34' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-10d88cd5-a8c4-4e4f-9ab5-65dde80b5d73' class='xr-var-data-in' type='checkbox'><label for='data-10d88cd5-a8c4-4e4f-9ab5-65dde80b5d73' 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>nodal areas</dd></dl></div><div class='xr-var-data'><pre>[150720 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>elem_area</span></div><div class='xr-var-dims'>(nelem)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-b5a8d38c-fd72-4cff-a20a-db458435d933' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-b5a8d38c-fd72-4cff-a20a-db458435d933' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bcb532e4-e49c-48fe-bee2-56c10f58fba3' class='xr-var-data-in' type='checkbox'><label for='data-bcb532e4-e49c-48fe-bee2-56c10f58fba3' 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>element areas</dd></dl></div><div class='xr-var-data'><pre>array([7.572042e+08, 7.278958e+08, 9.803415e+08, ..., 6.775696e+09,\n", | |
" 7.766659e+09, 6.580706e+09])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-19864d42-53af-405d-af4d-14903a432eaa' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-19864d42-53af-405d-af4d-14903a432eaa' 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.Dataset>\n", | |
"Dimensions: (nelem: 5839, nod2: 3140, nz: 48)\n", | |
"Dimensions without coordinates: nelem, nod2, nz\n", | |
"Data variables:\n", | |
" nlevels_nod2D (nod2) int32 ...\n", | |
" nod_area (nod2, nz) float64 ...\n", | |
" elem_area (nelem) float64 ..." | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# because of recent changes to mesh diag file and reduce risk of errors just using necessary vars. \n", | |
"subset_vars = ['nlevels_nod2D', 'nod_area', 'elem_area']\n", | |
"partial_mesh_diag = pi_mdiag[subset_vars].rename({'elem_n':'nelem', 'nod_n':'nod2', 'nl':'nz'}) #, 'elem_n':'nelem'})\n", | |
"partial_mesh_diag['nod_area'] = partial_mesh_diag['nod_area'].T \n", | |
"partial_mesh_diag" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2021-07-18T05:21:55.615308Z", | |
"start_time": "2021-07-18T05:21:55.591500Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
"<defs>\n", | |
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"</symbol>\n", | |
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"</symbol>\n", | |
"</defs>\n", | |
"</svg>\n", | |
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
" *\n", | |
" */\n", | |
"\n", | |
":root {\n", | |
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
" --xr-background-color: var(--jp-layout-color0, white);\n", | |
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
"}\n", | |
"\n", | |
"html[theme=dark],\n", | |
"body.vscode-dark {\n", | |
" --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
" --xr-border-color: #1F1F1F;\n", | |
" --xr-disabled-color: #515151;\n", | |
" --xr-background-color: #111111;\n", | |
" --xr-background-color-row-even: #111111;\n", | |
" --xr-background-color-row-odd: #313131;\n", | |
"}\n", | |
"\n", | |
".xr-wrap {\n", | |
" display: block;\n", | |
" min-width: 300px;\n", | |
" max-width: 700px;\n", | |
"}\n", | |
"\n", | |
".xr-text-repr-fallback {\n", | |
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-header {\n", | |
" padding-top: 6px;\n", | |
" padding-bottom: 6px;\n", | |
" margin-bottom: 4px;\n", | |
" border-bottom: solid 1px var(--xr-border-color);\n", | |
"}\n", | |
"\n", | |
".xr-header > div,\n", | |
".xr-header > ul {\n", | |
" display: inline;\n", | |
" margin-top: 0;\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type,\n", | |
".xr-array-name {\n", | |
" margin-left: 2px;\n", | |
" margin-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-sections {\n", | |
" padding-left: 0 !important;\n", | |
" display: grid;\n", | |
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n", | |
"}\n", | |
"\n", | |
".xr-section-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input + label {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label {\n", | |
" cursor: pointer;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label:hover {\n", | |
" color: var(--xr-font-color0);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary {\n", | |
" grid-column: 1;\n", | |
" color: var(--xr-font-color2);\n", | |
" font-weight: 500;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary > span {\n", | |
" display: inline-block;\n", | |
" padding-left: 0.5em;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in + label:before {\n", | |
" display: inline-block;\n", | |
" content: '►';\n", | |
" font-size: 11px;\n", | |
" width: 15px;\n", | |
" text-align: center;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label:before {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label:before {\n", | |
" content: '▼';\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label > span {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary,\n", | |
".xr-section-inline-details {\n", | |
" padding-top: 4px;\n", | |
" padding-bottom: 4px;\n", | |
"}\n", | |
"\n", | |
".xr-section-inline-details {\n", | |
" grid-column: 2 / -1;\n", | |
"}\n", | |
"\n", | |
".xr-section-details {\n", | |
" display: none;\n", | |
" grid-column: 1 / -1;\n", | |
" margin-bottom: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap {\n", | |
" grid-column: 1 / -1;\n", | |
" display: grid;\n", | |
" grid-template-columns: 20px auto;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap > label {\n", | |
" grid-column: 1;\n", | |
" vertical-align: top;\n", | |
"}\n", | |
"\n", | |
".xr-preview {\n", | |
" color: var(--xr-font-color3);\n", | |
"}\n", | |
"\n", | |
".xr-array-preview,\n", | |
".xr-array-data {\n", | |
" padding: 0 5px !important;\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-array-data,\n", | |
".xr-array-in:checked ~ .xr-array-preview {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-array-in:checked ~ .xr-array-data,\n", | |
".xr-array-preview {\n", | |
" display: inline-block;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list {\n", | |
" display: inline-block !important;\n", | |
" list-style: none;\n", | |
" padding: 0 !important;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li {\n", | |
" display: inline-block;\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:before {\n", | |
" content: '(';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:after {\n", | |
" content: ')';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li:not(:last-child):after {\n", | |
" content: ',';\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-has-index {\n", | |
" font-weight: bold;\n", | |
"}\n", | |
"\n", | |
".xr-var-list,\n", | |
".xr-var-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > div,\n", | |
".xr-var-item label,\n", | |
".xr-var-item > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-even);\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > .xr-var-name:hover span {\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-var-list > li:nth-child(odd) > div,\n", | |
".xr-var-list > li:nth-child(odd) > label,\n", | |
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-odd);\n", | |
"}\n", | |
"\n", | |
".xr-var-name {\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-dims {\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-var-dtype {\n", | |
" grid-column: 3;\n", | |
" text-align: right;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-preview {\n", | |
" grid-column: 4;\n", | |
"}\n", | |
"\n", | |
".xr-var-name,\n", | |
".xr-var-dims,\n", | |
".xr-var-dtype,\n", | |
".xr-preview,\n", | |
".xr-attrs dt {\n", | |
" white-space: nowrap;\n", | |
" overflow: hidden;\n", | |
" text-overflow: ellipsis;\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-var-name:hover,\n", | |
".xr-var-dims:hover,\n", | |
".xr-var-dtype:hover,\n", | |
".xr-attrs dt:hover {\n", | |
" overflow: visible;\n", | |
" width: auto;\n", | |
" z-index: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs,\n", | |
".xr-var-data {\n", | |
" display: none;\n", | |
" background-color: var(--xr-background-color) !important;\n", | |
" padding-bottom: 5px !important;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
".xr-var-data-in:checked ~ .xr-var-data {\n", | |
" display: block;\n", | |
"}\n", | |
"\n", | |
".xr-var-data > table {\n", | |
" float: right;\n", | |
"}\n", | |
"\n", | |
".xr-var-name span,\n", | |
".xr-var-data,\n", | |
".xr-attrs {\n", | |
" padding-left: 25px !important;\n", | |
"}\n", | |
"\n", | |
".xr-attrs,\n", | |
".xr-var-attrs,\n", | |
".xr-var-data {\n", | |
" grid-column: 1 / -1;\n", | |
"}\n", | |
"\n", | |
"dl.xr-attrs {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" display: grid;\n", | |
" grid-template-columns: 125px auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt,\n", | |
".xr-attrs dd {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" float: left;\n", | |
" padding-right: 10px;\n", | |
" width: auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt {\n", | |
" font-weight: normal;\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt:hover span {\n", | |
" display: inline-block;\n", | |
" background: var(--xr-background-color);\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dd {\n", | |
" grid-column: 2;\n", | |
" white-space: pre-wrap;\n", | |
" word-break: break-all;\n", | |
"}\n", | |
"\n", | |
".xr-icon-database,\n", | |
".xr-icon-file-text2 {\n", | |
" display: inline-block;\n", | |
" vertical-align: middle;\n", | |
" width: 1em;\n", | |
" height: 1.5em !important;\n", | |
" stroke-width: 0;\n", | |
" stroke: currentColor;\n", | |
" fill: currentColor;\n", | |
"}\n", | |
"</style><pre class='xr-text-repr-fallback'><xarray.Dataset>\n", | |
"Dimensions: (nelem: 5839, nod2: 3140, nz: 48, nz1: 47, three: 3)\n", | |
"Coordinates:\n", | |
" * nz (nz) float64 0.0 5.0 10.0 20.0 ... 5.65e+03 6e+03 6.25e+03\n", | |
" lon (nod2) float64 -60.6 -60.73 -62.15 ... 127.2 122.0 124.5\n", | |
" lat (nod2) float64 74.28 73.91 74.05 ... -66.25 -66.73 -66.46\n", | |
" faces (nelem, three) uint32 0 11 1 1 11 ... 3133 3139 3136 3137\n", | |
" * nz1 (nz1) float64 2.5 7.5 15.0 ... 5.525e+03 5.825e+03 6.125e+03\n", | |
"Dimensions without coordinates: nelem, nod2, three\n", | |
"Data variables:\n", | |
" nlevels_nod2D (nod2) int32 23 22 22 23 23 23 29 32 ... 29 20 29 29 23 21 22\n", | |
" nod_area (nod2, nz) float64 ...\n", | |
" elem_area (nelem) float64 7.572e+08 7.279e+08 ... 7.767e+09 6.581e+09\n", | |
"Attributes:\n", | |
" Conventions: CF-1.7</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-13036dd4-02da-4151-aaab-61c2d2e3b615' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-13036dd4-02da-4151-aaab-61c2d2e3b615' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>nelem</span>: 5839</li><li><span>nod2</span>: 3140</li><li><span class='xr-has-index'>nz</span>: 48</li><li><span class='xr-has-index'>nz1</span>: 47</li><li><span>three</span>: 3</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-de6a1b69-ea8d-4192-b79f-69f63613f7ce' class='xr-section-summary-in' type='checkbox' checked><label for='section-de6a1b69-ea8d-4192-b79f-69f63613f7ce' class='xr-section-summary' >Coordinates: <span>(5)</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'>nz</span></div><div class='xr-var-dims'>(nz)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 5.0 10.0 ... 6e+03 6.25e+03</div><input id='attrs-cfeb6ca4-4dc0-453c-addc-ad1baa8dc9c7' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-cfeb6ca4-4dc0-453c-addc-ad1baa8dc9c7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-80a27a87-34ff-40d1-be4f-3d61461e731b' class='xr-var-data-in' type='checkbox'><label for='data-80a27a87-34ff-40d1-be4f-3d61461e731b' 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>depth</dd><dt><span>units :</span></dt><dd>m</dd></dl></div><div class='xr-var-data'><pre>array([0.00e+00, 5.00e+00, 1.00e+01, 2.00e+01, 3.00e+01, 4.00e+01, 5.00e+01,\n", | |
" 6.00e+01, 7.00e+01, 8.00e+01, 9.00e+01, 1.00e+02, 1.15e+02, 1.35e+02,\n", | |
" 1.60e+02, 1.90e+02, 2.30e+02, 2.80e+02, 3.40e+02, 4.10e+02, 4.90e+02,\n", | |
" 5.80e+02, 6.80e+02, 7.90e+02, 9.10e+02, 1.04e+03, 1.18e+03, 1.33e+03,\n", | |
" 1.50e+03, 1.70e+03, 1.92e+03, 2.15e+03, 2.40e+03, 2.65e+03, 2.90e+03,\n", | |
" 3.15e+03, 3.40e+03, 3.65e+03, 3.90e+03, 4.15e+03, 4.40e+03, 4.65e+03,\n", | |
" 4.90e+03, 5.15e+03, 5.40e+03, 5.65e+03, 6.00e+03, 6.25e+03])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lon</span></div><div class='xr-var-dims'>(nod2)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-60.6 -60.73 -62.15 ... 122.0 124.5</div><input id='attrs-972cce79-1f9a-4cfc-86f1-41b453b39808' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-972cce79-1f9a-4cfc-86f1-41b453b39808' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f8f0f1d0-5c15-4610-9dc3-a686cc7d47ea' class='xr-var-data-in' type='checkbox'><label for='data-f8f0f1d0-5c15-4610-9dc3-a686cc7d47ea' 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>units :</span></dt><dd>degrees_east</dd></dl></div><div class='xr-var-data'><pre>array([-60.6011834, -60.7301373, -62.1527131, ..., 127.2248174,\n", | |
" 121.9987517, 124.5142243])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lat</span></div><div class='xr-var-dims'>(nod2)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>74.28 73.91 74.05 ... -66.73 -66.46</div><input id='attrs-63bd9d03-a495-4d2a-babb-8a571159e92d' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-63bd9d03-a495-4d2a-babb-8a571159e92d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9811d484-64bb-4896-8df1-f2ebe5bacdde' class='xr-var-data-in' type='checkbox'><label for='data-9811d484-64bb-4896-8df1-f2ebe5bacdde' 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>units :</span></dt><dd>degrees_north</dd></dl></div><div class='xr-var-data'><pre>array([ 74.28292396, 73.91183809, 74.05145544, ..., -66.24740724,\n", | |
" -66.73281897, -66.46269918])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>faces</span></div><div class='xr-var-dims'>(nelem, three)</div><div class='xr-var-dtype'>uint32</div><div class='xr-var-preview xr-preview'>0 11 1 1 11 ... 3133 3139 3136 3137</div><input id='attrs-20b72dc7-9736-4153-80fd-3ffa7c70b5e4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-20b72dc7-9736-4153-80fd-3ffa7c70b5e4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-93b617d2-670d-4cb2-98c7-6592d2af3521' class='xr-var-data-in' type='checkbox'><label for='data-93b617d2-670d-4cb2-98c7-6592d2af3521' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0, 11, 1],\n", | |
" [ 1, 11, 9],\n", | |
" [ 1, 9, 8],\n", | |
" ...,\n", | |
" [3138, 3135, 3139],\n", | |
" [3138, 3134, 3133],\n", | |
" [3139, 3136, 3137]], dtype=uint32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>nz1</span></div><div class='xr-var-dims'>(nz1)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.5 7.5 ... 5.825e+03 6.125e+03</div><input id='attrs-07e6dc23-0cdd-4bbc-9338-6b943c96108e' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-07e6dc23-0cdd-4bbc-9338-6b943c96108e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7c8e3d46-5bae-45d1-9387-16b2655e2edf' class='xr-var-data-in' type='checkbox'><label for='data-7c8e3d46-5bae-45d1-9387-16b2655e2edf' 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>depth at half level</dd><dt><span>units :</span></dt><dd>m</dd><dt><span>positive :</span></dt><dd>down</dd><dt><span>axis :</span></dt><dd>Z</dd></dl></div><div class='xr-var-data'><pre>array([2.500e+00, 7.500e+00, 1.500e+01, 2.500e+01, 3.500e+01, 4.500e+01,\n", | |
" 5.500e+01, 6.500e+01, 7.500e+01, 8.500e+01, 9.500e+01, 1.075e+02,\n", | |
" 1.250e+02, 1.475e+02, 1.750e+02, 2.100e+02, 2.550e+02, 3.100e+02,\n", | |
" 3.750e+02, 4.500e+02, 5.350e+02, 6.300e+02, 7.350e+02, 8.500e+02,\n", | |
" 9.750e+02, 1.110e+03, 1.255e+03, 1.415e+03, 1.600e+03, 1.810e+03,\n", | |
" 2.035e+03, 2.275e+03, 2.525e+03, 2.775e+03, 3.025e+03, 3.275e+03,\n", | |
" 3.525e+03, 3.775e+03, 4.025e+03, 4.275e+03, 4.525e+03, 4.775e+03,\n", | |
" 5.025e+03, 5.275e+03, 5.525e+03, 5.825e+03, 6.125e+03])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e42cf1d0-2cb6-4af5-9925-5b52050f73c0' class='xr-section-summary-in' type='checkbox' checked><label for='section-e42cf1d0-2cb6-4af5-9925-5b52050f73c0' class='xr-section-summary' >Data variables: <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>nlevels_nod2D</span></div><div class='xr-var-dims'>(nod2)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>23 22 22 23 23 ... 29 29 23 21 22</div><input id='attrs-11a574b7-d22c-4c5f-9fd0-6e670f1e6f4f' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-11a574b7-d22c-4c5f-9fd0-6e670f1e6f4f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f9f13396-747b-4334-93a3-97eae9e906b5' class='xr-var-data-in' type='checkbox'><label for='data-f9f13396-747b-4334-93a3-97eae9e906b5' 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>number of levels below nodes</dd></dl></div><div class='xr-var-data'><pre>array([23, 22, 22, ..., 23, 21, 22], dtype=int32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>nod_area</span></div><div class='xr-var-dims'>(nod2, nz)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-8ebb6a4b-8637-4074-88e1-fbee741a03a9' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-8ebb6a4b-8637-4074-88e1-fbee741a03a9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-05deb8df-d146-4607-a553-175fd65cea6d' class='xr-var-data-in' type='checkbox'><label for='data-05deb8df-d146-4607-a553-175fd65cea6d' 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>nodal areas</dd></dl></div><div class='xr-var-data'><pre>[150720 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>elem_area</span></div><div class='xr-var-dims'>(nelem)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>7.572e+08 7.279e+08 ... 6.581e+09</div><input id='attrs-f58d7c7b-5990-4e7b-b5de-d07b6eede491' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-f58d7c7b-5990-4e7b-b5de-d07b6eede491' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a43adfc3-9c78-42a7-a34e-8f037d2141cf' class='xr-var-data-in' type='checkbox'><label for='data-a43adfc3-9c78-42a7-a34e-8f037d2141cf' 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>element areas</dd></dl></div><div class='xr-var-data'><pre>array([7.572042e+08, 7.278958e+08, 9.803415e+08, ..., 6.775696e+09,\n", | |
" 7.766659e+09, 6.580706e+09])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8b74f0c7-a94e-4577-96cd-01961d94db07' class='xr-section-summary-in' type='checkbox' checked><label for='section-8b74f0c7-a94e-4577-96cd-01961d94db07' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>Conventions :</span></dt><dd>CF-1.7</dd></dl></div></li></ul></div></div>" | |
], | |
"text/plain": [ | |
"<xarray.Dataset>\n", | |
"Dimensions: (nelem: 5839, nod2: 3140, nz: 48, nz1: 47, three: 3)\n", | |
"Coordinates:\n", | |
" * nz (nz) float64 0.0 5.0 10.0 20.0 ... 5.65e+03 6e+03 6.25e+03\n", | |
" lon (nod2) float64 -60.6 -60.73 -62.15 ... 127.2 122.0 124.5\n", | |
" lat (nod2) float64 74.28 73.91 74.05 ... -66.25 -66.73 -66.46\n", | |
" faces (nelem, three) uint32 0 11 1 1 11 ... 3133 3139 3136 3137\n", | |
" * nz1 (nz1) float64 2.5 7.5 15.0 ... 5.525e+03 5.825e+03 6.125e+03\n", | |
"Dimensions without coordinates: nelem, nod2, three\n", | |
"Data variables:\n", | |
" nlevels_nod2D (nod2) int32 23 22 22 23 23 23 29 32 ... 29 20 29 29 23 21 22\n", | |
" nod_area (nod2, nz) float64 ...\n", | |
" elem_area (nelem) float64 7.572e+08 7.279e+08 ... 7.767e+09 6.581e+09\n", | |
"Attributes:\n", | |
" Conventions: CF-1.7" | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# merge coords data with subset vars of mesh diag\n", | |
"merged_grid_dataset = xr.merge([pi_grid, partial_mesh_diag], compat='override')\n", | |
"merged_grid_dataset" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2021-07-18T05:21:55.744465Z", | |
"start_time": "2021-07-18T05:21:55.616649Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n", | |
"<defs>\n", | |
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n", | |
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n", | |
"</symbol>\n", | |
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n", | |
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n", | |
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n", | |
"</symbol>\n", | |
"</defs>\n", | |
"</svg>\n", | |
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n", | |
" *\n", | |
" */\n", | |
"\n", | |
":root {\n", | |
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n", | |
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n", | |
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n", | |
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n", | |
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n", | |
" --xr-background-color: var(--jp-layout-color0, white);\n", | |
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n", | |
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n", | |
"}\n", | |
"\n", | |
"html[theme=dark],\n", | |
"body.vscode-dark {\n", | |
" --xr-font-color0: rgba(255, 255, 255, 1);\n", | |
" --xr-font-color2: rgba(255, 255, 255, 0.54);\n", | |
" --xr-font-color3: rgba(255, 255, 255, 0.38);\n", | |
" --xr-border-color: #1F1F1F;\n", | |
" --xr-disabled-color: #515151;\n", | |
" --xr-background-color: #111111;\n", | |
" --xr-background-color-row-even: #111111;\n", | |
" --xr-background-color-row-odd: #313131;\n", | |
"}\n", | |
"\n", | |
".xr-wrap {\n", | |
" display: block;\n", | |
" min-width: 300px;\n", | |
" max-width: 700px;\n", | |
"}\n", | |
"\n", | |
".xr-text-repr-fallback {\n", | |
" /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-header {\n", | |
" padding-top: 6px;\n", | |
" padding-bottom: 6px;\n", | |
" margin-bottom: 4px;\n", | |
" border-bottom: solid 1px var(--xr-border-color);\n", | |
"}\n", | |
"\n", | |
".xr-header > div,\n", | |
".xr-header > ul {\n", | |
" display: inline;\n", | |
" margin-top: 0;\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type,\n", | |
".xr-array-name {\n", | |
" margin-left: 2px;\n", | |
" margin-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-obj-type {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-sections {\n", | |
" padding-left: 0 !important;\n", | |
" display: grid;\n", | |
" grid-template-columns: 150px auto auto 1fr 20px 20px;\n", | |
"}\n", | |
"\n", | |
".xr-section-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-item input + label {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label {\n", | |
" cursor: pointer;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-item input:enabled + label:hover {\n", | |
" color: var(--xr-font-color0);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary {\n", | |
" grid-column: 1;\n", | |
" color: var(--xr-font-color2);\n", | |
" font-weight: 500;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary > span {\n", | |
" display: inline-block;\n", | |
" padding-left: 0.5em;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label {\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in + label:before {\n", | |
" display: inline-block;\n", | |
" content: '►';\n", | |
" font-size: 11px;\n", | |
" width: 15px;\n", | |
" text-align: center;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:disabled + label:before {\n", | |
" color: var(--xr-disabled-color);\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label:before {\n", | |
" content: '▼';\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked + label > span {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary,\n", | |
".xr-section-inline-details {\n", | |
" padding-top: 4px;\n", | |
" padding-bottom: 4px;\n", | |
"}\n", | |
"\n", | |
".xr-section-inline-details {\n", | |
" grid-column: 2 / -1;\n", | |
"}\n", | |
"\n", | |
".xr-section-details {\n", | |
" display: none;\n", | |
" grid-column: 1 / -1;\n", | |
" margin-bottom: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-section-summary-in:checked ~ .xr-section-details {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap {\n", | |
" grid-column: 1 / -1;\n", | |
" display: grid;\n", | |
" grid-template-columns: 20px auto;\n", | |
"}\n", | |
"\n", | |
".xr-array-wrap > label {\n", | |
" grid-column: 1;\n", | |
" vertical-align: top;\n", | |
"}\n", | |
"\n", | |
".xr-preview {\n", | |
" color: var(--xr-font-color3);\n", | |
"}\n", | |
"\n", | |
".xr-array-preview,\n", | |
".xr-array-data {\n", | |
" padding: 0 5px !important;\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-array-data,\n", | |
".xr-array-in:checked ~ .xr-array-preview {\n", | |
" display: none;\n", | |
"}\n", | |
"\n", | |
".xr-array-in:checked ~ .xr-array-data,\n", | |
".xr-array-preview {\n", | |
" display: inline-block;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list {\n", | |
" display: inline-block !important;\n", | |
" list-style: none;\n", | |
" padding: 0 !important;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li {\n", | |
" display: inline-block;\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:before {\n", | |
" content: '(';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list:after {\n", | |
" content: ')';\n", | |
"}\n", | |
"\n", | |
".xr-dim-list li:not(:last-child):after {\n", | |
" content: ',';\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-has-index {\n", | |
" font-weight: bold;\n", | |
"}\n", | |
"\n", | |
".xr-var-list,\n", | |
".xr-var-item {\n", | |
" display: contents;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > div,\n", | |
".xr-var-item label,\n", | |
".xr-var-item > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-even);\n", | |
" margin-bottom: 0;\n", | |
"}\n", | |
"\n", | |
".xr-var-item > .xr-var-name:hover span {\n", | |
" padding-right: 5px;\n", | |
"}\n", | |
"\n", | |
".xr-var-list > li:nth-child(odd) > div,\n", | |
".xr-var-list > li:nth-child(odd) > label,\n", | |
".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", | |
" background-color: var(--xr-background-color-row-odd);\n", | |
"}\n", | |
"\n", | |
".xr-var-name {\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-dims {\n", | |
" grid-column: 2;\n", | |
"}\n", | |
"\n", | |
".xr-var-dtype {\n", | |
" grid-column: 3;\n", | |
" text-align: right;\n", | |
" color: var(--xr-font-color2);\n", | |
"}\n", | |
"\n", | |
".xr-var-preview {\n", | |
" grid-column: 4;\n", | |
"}\n", | |
"\n", | |
".xr-var-name,\n", | |
".xr-var-dims,\n", | |
".xr-var-dtype,\n", | |
".xr-preview,\n", | |
".xr-attrs dt {\n", | |
" white-space: nowrap;\n", | |
" overflow: hidden;\n", | |
" text-overflow: ellipsis;\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-var-name:hover,\n", | |
".xr-var-dims:hover,\n", | |
".xr-var-dtype:hover,\n", | |
".xr-attrs dt:hover {\n", | |
" overflow: visible;\n", | |
" width: auto;\n", | |
" z-index: 1;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs,\n", | |
".xr-var-data {\n", | |
" display: none;\n", | |
" background-color: var(--xr-background-color) !important;\n", | |
" padding-bottom: 5px !important;\n", | |
"}\n", | |
"\n", | |
".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", | |
".xr-var-data-in:checked ~ .xr-var-data {\n", | |
" display: block;\n", | |
"}\n", | |
"\n", | |
".xr-var-data > table {\n", | |
" float: right;\n", | |
"}\n", | |
"\n", | |
".xr-var-name span,\n", | |
".xr-var-data,\n", | |
".xr-attrs {\n", | |
" padding-left: 25px !important;\n", | |
"}\n", | |
"\n", | |
".xr-attrs,\n", | |
".xr-var-attrs,\n", | |
".xr-var-data {\n", | |
" grid-column: 1 / -1;\n", | |
"}\n", | |
"\n", | |
"dl.xr-attrs {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" display: grid;\n", | |
" grid-template-columns: 125px auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt,\n", | |
".xr-attrs dd {\n", | |
" padding: 0;\n", | |
" margin: 0;\n", | |
" float: left;\n", | |
" padding-right: 10px;\n", | |
" width: auto;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt {\n", | |
" font-weight: normal;\n", | |
" grid-column: 1;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dt:hover span {\n", | |
" display: inline-block;\n", | |
" background: var(--xr-background-color);\n", | |
" padding-right: 10px;\n", | |
"}\n", | |
"\n", | |
".xr-attrs dd {\n", | |
" grid-column: 2;\n", | |
" white-space: pre-wrap;\n", | |
" word-break: break-all;\n", | |
"}\n", | |
"\n", | |
".xr-icon-database,\n", | |
".xr-icon-file-text2 {\n", | |
" display: inline-block;\n", | |
" vertical-align: middle;\n", | |
" width: 1em;\n", | |
" height: 1.5em !important;\n", | |
" stroke-width: 0;\n", | |
" stroke: currentColor;\n", | |
" fill: currentColor;\n", | |
"}\n", | |
"</style><pre class='xr-text-repr-fallback'><xarray.Dataset>\n", | |
"Dimensions: (nelem: 1411, nod2: 788, nz: 48, nz1: 47, three: 3)\n", | |
"Coordinates:\n", | |
" * nz (nz) float64 0.0 5.0 10.0 20.0 ... 5.65e+03 6e+03 6.25e+03\n", | |
" lon (nod2) float64 -60.6 -60.73 -62.15 ... -24.18 -51.75 -30.51\n", | |
" lat (nod2) float64 74.28 73.91 74.05 74.63 ... 60.14 89.4 60.24\n", | |
" * nz1 (nz1) float64 2.5 7.5 15.0 ... 5.525e+03 5.825e+03 6.125e+03\n", | |
"Dimensions without coordinates: nelem, nod2, three\n", | |
"Data variables:\n", | |
" nlevels_nod2D (nod2) int32 23 22 22 23 23 23 29 32 ... 34 35 31 31 33 38 33\n", | |
" nod_area (nod2, nz) float64 ...\n", | |
" elem_area (nelem) float64 7.572e+08 7.279e+08 ... 8.252e+09 1.068e+10\n", | |
" faces (nelem, three) int64 0 11 1 1 11 9 ... 765 767 787 779 783\n", | |
"Attributes:\n", | |
" Conventions: CF-1.7</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-5c9ce5f4-f0b8-4bf7-8727-8e0544fc47d3' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-5c9ce5f4-f0b8-4bf7-8727-8e0544fc47d3' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>nelem</span>: 1411</li><li><span>nod2</span>: 788</li><li><span class='xr-has-index'>nz</span>: 48</li><li><span class='xr-has-index'>nz1</span>: 47</li><li><span>three</span>: 3</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-8dd8e164-d6d1-4525-b7ef-c038f1578abe' class='xr-section-summary-in' type='checkbox' checked><label for='section-8dd8e164-d6d1-4525-b7ef-c038f1578abe' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>nz</span></div><div class='xr-var-dims'>(nz)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 5.0 10.0 ... 6e+03 6.25e+03</div><input id='attrs-5d8e5475-751b-40af-bed1-143f1b82b21f' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-5d8e5475-751b-40af-bed1-143f1b82b21f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bc10e235-5e6b-4098-8c94-39371499b1b2' class='xr-var-data-in' type='checkbox'><label for='data-bc10e235-5e6b-4098-8c94-39371499b1b2' 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>depth</dd><dt><span>units :</span></dt><dd>m</dd></dl></div><div class='xr-var-data'><pre>array([0.00e+00, 5.00e+00, 1.00e+01, 2.00e+01, 3.00e+01, 4.00e+01, 5.00e+01,\n", | |
" 6.00e+01, 7.00e+01, 8.00e+01, 9.00e+01, 1.00e+02, 1.15e+02, 1.35e+02,\n", | |
" 1.60e+02, 1.90e+02, 2.30e+02, 2.80e+02, 3.40e+02, 4.10e+02, 4.90e+02,\n", | |
" 5.80e+02, 6.80e+02, 7.90e+02, 9.10e+02, 1.04e+03, 1.18e+03, 1.33e+03,\n", | |
" 1.50e+03, 1.70e+03, 1.92e+03, 2.15e+03, 2.40e+03, 2.65e+03, 2.90e+03,\n", | |
" 3.15e+03, 3.40e+03, 3.65e+03, 3.90e+03, 4.15e+03, 4.40e+03, 4.65e+03,\n", | |
" 4.90e+03, 5.15e+03, 5.40e+03, 5.65e+03, 6.00e+03, 6.25e+03])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lon</span></div><div class='xr-var-dims'>(nod2)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-60.6 -60.73 ... -51.75 -30.51</div><input id='attrs-3ab82e63-af56-483b-9fe8-96d4c0b752cd' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-3ab82e63-af56-483b-9fe8-96d4c0b752cd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2973e1aa-1682-44ae-bb40-b0b80add3cc1' class='xr-var-data-in' type='checkbox'><label for='data-2973e1aa-1682-44ae-bb40-b0b80add3cc1' 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>units :</span></dt><dd>degrees_east</dd></dl></div><div class='xr-var-data'><pre>array([-60.6011834, -60.7301373, -62.1527131, -60.7111357, -62.0335574,\n", | |
" -59.9736546, -63.6794846, -65.5532533, -61.7425291, -59.9392366,\n", | |
" -59.4011468, -59.4682313, -58.2107582, -63.8723102, -65.8697378,\n", | |
" -61.481425 , -63.1080387, -60.7387397, -58.7615517, -61.7898189,\n", | |
" -63.4757471, -67.7643045, -67.2611287, -65.2572298, -60.3321748,\n", | |
" -60.0999984, -59.1322154, -58.6796624, -57.6832805, -61.3388917,\n", | |
" -17.5874553, -19.3452906, -20.193573 , -21.360015 , -22.0731905,\n", | |
" -17.3615116, -19.3179929, -69.9981337, -68.3272769, -70.5321889,\n", | |
" -64.9493073, -66.9079393, -62.4986667, -64.1209248, -61.6927496,\n", | |
" -60.2271156, -63.313816 , -62.1683447, -69.3572198, -71.1274434,\n", | |
" -67.3222202, -69.0691111, -65.3302779, -61.1782488, -59.7324034,\n", | |
" -58.8700492, -58.7942475, -57.9515235, -57.0728499, -60.242282 ,\n", | |
" -22.18846 , -15.864382 , -16.1900108, -17.5943849, -16.4992691,\n", | |
" -18.3352937, -19.1510128, -19.884127 , -20.3914312, -20.4190573,\n", | |
" -13.6900725, -15.5560981, -15.1247163, -17.036157 , -19.2260797,\n", | |
" -72.1317502, -73.1418277, -72.5764595, -70.9305796, -69.0667892,\n", | |
" -65.9487421, -67.7255644, -63.3247203, -65.1578192, -62.3021101,\n", | |
" -64.035559 , -63.0665036, -67.1972495, -70.993713 , -69.2346547,\n", | |
" -73.7066298, -65.9096723, -61.9682947, -60.1743691, -59.5249251,\n", | |
" -58.6420308, -57.6046824, -57.7521788, -56.4039398, -58.7334756,\n", | |
"...\n", | |
" -37.5788809, -29.8638878, -31.9190301, -28.7478505, -26.7165052,\n", | |
" -51.3093826, -48.6928923, -42.0170874, -24.584036 , -20.4223153,\n", | |
" -22.5932098, -18.0637806, -15.2591444, -13.0685335, 4.8099114,\n", | |
" -0.7631325, 0.9536942, -10.5742171, -3.4522832, -6.2258395,\n", | |
" -8.0254895, 56.0027079, 59.2753388, 59.90681 , 22.5450385,\n", | |
" 35.1172268, 56.5555749, 49.1058152, -32.3346845, -20.6902288,\n", | |
" 9.8820769, -4.6172846, -69.2402742, -61.0198742, -50.2812027,\n", | |
" -42.9953178, -76.9252973, -33.2449506, -38.9110071, -40.5337178,\n", | |
" -35.2362225, -36.9041204, -30.719841 , -28.1970493, -26.1170894,\n", | |
" -48.9989769, -45.88116 , -42.6665636, -24.4799837, -20.289292 ,\n", | |
" -22.3403919, -16.5460068, -18.4025409, -14.4763194, -12.2394067,\n", | |
" -1.8526408, -9.8394779, -4.7989946, -7.1539795, 27.2715165,\n", | |
" 46.5507785, -31.4846808, -12.6486745, 9.8917942, -76.7401409,\n", | |
" -69.2617411, -57.0933879, -49.3665172, -32.5326156, -39.9943438,\n", | |
" -38.4339414, -34.539255 , -36.4598513, -29.8054757, -26.8445248,\n", | |
" -24.5253799, -20.3908207, -22.4971617, -16.2901591, -18.5459302,\n", | |
" -13.845121 , -3.0893386, -8.8690158, -5.6877627, 35.7109276,\n", | |
" -32.3258812, 4.8609709, -70.2155904, -65.6854508, -31.716164 ,\n", | |
" -38.2559088, -33.8313733, -36.1242058, -28.7357179, -26.3149615,\n", | |
" -24.1775859, -51.7460792, -30.5110981])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lat</span></div><div class='xr-var-dims'>(nod2)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>74.28 73.91 74.05 ... 89.4 60.24</div><input id='attrs-23c44e0d-dc2e-4630-af83-b644205fd030' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-23c44e0d-dc2e-4630-af83-b644205fd030' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ef185cc7-3e73-4ebd-a1f9-faa9d0905d0e' class='xr-var-data-in' type='checkbox'><label for='data-ef185cc7-3e73-4ebd-a1f9-faa9d0905d0e' 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>units :</span></dt><dd>degrees_north</dd></dl></div><div class='xr-var-data'><pre>array([74.28292396, 73.91183809, 74.05145544, 74.62911128, 74.4895389 ,\n", | |
" 74.90949094, 73.74144053, 73.51748871, 73.52045373, 73.66892311,\n", | |
" 74.46243486, 74.06723304, 74.81511452, 74.28270565, 74.10521378,\n", | |
" 74.91340459, 74.76179413, 75.22060446, 75.35363504, 72.94770914,\n", | |
" 73.15971162, 73.69173144, 73.09713373, 72.87428151, 73.25685914,\n", | |
" 72.82708439, 73.40406999, 73.77589969, 74.25984227, 72.41936723,\n", | |
" 74.63089965, 74.23311831, 73.72578432, 73.3059939 , 72.83643713,\n", | |
" 75.13751959, 74.81065658, 73.77066415, 74.23273244, 74.30679702,\n", | |
" 74.66868627, 74.59711365, 75.13111528, 75.09380071, 75.41187693,\n", | |
" 75.81257499, 72.49967638, 71.9420773 , 73.19996794, 73.27299699,\n", | |
" 72.52170963, 72.70977309, 72.31076936, 71.45116509, 72.35909313,\n", | |
" 73.03400257, 72.64376036, 73.31552534, 73.73866118, 71.91638548,\n", | |
" 72.27578009, 75.31507733, 74.86862726, 74.11558163, 74.42436041,\n", | |
" 73.6849668 , 73.26135666, 72.91346502, 72.53918457, 72.14103337,\n", | |
" 75.98437592, 75.78140956, 76.22642993, 75.62681974, 75.41733055,\n", | |
" 73.82952712, 73.2540275 , 74.35822597, 74.84709621, 74.77343895,\n", | |
" 75.04642712, 75.06933191, 75.46930746, 75.41815407, 76.00455627,\n", | |
" 71.87330733, 71.36277617, 72.03616325, 72.65325509, 72.18809402,\n", | |
" 72.28820793, 71.74121825, 70.91464265, 70.9265789 , 71.40145391,\n", | |
" 72.15002293, 72.82347185, 72.42072686, 73.13169965, 71.76648755,\n", | |
"...\n", | |
" 62.8906219 , 64.49359861, 64.27334762, 63.87144212, 63.79679448,\n", | |
" 60.94950864, 61.17765299, 62.66123191, 63.58932147, 63.61723904,\n", | |
" 63.08808256, 62.71689526, 62.60102842, 62.3530608 , 61.12995447,\n", | |
" 62.33253145, 60.83547578, 62.16464721, 62.47976482, 62.72909127,\n", | |
" 62.05481102, 78.85885626, 80.49311005, 74.63928802, 84.28898835,\n", | |
" 83.93404805, 82.33621486, 83.64865418, 85.34304791, 85.66442538,\n", | |
" 84.93091088, 85.58104524, 84.47956847, 84.9043985 , 85.07055782,\n", | |
" 85.68939339, 83.9631273 , 63.53910343, 62.23144497, 61.6596236 ,\n", | |
" 62.88424494, 62.14166562, 63.47221435, 63.03721688, 63.03301261,\n", | |
" 60.04094898, 60.48664638, 60.9653997 , 62.54564952, 62.33260488,\n", | |
" 62.05045674, 61.83846438, 61.5432462 , 61.48300546, 61.1839886 ,\n", | |
" 61.23860301, 61.05045649, 61.42474019, 60.97610999, 85.4065995 ,\n", | |
" 85.13986682, 86.32771732, 86.6446852 , 86.29844314, 84.76042685,\n", | |
" 85.36910047, 85.73798293, 86.62068389, 62.65344373, 60.68410014,\n", | |
" 61.35705215, 61.93936276, 61.16656112, 62.4206587 , 62.14331346,\n", | |
" 61.61408647, 61.17321834, 61.00682615, 60.65123539, 60.26446165,\n", | |
" 60.14664759, 60.11279718, 60.06548562, 60.06104169, 86.87573279,\n", | |
" 87.64104411, 87.89096529, 86.41238905, 87.61681574, 61.52783758,\n", | |
" 60.31101264, 60.76363751, 60.04588505, 61.29508754, 60.89727597,\n", | |
" 60.14122613, 89.40483957, 60.2375343 ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>nz1</span></div><div class='xr-var-dims'>(nz1)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.5 7.5 ... 5.825e+03 6.125e+03</div><input id='attrs-9c7b33ea-bdcf-4b28-802e-c1da4faeca33' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-9c7b33ea-bdcf-4b28-802e-c1da4faeca33' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-cb71e9cb-1940-46f2-be92-d028da593035' class='xr-var-data-in' type='checkbox'><label for='data-cb71e9cb-1940-46f2-be92-d028da593035' 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>depth at half level</dd><dt><span>units :</span></dt><dd>m</dd><dt><span>positive :</span></dt><dd>down</dd><dt><span>axis :</span></dt><dd>Z</dd></dl></div><div class='xr-var-data'><pre>array([2.500e+00, 7.500e+00, 1.500e+01, 2.500e+01, 3.500e+01, 4.500e+01,\n", | |
" 5.500e+01, 6.500e+01, 7.500e+01, 8.500e+01, 9.500e+01, 1.075e+02,\n", | |
" 1.250e+02, 1.475e+02, 1.750e+02, 2.100e+02, 2.550e+02, 3.100e+02,\n", | |
" 3.750e+02, 4.500e+02, 5.350e+02, 6.300e+02, 7.350e+02, 8.500e+02,\n", | |
" 9.750e+02, 1.110e+03, 1.255e+03, 1.415e+03, 1.600e+03, 1.810e+03,\n", | |
" 2.035e+03, 2.275e+03, 2.525e+03, 2.775e+03, 3.025e+03, 3.275e+03,\n", | |
" 3.525e+03, 3.775e+03, 4.025e+03, 4.275e+03, 4.525e+03, 4.775e+03,\n", | |
" 5.025e+03, 5.275e+03, 5.525e+03, 5.825e+03, 6.125e+03])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d0ec6062-f55f-45f5-9489-1964d5844f8f' class='xr-section-summary-in' type='checkbox' checked><label for='section-d0ec6062-f55f-45f5-9489-1964d5844f8f' class='xr-section-summary' >Data variables: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>nlevels_nod2D</span></div><div class='xr-var-dims'>(nod2)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>23 22 22 23 23 ... 31 31 33 38 33</div><input id='attrs-8581aee8-c94b-499d-ae4e-90e1ff675819' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-8581aee8-c94b-499d-ae4e-90e1ff675819' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2e9c40eb-050f-43af-b807-3c8a3bace3ba' class='xr-var-data-in' type='checkbox'><label for='data-2e9c40eb-050f-43af-b807-3c8a3bace3ba' 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>number of levels below nodes</dd></dl></div><div class='xr-var-data'><pre>array([23, 22, 22, ..., 33, 38, 33], dtype=int32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>nod_area</span></div><div class='xr-var-dims'>(nod2, nz)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-7d9485c3-aff8-4eed-aed1-128f202acbda' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-7d9485c3-aff8-4eed-aed1-128f202acbda' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-191aeff2-f8f5-48e7-90c7-d67672b59b17' class='xr-var-data-in' type='checkbox'><label for='data-191aeff2-f8f5-48e7-90c7-d67672b59b17' 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>nodal areas</dd></dl></div><div class='xr-var-data'><pre>array([[1.685419e+09, 1.685419e+09, 1.685419e+09, ..., 0.000000e+00,\n", | |
" 0.000000e+00, 0.000000e+00],\n", | |
" [1.531237e+09, 1.531237e+09, 1.531237e+09, ..., 0.000000e+00,\n", | |
" 0.000000e+00, 0.000000e+00],\n", | |
" [2.555195e+09, 2.555195e+09, 2.555195e+09, ..., 0.000000e+00,\n", | |
" 0.000000e+00, 0.000000e+00],\n", | |
" ...,\n", | |
" [2.203654e+10, 2.203654e+10, 2.203654e+10, ..., 0.000000e+00,\n", | |
" 0.000000e+00, 0.000000e+00],\n", | |
" [4.312251e+10, 4.312251e+10, 4.312251e+10, ..., 0.000000e+00,\n", | |
" 0.000000e+00, 0.000000e+00],\n", | |
" [2.591320e+10, 2.591320e+10, 2.591320e+10, ..., 0.000000e+00,\n", | |
" 0.000000e+00, 0.000000e+00]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>elem_area</span></div><div class='xr-var-dims'>(nelem)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>7.572e+08 7.279e+08 ... 1.068e+10</div><input id='attrs-e3da6ce2-4ef1-49c3-88f2-5dc18a54141c' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-e3da6ce2-4ef1-49c3-88f2-5dc18a54141c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ecd07806-44fd-4f94-bece-fa2002b0c389' class='xr-var-data-in' type='checkbox'><label for='data-ecd07806-44fd-4f94-bece-fa2002b0c389' 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>element areas</dd></dl></div><div class='xr-var-data'><pre>array([7.572042e+08, 7.278958e+08, 9.803415e+08, ..., 7.615236e+09,\n", | |
" 8.252081e+09, 1.067757e+10])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>faces</span></div><div class='xr-var-dims'>(nelem, three)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 11 1 1 11 ... 765 767 787 779 783</div><input id='attrs-a9d46cf9-140a-4fc5-90c9-c7a3b6e0445c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a9d46cf9-140a-4fc5-90c9-c7a3b6e0445c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6185816f-99a3-4c6e-b2fc-4df86a03f509' class='xr-var-data-in' type='checkbox'><label for='data-6185816f-99a3-4c6e-b2fc-4df86a03f509' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0, 11, 1],\n", | |
" [ 1, 11, 9],\n", | |
" [ 1, 9, 8],\n", | |
" ...,\n", | |
" [784, 764, 765],\n", | |
" [785, 765, 767],\n", | |
" [787, 779, 783]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-faa04964-4d39-44c8-b0fd-1425acf23acd' class='xr-section-summary-in' type='checkbox' checked><label for='section-faa04964-4d39-44c8-b0fd-1425acf23acd' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>Conventions :</span></dt><dd>CF-1.7</dd></dl></div></li></ul></div></div>" | |
], | |
"text/plain": [ | |
"<xarray.Dataset>\n", | |
"Dimensions: (nelem: 1411, nod2: 788, nz: 48, nz1: 47, three: 3)\n", | |
"Coordinates:\n", | |
" * nz (nz) float64 0.0 5.0 10.0 20.0 ... 5.65e+03 6e+03 6.25e+03\n", | |
" lon (nod2) float64 -60.6 -60.73 -62.15 ... -24.18 -51.75 -30.51\n", | |
" lat (nod2) float64 74.28 73.91 74.05 74.63 ... 60.14 89.4 60.24\n", | |
" * nz1 (nz1) float64 2.5 7.5 15.0 ... 5.525e+03 5.825e+03 6.125e+03\n", | |
"Dimensions without coordinates: nelem, nod2, three\n", | |
"Data variables:\n", | |
" nlevels_nod2D (nod2) int32 23 22 22 23 23 23 29 32 ... 34 35 31 31 33 38 33\n", | |
" nod_area (nod2, nz) float64 ...\n", | |
" elem_area (nelem) float64 7.572e+08 7.279e+08 ... 8.252e+09 1.068e+10\n", | |
" faces (nelem, three) int64 0 11 1 1 11 9 ... 765 767 787 779 783\n", | |
"Attributes:\n", | |
" Conventions: CF-1.7" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# select on merged dataset\n", | |
"grid_sel = merged_grid_dataset.pyfesom2.select(region=(-80,60,60,90))\n", | |
"grid_sel" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2021-07-18T05:21:56.006088Z", | |
"start_time": "2021-07-18T05:21:55.745886Z" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"# save to a file \n", | |
"grid_sel.to_netcdf('subset_coords.nc')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.8" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment