From e855da08912bac76b43c93b330c5871c14ea4d83 Mon Sep 17 00:00:00 2001 From: Abel Aoun Date: Wed, 24 Jan 2024 09:53:50 +0100 Subject: [PATCH] DOC: Update notebooks --- doc/source/tutorials/index.rst | 1 + .../notebooks/averaged_tas_anomaly.ipynb | 2 +- .../notebooks/cold_spell_duration.ipynb | 536 +----------------- .../notebooks/custom_freezing_tas.ipynb | 2 +- .../notebooks/data/cmcc_tas.metalink | 68 +++ .../notebooks/deltaT_deltaP_anomaly.ipynb | 20 +- .../tg90p_calculate__subset_and_plot.ipynb | 17 +- 7 files changed, 92 insertions(+), 554 deletions(-) create mode 100644 doc/source/tutorials/notebooks/data/cmcc_tas.metalink diff --git a/doc/source/tutorials/index.rst b/doc/source/tutorials/index.rst index a62d73d4..87e0579c 100644 --- a/doc/source/tutorials/index.rst +++ b/doc/source/tutorials/index.rst @@ -16,3 +16,4 @@ capabilities. To see how icclim can solve specific issues see notebooks/tg90p_calculate__subset_and_plot notebooks/custom_freezing_tas notebooks/cold_spell_duration + notebooks/su_summer_days__subset_and_plot diff --git a/doc/source/tutorials/notebooks/averaged_tas_anomaly.ipynb b/doc/source/tutorials/notebooks/averaged_tas_anomaly.ipynb index 1363d230..80ac16e7 100644 --- a/doc/source/tutorials/notebooks/averaged_tas_anomaly.ipynb +++ b/doc/source/tutorials/notebooks/averaged_tas_anomaly.ipynb @@ -8,7 +8,7 @@ "\n", "## Averaged Temperature Anomaly 2081-2100 vs 1971-2000 SSP585\n", "\n", - "This example calculates the averaged temperature anomaly (using the TG indicator) for the period 2081-2100 compared to the reference 1971-2000 for SSP585 and several climate models.\n", + "This example calculates the averaged temperature anomaly (using the **TG** indicator) for the period 2081-2100 compared to the reference 1971-2000 for SSP585 and several climate models.\n", "\n", "We assume to have the **tas** variable in netCDF files in a `./data` folder.\n", "The data can be dowloaded using the [metalink](data/cmcc_gfdl_tas.metalink) provided with this notebook.\n", diff --git a/doc/source/tutorials/notebooks/cold_spell_duration.ipynb b/doc/source/tutorials/notebooks/cold_spell_duration.ipynb index 03d9f2b8..d25527b9 100644 --- a/doc/source/tutorials/notebooks/cold_spell_duration.ipynb +++ b/doc/source/tutorials/notebooks/cold_spell_duration.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Calculate the Cold-spell duration index (CSDI)\n", + "# Calculate CSDI: Cold-spell duration index\n", "\n", "## Cold-spell duration index using the Copernicus Change Service (C3S)\n", "\n", @@ -533,540 +533,6 @@ "print(listOfFileNames)" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Create a dask local cluster" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-01-22 12:02:50,774 To route to workers diagnostics web server please install jupyter-server-proxy: python -m pip install jupyter-server-proxy\n", - "/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/node.py:182: UserWarning: Port 8787 is already in use.\n", - "Perhaps you already have a cluster running?\n", - "Hosting the HTTP server on port 44911 instead\n", - " warnings.warn(\n", - "2024-01-22 12:02:50,801 State start\n", - "2024-01-22 12:02:50,806 Scheduler at: tcp://127.0.0.1:33471\n", - "2024-01-22 12:02:50,807 dashboard at: http://127.0.0.1:44911/status\n", - "2024-01-22 12:02:50,808 Registering Worker plugin shuffle\n", - "2024-01-22 12:02:50,818 Start Nanny at: 'tcp://127.0.0.1:33675'\n", - "2024-01-22 12:02:51,350 Register worker \n", - "2024-01-22 12:02:51,352 Starting worker compute stream, tcp://127.0.0.1:39551\n", - "2024-01-22 12:02:51,352 Starting established connection to tcp://127.0.0.1:52254\n", - "2024-01-22 12:02:51,390 Receive client connection: Client-c878d7e9-b915-11ee-a8ec-10f60a94f133\n", - "2024-01-22 12:02:51,391 Starting established connection to tcp://127.0.0.1:52266\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "
\n", - "
\n", - "

Client

\n", - "

Client-c878d7e9-b915-11ee-a8ec-10f60a94f133

\n", - " \n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "
Connection method: Cluster objectCluster type: distributed.LocalCluster
\n", - " Dashboard: http://127.0.0.1:44911/status\n", - "
\n", - "\n", - " \n", - "\n", - " \n", - "
\n", - "

Cluster Info

\n", - "
\n", - "
\n", - "
\n", - "
\n", - "

LocalCluster

\n", - "

777e9d86

\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - "\n", - " \n", - "
\n", - " Dashboard: http://127.0.0.1:44911/status\n", - " \n", - " Workers: 1\n", - "
\n", - " Total threads: 1\n", - " \n", - " Total memory: 11.18 GiB\n", - "
Status: runningUsing processes: True
\n", - "\n", - "
\n", - " \n", - "

Scheduler Info

\n", - "
\n", - "\n", - "
\n", - "
\n", - "
\n", - "
\n", - "

Scheduler

\n", - "

Scheduler-11b924af-aaa9-4294-a1bb-53879f270862

\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - " Comm: tcp://127.0.0.1:33471\n", - " \n", - " Workers: 1\n", - "
\n", - " Dashboard: http://127.0.0.1:44911/status\n", - " \n", - " Total threads: 1\n", - "
\n", - " Started: Just now\n", - " \n", - " Total memory: 11.18 GiB\n", - "
\n", - "
\n", - "
\n", - "\n", - "
\n", - " \n", - "

Workers

\n", - "
\n", - "\n", - " \n", - "
\n", - "
\n", - "
\n", - "
\n", - " \n", - "

Worker: 0

\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "\n", - " \n", - "\n", - " \n", - "\n", - "
\n", - " Comm: tcp://127.0.0.1:39551\n", - " \n", - " Total threads: 1\n", - "
\n", - " Dashboard: http://127.0.0.1:36111/status\n", - " \n", - " Memory: 11.18 GiB\n", - "
\n", - " Nanny: tcp://127.0.0.1:33675\n", - "
\n", - " Local directory: /tmp/dask-scratch-space/worker-hvevd7os\n", - "
\n", - "
\n", - "
\n", - "
\n", - " \n", - "\n", - "
\n", - "
\n", - "\n", - "
\n", - "
\n", - "
\n", - "
\n", - " \n", - "\n", - "
\n", - "
" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-01-22 12:03:12,470 '<' not supported between instances of 'float' and 'str'\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:03:12,472 '<' not supported between instances of 'float' and 'str'\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 4702, in status_doc\n", - " cluster_memory = ClusterMemory(scheduler, sizing_mode=\"stretch_both\")\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:03:12,474 Uncaught exception GET /status (127.0.0.1)\n", - "HTTPServerRequest(protocol='http', host='127.0.0.1:44911', method='GET', uri='/status', version='HTTP/1.1', remote_ip='127.0.0.1')\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/tornado/web.py\", line 1786, in _execute\n", - " result = await result\n", - " ^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/views/doc_handler.py\", line 54, in get\n", - " session = await self.get_session()\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/views/session_handler.py\", line 145, in get_session\n", - " session = await self.application_context.create_session_if_needed(session_id, self.request, token)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/contexts.py\", line 240, in create_session_if_needed\n", - " self._application.initialize_document(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/application/application.py\", line 190, in initialize_document\n", - " h.modify_document(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/application/handlers/function.py\", line 140, in modify_document\n", - " self._func(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 4702, in status_doc\n", - " cluster_memory = ClusterMemory(scheduler, sizing_mode=\"stretch_both\")\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:04:14,180 '<' not supported between instances of 'float' and 'str'\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:04:14,182 '<' not supported between instances of 'float' and 'str'\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 4702, in status_doc\n", - " cluster_memory = ClusterMemory(scheduler, sizing_mode=\"stretch_both\")\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:04:14,184 Uncaught exception GET /status (127.0.0.1)\n", - "HTTPServerRequest(protocol='http', host='127.0.0.1:44911', method='GET', uri='/status', version='HTTP/1.1', remote_ip='127.0.0.1')\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/tornado/web.py\", line 1786, in _execute\n", - " result = await result\n", - " ^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/views/doc_handler.py\", line 54, in get\n", - " session = await self.get_session()\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/views/session_handler.py\", line 145, in get_session\n", - " session = await self.application_context.create_session_if_needed(session_id, self.request, token)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/contexts.py\", line 240, in create_session_if_needed\n", - " self._application.initialize_document(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/application/application.py\", line 190, in initialize_document\n", - " h.modify_document(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/application/handlers/function.py\", line 140, in modify_document\n", - " self._func(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 4702, in status_doc\n", - " cluster_memory = ClusterMemory(scheduler, sizing_mode=\"stretch_both\")\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:04:18,384 Worker tcp://127.0.0.1:39551 (pid=76080) exceeded 95% memory budget. Restarting...\n", - "2024-01-22 12:04:18,501 Connection to tcp://127.0.0.1:52254 has been closed.\n", - "2024-01-22 12:04:18,502 Remove worker (stimulus_id='handle-worker-cleanup-1705921458.5023253')\n", - "2024-01-22 12:04:18,552 Lost all workers\n", - "2024-01-22 12:04:18,552 Worker process 76080 was killed by signal 15\n", - "2024-01-22 12:04:18,727 Restarting worker\n", - "2024-01-22 12:04:19,089 Failed to start process\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/nanny.py\", line 448, in instantiate\n", - " result = await self.process.start()\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/nanny.py\", line 755, in start\n", - " msg = await self._wait_until_connected(uid)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/nanny.py\", line 896, in _wait_until_connected\n", - " raise msg[\"exception\"]\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/nanny.py\", line 947, in run\n", - " worker = worker_factory()\n", - " ^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/worker.py\", line 753, in __init__\n", - " self.memory_manager = WorkerMemoryManager(\n", - " ^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/worker_memory.py\", line 162, in __init__\n", - " self.memory_limit\n", - "MemoryError\n", - "2024-01-22 12:04:19,091 Closing Nanny at 'tcp://127.0.0.1:33675'. Reason: nanny-instantiate-failed\n", - "2024-01-22 12:04:19,092 Nanny asking worker to close. Reason: nanny-instantiate-failed\n", - "2024-01-22 12:04:19,094 Worker process 76328 was killed by signal 15\n", - "2024-01-22 12:04:19,096 Failed to restart worker after its process exited\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/nanny.py\", line 563, in _on_worker_exit\n", - " await self.instantiate()\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/nanny.py\", line 448, in instantiate\n", - " result = await self.process.start()\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/nanny.py\", line 755, in start\n", - " msg = await self._wait_until_connected(uid)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/nanny.py\", line 896, in _wait_until_connected\n", - " raise msg[\"exception\"]\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/nanny.py\", line 947, in run\n", - " worker = worker_factory()\n", - " ^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/worker.py\", line 753, in __init__\n", - " self.memory_manager = WorkerMemoryManager(\n", - " ^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/worker_memory.py\", line 162, in __init__\n", - " self.memory_limit\n", - "MemoryError\n", - "2024-01-22 12:19:43,337 '<' not supported between instances of 'float' and 'str'\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:19:43,339 '<' not supported between instances of 'float' and 'str'\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 4702, in status_doc\n", - " cluster_memory = ClusterMemory(scheduler, sizing_mode=\"stretch_both\")\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:19:43,340 Uncaught exception GET /status (127.0.0.1)\n", - "HTTPServerRequest(protocol='http', host='127.0.0.1:44911', method='GET', uri='/status', version='HTTP/1.1', remote_ip='127.0.0.1')\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/tornado/web.py\", line 1786, in _execute\n", - " result = await result\n", - " ^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/views/doc_handler.py\", line 54, in get\n", - " session = await self.get_session()\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/views/session_handler.py\", line 145, in get_session\n", - " session = await self.application_context.create_session_if_needed(session_id, self.request, token)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/contexts.py\", line 240, in create_session_if_needed\n", - " self._application.initialize_document(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/application/application.py\", line 190, in initialize_document\n", - " h.modify_document(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/application/handlers/function.py\", line 140, in modify_document\n", - " self._func(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 4702, in status_doc\n", - " cluster_memory = ClusterMemory(scheduler, sizing_mode=\"stretch_both\")\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:32:43,156 '<' not supported between instances of 'float' and 'str'\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:32:43,158 '<' not supported between instances of 'float' and 'str'\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 4702, in status_doc\n", - " cluster_memory = ClusterMemory(scheduler, sizing_mode=\"stretch_both\")\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 12:32:43,160 Uncaught exception GET /status (127.0.0.1)\n", - "HTTPServerRequest(protocol='http', host='127.0.0.1:44911', method='GET', uri='/status', version='HTTP/1.1', remote_ip='127.0.0.1')\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/tornado/web.py\", line 1786, in _execute\n", - " result = await result\n", - " ^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/views/doc_handler.py\", line 54, in get\n", - " session = await self.get_session()\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/views/session_handler.py\", line 145, in get_session\n", - " session = await self.application_context.create_session_if_needed(session_id, self.request, token)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/server/contexts.py\", line 240, in create_session_if_needed\n", - " self._application.initialize_document(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/application/application.py\", line 190, in initialize_document\n", - " h.modify_document(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/bokeh/application/handlers/function.py\", line 140, in modify_document\n", - " self._func(doc)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 4702, in status_doc\n", - " cluster_memory = ClusterMemory(scheduler, sizing_mode=\"stretch_both\")\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/utils.py\", line 838, in wrapper\n", - " return func(*args, **kwargs)\n", - " ^^^^^^^^^^^^^^^^^^^^^\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 306, in __init__\n", - " MemoryColor.__init__(self)\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/dashboard/components/scheduler.py\", line 286, in __init__\n", - " self.red = min(terminate or math.inf, 1.0)\n", - " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "TypeError: '<' not supported between instances of 'float' and 'str'\n", - "2024-01-22 14:51:14,992 Task exception was never retrieved\n", - "future: .wait() done, defined at /home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/client.py:2208> exception=AllExit()>\n", - "Traceback (most recent call last):\n", - " File \"/home/bzah/micromamba/envs/icclim-dev/lib/python3.11/site-packages/distributed/client.py\", line 2217, in wait\n", - " raise AllExit()\n", - "distributed.client.AllExit\n" - ] - } - ], - "source": [ - "# Setup Dask config\n", - "\n", - "client = DaskClient(\n", - " memory_limit=\"12GB\", n_workers=1, threads_per_worker=1, silence_logs=logging.ERROR\n", - ")\n", - "\n", - "dask.config.set({\"array.slicing.split_large_chunks\": False})\n", - "\n", - "dask.config.set({\"distributed.worker.memory.target\": \"0.8\"})\n", - "dask.config.set({\"distributed.worker.memory.spill\": \"0.9\"})\n", - "dask.config.set({\"distributed.worker.memory.pause\": \"0.95\"})\n", - "dask.config.set({\"distributed.worker.memory.terminate\": \"0.98\"})\n", - "\n", - "dask.config.set({\"array.chunk-size\": \"100 MB\"})\n", - "client" - ] - }, { "cell_type": "markdown", "metadata": {}, diff --git a/doc/source/tutorials/notebooks/custom_freezing_tas.ipynb b/doc/source/tutorials/notebooks/custom_freezing_tas.ipynb index 7b483b21..89118351 100644 --- a/doc/source/tutorials/notebooks/custom_freezing_tas.ipynb +++ b/doc/source/tutorials/notebooks/custom_freezing_tas.ipynb @@ -6,7 +6,7 @@ "tags": [] }, "source": [ - "# Calculate number of days with freezing mean temperature\n", + "# Calculate custom index: number of days with freezing mean temperature\n", "\n", "Example notebook that runs icclim.\n", "\n", diff --git a/doc/source/tutorials/notebooks/data/cmcc_tas.metalink b/doc/source/tutorials/notebooks/data/cmcc_tas.metalink new file mode 100644 index 00000000..2420afd8 --- /dev/null +++ b/doc/source/tutorials/notebooks/data/cmcc_tas.metalink @@ -0,0 +1,68 @@ + + + 1147761901 + 1842d1e9d4d880f431f1a08cff252501ea32aac39e85dd02426f1616b7cc34d9 + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/ScenarioMIP/CMCC/CMCC-ESM2/ssp585/r1i1p1f1/day/tas/gn/v20210126/tas_day_CMCC-ESM2_ssp585_r1i1p1f1_gn_20150101-20391231.nc + + + + 1145071534 + 749ca55115708a81b59e0430fc2dca9674fe16ec7328b639f1232bfeb2531720 + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/ScenarioMIP/CMCC/CMCC-ESM2/ssp585/r1i1p1f1/day/tas/gn/v20210126/tas_day_CMCC-ESM2_ssp585_r1i1p1f1_gn_20400101-20641231.nc + + + + 1141932140 + 823c0ddcd5d607508f6d2c1cf262ae8345c9f5e7b90b83dff459c9768c01b874 + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/ScenarioMIP/CMCC/CMCC-ESM2/ssp585/r1i1p1f1/day/tas/gn/v20210126/tas_day_CMCC-ESM2_ssp585_r1i1p1f1_gn_20650101-20891231.nc + + + + 501759828 + 009c5804afeeac37e5337e1f9a0defcded19e1418ec604fe3c9ec921e80e7122 + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/ScenarioMIP/CMCC/CMCC-ESM2/ssp585/r1i1p1f1/day/tas/gn/v20210126/tas_day_CMCC-ESM2_ssp585_r1i1p1f1_gn_20900101-21001231.nc + + + + 1150891671 + e04ed7e8cd9d826534e62d9f1f3f475d82c598c4afe4c895f6a09f611a3b2b55 + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/CMIP/CMCC/CMCC-ESM2/historical/r1i1p1f1/day/tas/gn/v20210114/tas_day_CMCC-ESM2_historical_r1i1p1f1_gn_18500101-18741231.nc + + + + 1151025700 + 6c4b4daf593a7f4f367422cd3809cc1903b150416768082f6f23ff7d0d423c2e + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/CMIP/CMCC/CMCC-ESM2/historical/r1i1p1f1/day/tas/gn/v20210114/tas_day_CMCC-ESM2_historical_r1i1p1f1_gn_18750101-18991231.nc + + + + 1150811941 + 41ce66cfc99260dcc3f444c4d331af1bd0e31a584ce58efcf99e4fd6e1018315 + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/CMIP/CMCC/CMCC-ESM2/historical/r1i1p1f1/day/tas/gn/v20210114/tas_day_CMCC-ESM2_historical_r1i1p1f1_gn_19000101-19241231.nc + + + + 1150101826 + 9d98438740d5df41f8c32134ee1517bbdc1ff8fc44edae4ee7ef0f1b77cca6db + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/CMIP/CMCC/CMCC-ESM2/historical/r1i1p1f1/day/tas/gn/v20210114/tas_day_CMCC-ESM2_historical_r1i1p1f1_gn_19250101-19491231.nc + + + + 1149723510 + 934178eea0dc6b0d34631f4b0a897308da91b0525217302b1cddf79a491d0eef + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/CMIP/CMCC/CMCC-ESM2/historical/r1i1p1f1/day/tas/gn/v20210114/tas_day_CMCC-ESM2_historical_r1i1p1f1_gn_19500101-19741231.nc + + + + 1149098090 + 20087e4531105f3d3aec33b39c33b1ebfd9f4bf266cb58e2e40dc70a98ee2eb8 + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/CMIP/CMCC/CMCC-ESM2/historical/r1i1p1f1/day/tas/gn/v20210114/tas_day_CMCC-ESM2_historical_r1i1p1f1_gn_19750101-19991231.nc + + + + 688921916 + 2a085848340fcd18a92885461075e7573f30739322c60d9008a04c9206bf4e04 + http://esgf-node2.cmcc.it/thredds/fileServer/esg_dataroot/CMIP6/CMIP/CMCC/CMCC-ESM2/historical/r1i1p1f1/day/tas/gn/v20210114/tas_day_CMCC-ESM2_historical_r1i1p1f1_gn_20000101-20141231.nc + + + diff --git a/doc/source/tutorials/notebooks/deltaT_deltaP_anomaly.ipynb b/doc/source/tutorials/notebooks/deltaT_deltaP_anomaly.ipynb index 0a5221f9..88fc8b51 100644 --- a/doc/source/tutorials/notebooks/deltaT_deltaP_anomaly.ipynb +++ b/doc/source/tutorials/notebooks/deltaT_deltaP_anomaly.ipynb @@ -6,11 +6,16 @@ "source": [ "# Calculate averaged surface temperature and precipitation anomalies\n", "\n", - "#### The averaged surface temperature anomaly and the same for precipitation anomaly over the period 2081-2100 compared to the period 1981-2000, and display delta-T delta-P diagram\n", - "\n", - "Example notebook that runs icclim.\n", - "\n", - "The example calculates the averaged temperature anomaly (using the [TG](https://knmi-ecad-assets-prd.s3.amazonaws.com/documents/atbd.pdf#subsubsection.5.3.11.TG) indicator) vs the precipitation anomaly (using the PRCPTOT indicator) for the period 2081-2100 compared to the reference 1981-2000 for SSP 585 and several climate models.\n", + "Goals:\n", + "- Compute the averaged surface temperature anomaly and the same for precipitation anomaly over the period 2081-2100 compared to the period 1981-2000\n", + "- Display delta-T delta-P diagram" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The example calculates the averaged temperature anomaly (using the **TG**) indicator) vs the precipitation anomaly (using the **PRCPTOT** indicator) for the period 2081-2100 compared to the reference 1981-2000 for SSP 585 and several climate models.\n", "\n", "We assume to have the **tas** and the **pr** variables in netCDF files in a `./data` folder.\n", "The data can be dowloaded using the [metalink](data/cmcc_gfdl_pr_and_tas.metalink) provided with this notebook.\n", @@ -22,7 +27,7 @@ "\n", "The datasets that are expected for this notebook are tas and pr parameters (needed to calculate the TG and PRCPTOT indicators respectively) for several climate models, for the historical (1981-2000) and future (2081-2100) SSP 585 experiment and for several climate models and one member. Daily data is used. In C4I, you can find all of the data needed in the CMIP6 project, at the **esgf-data3.ceda.ac.uk** and **esgf.nci.org.au** mirrors.\n", "\n", - "### Preparation of the needed modules" + "### Preparation of the modules" ] }, { @@ -144,8 +149,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Specification of the parameters and period of interest\n", - "\n", + "### Parameters Setup \n", "The time period of interest as well as the reference period are defined here.\n", "A list of models is listed here as an example.\n", "Here we used Monthly data (Amon) but daily data could also be used.\n", diff --git a/doc/source/tutorials/notebooks/tg90p_calculate__subset_and_plot.ipynb b/doc/source/tutorials/notebooks/tg90p_calculate__subset_and_plot.ipynb index 9abe0435..6f95ae7f 100644 --- a/doc/source/tutorials/notebooks/tg90p_calculate__subset_and_plot.ipynb +++ b/doc/source/tutorials/notebooks/tg90p_calculate__subset_and_plot.ipynb @@ -13,13 +13,12 @@ "\n", "Example notebook that runs icclim.\n", "\n", - "The example calculates the percentage of days when Tmax > 90th percentile (TG90p indicator) for the dataset chosen by the user on C4I.\n", - "We assume to have the **tas** variable in netCDF files in a `./data` folder.\n", - "The data can be dowloaded using the [metalink](data/cmcc_gfdl_tas.metalink) provided with this notebook.\n", + "The example calculates the percentage of days when Tas > 90th percentile (TG90pindicator) for the dataset chosen by the user on C4I. \n", + "We assume to have the **tas** variable in netCDF files in a `./data` folder for model `CMCC` and for one member `r1i1p1f1`. \n", + "The data can be dowloaded using the [metalink](data/cmcc_tas.metalink) provided with this notebook.\n", "The data described in a `.metalink` file can be dowloaded with tools such as [aria2](https://aria2.github.io/) or a browser plugin such as [DownThemAll!](https://addons.mozilla.org/en-US/firefox/addon/downthemall/)\n", "If you wish to use a different dataset, you can use the [climate 4 impact portal](https://www.climate4impact.eu/c4i-frontend/) to search and select the data you wish to use and a metalink file to the [ESGF](https://esgf.llnl.gov/) data will be provided.\n", "\n", - "\n", "The data is read using xarray and a plot of the time series over a specific region is generated, as well as an average spatial map. Several output types examples are shown.\n", "\n", "The dataset that is expected for this notebook are tas parameter (needed to calculate the TG90p indicator) for one specific climate model and experiment as well as one member. The time period should be continuous.\n", @@ -1195,7 +1194,7 @@ "# Quickly plot the data using xarray.plot()\n", "tg90_two.plot(x=\"lon\", y=\"lat\", col=\"time\", col_wrap=1)\n", "\n", - "plt.suptitle(\"Two Time Steps of TX90P\", y=1.03)\n", + "plt.suptitle(\"Two Time Steps of TG90P\", y=1.03)\n", "plt.show()" ] }, @@ -1240,7 +1239,7 @@ "\n", "# Plot information\n", "plt.suptitle(\n", - " \"Percentage of days when Tmax > 90th percentil Period 2081-2100 Reference 1981-2000 TX90P\",\n", + " \"Percentage of days when Tas > 90th percentil Period 2081-2100 Reference 1981-2000 TG90P\",\n", " y=1,\n", ")\n", "\n", @@ -1250,7 +1249,7 @@ "ax.set_extent(extent)\n", "\n", "# Save plot as png\n", - "plt.savefig(\"c4i_tx90p_icclim.png\")" + "plt.savefig(\"c4i_tg90p_icclim.png\")" ] }, { @@ -1292,7 +1291,7 @@ "\n", "# Plot information\n", "plt.suptitle(\n", - " \"Percentage of days when tas > 90th percentile - Period 2081-2100 - Reference 1981-2000 - TX90P\",\n", + " \"Percentage of days when tas > 90th percentile - Period 2081-2100 - Reference 1981-2000 - TG90P\",\n", " y=1,\n", ")\n", "\n", @@ -1302,7 +1301,7 @@ "ax.set_extent(extent)\n", "\n", "# Save plot as png\n", - "plt.savefig(\"c4i_tx90p_contours_icclim.png\")" + "plt.savefig(\"c4i_tg90p_contours_icclim.png\")" ] } ],