{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "82b0540a", "metadata": {}, "outputs": [], "source": [ "import earthkit.data\n", "import earthkit.plots" ] }, { "cell_type": "code", "execution_count": 2, "id": "633a5450", "metadata": {}, "outputs": [], "source": [ "from datetime import datetime" ] }, { "cell_type": "code", "execution_count": 3, "id": "7ec9a0d6", "metadata": {}, "outputs": [], "source": [ "YEARS = {\n", " 1993: \"Normal conditions\",\n", " 1997: \"El Niño\",\n", " 1998: \"La Niña\",\n", "}\n", "\n", "DOMAIN = [100, 300, -20, 20]" ] }, { "cell_type": "code", "execution_count": 4, "id": "5b6b497a", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2024-06-16 19:09:09,322 INFO Welcome to the CDS\n", "2024-06-16 19:09:09,322 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels-monthly-means\n", "2024-06-16 19:09:09,434 INFO Request is completed\n", "2024-06-16 19:09:09,434 INFO Downloading https://download-0006-clone.copernicus-climate.eu/cache-compute-0006/cache/data6/adaptor.mars.internal-1718561324.1581435-27236-17-ac702269-b7ec-4519-8881-446cccecdc6d.grib to /var/folders/vt/7j2c2tmx4m14gn_sg3zpf5l00000gn/T/tmpcn2ozd_0/cds-retriever-648ba78d96b1a50a3af06f46c2ad55dfc9915a50822c7ac66404e1b21b12b1eb.cache.tmp (701.8K)\n", "2024-06-16 19:09:09,886 INFO Download rate 1.5M/s \n" ] } ], "source": [ "data = earthkit.data.from_source(\n", " \"cds\", \"reanalysis-era5-single-levels-monthly-means\",\n", " {\n", " \"product_type\": \"monthly_averaged_reanalysis\",\n", " \"variable\": \"sea_surface_temperature\",\n", " \"year\": list(YEARS),\n", " \"month\": \"12\",\n", " \"time\": \"00:00\",\n", " \"area\": [20, 100, -20, -60],\n", " \"grid\": [0.25, 0.25],\n", " },\n", ")" ] }, { "cell_type": "code", "execution_count": 5, "id": "f34d06a5", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | centre | \n", "shortName | \n", "typeOfLevel | \n", "level | \n", "dataDate | \n", "dataTime | \n", "stepRange | \n", "dataType | \n", "number | \n", "gridType | \n", "
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "ecmf | \n", "sst | \n", "surface | \n", "0 | \n", "19931201 | \n", "0 | \n", "0 | \n", "an | \n", "0 | \n", "regular_ll | \n", "
| 1 | \n", "ecmf | \n", "sst | \n", "surface | \n", "0 | \n", "19971201 | \n", "0 | \n", "0 | \n", "an | \n", "0 | \n", "regular_ll | \n", "
| 2 | \n", "ecmf | \n", "sst | \n", "surface | \n", "0 | \n", "19981201 | \n", "0 | \n", "0 | \n", "an | \n", "0 | \n", "regular_ll | \n", "