{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "60dc9908-b54e-4702-a2ac-7b2a39ceb78f",
   "metadata": {},
   "source": [
    "## *NOTE* Frequency indices T?90, R??mm, N??? have errors in them. Output files deleted."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4176fb9d-fa11-4c3f-9fe3-ab8f85c8a2c6",
   "metadata": {},
   "source": [
    "Calculate the climatology and anomalies for each index.  \n",
    "Then calculate the statistical significance to plot results\n",
    "\n",
    "Using ARISE-SAI runs with 5% seeding. Because only 5 runs of SSP245 have tmax and tmin, subtract the ensemble mean climatology from all temperatures."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "fc0a7e24-8f74-481e-ad77-a5a92941f37f",
   "metadata": {},
   "outputs": [],
   "source": [
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "8716581d-05e0-4263-938e-508dbf434365",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "import numpy as np # data arrays\n",
    "import xarray as xr # data array manipulation\n",
    "import pandas as pd\n",
    "import os\n",
    "import glob # to enable pattern matching\n",
    "from scipy import stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "f911edaf-07da-4e30-89e0-55b9f6849768",
   "metadata": {},
   "outputs": [],
   "source": [
    "iDir = \"/glade/work/maritye/Data/ARISE-MCB/ETCCDI/\"\n",
    "inSSP = '/glade/work/maritye/Data/ARISE-SAI/ETCCDI/SSP245/'\n",
    "oDir = '/glade/work/maritye/Data/ARISE-MCB/ETCCDI/Anomalies/'\n",
    "\n",
    "varnam = ['PRECT', 'TREFHTMX', 'TREFHTMN']"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "934c4a5e-2606-46ed-9544-cb8630a14365",
   "metadata": {},
   "source": [
    "Can't quite work out how to loop the directories and the separate lists of indices. So just do three repeated calculations for anomalies and significances"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c58ec6c6-44de-486d-8027-081e24e3bee3",
   "metadata": {},
   "source": [
    "Create standard information to include with each data set"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "a6652955-d0ba-4821-928e-dc2149e181c7",
   "metadata": {},
   "outputs": [],
   "source": [
    "years = np.arange(2035,2070)\n",
    "dates= '2035-2069'\n",
    "member=range(10)\n",
    "lat = np.linspace(-90,90,num=192)\n",
    "lon = np.linspace(0,358.75,num=288)\n",
    "dims = ('member', 'lat', 'lon')\n",
    "coords = dict(member = member, lat=lat, lon=lon)\n",
    "attribs = dict(description='Extreme Index Anomalies based on ETCCDI definitions. MCB scenarios with 5% global seeding', \n",
    "                history='Created by Mari Tye November 2023.' ),\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "id": "67f7f85b-812d-4089-bb6a-1591706a341b",
   "metadata": {},
   "outputs": [],
   "source": [
    "pindices = ['CDD','CWD','RX1D','N95','N99','R20mm','RX5D','PRCPTOT', 'SDII','R10mm'] # something funny with P95 and P99 ignore these 2 for MCB runs\n",
    "txindices = ['TXX',  'TXN', 'TX10', 'TX90'] #calculated the fixed threshold indices but they aren't very meaningful at a global scale so not including in paper or significance tests.\n",
    "tnindices = ['TNX', 'TNN', 'TN10', 'TN90']"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9668dfbd-f2d4-458b-a738-990ea8e6640f",
   "metadata": {},
   "source": [
    "Precipitation anomalies and significance of changes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "id": "9f339d23-5865-48fd-8cff-185932a86add",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CDD\n",
      "CWD\n",
      "RX1D\n",
      "N95\n",
      "N99\n",
      "R20mm\n",
      "RX5D\n",
      "PRCPTOT\n",
      "SDII\n",
      "R10mm\n"
     ]
    }
   ],
   "source": [
    "for i in range(len(pindices)):\n",
    "    print(pindices[i])\n",
    "    \n",
    "    # this creates a vector, but only want first element to use as file name\n",
    "    praw_ssp = glob.glob(inSSP + varnam[0] + '/*' + pindices[i] + '*.nc')[0]\n",
    "    praw_mcb = glob.glob(iDir + varnam[0] + '/*' + pindices[i] + '*.nc')[0]\n",
    "    \n",
    "    with xr.open_dataset(praw_ssp) as ds_ssp:\n",
    "        cont = ds_ssp.sel(year=slice('2019-01-01','2039-12-31'))\n",
    "        ssp_ec = ds_ssp.sel(year=slice('2049-01-01', '2069-12-31'))\n",
    "        clim = cont.mean(dim='year')\n",
    "        \n",
    "    with xr.open_dataset(praw_mcb) as ds_mcb:\n",
    "        mcb_ec = ds_mcb.sel(year=slice('2049-01-01', '2069-12-31'))\n",
    "        \n",
    "    \n",
    "    \n",
    "    bc_anom = cont - clim\n",
    "    ssp_anom = ssp_ec - clim\n",
    "    mcb_anom = mcb_ec - clim\n",
    "    \n",
    "  \n",
    "    sigs = xr.DataArray(None, coords=dict(member=member, lat = lat, lon = lon), dims=dims, name='pval_ssp')\n",
    "    sigm = xr.DataArray(None, coords=dict(member=member, lat = lat, lon = lon), dims=dims, name='pval_mcb')\n",
    "\n",
    "    for em in range(10):\n",
    "    \n",
    "        index_c = bc_anom[pindices[i]].sel(member = em)\n",
    "        index_e = ssp_anom[pindices[i]].sel(member = em)\n",
    "        index_m = mcb_anom[pindices[i]].sel(member = em)\n",
    "        foo = stats.ttest_ind(index_c, index_e).pvalue\n",
    "        boo = stats.ttest_ind(index_c, index_m).pvalue\n",
    "        sigs[em,:,:,] = xr.DataArray(foo)\n",
    "        sigm[em,:,:,] = xr.DataArray(boo)\n",
    "    \n",
    "    # create a merged file of end of century ensemble mean anomalies and significances\n",
    "    ssp_ec_mean = (ssp_anom.mean(dim=('year', 'member'))).to_array(name = f\"SSP_{str(pindices[i])}\")\n",
    "    mcb_ec_mean = (mcb_anom.mean(dim=('year', 'member'))).to_array(name = f\"MCB_{str(pindices[i])}\")\n",
    "    ssp_sig = xr.DataArray(sigs.mean(dim='member'))\n",
    "    mcb_sig = xr.DataArray(sigm.mean(dim='member'))\n",
    "    \n",
    "    anoms_sigs = xr.merge([ssp_ec_mean, mcb_ec_mean, ssp_sig, mcb_sig])\n",
    "    anoms_sigs.assign_attrs(purpose = \"Ensemble mean climatology for producing figures\")\n",
    "    flnm = iDir + 'Anomalies_Significances_2060_' + pindices[i] + '.nc'\n",
    "    anoms_sigs.to_netcdf(flnm)\n",
    "    \n",
    "    \"\"\"\n",
    "# Save the anomaly time series for future reference.\n",
    "    sspnm = praw_ssp.split(pindices[i])[0] + pindices[i] + '_2050-2069_anoms.nc'\n",
    "    contnm = praw_ssp.split(pindices[i])[0] + pindices[i] + '_2020-2039_anoms.nc'\n",
    "    mcbnm = praw_mcb.split(pindices[i])[0] + pindices[i] + '_2050-2069_anoms.nc'\n",
    "    \n",
    "    ssp_anom.to_netcdf(sspnm)\n",
    "    mcb_anom.to_netcdf(mcbnm)\n",
    "    bc_anom.to_netcdf(contnm)\n",
    "\"\"\"    \n",
    "\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "id": "ebc3f5a8-0d4e-495d-aa0c-21aa466d54fa",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "del(sigs)\n",
    "del(sigm)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "id": "f0a98dd8-44a1-44af-818a-3ac52e3f3214",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "TXX\n",
      "TXN\n",
      "TX10\n",
      "TX90\n"
     ]
    }
   ],
   "source": [
    "for i in range(len(txindices)):\n",
    "    print(txindices[i])\n",
    "    \n",
    "    # this creates a vector, but only want first element to use as file name\n",
    "    praw_ssp = glob.glob(inSSP + varnam[1] + '/*' + txindices[i] + '*.nc')[0]\n",
    "    praw_mcb = glob.glob(iDir + varnam[1] + '/*' + txindices[i] + '*.nc')[0]\n",
    "    \n",
    "    with xr.open_dataset(praw_ssp) as ds_ssp:\n",
    "        ds_ssp = ds_ssp.rename({'members':'member'})\n",
    "        cont = ds_ssp.sel(year=slice('2019-01-01','2039-12-31'))\n",
    "        ssp_ec = ds_ssp.sel(year=slice('2049-01-01', '2069-12-31'))\n",
    "        clim = cont.mean(dim='year')\n",
    "        \n",
    "    with xr.open_dataset(praw_mcb) as ds_mcb:\n",
    "        mcb_ec = ds_mcb.sel(year=slice('2049-01-01', '2069-12-31'))\n",
    "        \n",
    "    \n",
    "    \n",
    "    bc_anom = cont - clim\n",
    "    ssp_anom = ssp_ec - clim\n",
    "    mcb_anom = mcb_ec - clim\n",
    "    \n",
    "  \n",
    "    sigs = xr.DataArray(None, coords=dict(member=member, lat = lat, lon = lon), dims=dims, name='pval_ssp')\n",
    "    sigm = xr.DataArray(None, coords=dict(member=member, lat = lat, lon = lon), dims=dims, name='pval_mcb')\n",
    "\n",
    "    for em in range(10):\n",
    "    \n",
    "        index_c = bc_anom[txindices[i]].sel(member = em)\n",
    "        index_e = ssp_anom[txindices[i]].sel(member = em)\n",
    "        index_m = mcb_anom[txindices[i]].sel(member = em)\n",
    "        foo = stats.ttest_ind(index_c, index_e).pvalue\n",
    "        boo = stats.ttest_ind(index_c, index_m).pvalue\n",
    "        sigs[em,:,:,] = xr.DataArray(foo)\n",
    "        sigm[em,:,:,] = xr.DataArray(boo)\n",
    "    \n",
    "    # create a merged file of end of century ensemble mean anomalies and significances\n",
    "    ssp_ec_mean = (ssp_anom.mean(dim=('year', 'member'))).to_array(name = f\"SSP_{str(txindices[i])}\")\n",
    "    mcb_ec_mean = (mcb_anom.mean(dim=('year', 'member'))).to_array(name = f\"MCB_{str(txindices[i])}\")\n",
    "    ssp_sig = xr.DataArray(sigs.mean(dim='member'))\n",
    "    mcb_sig = xr.DataArray(sigm.mean(dim='member'))\n",
    "    \n",
    "    anoms_sigs = xr.merge([ssp_ec_mean, mcb_ec_mean, ssp_sig, mcb_sig])\n",
    "    anoms_sigs.assign_attrs(purpose = \"Ensemble mean climatology for producing figures\")\n",
    "    flnm = iDir + 'Anomalies_Significances_2060_' + txindices[i] + '.nc'\n",
    "    anoms_sigs.to_netcdf(flnm)\n",
    "    \n",
    "\n",
    "\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8271e70d-6a18-46b2-9e38-bd2bc8cdf859",
   "metadata": {
    "tags": []
   },
   "source": [
    "Daily minima Again using only the max, min and 90th/10th percentiles"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "id": "47a50f2f-7a2a-4a29-931b-f590080696b9",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "TNX\n",
      "TNN\n",
      "TN10\n",
      "TN90\n"
     ]
    }
   ],
   "source": [
    "for i in range(len(tnindices)):\n",
    "    print(tnindices[i])\n",
    "    \n",
    "    # this creates a vector, but only want first element to use as file name\n",
    "    praw_ssp = glob.glob(inSSP + varnam[2] + '/*' + tnindices[i] + '*.nc')[0]\n",
    "    praw_mcb = glob.glob(iDir + varnam[2] + '/*' + tnindices[i] + '*.nc')[0]\n",
    "    \n",
    "    with xr.open_dataset(praw_ssp) as ds_ssp:\n",
    "        ds_ssp = ds_ssp.rename({'members':'member'})\n",
    "        cont = ds_ssp.sel(year=slice('2019-01-01','2039-12-31'))\n",
    "        ssp_ec = ds_ssp.sel(year=slice('2049-01-01', '2069-12-31'))\n",
    "        clim = cont.mean(dim='year')\n",
    "        \n",
    "    with xr.open_dataset(praw_mcb) as ds_mcb:\n",
    "        mcb_ec = ds_mcb.sel(year=slice('2049-01-01', '2069-12-31'))\n",
    "        \n",
    "    \n",
    "    \n",
    "    bc_anom = cont - clim\n",
    "    ssp_anom = ssp_ec - clim\n",
    "    mcb_anom = mcb_ec - clim\n",
    "    \n",
    "  \n",
    "    sigs = xr.DataArray(None, coords=dict(member=member, lat = lat, lon = lon), dims=dims, name='pval_ssp')\n",
    "    sigm = xr.DataArray(None, coords=dict(member=member, lat = lat, lon = lon), dims=dims, name='pval_mcb')\n",
    "\n",
    "    for em in range(10):\n",
    "    \n",
    "        index_c = bc_anom[tnindices[i]].sel(member = em)\n",
    "        index_e = ssp_anom[tnindices[i]].sel(member = em)\n",
    "        index_m = mcb_anom[tnindices[i]].sel(member = em)\n",
    "        foo = stats.ttest_ind(index_c, index_e).pvalue\n",
    "        boo = stats.ttest_ind(index_c, index_m).pvalue\n",
    "        sigs[em,:,:,] = xr.DataArray(foo)\n",
    "        sigm[em,:,:,] = xr.DataArray(boo)\n",
    "    \n",
    "    # create a merged file of end of century ensemble mean anomalies and significances\n",
    "    ssp_ec_mean = (ssp_anom.mean(dim=('year', 'member'))).to_array(name = f\"SSP_{str(txindices[i])}\")\n",
    "    mcb_ec_mean = (mcb_anom.mean(dim=('year', 'member'))).to_array(name = f\"MCB_{str(txindices[i])}\")\n",
    "    ssp_sig = xr.DataArray(sigs.mean(dim='member'))\n",
    "    mcb_sig = xr.DataArray(sigm.mean(dim='member'))\n",
    "    \n",
    "    anoms_sigs = xr.merge([ssp_ec_mean, mcb_ec_mean, ssp_sig, mcb_sig])\n",
    "    anoms_sigs.assign_attrs(purpose = \"Ensemble mean climatology for producing figures\")\n",
    "    flnm = iDir + 'Anomalies_Significances_2060_' + tnindices[i] + '.nc'\n",
    "    anoms_sigs.to_netcdf(flnm)\n",
    "    \n",
    "\n",
    "\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "id": "1b7167f2-6027-4e6b-a545-7d17c8c48945",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
       "Dimensions:   (lat: 192, lon: 288, variable: 1, members: 10)\n",
       "Coordinates:\n",
       "  * lat       (lat) float64 -90.0 -89.06 -88.12 -87.17 ... 88.12 89.06 90.0\n",
       "  * lon       (lon) float64 0.0 1.25 2.5 3.75 5.0 ... 355.0 356.2 357.5 358.8\n",
       "  * variable  (variable) object &#x27;TN90&#x27;\n",
       "  * members   (members) int64 0 1 2 3 4 5 6 7 8 9\n",
       "Data variables:\n",
       "    SSP_TX90  (variable, lat, lon) float64 11.83 11.83 11.83 ... 5.09 5.075 5.12\n",
       "    MCB_TX90  (variable, lat, lon, members) float64 1.355e+03 ... 885.0\n",
       "    pval_ssp  (lat, lon) float64 0.01352 0.01352 0.01352 ... 0.1332 0.1292\n",
       "    pval_mcb  (lat, lon) float64 1.409e-76 1.409e-76 ... 4.484e-74 6.86e-74</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-7deeb0af-6448-45a2-b8f1-238ab3e40d91' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-7deeb0af-6448-45a2-b8f1-238ab3e40d91' 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'>lat</span>: 192</li><li><span class='xr-has-index'>lon</span>: 288</li><li><span class='xr-has-index'>variable</span>: 1</li><li><span class='xr-has-index'>members</span>: 10</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-f0ecbd6a-de1e-4782-b617-7531b9ca3f80' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f0ecbd6a-de1e-4782-b617-7531b9ca3f80' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lat</span></div><div class='xr-var-dims'>(lat)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-90.0 -89.06 -88.12 ... 89.06 90.0</div><input id='attrs-2fa1441b-37cd-4563-ba00-e2daf7f18c77' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2fa1441b-37cd-4563-ba00-e2daf7f18c77' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1343676e-a161-44c4-88ac-5096d64747e4' class='xr-var-data-in' type='checkbox'><label for='data-1343676e-a161-44c4-88ac-5096d64747e4' 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([-90.      , -89.057592, -88.115183, -87.172775, -86.230366, -85.287958,\n",
       "       -84.34555 , -83.403141, -82.460733, -81.518325, -80.575916, -79.633508,\n",
       "       -78.691099, -77.748691, -76.806283, -75.863874, -74.921466, -73.979058,\n",
       "       -73.036649, -72.094241, -71.151832, -70.209424, -69.267016, -68.324607,\n",
       "       -67.382199, -66.439791, -65.497382, -64.554974, -63.612565, -62.670157,\n",
       "       -61.727749, -60.78534 , -59.842932, -58.900524, -57.958115, -57.015707,\n",
       "       -56.073298, -55.13089 , -54.188482, -53.246073, -52.303665, -51.361257,\n",
       "       -50.418848, -49.47644 , -48.534031, -47.591623, -46.649215, -45.706806,\n",
       "       -44.764398, -43.82199 , -42.879581, -41.937173, -40.994764, -40.052356,\n",
       "       -39.109948, -38.167539, -37.225131, -36.282723, -35.340314, -34.397906,\n",
       "       -33.455497, -32.513089, -31.570681, -30.628272, -29.685864, -28.743455,\n",
       "       -27.801047, -26.858639, -25.91623 , -24.973822, -24.031414, -23.089005,\n",
       "       -22.146597, -21.204188, -20.26178 , -19.319372, -18.376963, -17.434555,\n",
       "       -16.492147, -15.549738, -14.60733 , -13.664921, -12.722513, -11.780105,\n",
       "       -10.837696,  -9.895288,  -8.95288 ,  -8.010471,  -7.068063,  -6.125654,\n",
       "        -5.183246,  -4.240838,  -3.298429,  -2.356021,  -1.413613,  -0.471204,\n",
       "         0.471204,   1.413613,   2.356021,   3.298429,   4.240838,   5.183246,\n",
       "         6.125654,   7.068063,   8.010471,   8.95288 ,   9.895288,  10.837696,\n",
       "        11.780105,  12.722513,  13.664921,  14.60733 ,  15.549738,  16.492147,\n",
       "        17.434555,  18.376963,  19.319372,  20.26178 ,  21.204188,  22.146597,\n",
       "        23.089005,  24.031414,  24.973822,  25.91623 ,  26.858639,  27.801047,\n",
       "        28.743455,  29.685864,  30.628272,  31.570681,  32.513089,  33.455497,\n",
       "        34.397906,  35.340314,  36.282723,  37.225131,  38.167539,  39.109948,\n",
       "        40.052356,  40.994764,  41.937173,  42.879581,  43.82199 ,  44.764398,\n",
       "        45.706806,  46.649215,  47.591623,  48.534031,  49.47644 ,  50.418848,\n",
       "        51.361257,  52.303665,  53.246073,  54.188482,  55.13089 ,  56.073298,\n",
       "        57.015707,  57.958115,  58.900524,  59.842932,  60.78534 ,  61.727749,\n",
       "        62.670157,  63.612565,  64.554974,  65.497382,  66.439791,  67.382199,\n",
       "        68.324607,  69.267016,  70.209424,  71.151832,  72.094241,  73.036649,\n",
       "        73.979058,  74.921466,  75.863874,  76.806283,  77.748691,  78.691099,\n",
       "        79.633508,  80.575916,  81.518325,  82.460733,  83.403141,  84.34555 ,\n",
       "        85.287958,  86.230366,  87.172775,  88.115183,  89.057592,  90.      ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>lon</span></div><div class='xr-var-dims'>(lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 1.25 2.5 ... 356.2 357.5 358.8</div><input id='attrs-31922b02-3b47-4abc-81d5-8fdecefe2208' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-31922b02-3b47-4abc-81d5-8fdecefe2208' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e971c273-d3a1-458b-a2e2-18f018f5ecfb' class='xr-var-data-in' type='checkbox'><label for='data-e971c273-d3a1-458b-a2e2-18f018f5ecfb' 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.  ,   1.25,   2.5 , ..., 356.25, 357.5 , 358.75])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>variable</span></div><div class='xr-var-dims'>(variable)</div><div class='xr-var-dtype'>object</div><div class='xr-var-preview xr-preview'>&#x27;TN90&#x27;</div><input id='attrs-085f6a50-8088-4bcd-b613-cd181816faa8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-085f6a50-8088-4bcd-b613-cd181816faa8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-604fd773-8c1b-4cfc-a745-2d04adc51558' class='xr-var-data-in' type='checkbox'><label for='data-604fd773-8c1b-4cfc-a745-2d04adc51558' 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;TN90&#x27;], dtype=object)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>members</span></div><div class='xr-var-dims'>(members)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 7 8 9</div><input id='attrs-41aa7625-58b7-4581-93bf-0625ceb73ddb' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-41aa7625-58b7-4581-93bf-0625ceb73ddb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-82510e9e-136b-4607-945a-c7bd2a8a5b5d' class='xr-var-data-in' type='checkbox'><label for='data-82510e9e-136b-4607-945a-c7bd2a8a5b5d' 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, 1, 2, 3, 4, 5, 6, 7, 8, 9])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-c57ad98c-de14-4aae-bac4-bbee664714a7' class='xr-section-summary-in' type='checkbox'  checked><label for='section-c57ad98c-de14-4aae-bac4-bbee664714a7' 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>SSP_TX90</span></div><div class='xr-var-dims'>(variable, lat, lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>11.83 11.83 11.83 ... 5.075 5.12</div><input id='attrs-3cab9c44-643e-434a-8573-9b68a19e1171' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3cab9c44-643e-434a-8573-9b68a19e1171' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4eac4586-2f80-4fd6-9d24-5c3efdf0bedc' class='xr-var-data-in' type='checkbox'><label for='data-4eac4586-2f80-4fd6-9d24-5c3efdf0bedc' 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([[[11.83 , 11.83 , 11.83 , ..., 11.835, 11.835, 11.83 ],\n",
       "        [11.94 , 11.93 , 11.975, ..., 12.02 , 12.03 , 11.98 ],\n",
       "        [12.145, 12.065, 12.105, ..., 12.295, 12.215, 12.115],\n",
       "        ...,\n",
       "        [ 6.52 ,  6.675,  6.645, ...,  6.395,  6.465,  6.5  ],\n",
       "        [ 5.555,  5.555,  5.52 , ...,  5.645,  5.615,  5.63 ],\n",
       "        [ 5.11 ,  5.09 ,  5.11 , ...,  5.09 ,  5.075,  5.12 ]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>MCB_TX90</span></div><div class='xr-var-dims'>(variable, lat, lon, members)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.355e+03 1.355e+03 ... 903.5 885.0</div><input id='attrs-68590f29-3c21-4612-bd6f-96b7ad959dad' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-68590f29-3c21-4612-bd6f-96b7ad959dad' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9261f024-fac2-43d5-be4a-f43971f7627a' class='xr-var-data-in' type='checkbox'><label for='data-9261f024-fac2-43d5-be4a-f43971f7627a' 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([[[[1354.65, 1355.15, 1368.15, ..., 1355.05, 1359.5 , 1353.35],\n",
       "         [1354.65, 1355.15, 1368.15, ..., 1355.05, 1359.5 , 1353.35],\n",
       "         [1354.65, 1355.15, 1368.15, ..., 1355.05, 1359.5 , 1353.35],\n",
       "         ...,\n",
       "         [1354.65, 1355.15, 1368.15, ..., 1355.05, 1359.5 , 1353.4 ],\n",
       "         [1354.65, 1355.15, 1368.15, ..., 1355.05, 1359.5 , 1353.4 ],\n",
       "         [1354.65, 1355.15, 1368.15, ..., 1355.05, 1359.5 , 1353.35]],\n",
       "\n",
       "        [[1341.55, 1341.75, 1356.05, ..., 1342.  , 1346.9 , 1340.65],\n",
       "         [1340.1 , 1340.45, 1354.55, ..., 1340.8 , 1345.35, 1339.4 ],\n",
       "         [1341.45, 1341.7 , 1355.9 , ..., 1341.85, 1346.55, 1340.65],\n",
       "         ...,\n",
       "         [1343.2 , 1343.3 , 1357.55, ..., 1343.55, 1348.5 , 1342.3 ],\n",
       "         [1342.95, 1343.  , 1357.3 , ..., 1343.2 , 1348.15, 1342.05],\n",
       "         [1343.25, 1343.35, 1357.55, ..., 1343.5 , 1348.4 , 1342.3 ]],\n",
       "\n",
       "        [[1326.45, 1327.55, 1342.25, ..., 1327.55, 1333.4 , 1325.95],\n",
       "         [1322.4 , 1323.55, 1338.05, ..., 1323.4 , 1329.5 , 1321.95],\n",
       "         [1322.1 , 1323.3 , 1337.75, ..., 1323.25, 1329.35, 1321.7 ],\n",
       "         ...,\n",
       "...\n",
       "         ...,\n",
       "         [ 900.15,  898.15,  918.8 , ...,  899.6 ,  918.05,  897.95],\n",
       "         [ 898.25,  896.5 ,  916.95, ...,  897.6 ,  915.95,  896.25],\n",
       "         [ 901.4 ,  899.7 ,  920.2 , ...,  900.8 ,  918.75,  899.25]],\n",
       "\n",
       "        [[ 888.  ,  888.1 ,  907.15, ...,  887.7 ,  905.55,  887.  ],\n",
       "         [ 889.65,  889.7 ,  908.9 , ...,  889.45,  907.15,  888.9 ],\n",
       "         [ 889.7 ,  889.6 ,  908.8 , ...,  889.5 ,  907.2 ,  889.05],\n",
       "         ...,\n",
       "         [ 890.2 ,  890.1 ,  909.9 , ...,  890.05,  908.2 ,  889.2 ],\n",
       "         [ 889.45,  889.65,  909.  , ...,  889.1 ,  907.4 ,  888.6 ],\n",
       "         [ 888.6 ,  888.9 ,  908.25, ...,  888.5 ,  906.45,  887.9 ]],\n",
       "\n",
       "        [[ 884.9 ,  885.7 ,  906.35, ...,  886.95,  903.15,  884.7 ],\n",
       "         [ 884.9 ,  885.65,  906.35, ...,  886.95,  903.15,  884.7 ],\n",
       "         [ 885.8 ,  886.5 ,  907.2 , ...,  887.8 ,  903.9 ,  885.6 ],\n",
       "         ...,\n",
       "         [ 885.55,  886.35,  907.  , ...,  887.55,  903.75,  885.4 ],\n",
       "         [ 885.8 ,  886.6 ,  907.3 , ...,  887.85,  904.  ,  885.6 ],\n",
       "         [ 885.2 ,  886.05,  906.7 , ...,  887.3 ,  903.45,  885.  ]]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>pval_ssp</span></div><div class='xr-var-dims'>(lat, lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.01352 0.01352 ... 0.1332 0.1292</div><input id='attrs-48314334-aaa0-4bb8-aa7f-5facacd4a99d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-48314334-aaa0-4bb8-aa7f-5facacd4a99d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3a484052-1444-4e10-8435-cbc96b18ae89' class='xr-var-data-in' type='checkbox'><label for='data-3a484052-1444-4e10-8435-cbc96b18ae89' 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.01352063, 0.01352063, 0.01352063, ..., 0.01351372, 0.01351372,\n",
       "        0.01352063],\n",
       "       [0.01156091, 0.01420959, 0.0154716 , ..., 0.00928933, 0.00992595,\n",
       "        0.01117477],\n",
       "       [0.00796935, 0.00903441, 0.00872161, ..., 0.00562794, 0.00602744,\n",
       "        0.0077124 ],\n",
       "       ...,\n",
       "       [0.09288949, 0.07803737, 0.08440025, ..., 0.08474736, 0.08967286,\n",
       "        0.09480273],\n",
       "       [0.12566714, 0.13282371, 0.13328512, ..., 0.10458419, 0.11085854,\n",
       "        0.11444426],\n",
       "       [0.12797459, 0.12983187, 0.13146691, ..., 0.13029939, 0.13318976,\n",
       "        0.12922283]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>pval_mcb</span></div><div class='xr-var-dims'>(lat, lon)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.409e-76 1.409e-76 ... 6.86e-74</div><input id='attrs-e3eed750-b7fa-40ee-bf0d-8ae2c5816659' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e3eed750-b7fa-40ee-bf0d-8ae2c5816659' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-23b1fbd9-6c00-464b-9d48-4b2472ee4d30' class='xr-var-data-in' type='checkbox'><label for='data-23b1fbd9-6c00-464b-9d48-4b2472ee4d30' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.40880304e-76, 1.40880304e-76, 1.40880304e-76, ...,\n",
       "        1.36631651e-76, 1.36631651e-76, 1.40880304e-76],\n",
       "       [2.21032330e-75, 1.88390709e-75, 2.06304186e-75, ...,\n",
       "        1.75155421e-75, 1.97963559e-75, 2.80171372e-75],\n",
       "       [3.45410247e-76, 2.69664689e-76, 3.94803921e-76, ...,\n",
       "        6.48396307e-76, 5.37515288e-76, 3.16902982e-76],\n",
       "       ...,\n",
       "       [1.22456010e-71, 1.41179629e-71, 8.53969787e-72, ...,\n",
       "        1.79203090e-71, 2.72367168e-71, 1.50922120e-71],\n",
       "       [9.75114115e-73, 1.14634500e-72, 1.30313885e-72, ...,\n",
       "        1.12171295e-72, 1.06647336e-72, 8.72692564e-73],\n",
       "       [5.67257303e-74, 6.04806349e-74, 7.10627222e-74, ...,\n",
       "        4.45169032e-74, 4.48444076e-74, 6.85991267e-74]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-39b2dd00-861f-436b-94ce-ee56fb40405d' class='xr-section-summary-in' type='checkbox'  ><label for='section-39b2dd00-861f-436b-94ce-ee56fb40405d' class='xr-section-summary' >Indexes: <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-index-name'><div>lat</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-c508fa91-dea3-4874-bfb5-c81ecf8996d4' class='xr-index-data-in' type='checkbox'/><label for='index-c508fa91-dea3-4874-bfb5-c81ecf8996d4' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([             -90.0, -89.05759162303664,  -88.1151832460733,\n",
       "       -87.17277486910994,  -86.2303664921466, -85.28795811518324,\n",
       "        -84.3455497382199, -83.40314136125654, -82.46073298429319,\n",
       "       -81.51832460732984,\n",
       "       ...\n",
       "        81.51832460732984,   82.4607329842932,  83.40314136125653,\n",
       "        84.34554973821989,  85.28795811518324,   86.2303664921466,\n",
       "        87.17277486910996,  88.11518324607329,  89.05759162303664,\n",
       "                     90.0],\n",
       "      dtype=&#x27;float64&#x27;, name=&#x27;lat&#x27;, length=192))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>lon</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-1ee9332a-1ae0-4d3f-87db-264801f79922' class='xr-index-data-in' type='checkbox'/><label for='index-1ee9332a-1ae0-4d3f-87db-264801f79922' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([   0.0,   1.25,    2.5,   3.75,    5.0,   6.25,    7.5,   8.75,   10.0,\n",
       "        11.25,\n",
       "       ...\n",
       "        347.5, 348.75,  350.0, 351.25,  352.5, 353.75,  355.0, 356.25,  357.5,\n",
       "       358.75],\n",
       "      dtype=&#x27;float64&#x27;, name=&#x27;lon&#x27;, length=288))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>variable</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-eb9ecd96-62e0-49f3-be86-4ffbb78d97e4' class='xr-index-data-in' type='checkbox'/><label for='index-eb9ecd96-62e0-49f3-be86-4ffbb78d97e4' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([&#x27;TN90&#x27;], dtype=&#x27;object&#x27;, name=&#x27;variable&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>members</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-ea184d63-55f4-4902-b2ec-96fa76b6682f' class='xr-index-data-in' type='checkbox'/><label for='index-ea184d63-55f4-4902-b2ec-96fa76b6682f' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=&#x27;int64&#x27;, name=&#x27;members&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-2cd8b8a6-4701-40d4-8025-823a250a6d97' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-2cd8b8a6-4701-40d4-8025-823a250a6d97' 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:   (lat: 192, lon: 288, variable: 1, members: 10)\n",
       "Coordinates:\n",
       "  * lat       (lat) float64 -90.0 -89.06 -88.12 -87.17 ... 88.12 89.06 90.0\n",
       "  * lon       (lon) float64 0.0 1.25 2.5 3.75 5.0 ... 355.0 356.2 357.5 358.8\n",
       "  * variable  (variable) object 'TN90'\n",
       "  * members   (members) int64 0 1 2 3 4 5 6 7 8 9\n",
       "Data variables:\n",
       "    SSP_TX90  (variable, lat, lon) float64 11.83 11.83 11.83 ... 5.09 5.075 5.12\n",
       "    MCB_TX90  (variable, lat, lon, members) float64 1.355e+03 ... 885.0\n",
       "    pval_ssp  (lat, lon) float64 0.01352 0.01352 0.01352 ... 0.1332 0.1292\n",
       "    pval_mcb  (lat, lon) float64 1.409e-76 1.409e-76 ... 4.484e-74 6.86e-74"
      ]
     },
     "execution_count": 115,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "anoms_sigs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8e6a0320-fa73-4ed0-9b62-8c62fcee4b24",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:miniconda-npl2023a_mrt]",
   "language": "python",
   "name": "conda-env-miniconda-npl2023a_mrt-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
