{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# How to read and write rotated grids"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import xarray as xr\n",
    "from nes import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "nc_path_1 = '/gpfs/scratch/bsc32/bsc32538/mr_multiplyby/OUT/stats_bnds/monarch/a45g/regional/daily_max/O3_all/O3_all-000_2021080300.nc'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1. Read dataset"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Open with xarray"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2 {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
       "Dimensions:       (time: 1, nv: 2, lev: 24, rlat: 271, rlon: 351)\n",
       "Coordinates:\n",
       "  * time          (time) datetime64[ns] 2021-08-03\n",
       "  * lev           (lev) float64 0.0 1.0 2.0 3.0 4.0 ... 19.0 20.0 21.0 22.0 23.0\n",
       "    lat           (rlat, rlon) float64 16.35 16.43 16.52 ... 58.83 58.68 58.53\n",
       "    lon           (rlat, rlon) float64 -22.18 -22.02 -21.85 ... 88.05 88.23\n",
       "  * rlat          (rlat) float64 -27.0 -26.8 -26.6 -26.4 ... 26.4 26.6 26.8 27.0\n",
       "  * rlon          (rlon) float64 -35.0 -34.8 -34.6 -34.4 ... 34.4 34.6 34.8 35.0\n",
       "Dimensions without coordinates: nv\n",
       "Data variables:\n",
       "    time_bnds     (time, nv) datetime64[ns] 2021-08-03 2021-08-07\n",
       "    O3_all        (time, lev, rlat, rlon) float32 ...\n",
       "    rotated_pole  |S1 b&#x27;&#x27;\n",
       "Attributes:\n",
       "    Conventions:  CF-1.7\n",
       "    comment:      Generated on marenostrum4</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-e2f0b405-752f-4f4c-8afb-165c17bb05e8' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e2f0b405-752f-4f4c-8afb-165c17bb05e8' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 1</li><li><span>nv</span>: 2</li><li><span class='xr-has-index'>lev</span>: 24</li><li><span class='xr-has-index'>rlat</span>: 271</li><li><span class='xr-has-index'>rlon</span>: 351</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-8e0cefd1-89bd-4c69-ae71-9e019b04a277' class='xr-section-summary-in' type='checkbox'  checked><label for='section-8e0cefd1-89bd-4c69-ae71-9e019b04a277' class='xr-section-summary' >Coordinates: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2021-08-03</div><input id='attrs-192a7115-85c3-4f4f-9634-3ca80391431f' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-192a7115-85c3-4f4f-9634-3ca80391431f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-44ac5e81-f599-4ee8-affd-385a6bbf2036' class='xr-var-data-in' type='checkbox'><label for='data-44ac5e81-f599-4ee8-affd-385a6bbf2036' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>time</dd><dt><span>long_name :</span></dt><dd>time</dd><dt><span>bounds :</span></dt><dd>time_bnds</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2021-08-03T00:00:00.000000000&#x27;], dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lev</span></div><div class='xr-var-dims'>(lev)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.0 2.0 3.0 ... 21.0 22.0 23.0</div><input id='attrs-74d34770-0e99-4a27-abb0-b18ebf6e0296' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-74d34770-0e99-4a27-abb0-b18ebf6e0296' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d20272a5-e7a2-49d1-8a19-aae87f9998ec' class='xr-var-data-in' type='checkbox'><label for='data-d20272a5-e7a2-49d1-8a19-aae87f9998ec' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>-</dd><dt><span>positive :</span></dt><dd>up</dd></dl></div><div class='xr-var-data'><pre>array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12., 13.,\n",
       "       14., 15., 16., 17., 18., 19., 20., 21., 22., 23.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lat</span></div><div class='xr-var-dims'>(rlat, rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-85808f38-d14b-4618-a88b-80ab2efcf251' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-85808f38-d14b-4618-a88b-80ab2efcf251' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0aa3fb31-d03c-4898-a964-a6881d6a58d5' class='xr-var-data-in' type='checkbox'><label for='data-0aa3fb31-d03c-4898-a964-a6881d6a58d5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>long_name :</span></dt><dd>latitude coordinate</dd><dt><span>standard_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><pre>array([[16.350338, 16.43293 , 16.515146, ..., 16.515146, 16.43293 , 16.350338],\n",
       "       [16.527426, 16.610239, 16.692677, ..., 16.692677, 16.610243, 16.527426],\n",
       "       [16.704472, 16.787508, 16.870167, ..., 16.870167, 16.78751 , 16.704472],\n",
       "       ...,\n",
       "       [58.32095 , 58.472683, 58.62431 , ..., 58.62431 , 58.472683, 58.32095 ],\n",
       "       [58.426285, 58.578201, 58.730026, ..., 58.730026, 58.578201, 58.426285],\n",
       "       [58.530792, 58.682899, 58.834919, ..., 58.834919, 58.682903, 58.530792]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lon</span></div><div class='xr-var-dims'>(rlat, rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-348162d7-92a7-4104-90e4-0ff0594b5ea8' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-348162d7-92a7-4104-90e4-0ff0594b5ea8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ec110398-f021-4f84-91f0-adf96b9f4ec1' class='xr-var-data-in' type='checkbox'><label for='data-ec110398-f021-4f84-91f0-adf96b9f4ec1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>long_name :</span></dt><dd>longitude coordinate</dd><dt><span>standard_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><pre>array([[-22.181265, -22.016672, -21.851799, ...,  41.851795,  42.016666,\n",
       "         42.181259],\n",
       "       [-22.278179, -22.113186, -21.947905, ...,  41.947899,  42.113174,\n",
       "         42.278172],\n",
       "       [-22.375267, -22.209873, -22.044189, ...,  42.044186,  42.209873,\n",
       "         42.375263],\n",
       "       ...,\n",
       "       [-67.577667, -67.397064, -67.215347, ...,  87.21534 ,  87.397057,\n",
       "         87.57766 ],\n",
       "       [-67.901878, -67.722473, -67.541939, ...,  87.541939,  87.722458,\n",
       "         87.901871],\n",
       "       [-68.228035, -68.04982 , -67.870514, ...,  87.870506,  88.04982 ,\n",
       "         88.228035]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>rlat</span></div><div class='xr-var-dims'>(rlat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-27.0 -26.8 -26.6 ... 26.8 27.0</div><input id='attrs-cc271a56-06e9-4c17-87e8-d984006f5b39' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-cc271a56-06e9-4c17-87e8-d984006f5b39' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6bced223-fb1d-4a4d-9a14-f528f7173c64' class='xr-var-data-in' type='checkbox'><label for='data-6bced223-fb1d-4a4d-9a14-f528f7173c64' 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 in rotated pole grid</dd><dt><span>units :</span></dt><dd>0.0174532925199433 rad</dd><dt><span>standard_name :</span></dt><dd>grid_latitude</dd></dl></div><div class='xr-var-data'><pre>array([-27.      , -26.799999, -26.6     , ...,  26.6     ,  26.800001,\n",
       "        27.      ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>rlon</span></div><div class='xr-var-dims'>(rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-35.0 -34.8 -34.6 ... 34.8 35.0</div><input id='attrs-f8af063b-55bc-419c-8f1f-00d79162f797' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-f8af063b-55bc-419c-8f1f-00d79162f797' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-dbef52a9-5d2e-4d0d-ab8e-dd0b0ad25eaa' class='xr-var-data-in' type='checkbox'><label for='data-dbef52a9-5d2e-4d0d-ab8e-dd0b0ad25eaa' 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 in rotated pole grid</dd><dt><span>units :</span></dt><dd>0.0174532925199433 rad</dd><dt><span>standard_name :</span></dt><dd>grid_longitude</dd></dl></div><div class='xr-var-data'><pre>array([-35.      , -34.799999, -34.599998, ...,  34.600002,  34.799999,\n",
       "        35.      ])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1055e853-490b-4f0e-9bdd-01ef18938f41' class='xr-section-summary-in' type='checkbox'  checked><label for='section-1055e853-490b-4f0e-9bdd-01ef18938f41' 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>time_bnds</span></div><div class='xr-var-dims'>(time, nv)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-bd8ab926-d371-41bf-a1d4-2132d146a5b2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bd8ab926-d371-41bf-a1d4-2132d146a5b2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b7be75c3-964f-4046-b238-d799033f30b9' class='xr-var-data-in' type='checkbox'><label for='data-b7be75c3-964f-4046-b238-d799033f30b9' 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([[&#x27;2021-08-03T00:00:00.000000000&#x27;, &#x27;2021-08-07T00:00:00.000000000&#x27;]],\n",
       "      dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>O3_all</span></div><div class='xr-var-dims'>(time, lev, rlat, rlon)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-176c5302-94fa-4ff9-92ea-6940b422c0e5' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-176c5302-94fa-4ff9-92ea-6940b422c0e5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-235befe3-2df6-4f3c-a033-954fe4a92760' class='xr-var-data-in' type='checkbox'><label for='data-235befe3-2df6-4f3c-a033-954fe4a92760' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>kg/m3</dd><dt><span>long_name :</span></dt><dd>TRACERS_044</dd><dt><span>cell_methods :</span></dt><dd>time: maximum (interval: 1hr)</dd><dt><span>grid_mapping :</span></dt><dd>rotated_pole</dd></dl></div><div class='xr-var-data'><pre>[2282904 values with dtype=float32]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>rotated_pole</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>|S1</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-b651cb0f-393b-421f-9751-0eec7b63a7bb' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-b651cb0f-393b-421f-9751-0eec7b63a7bb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-06711290-2fd3-4fbb-abb7-cd4fa9274dc3' class='xr-var-data-in' type='checkbox'><label for='data-06711290-2fd3-4fbb-abb7-cd4fa9274dc3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>grid_mapping_name :</span></dt><dd>rotated_latitude_longitude</dd><dt><span>grid_north_pole_latitude :</span></dt><dd>39.0</dd><dt><span>grid_north_pole_longitude :</span></dt><dd>-170.0</dd></dl></div><div class='xr-var-data'><pre>array(b&#x27;&#x27;, dtype=&#x27;|S1&#x27;)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e5635b51-233f-4db9-aad2-3ee9920c8d8b' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e5635b51-233f-4db9-aad2-3ee9920c8d8b' class='xr-section-summary' >Attributes: <span>(2)</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><dt><span>comment :</span></dt><dd>Generated on marenostrum4</dd></dl></div></li></ul></div></div>"
      ],
      "text/plain": [
       "<xarray.Dataset>\n",
       "Dimensions:       (time: 1, nv: 2, lev: 24, rlat: 271, rlon: 351)\n",
       "Coordinates:\n",
       "  * time          (time) datetime64[ns] 2021-08-03\n",
       "  * lev           (lev) float64 0.0 1.0 2.0 3.0 4.0 ... 19.0 20.0 21.0 22.0 23.0\n",
       "    lat           (rlat, rlon) float64 ...\n",
       "    lon           (rlat, rlon) float64 ...\n",
       "  * rlat          (rlat) float64 -27.0 -26.8 -26.6 -26.4 ... 26.4 26.6 26.8 27.0\n",
       "  * rlon          (rlon) float64 -35.0 -34.8 -34.6 -34.4 ... 34.4 34.6 34.8 35.0\n",
       "Dimensions without coordinates: nv\n",
       "Data variables:\n",
       "    time_bnds     (time, nv) datetime64[ns] ...\n",
       "    O3_all        (time, lev, rlat, rlon) float32 ...\n",
       "    rotated_pole  |S1 ...\n",
       "Attributes:\n",
       "    Conventions:  CF-1.7\n",
       "    comment:      Generated on marenostrum4"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xr.open_dataset(nc_path_1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Open with NES"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<nes.nc_projections.rotated_nes.RotatedNes at 0x7f9035dce990>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nessy_1 = open_netcdf(path=nc_path_1, info=True)\n",
    "nessy_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[datetime.datetime(2021, 8, 3, 0, 0)]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nessy_1.time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': masked_array(data=[ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10.,\n",
       "                    11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21.,\n",
       "                    22., 23.],\n",
       "              mask=False,\n",
       "        fill_value=1e+20),\n",
       " 'dimensions': ('lev',),\n",
       " 'units': '',\n",
       " 'positive': 'up'}"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nessy_1.lev"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': masked_array(\n",
       "   data=[[16.35033798, 16.43292999, 16.51514626, ..., 16.51514626,\n",
       "          16.43292999, 16.35033798],\n",
       "         [16.52742577, 16.61023903, 16.69267654, ..., 16.69267654,\n",
       "          16.61024284, 16.52742577],\n",
       "         [16.70447159, 16.78750801, 16.87016678, ..., 16.87016678,\n",
       "          16.78750992, 16.70447159],\n",
       "         ...,\n",
       "         [58.32094955, 58.47268295, 58.62430954, ..., 58.62430954,\n",
       "          58.47268295, 58.32094955],\n",
       "         [58.42628479, 58.57820129, 58.73002625, ..., 58.73002625,\n",
       "          58.57820129, 58.42628479],\n",
       "         [58.53079224, 58.68289948, 58.83491898, ..., 58.83491898,\n",
       "          58.68290329, 58.53079224]],\n",
       "   mask=False,\n",
       "   fill_value=1e+20),\n",
       " 'dimensions': ('rlat', 'rlon'),\n",
       " 'units': 'degrees_north',\n",
       " 'axis': 'Y',\n",
       " 'long_name': 'latitude coordinate',\n",
       " 'standard_name': 'latitude'}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nessy_1.lat"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': masked_array(\n",
       "   data=[[-22.18126488, -22.01667213, -21.85179901, ...,  41.8517952 ,\n",
       "           42.01666641,  42.18125916],\n",
       "         [-22.27817917, -22.11318588, -21.94790459, ...,  41.94789886,\n",
       "           42.11317444,  42.27817154],\n",
       "         [-22.37526703, -22.2098732 , -22.04418945, ...,  42.04418564,\n",
       "           42.2098732 ,  42.37526321],\n",
       "         ...,\n",
       "         [-67.57766724, -67.39706421, -67.21534729, ...,  87.21533966,\n",
       "           87.39705658,  87.57765961],\n",
       "         [-67.90187836, -67.72247314, -67.54193878, ...,  87.54193878,\n",
       "           87.72245789,  87.90187073],\n",
       "         [-68.22803497, -68.04981995, -67.87051392, ...,  87.87050629,\n",
       "           88.04981995,  88.22803497]],\n",
       "   mask=False,\n",
       "   fill_value=1e+20),\n",
       " 'dimensions': ('rlat', 'rlon'),\n",
       " 'units': 'degrees_east',\n",
       " 'axis': 'X',\n",
       " 'long_name': 'longitude coordinate',\n",
       " 'standard_name': 'longitude'}"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nessy_1.lon"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Rank 000: Loading O3_all var (1/1)\n",
      "Rank 000: Loaded O3_all var ((1, 24, 271, 351))\n"
     ]
    }
   ],
   "source": [
    "nessy_1.load()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'O3_all': {'data': masked_array(\n",
       "    data=[[[[2.82636070e-09, 2.83436141e-09, 2.82522827e-09, ...,\n",
       "             2.96334601e-09, 2.94810221e-09, 2.91839553e-09],\n",
       "            [2.80930834e-09, 2.57182142e-09, 2.55521360e-09, ...,\n",
       "             2.56395216e-09, 2.55890820e-09, 2.89073032e-09],\n",
       "            [2.79031842e-09, 2.53415999e-09, 2.50317100e-09, ...,\n",
       "             2.56737764e-09, 2.58685584e-09, 2.85498758e-09],\n",
       "            ...,\n",
       "            [4.54469973e-09, 2.31674457e-09, 2.22753971e-09, ...,\n",
       "             3.90127353e-09, 3.89643118e-09, 3.95452204e-09],\n",
       "            [4.54129534e-09, 3.39469808e-09, 2.30205255e-09, ...,\n",
       "             3.88824706e-09, 3.88372090e-09, 3.95252631e-09],\n",
       "            [4.55012028e-09, 4.54941684e-09, 4.55885596e-09, ...,\n",
       "             3.93945099e-09, 3.94256938e-09, 3.94736510e-09]],\n",
       "  \n",
       "           [[1.61966751e-09, 1.62850033e-09, 1.62801062e-09, ...,\n",
       "             1.74583636e-09, 1.74684045e-09, 1.74125825e-09],\n",
       "            [1.60704539e-09, 1.41438683e-09, 1.39824063e-09, ...,\n",
       "             1.43241041e-09, 1.45136980e-09, 1.73744363e-09],\n",
       "            [1.59303792e-09, 1.41264567e-09, 1.43958856e-09, ...,\n",
       "             1.43522705e-09, 1.45869528e-09, 1.72746673e-09],\n",
       "            ...,\n",
       "            [3.39471939e-09, 2.65527422e-09, 2.22850582e-09, ...,\n",
       "             3.00350167e-09, 3.02176750e-09, 3.04009262e-09],\n",
       "            [3.42592332e-09, 2.81851942e-09, 2.28753505e-09, ...,\n",
       "             2.99818836e-09, 2.99247205e-09, 3.04403525e-09],\n",
       "            [3.43113582e-09, 3.43824125e-09, 3.44929552e-09, ...,\n",
       "             3.05421777e-09, 3.04752024e-09, 3.04445491e-09]],\n",
       "  \n",
       "           [[6.52169652e-10, 6.62677024e-10, 6.71934786e-10, ...,\n",
       "             6.84429291e-10, 6.85826118e-10, 6.81504464e-10],\n",
       "            [6.54959087e-10, 6.65219158e-10, 6.72430500e-10, ...,\n",
       "             7.02121916e-10, 6.88325397e-10, 6.78990253e-10],\n",
       "            [6.57915333e-10, 6.72102929e-10, 6.82566170e-10, ...,\n",
       "             7.10820458e-10, 7.07094217e-10, 6.77522760e-10],\n",
       "            ...,\n",
       "            [2.26027863e-09, 2.27629537e-09, 2.22616392e-09, ...,\n",
       "             1.80253423e-09, 1.80225357e-09, 1.75757697e-09],\n",
       "            [2.25028196e-09, 2.24872521e-09, 2.25445618e-09, ...,\n",
       "             1.78916737e-09, 1.75583581e-09, 1.73717007e-09],\n",
       "            [2.25827335e-09, 2.26974151e-09, 2.28325270e-09, ...,\n",
       "             1.80090465e-09, 1.77703174e-09, 1.75434933e-09]],\n",
       "  \n",
       "           ...,\n",
       "  \n",
       "           [[6.20177729e-11, 6.26959387e-11, 6.28658792e-11, ...,\n",
       "             7.74274672e-11, 7.81546980e-11, 7.60479180e-11],\n",
       "            [6.20486787e-11, 4.91600684e-11, 4.88878833e-11, ...,\n",
       "             8.30884250e-11, 8.02152303e-11, 7.64004970e-11],\n",
       "            [6.20976950e-11, 4.84989236e-11, 4.85273696e-11, ...,\n",
       "             8.46209977e-11, 8.60716498e-11, 9.29777644e-11],\n",
       "            ...,\n",
       "            [6.15721710e-11, 5.85051035e-11, 5.68927752e-11, ...,\n",
       "             7.66955388e-11, 7.87262894e-11, 8.41871295e-11],\n",
       "            [6.17081941e-11, 5.77536560e-11, 5.71826440e-11, ...,\n",
       "             8.49015233e-11, 8.82505458e-11, 9.20043208e-11],\n",
       "            [6.09760506e-11, 6.03529102e-11, 6.24047411e-11, ...,\n",
       "             9.69636524e-11, 9.73700426e-11, 9.67554162e-11]],\n",
       "  \n",
       "           [[6.17567178e-11, 6.23894963e-11, 6.25706292e-11, ...,\n",
       "             9.04916420e-11, 8.90077803e-11, 8.43536768e-11],\n",
       "            [6.17901147e-11, 4.59270816e-11, 4.57923699e-11, ...,\n",
       "             1.06383589e-10, 1.05693093e-10, 9.44862175e-11],\n",
       "            [6.18271337e-11, 4.17853495e-11, 3.94594427e-11, ...,\n",
       "             1.34135009e-10, 1.37096737e-10, 1.13853482e-10],\n",
       "            ...,\n",
       "            [5.87425456e-11, 5.60845814e-11, 5.33429169e-11, ...,\n",
       "             6.52061183e-11, 6.64711411e-11, 7.06842501e-11],\n",
       "            [5.92315016e-11, 5.72428251e-11, 5.51245403e-11, ...,\n",
       "             7.10893150e-11, 7.38196310e-11, 7.53354532e-11],\n",
       "            [5.72967125e-11, 5.87497967e-11, 6.08200851e-11, ...,\n",
       "             7.97847274e-11, 8.28124236e-11, 7.89215707e-11]],\n",
       "  \n",
       "           [[6.15217946e-11, 6.21571961e-11, 6.23377391e-11, ...,\n",
       "             1.08401239e-10, 1.07494236e-10, 1.08711720e-10],\n",
       "            [6.15563989e-11, 4.56989759e-11, 4.46428450e-11, ...,\n",
       "             1.30999808e-10, 1.26581134e-10, 1.39005307e-10],\n",
       "            [6.15933693e-11, 3.98656906e-11, 3.75483949e-11, ...,\n",
       "             1.37105632e-10, 1.48587462e-10, 1.83946344e-10],\n",
       "            ...,\n",
       "            [4.68582569e-11, 4.44464673e-11, 4.43960736e-11, ...,\n",
       "             5.86025117e-11, 5.84869791e-11, 6.32652056e-11],\n",
       "            [4.99817097e-11, 4.49490271e-11, 4.43218864e-11, ...,\n",
       "             6.19639479e-11, 6.07859180e-11, 6.55651922e-11],\n",
       "            [4.98553143e-11, 4.61104453e-11, 4.96835975e-11, ...,\n",
       "             6.42673414e-11, 6.38328765e-11, 6.38894007e-11]]]],\n",
       "    mask=False,\n",
       "    fill_value=1e+20,\n",
       "    dtype=float32),\n",
       "  'dimensions': ('time', 'lev', 'rlat', 'rlon'),\n",
       "  'units': 'kg/m3',\n",
       "  'long_name': 'TRACERS_044',\n",
       "  'coordinates': 'lat lon',\n",
       "  'cell_methods': 'time: maximum (interval: 1hr)',\n",
       "  'grid_mapping': 'rotated_pole'}}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nessy_1.variables"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2. Write dataset"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Write with NES"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Rank 000: Creating rotated_file_1.nc\n",
      "Rank 000: NetCDF ready to write\n",
      "Rank 000: Dimensions done\n",
      "Rank 000: Writing O3_all var (1/1)\n",
      "Rank 000: Var O3_all created (1/1)\n",
      "Rank 000: Filling O3_all)\n",
      "Rank 000: Var O3_all data (1/1)\n",
      "Rank 000: Var O3_all completed (1/1)\n"
     ]
    }
   ],
   "source": [
    "nessy_1.to_netcdf('rotated_file_1.nc', info=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "toc-hr-collapsed": true
   },
   "source": [
    "### Reopen with NES"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<nes.nc_projections.rotated_nes.RotatedNes at 0x7f9035e0bcd0>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nessy_2 = open_netcdf('rotated_file_1.nc', info=True)\n",
    "nessy_2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Reopen with xarray"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2 {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
       "Dimensions:       (time: 1, time_nv: 2, lev: 24, rlat: 271, rlon: 351)\n",
       "Coordinates:\n",
       "  * time          (time) datetime64[ns] 2021-08-03\n",
       "  * lev           (lev) float64 0.0 1.0 2.0 3.0 4.0 ... 19.0 20.0 21.0 22.0 23.0\n",
       "    lat           (rlat, rlon) float64 16.35 16.43 16.52 ... 58.83 58.68 58.53\n",
       "    lon           (rlat, rlon) float64 -22.18 -22.02 -21.85 ... 88.05 88.23\n",
       "  * rlat          (rlat) float64 -27.0 -26.8 -26.6 -26.4 ... 26.4 26.6 26.8 27.0\n",
       "  * rlon          (rlon) float64 -35.0 -34.8 -34.6 -34.4 ... 34.4 34.6 34.8 35.0\n",
       "Dimensions without coordinates: time_nv\n",
       "Data variables:\n",
       "    time_bnds     (time, time_nv) datetime64[ns] 2021-08-03 2021-08-07\n",
       "    O3_all        (time, lev, rlat, rlon) float32 ...\n",
       "    rotated_pole  |S1 b&#x27;&#x27;\n",
       "Attributes:\n",
       "    Conventions:  CF-1.7\n",
       "    comment:      Generated on marenostrum4</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-4f3c3cd8-0cb5-4270-bef7-7e2fe4753b76' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-4f3c3cd8-0cb5-4270-bef7-7e2fe4753b76' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 1</li><li><span>time_nv</span>: 2</li><li><span class='xr-has-index'>lev</span>: 24</li><li><span class='xr-has-index'>rlat</span>: 271</li><li><span class='xr-has-index'>rlon</span>: 351</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-0f9e6559-8b90-4f2a-af41-dd6e3b8e4681' class='xr-section-summary-in' type='checkbox'  checked><label for='section-0f9e6559-8b90-4f2a-af41-dd6e3b8e4681' class='xr-section-summary' >Coordinates: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2021-08-03</div><input id='attrs-c2df4b71-7cfa-4c70-85a0-c8bab2216944' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-c2df4b71-7cfa-4c70-85a0-c8bab2216944' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b4d9e7c3-c231-45b4-9696-98d48231ce50' class='xr-var-data-in' type='checkbox'><label for='data-b4d9e7c3-c231-45b4-9696-98d48231ce50' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>time</dd><dt><span>long_name :</span></dt><dd>time</dd><dt><span>bounds :</span></dt><dd>time_bnds</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2021-08-03T00:00:00.000000000&#x27;], dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lev</span></div><div class='xr-var-dims'>(lev)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.0 2.0 3.0 ... 21.0 22.0 23.0</div><input id='attrs-2e8eb9ff-449f-4a6d-9419-ec0834955c78' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2e8eb9ff-449f-4a6d-9419-ec0834955c78' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9535203f-7f86-4482-b0d7-da770ebe45af' class='xr-var-data-in' type='checkbox'><label for='data-9535203f-7f86-4482-b0d7-da770ebe45af' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>1</dd><dt><span>positive :</span></dt><dd>up</dd></dl></div><div class='xr-var-data'><pre>array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12., 13.,\n",
       "       14., 15., 16., 17., 18., 19., 20., 21., 22., 23.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lat</span></div><div class='xr-var-dims'>(rlat, rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-bda95bd5-74c7-4bac-b9f7-0744ec61bc10' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-bda95bd5-74c7-4bac-b9f7-0744ec61bc10' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0a284eb7-9b55-4131-ab8a-18fea6aa22b8' class='xr-var-data-in' type='checkbox'><label for='data-0a284eb7-9b55-4131-ab8a-18fea6aa22b8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>long_name :</span></dt><dd>latitude coordinate</dd><dt><span>standard_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><pre>array([[16.350338, 16.43293 , 16.515146, ..., 16.515146, 16.43293 , 16.350338],\n",
       "       [16.527426, 16.610239, 16.692677, ..., 16.692677, 16.610243, 16.527426],\n",
       "       [16.704472, 16.787508, 16.870167, ..., 16.870167, 16.78751 , 16.704472],\n",
       "       ...,\n",
       "       [58.32095 , 58.472683, 58.62431 , ..., 58.62431 , 58.472683, 58.32095 ],\n",
       "       [58.426285, 58.578201, 58.730026, ..., 58.730026, 58.578201, 58.426285],\n",
       "       [58.530792, 58.682899, 58.834919, ..., 58.834919, 58.682903, 58.530792]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lon</span></div><div class='xr-var-dims'>(rlat, rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-59887eb3-9d9a-4b94-aa02-6cee51b40dcd' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-59887eb3-9d9a-4b94-aa02-6cee51b40dcd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f4b553ae-e230-4d83-866a-8addc90a0ffd' class='xr-var-data-in' type='checkbox'><label for='data-f4b553ae-e230-4d83-866a-8addc90a0ffd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>long_name :</span></dt><dd>longitude coordinate</dd><dt><span>standard_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><pre>array([[-22.181265, -22.016672, -21.851799, ...,  41.851795,  42.016666,\n",
       "         42.181259],\n",
       "       [-22.278179, -22.113186, -21.947905, ...,  41.947899,  42.113174,\n",
       "         42.278172],\n",
       "       [-22.375267, -22.209873, -22.044189, ...,  42.044186,  42.209873,\n",
       "         42.375263],\n",
       "       ...,\n",
       "       [-67.577667, -67.397064, -67.215347, ...,  87.21534 ,  87.397057,\n",
       "         87.57766 ],\n",
       "       [-67.901878, -67.722473, -67.541939, ...,  87.541939,  87.722458,\n",
       "         87.901871],\n",
       "       [-68.228035, -68.04982 , -67.870514, ...,  87.870506,  88.04982 ,\n",
       "         88.228035]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>rlat</span></div><div class='xr-var-dims'>(rlat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-27.0 -26.8 -26.6 ... 26.8 27.0</div><input id='attrs-8935f8e8-9ee7-4b93-b52e-fdcbfe30acd8' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-8935f8e8-9ee7-4b93-b52e-fdcbfe30acd8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d8d9e0e5-40ca-4a2b-95a3-7ff9efd62b52' class='xr-var-data-in' type='checkbox'><label for='data-d8d9e0e5-40ca-4a2b-95a3-7ff9efd62b52' 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 in rotated pole grid</dd><dt><span>units :</span></dt><dd>0.0174532925199433 rad</dd><dt><span>standard_name :</span></dt><dd>grid_latitude</dd></dl></div><div class='xr-var-data'><pre>array([-27.      , -26.799999, -26.6     , ...,  26.6     ,  26.800001,\n",
       "        27.      ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>rlon</span></div><div class='xr-var-dims'>(rlon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-35.0 -34.8 -34.6 ... 34.8 35.0</div><input id='attrs-4843b640-9233-4a37-a131-ba34c6d523fc' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-4843b640-9233-4a37-a131-ba34c6d523fc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d08d1b2a-e0f7-4d90-8f37-b4ec505fb3fb' class='xr-var-data-in' type='checkbox'><label for='data-d08d1b2a-e0f7-4d90-8f37-b4ec505fb3fb' 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 in rotated pole grid</dd><dt><span>units :</span></dt><dd>0.0174532925199433 rad</dd><dt><span>standard_name :</span></dt><dd>grid_longitude</dd></dl></div><div class='xr-var-data'><pre>array([-35.      , -34.799999, -34.599998, ...,  34.600002,  34.799999,\n",
       "        35.      ])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-cb1e3b71-872f-47a1-be4f-c1976883b19d' class='xr-section-summary-in' type='checkbox'  checked><label for='section-cb1e3b71-872f-47a1-be4f-c1976883b19d' 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>time_bnds</span></div><div class='xr-var-dims'>(time, time_nv)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-d0280ed4-7a45-4405-9eec-0901d6c2b034' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d0280ed4-7a45-4405-9eec-0901d6c2b034' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-75a8e0f3-e8f6-4e7d-9407-243a8e103e46' class='xr-var-data-in' type='checkbox'><label for='data-75a8e0f3-e8f6-4e7d-9407-243a8e103e46' 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([[&#x27;2021-08-03T00:00:00.000000000&#x27;, &#x27;2021-08-07T00:00:00.000000000&#x27;]],\n",
       "      dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>O3_all</span></div><div class='xr-var-dims'>(time, lev, rlat, rlon)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-fbd2a525-4a8f-4333-9632-1e5f2b7955bb' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-fbd2a525-4a8f-4333-9632-1e5f2b7955bb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c33e91f4-0e05-4f07-ab6c-26cc49d86bc9' class='xr-var-data-in' type='checkbox'><label for='data-c33e91f4-0e05-4f07-ab6c-26cc49d86bc9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>kg/m3</dd><dt><span>long_name :</span></dt><dd>TRACERS_044</dd><dt><span>cell_methods :</span></dt><dd>time: maximum (interval: 1hr)</dd><dt><span>grid_mapping :</span></dt><dd>rotated_pole</dd></dl></div><div class='xr-var-data'><pre>[2282904 values with dtype=float32]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>rotated_pole</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>|S1</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-00a64bde-2ede-4d34-9674-4f71021c9af0' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-00a64bde-2ede-4d34-9674-4f71021c9af0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9542fd55-208d-4d12-bfbe-5f681389bff8' class='xr-var-data-in' type='checkbox'><label for='data-9542fd55-208d-4d12-bfbe-5f681389bff8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>grid_mapping_name :</span></dt><dd>rotated_latitude_longitude</dd><dt><span>grid_north_pole_latitude :</span></dt><dd>39.0</dd><dt><span>grid_north_pole_longitude :</span></dt><dd>-170.0</dd></dl></div><div class='xr-var-data'><pre>array(b&#x27;&#x27;, dtype=&#x27;|S1&#x27;)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8be6c660-eb26-4fff-bfcc-16474f0b3a01' class='xr-section-summary-in' type='checkbox'  checked><label for='section-8be6c660-eb26-4fff-bfcc-16474f0b3a01' class='xr-section-summary' >Attributes: <span>(2)</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><dt><span>comment :</span></dt><dd>Generated on marenostrum4</dd></dl></div></li></ul></div></div>"
      ],
      "text/plain": [
       "<xarray.Dataset>\n",
       "Dimensions:       (time: 1, time_nv: 2, lev: 24, rlat: 271, rlon: 351)\n",
       "Coordinates:\n",
       "  * time          (time) datetime64[ns] 2021-08-03\n",
       "  * lev           (lev) float64 0.0 1.0 2.0 3.0 4.0 ... 19.0 20.0 21.0 22.0 23.0\n",
       "    lat           (rlat, rlon) float64 ...\n",
       "    lon           (rlat, rlon) float64 ...\n",
       "  * rlat          (rlat) float64 -27.0 -26.8 -26.6 -26.4 ... 26.4 26.6 26.8 27.0\n",
       "  * rlon          (rlon) float64 -35.0 -34.8 -34.6 -34.4 ... 34.4 34.6 34.8 35.0\n",
       "Dimensions without coordinates: time_nv\n",
       "Data variables:\n",
       "    time_bnds     (time, time_nv) datetime64[ns] ...\n",
       "    O3_all        (time, lev, rlat, rlon) float32 ...\n",
       "    rotated_pole  |S1 ...\n",
       "Attributes:\n",
       "    Conventions:  CF-1.7\n",
       "    comment:      Generated on marenostrum4"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xr.open_dataset('rotated_file_1.nc')"
   ]
  }
 ],
 "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.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
