{ "cells": [ { "cell_type": "markdown", "id": "cc301de0-78cb-47f4-bae2-5da3355a93f2", "metadata": {}, "source": [ "## Time zones" ] }, { "cell_type": "code", "execution_count": 1, "id": "6b323220-3a5a-4a0b-8f33-4730d802c7c9", "metadata": {}, "outputs": [], "source": [ "import earthkit.data\n", "import earthkit.plots" ] }, { "cell_type": "code", "execution_count": 2, "id": "f4ea40ec-f2f7-4b41-a930-7e33a0976d1e", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2025-02-04 14:11:16,382 WARNING [2025-02-04T14:11:16.361399] You are using a deprecated API endpoint. If you are using cdsapi, please upgrade to the latest version.\n", "2025-02-04 14:11:16,384 INFO Request ID is a843faaf-5a99-4019-ab5e-6667c4133d29\n", "2025-02-04 14:11:16,472 INFO status has been updated to accepted\n", "2025-02-04 14:11:23,814 INFO status has been updated to running\n", "2025-02-04 14:11:29,149 INFO status has been updated to successful\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "1ad9ec3ff6fd5ab37c4badc89898a968.grib: 0%| | 0.00/1.98M [00:00" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "chart = earthkit.plots.Map(domain=\"Japan\")\n", "\n", "chart.block(data, levels=range(31), colors=\"turbo\", units=\"celsius\")\n", "\n", "with earthkit.plots.schema.set(time_zone=\"Asia/Tokyo\"):\n", " chart.title(\"{variable_name} at {time:%H:%M %Z} ({utc_offset}) on {time:%-d %B %Y}\")\n", "\n", "chart.coastlines()\n", "chart.borders()\n", "chart.gridlines()\n", "\n", "chart.legend(location=\"right\")\n", "\n", "chart.show()" ] } ], "metadata": { "kernelspec": { "display_name": "DEVELOP", "language": "python", "name": "develop" }, "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.10.6" } }, "nbformat": 4, "nbformat_minor": 5 }