{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "1ffd9ca6-906c-4fb4-8f1a-aee78e4a8f09",
   "metadata": {},
   "outputs": [
    {
     "ename": "ValueError",
     "evalue": "Missing SRI hash for version 3.3.4",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mFileNotFoundError\u001b[0m                         Traceback (most recent call last)",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/bokeh/resources.py:161\u001b[0m, in \u001b[0;36mget_sri_hashes_for_version\u001b[0;34m(version)\u001b[0m\n\u001b[1;32m    160\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 161\u001b[0m     \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mROOT_DIR\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m/\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m_sri\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;241;43m/\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;124;43mf\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;132;43;01m{\u001b[39;49;00m\u001b[43mversion\u001b[49m\u001b[38;5;132;43;01m}\u001b[39;49;00m\u001b[38;5;124;43m.json\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m f:\n\u001b[1;32m    162\u001b[0m         _ALL_SRI_HASHES[version] \u001b[38;5;241m=\u001b[39m json\u001b[38;5;241m.\u001b[39mload(f)\n",
      "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/carlos/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/bokeh/_sri/3.3.4.json'",
      "\nThe above exception was the direct cause of the following exception:\n",
      "\u001b[0;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[1], line 6\u001b[0m\n\u001b[1;32m      4\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mcartopy\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcrs\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mccrs\u001b[39;00m\n\u001b[1;32m      5\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mcartopy\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mfeature\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mcfeature\u001b[39;00m\n\u001b[0;32m----> 6\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpanel\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mpn\u001b[39;00m\n\u001b[1;32m      7\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mhvplot\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mxarray\u001b[39;00m\n\u001b[1;32m      8\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/panel/__init__.py:50\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m      2\u001b[0m \u001b[38;5;124;03mPanel is a high level app and dashboarding framework\u001b[39;00m\n\u001b[1;32m      3\u001b[0m \u001b[38;5;124;03m====================================================\u001b[39;00m\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m     46\u001b[0m \u001b[38;5;124;03mhttps://panel.holoviz.org/getting_started/index.html\u001b[39;00m\n\u001b[1;32m     47\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m     48\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mparam\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m rx\n\u001b[0;32m---> 50\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m chat  \u001b[38;5;66;03m# noqa\u001b[39;00m\n\u001b[1;32m     51\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m layout  \u001b[38;5;66;03m# noqa\u001b[39;00m\n\u001b[1;32m     52\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m links  \u001b[38;5;66;03m# noqa\u001b[39;00m\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/panel/chat/__init__.py:33\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m      2\u001b[0m \u001b[38;5;124;03mPanel chat makes creating chat components easy\u001b[39;00m\n\u001b[1;32m      3\u001b[0m \u001b[38;5;124;03m==============================================================\u001b[39;00m\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m     29\u001b[0m \u001b[38;5;124;03mhttps://panel.holoviz.org/reference/chat/ChatInterface.html\u001b[39;00m\n\u001b[1;32m     30\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m     31\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mimportlib\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01m_importlib\u001b[39;00m\n\u001b[0;32m---> 33\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mfeed\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ChatFeed  \u001b[38;5;66;03m# noqa\u001b[39;00m\n\u001b[1;32m     34\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01micon\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ChatReactionIcons  \u001b[38;5;66;03m# noqa\u001b[39;00m\n\u001b[1;32m     35\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01minterface\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ChatInterface  \u001b[38;5;66;03m# noqa\u001b[39;00m\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/panel/chat/feed.py:25\u001b[0m\n\u001b[1;32m     22\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mparam\u001b[39;00m\n\u001b[1;32m     24\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_param\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Margin\n\u001b[0;32m---> 25\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mio\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mresources\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m CDN_DIST\n\u001b[1;32m     26\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlayout\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Column, ListPanel\n\u001b[1;32m     27\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlayout\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcard\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Card\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/panel/io/__init__.py:7\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m      2\u001b[0m \u001b[38;5;124;03mThe io module contains utilities for loading JS components, embedding\u001b[39;00m\n\u001b[1;32m      3\u001b[0m \u001b[38;5;124;03mmodel state, and rendering panel objects.\u001b[39;00m\n\u001b[1;32m      4\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m      5\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01msys\u001b[39;00m\n\u001b[0;32m----> 7\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcache\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m cache  \u001b[38;5;66;03m# noqa\u001b[39;00m\n\u001b[1;32m      8\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcallbacks\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m PeriodicCallback  \u001b[38;5;66;03m# noqa\u001b[39;00m\n\u001b[1;32m      9\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdocument\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m (  \u001b[38;5;66;03m# noqa\u001b[39;00m\n\u001b[1;32m     10\u001b[0m     hold, immediate_dispatch, init_doc, unlocked, with_lock,\n\u001b[1;32m     11\u001b[0m )\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/panel/io/cache.py:25\u001b[0m\n\u001b[1;32m     21\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mparam\u001b[39;00m\n\u001b[1;32m     23\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mparam\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mparameterized\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m iscoroutinefunction\n\u001b[0;32m---> 25\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mstate\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m state\n\u001b[1;32m     27\u001b[0m \u001b[38;5;66;03m#---------------------------------------------------------------------\u001b[39;00m\n\u001b[1;32m     28\u001b[0m \u001b[38;5;66;03m# Private API\u001b[39;00m\n\u001b[1;32m     29\u001b[0m \u001b[38;5;66;03m#---------------------------------------------------------------------\u001b[39;00m\n\u001b[1;32m     31\u001b[0m _CYCLE_PLACEHOLDER \u001b[38;5;241m=\u001b[39m \u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mpanel-93KZ39Q-floatingdangeroushomechose-CYCLE\u001b[39m\u001b[38;5;124m\"\u001b[39m\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/panel/io/state.py:32\u001b[0m\n\u001b[1;32m     30\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mbokeh\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdocument\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Document\n\u001b[1;32m     31\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mbokeh\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdocument\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlocking\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m UnlockedDocumentProxy\n\u001b[0;32m---> 32\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mbokeh\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mio\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m curdoc \u001b[38;5;28;01mas\u001b[39;00m _curdoc\n\u001b[1;32m     33\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpyviz_comms\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m CommManager \u001b[38;5;28;01mas\u001b[39;00m _CommManager\n\u001b[1;32m     35\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutil\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m decode_token, parse_timedelta\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/bokeh/io/__init__.py:24\u001b[0m\n\u001b[1;32m     17\u001b[0m log \u001b[38;5;241m=\u001b[39m logging\u001b[38;5;241m.\u001b[39mgetLogger(\u001b[38;5;18m__name__\u001b[39m)\n\u001b[1;32m     19\u001b[0m \u001b[38;5;66;03m#-----------------------------------------------------------------------------\u001b[39;00m\n\u001b[1;32m     20\u001b[0m \u001b[38;5;66;03m# Imports\u001b[39;00m\n\u001b[1;32m     21\u001b[0m \u001b[38;5;66;03m#-----------------------------------------------------------------------------\u001b[39;00m\n\u001b[1;32m     22\u001b[0m \n\u001b[1;32m     23\u001b[0m \u001b[38;5;66;03m# Bokeh imports\u001b[39;00m\n\u001b[0;32m---> 24\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdoc\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m curdoc\n\u001b[1;32m     25\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mexport\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m export_png, export_svg, export_svgs\n\u001b[1;32m     26\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mnotebook\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m install_jupyter_hooks, install_notebook_hook, push_notebook\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/bokeh/io/doc.py:30\u001b[0m\n\u001b[1;32m     28\u001b[0m \u001b[38;5;66;03m# Bokeh imports\u001b[39;00m\n\u001b[1;32m     29\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdocument\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Document\n\u001b[0;32m---> 30\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mstate\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m curstate\n\u001b[1;32m     32\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m TYPE_CHECKING:\n\u001b[1;32m     33\u001b[0m     \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdocument\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlocking\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m UnlockedDocumentProxy\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/bokeh/io/state.py:54\u001b[0m\n\u001b[1;32m     52\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcore\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtypes\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m PathLike\n\u001b[1;32m     53\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdocument\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Document\n\u001b[0;32m---> 54\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mresources\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Resources, ResourcesMode\n\u001b[1;32m     56\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m TYPE_CHECKING:\n\u001b[1;32m     57\u001b[0m     \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcore\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtypes\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ID\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/bokeh/resources.py:659\u001b[0m\n\u001b[1;32m    653\u001b[0m \u001b[38;5;66;03m# -----------------------------------------------------------------------------\u001b[39;00m\n\u001b[1;32m    654\u001b[0m \u001b[38;5;66;03m# Code\u001b[39;00m\n\u001b[1;32m    655\u001b[0m \u001b[38;5;66;03m# -----------------------------------------------------------------------------\u001b[39;00m\n\u001b[1;32m    657\u001b[0m ResourcesLike: TypeAlias \u001b[38;5;241m=\u001b[39m Union[Resources, ResourcesMode]\n\u001b[0;32m--> 659\u001b[0m CDN \u001b[38;5;241m=\u001b[39m \u001b[43mResources\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmode\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcdn\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m    661\u001b[0m INLINE \u001b[38;5;241m=\u001b[39m Resources(mode\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124minline\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m    663\u001b[0m __all__ \u001b[38;5;241m=\u001b[39m (\n\u001b[1;32m    664\u001b[0m     \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCDN\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m    665\u001b[0m     \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mINLINE\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m    669\u001b[0m     \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mverify_sri_hashes\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m    670\u001b[0m )\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/bokeh/resources.py:358\u001b[0m, in \u001b[0;36mResources.__init__\u001b[0;34m(***failed resolving arguments***)\u001b[0m\n\u001b[1;32m    355\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmessages \u001b[38;5;241m=\u001b[39m []\n\u001b[1;32m    357\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmode \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcdn\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[0;32m--> 358\u001b[0m     cdn \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_cdn_urls\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    359\u001b[0m     \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmessages\u001b[38;5;241m.\u001b[39mextend(cdn\u001b[38;5;241m.\u001b[39mmessages)\n\u001b[1;32m    360\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmode \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mserver\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/bokeh/resources.py:448\u001b[0m, in \u001b[0;36mResources._cdn_urls\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    447\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_cdn_urls\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Urls:\n\u001b[0;32m--> 448\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_get_cdn_urls\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mversion\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mminified\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/bokeh/resources.py:615\u001b[0m, in \u001b[0;36m_get_cdn_urls\u001b[0;34m(version, minified)\u001b[0m\n\u001b[1;32m    613\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m is_full_release(version): \u001b[38;5;66;03m# TODO: TypeGuard?\u001b[39;00m\n\u001b[1;32m    614\u001b[0m     \u001b[38;5;28;01massert\u001b[39;00m version \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m--> 615\u001b[0m     sri_hashes \u001b[38;5;241m=\u001b[39m \u001b[43mget_sri_hashes_for_version\u001b[49m\u001b[43m(\u001b[49m\u001b[43mversion\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    616\u001b[0m     result\u001b[38;5;241m.\u001b[39mhashes \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mlambda\u001b[39;00m components, kind: {\n\u001b[1;32m    617\u001b[0m         mk_url(component, kind): sri_hashes[mk_filename(component, kind)] \u001b[38;5;28;01mfor\u001b[39;00m component \u001b[38;5;129;01min\u001b[39;00m components\n\u001b[1;32m    618\u001b[0m     }\n\u001b[1;32m    620\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m result\n",
      "File \u001b[0;32m~/miniconda3/envs/GSIBerror/lib/python3.9/site-packages/bokeh/resources.py:164\u001b[0m, in \u001b[0;36mget_sri_hashes_for_version\u001b[0;34m(version)\u001b[0m\n\u001b[1;32m    162\u001b[0m             _ALL_SRI_HASHES[version] \u001b[38;5;241m=\u001b[39m json\u001b[38;5;241m.\u001b[39mload(f)\n\u001b[1;32m    163\u001b[0m     \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[0;32m--> 164\u001b[0m         \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mMissing SRI hash for version \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mversion\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n\u001b[1;32m    165\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m _ALL_SRI_HASHES[version]\n",
      "\u001b[0;31mValueError\u001b[0m: Missing SRI hash for version 3.3.4"
     ]
    }
   ],
   "source": [
    "import gsiberror as gb\n",
    "import os\n",
    "import matplotlib.pyplot as plt\n",
    "import cartopy.crs as ccrs\n",
    "import cartopy.feature as cfeature\n",
    "import panel as pn\n",
    "import hvplot.xarray\n",
    "import numpy as np\n",
    "import intake\n",
    "\n",
    "pn.extension()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bcf94be0-8fea-4d0f-b3b2-2398998b8f25",
   "metadata": {},
   "outputs": [],
   "source": [
    "path = '/extra3/GitHub/GSIMonitor/new'\n",
    "bcptec = 'berror_stats'\n",
    "fcptec = os.path.join(path, bcptec)\n",
    "\n",
    "cptec_b = gb.Berror(fcptec)\n",
    "cptec_b.read_records()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e36219bf-e0d7-43d7-bc3a-07a803850608",
   "metadata": {},
   "outputs": [],
   "source": [
    "catalog_berror = intake.open_catalog('http://ftp1.cptec.inpe.br/pesquisa/das/carlos.bastarz/GSIMonitor/berror/catalog_berror.yml')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1489803f-466c-4f59-9a80-f4a42182926a",
   "metadata": {},
   "outputs": [],
   "source": [
    "catalog_berror['amplitudes_sf']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d11cb528-4dd4-444d-9e9f-025d6e95750f",
   "metadata": {},
   "outputs": [],
   "source": [
    "level_lst = np.arange(0,64, 1).tolist()\n",
    "level = pn.widgets.IntSlider(name='Level', value=0, start=level_lst[0], step=1, end=level_lst[-1])\n",
    "\n",
    "balproj_lst = ['agvin', 'bgvin', 'wgvin']\n",
    "balproj = pn.widgets.Select(name='Balance Projection Matrix', value=balproj_lst[0], options=balproj_lst)\n",
    "\n",
    "stdevvars_lst = ['sf', 'vp', 't', 'q', 'qin', 'oz', 'ps', 'cw', 'sst']\n",
    "stdevvars = pn.widgets.Select(name='Standard Deviation', value=stdevvars_lst[0], options=stdevvars_lst)\n",
    "\n",
    "show_profile = pn.widgets.Checkbox(name='Profile', value=False)\n",
    "\n",
    "hscalevars_lst = ['sf', 'vp', 't', 'q', 'oz', 'cw', 'ps', 'sst']\n",
    "hscalevars = pn.widgets.Select(name='Horizontal Length Scale', value=hscalevars_lst[0], options=hscalevars_lst)\n",
    "\n",
    "vscalevars_lst = ['sf', 'vp', 't', 'q', 'oz', 'cw']\n",
    "vscalevars = pn.widgets.Select(name='Vertical Length Scale', value=vscalevars_lst[0], options=vscalevars_lst)\n",
    "\n",
    "vertical_log = pn.widgets.Checkbox(name='Vertical Log', value=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "13ec21b2-0c75-4229-868f-a1865ca3ecb5",
   "metadata": {},
   "outputs": [],
   "source": [
    "@pn.depends(balproj, level, vertical_log)\n",
    "def plotBalProjs(balproj, level, vertical_log):\n",
    "    dset = cptec_b.balprojs[balproj]\n",
    "    if balproj == 'wgvin':\n",
    "        ax = dset.isel(level=0, latitude=slice(0,-2)).hvplot.line(x='latitude', \n",
    "                                                                  title='Projection of the Stream Function over the balanced part of Surface Pressure')      \n",
    "    elif balproj == 'bgvin':\n",
    "        if vertical_log:\n",
    "            ax = dset.hvplot.quadmesh(y='level', \n",
    "                                      x='latitude',\n",
    "                                      logy=True,\n",
    "                                      clabel='Km',\n",
    "                                      aspect=1,\n",
    "                                      cmap='jet',\n",
    "                                      frame_height=500,\n",
    "                                      title='Projection of the Stream Function over the balanced part of Velocity Potential')\n",
    "        else:\n",
    "            ax = dset.hvplot.quadmesh(y='level', \n",
    "                                      x='latitude',\n",
    "                                      logy=False,\n",
    "                                      clabel='Km',\n",
    "                                      aspect=1,\n",
    "                                      cmap='jet',\n",
    "                                      frame_height=500,\n",
    "                                      title='Projection of the Stream Function over the balanced part of Velocity Potential')            \n",
    "    elif balproj == 'agvin':\n",
    "        if vertical_log:\n",
    "            ax = dset.isel(level_2=level).hvplot.quadmesh(y='level', \n",
    "                                                          x='latitude',\n",
    "                                                          logy=True,\n",
    "                                                          clabel='Km',\n",
    "                                                          aspect=1,\n",
    "                                                          cmap='jet',\n",
    "                                                          frame_height=500,\n",
    "                                                          title='Projection of Stream Function at level ' + str(level) + ' over the vertical \\nprofile of the balanced part of Virtual Temperature')\n",
    "        else:        \n",
    "            ax = dset.isel(level_2=level).hvplot.quadmesh(y='level', \n",
    "                                                          x='latitude',\n",
    "                                                          logy=False,\n",
    "                                                          clabel='Km',\n",
    "                                                          aspect=1,\n",
    "                                                          cmap='jet',\n",
    "                                                          frame_height=500,\n",
    "                                                          title='Projection of Stream Function at level ' + str(level) + ' over the vertical \\nprofile of the balanced part of Virtual Temperature')        \n",
    "    return ax"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3cfdcb6b-f34d-49fe-a439-4fa9ba81d64c",
   "metadata": {},
   "outputs": [],
   "source": [
    "pn.Column(balproj, level, vertical_log, plotBalProjs).servable()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3c6cdc7c-9a52-4a52-847d-84c645bb8804",
   "metadata": {},
   "outputs": [],
   "source": [
    "@pn.depends(stdevvars, show_profile, vertical_log)\n",
    "def plotStDev(stdevvars, show_profile, vertical_log):\n",
    "    if stdevvars == 'sf': \n",
    "        vname = 'Stream Function'\n",
    "    elif stdevvars == 'vp':\n",
    "        vname = 'Velocity Potential'\n",
    "    elif stdevvars == 't':\n",
    "        vname = 'Unbalanced part of Temperature'\n",
    "    elif stdevvars == 'q':\n",
    "        vname = 'Relative Humidity'\n",
    "    elif stdevvars == 'qin':\n",
    "        vname = 'Relative Humidity'\n",
    "    elif stdevvars == 'oz':\n",
    "        vname = 'Ozone'\n",
    "    elif stdevvars == 'cw':\n",
    "        vname = 'Liquid Water Content'\n",
    "    elif stdevvars == 'ps':\n",
    "        vname = 'Surface Pressure'\n",
    "    elif stdevvars == 'sst':\n",
    "        vname = 'Sea Surface Temperature'\n",
    "\n",
    "    if vertical_log:\n",
    "        logy=True\n",
    "    else:\n",
    "        logy=False\n",
    "    \n",
    "    if stdevvars == 'qin':\n",
    "        dset = cptec_b.amplitudes[stdevvars]*1e2\n",
    "        if show_profile:\n",
    "            ax = dset.isel(latitude=slice(0,25)).mean(dim='latitude').hvplot.line(#y='level',\n",
    "                                                                 #x='latitude',\n",
    "                                                                 clabel='Km',\n",
    "                                                                 aspect=1,\n",
    "                                                                 cmap='jet',\n",
    "                                                                 frame_height=500,\n",
    "                                                                 invert=True,\n",
    "                                                                 logy=logy,\n",
    "                                                                 title='Standard Deviation of ' + str(vname))\n",
    "        else:\n",
    "            ax = dset.isel(latitude=slice(0,25)).hvplot.quadmesh(y='level',\n",
    "                                                                 x='latitude',\n",
    "                                                                 clabel='Km',\n",
    "                                                                 aspect=1,\n",
    "                                                                 cmap='jet',\n",
    "                                                                 frame_height=500,\n",
    "                                                                 logy=logy,\n",
    "                                                                 title='Standard Deviation of ' + str(vname))            \n",
    "    elif stdevvars == 'ps':\n",
    "        dset = cptec_b.amplitudes[stdevvars]\n",
    "        ax = dset.hvplot.line(x='latitude',\n",
    "                              clabel='Km',\n",
    "                              aspect=1,\n",
    "                              cmap='jet',\n",
    "                              frame_height=500,\n",
    "                              title='Standard Deviation of ' + str(vname))  \n",
    "    elif stdevvars == 'sst':\n",
    "        dset = cptec_b.amplitudes[stdevvars]\n",
    "        ax = dset.hvplot.quadmesh(y='latitude',\n",
    "                                  x='longitude',\n",
    "                                  clabel='Km',\n",
    "                                  aspect=1,\n",
    "                                  cmap='jet',\n",
    "                                  frame_height=500,\n",
    "                                  geo=True,\n",
    "                                  coastline=True,  \n",
    "                                  title='Standard Deviation of ' + str(vname))          \n",
    "    else:\n",
    "        dset = cptec_b.amplitudes[stdevvars]\n",
    "        if show_profile:\n",
    "            ax = dset.mean(dim='latitude').hvplot.line(#y='level',\n",
    "                                      #x='latitude',\n",
    "                                      clabel='Km',\n",
    "                                      aspect=1,\n",
    "                                      cmap='jet',\n",
    "                                      frame_height=500,\n",
    "                                      invert=True,\n",
    "                                      #show_grid=True,\n",
    "                                      logy=logy,\n",
    "                                      title='Standard Deviation of ' + str(vname))        \n",
    "        else:\n",
    "            ax = dset.hvplot.quadmesh(y='level',\n",
    "                                      x='latitude',\n",
    "                                      clabel='Km',\n",
    "                                      aspect=1,\n",
    "                                      cmap='jet',\n",
    "                                      frame_height=500, \n",
    "                                      logy=logy,\n",
    "                                      title='Standard Deviation of ' + str(vname))         \n",
    "    return ax"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a632e481-f09a-4985-ac37-a8b63e6c1e05",
   "metadata": {},
   "outputs": [],
   "source": [
    "pn.Column(stdevvars, show_profile, vertical_log, plotStDev).servable()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "72239f67-901b-4705-bcdf-78735fb00cc7",
   "metadata": {},
   "outputs": [],
   "source": [
    "@pn.depends(hscalevars, vertical_log)\n",
    "def plotHScale(hscalevars, vertical_log):\n",
    "    if hscalevars == 'sf': \n",
    "        vname = 'Stream Function'\n",
    "    elif hscalevars == 'vp':\n",
    "        vname = 'Velocity Potential'\n",
    "    elif hscalevars == 't':\n",
    "        vname = 'Unbalanced part of Temperature'\n",
    "    elif hscalevars == 'q':\n",
    "        vname = 'Relative Humidity'\n",
    "    elif hscalevars == 'qin':\n",
    "        vname = 'Relative Humidity'\n",
    "    elif hscalevars == 'oz':\n",
    "        vname = 'Ozone'\n",
    "    elif hscalevars == 'cw':\n",
    "        vname = 'Liquid Water Content'\n",
    "    elif hscalevars == 'ps':\n",
    "        vname = 'Surface Pressure'\n",
    "    elif hscalevars == 'sst':\n",
    "        vname = 'Sea Surface Temperature'\n",
    "\n",
    "    if vertical_log:\n",
    "        logy=True\n",
    "    else:\n",
    "        logy=False\n",
    "    \n",
    "    if hscalevars == 'qin':\n",
    "        dset = cptec_b.hscales[hscalevars]*1e2\n",
    "        ax = dset.isel(latitude=slice(0,25)).hvplot.quadmesh(y='level',\n",
    "                                                             x='latitude',\n",
    "                                                             clabel='Km',\n",
    "                                                             aspect=1,\n",
    "                                                             cmap='jet',\n",
    "                                                             frame_height=500,\n",
    "                                                             logy=logy,\n",
    "                                                             title='Horizontal Length Scale of ' + str(vname))\n",
    "    elif hscalevars == 'ps':\n",
    "        dset = cptec_b.hscales[hscalevars]\n",
    "        ax = dset.hvplot.line(x='latitude',\n",
    "                              clabel='Km',\n",
    "                              aspect=1,\n",
    "                              cmap='jet',\n",
    "                              frame_height=500,\n",
    "                              title='Horizontal Length Scale of ' + str(vname))  \n",
    "    elif hscalevars == 'sst':\n",
    "        dset = cptec_b.hscales[hscalevars]\n",
    "        ax = dset.hvplot.quadmesh(y='latitude',\n",
    "                                  x='longitude',\n",
    "                                  clabel='Km',\n",
    "                                  aspect=1,\n",
    "                                  cmap='jet',\n",
    "                                  frame_height=500,\n",
    "                                  geo=True,\n",
    "                                  coastline=True,  \n",
    "                                  title='Horizontal Length Scale of ' + str(vname))          \n",
    "    else:\n",
    "        dset = cptec_b.hscales[hscalevars]\n",
    "        ax = dset.hvplot.quadmesh(y='level',\n",
    "                                  x='latitude',\n",
    "                                  clabel='Km',\n",
    "                                  aspect=1,\n",
    "                                  cmap='jet',\n",
    "                                  frame_height=500, \n",
    "                                  logy=logy,\n",
    "                                  title='Horizontal Length Scale of ' + str(vname))        \n",
    "    return ax"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "99a823ab-871e-4de8-8b54-cad098a1e612",
   "metadata": {},
   "outputs": [],
   "source": [
    "pn.Column(hscalevars, vertical_log, plotHScale).servable()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e26d73a1-e375-4dd4-9fc1-09094a670653",
   "metadata": {},
   "outputs": [],
   "source": [
    "@pn.depends(vscalevars, vertical_log)\n",
    "def plotVScale(vscalevars, vertical_log):\n",
    "    if vscalevars == 'sf': \n",
    "        vname = 'Stream Function'\n",
    "    elif vscalevars == 'vp':\n",
    "        vname = 'Velocity Potential'\n",
    "    elif vscalevars == 't':\n",
    "        vname = 'Unbalanced part of Temperature'\n",
    "    elif vscalevars == 'q':\n",
    "        vname = 'Relative Humidity'\n",
    "    elif vscalevars == 'qin':\n",
    "        vname = 'Relative Humidity'\n",
    "    elif vscalevars == 'oz':\n",
    "        vname = 'Ozone'\n",
    "    elif vscalevars == 'cw':\n",
    "        vname = 'Liquid Water Content'\n",
    "    elif vscalevars == 'ps':\n",
    "        vname = 'Surface Pressure'\n",
    "    elif vscalevars == 'sst':\n",
    "        vname = 'Sea Surface Temperature'\n",
    "\n",
    "    if vertical_log:\n",
    "        logy=True\n",
    "    else:\n",
    "        logy=False\n",
    "    \n",
    "    if vscalevars == 'qin':\n",
    "        dset = cptec_b.vscales[vscalevars]*1e2\n",
    "        ax = dset.isel(latitude=slice(0,25)).hvplot.quadmesh(y='level',\n",
    "                                                             x='latitude',\n",
    "                                                             clabel='Km',\n",
    "                                                             aspect=1,\n",
    "                                                             cmap='jet',\n",
    "                                                             frame_height=500,\n",
    "                                                             logy=logy,\n",
    "                                                             title='Vertical Length Scale of ' + str(vname))\n",
    "    elif vscalevars == 'ps':\n",
    "        dset = cptec_b.vscales[vscalevars]\n",
    "        ax = dset.hvplot.line(x='latitude',\n",
    "                              clabel='Km',\n",
    "                              aspect=1,\n",
    "                              cmap='jet',\n",
    "                              frame_height=500,\n",
    "                              title='Vertical Length Scale of ' + str(vname))  \n",
    "    elif vscalevars == 'sst':\n",
    "        dset = cptec_b.vscales[vscalevars]\n",
    "        ax = dset.hvplot.quadmesh(y='latitude',\n",
    "                                  x='longitude',\n",
    "                                  clabel='Km',\n",
    "                                  aspect=1,\n",
    "                                  cmap='jet',\n",
    "                                  frame_height=500,\n",
    "                                  geo=True,\n",
    "                                  coastline=True,  \n",
    "                                  title='Vertical Length Scale of ' + str(vname))          \n",
    "    else:\n",
    "        dset = cptec_b.vscales[vscalevars]\n",
    "        ax = dset.hvplot.quadmesh(y='level',\n",
    "                                  x='latitude',\n",
    "                                  clabel='Km',\n",
    "                                  aspect=1,\n",
    "                                  cmap='jet',\n",
    "                                  frame_height=500, \n",
    "                                  logy=logy,\n",
    "                                  title='Vertical Length Scale of ' + str(vname))        \n",
    "    return ax"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8a390105-a1ba-4bf9-8436-1209204afc2c",
   "metadata": {},
   "outputs": [],
   "source": [
    "pn.Column(vscalevars, vertical_log, plotVScale).servable()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "37f1c6b1-c73b-4dd7-8846-283d8882c983",
   "metadata": {},
   "outputs": [],
   "source": [
    "for var in balproj_lst:\n",
    "    cptec_b.balprojs[var].to_zarr('smna_berror_balprojs_' + str(var) + '.zarr', mode='w', consolidated=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7b633824-5deb-4bdf-9dc8-2be2be3ceaaf",
   "metadata": {},
   "outputs": [],
   "source": [
    "for var in stdevvars_lst:\n",
    "    cptec_b.amplitudes[var].to_zarr('smna_berror_amplitudes_' + str(var) + '.zarr', mode='w', consolidated=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "cd89dc06-5f34-4948-ab45-b3a1f2afb410",
   "metadata": {},
   "outputs": [],
   "source": [
    "for var in hscalevars_lst:\n",
    "    cptec_b.hscales[var].to_zarr('smna_berror_hscales_' + str(var) + '.zarr', mode='w', consolidated=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5c4ccf85-b7ec-4623-ac3d-311f602d1ed3",
   "metadata": {},
   "outputs": [],
   "source": [
    "for var in vscalevars_lst:\n",
    "    cptec_b.vscales[var].to_zarr('smna_berror_vscales_' + str(var) + '.zarr', mode='w', consolidated=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "42d2a449-1d57-4d8c-b331-b04a019784e6",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
