{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "1a74fd06-4e76-47bb-b566-cf425b20cb6b", "metadata": {}, "outputs": [], "source": [ "import earthkit.data\n", "import earthkit.plots" ] }, { "cell_type": "code", "execution_count": 2, "id": "bdbd54a8-62b5-44ff-9fc5-2d03ba898025", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "O32.grib: 0%| | 0.00/10.5k [00:00\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
centreshortNametypeOfLevelleveldataDatedataTimestepRangedataTypenumbergridType
0ecmf2tsurface02023101012000an0reduced_gg
\n", "" ], "text/plain": [ " centre shortName typeOfLevel level dataDate dataTime stepRange dataType \\\n", "0 ecmf 2t surface 0 20231010 1200 0 an \n", "\n", " number gridType \n", "0 0 reduced_gg " ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data = earthkit.data.from_source(\n", " \"url\",\n", " \"https://get.ecmwf.int/repository/test-data/earthkit-regrid/test-data/global_0_360/O32.grib\",\n", ")\n", "\n", "data.ls()" ] }, { "cell_type": "code", "execution_count": 3, "id": "05532895-eff3-4512-abbf-8c226c7aba03", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "LL-1x1-90:0:-90:359-c3c76e2a27e53dbd0fdd17b7eb075fea-011801.npz: 0%| | 0.00/821k [00:00" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "chart = earthkit.plots.Map(domain=\"Arctic\")\n", "\n", "chart.contourf(data, units=\"celsius\")\n", "\n", "chart.title()\n", "chart.legend()\n", "\n", "chart.coastlines()\n", "chart.gridlines()\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 }