Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save j08lue/32e1ba3dd1a290badae8a472b290fd32 to your computer and use it in GitHub Desktop.

Select an option

Save j08lue/32e1ba3dd1a290badae8a472b290fd32 to your computer and use it in GitHub Desktop.
Collect On-Demand Extremes DT simulation domain centroids and bounds
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"id": "f199b818-3e15-4066-96b4-94776bdc7fcb",
"metadata": {},
"source": [
"# Collect On-Demand Extremes DT simulation domain centroids and bounds"
]
},
{
"cell_type": "markdown",
"id": "838c5321-bc4d-44bb-808d-5c39e5c75140",
"metadata": {},
"source": [
"Using Qubed for looking up available fields from the Data Bridge STAC and geohash to decode reference locations\n",
"\n",
"```\n",
"pip install requests\n",
"pip install qubed earthkit.data\n",
"pip install git+https://github.com/destination-earth-digital-twins/geohash.git\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "453f07b4-aa38-4d63-b59b-2ee4306c2e88",
"metadata": {},
"outputs": [],
"source": [
"import json\n",
"\n",
"import geohash\n",
"import requests\n",
"import earthkit.data\n",
"from qubed import Qube"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "0e717e7c-5f70-40c5-bb43-c0d936597bf9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['climate-dt', 'extremes-dt', 'on-demand-extremes-dt']"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"full_dt = Qube.from_json(requests.get(\"https://qubed.lumi.apps.dte.destination-earth.eu/api/v2/select/\").json())\n",
"full_dt.span(\"dataset\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "3c7fd96e-b826-4465-910f-cde682f9ad42",
"metadata": {},
"outputs": [],
"source": [
"dt = full_dt.select({\"dataset\": \"on-demand-extremes-dt\"})"
]
},
{
"cell_type": "markdown",
"id": "a37f7392-93a3-4389-a0d7-b4dd1fc30907",
"metadata": {},
"source": [
"Load a slice of data for each simulation and determine its domain"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "c6a8dab1-5fdc-4a00-8368-215c88adfa66",
"metadata": {},
"outputs": [],
"source": [
"def get_bbox_geometry(request):\n",
" reader = earthkit.data.from_source(\n",
" \"polytope\",\n",
" \"destination-earth\",\n",
" request,\n",
" stream=False,\n",
" address=\"polytope.lumi.apps.dte.destination-earth.eu\",\n",
" )\n",
" ds = reader.to_xarray()\n",
" \n",
" assert ds[\"longitude\"].dims == ('y', 'x')\n",
" assert ds[\"latitude\"].dims == ('y', 'x')\n",
" lons = ds[\"longitude\"]\n",
" lats = ds[\"latitude\"]\n",
" \n",
" indices = [\n",
" [0, 0],\n",
" [0, -1],\n",
" [-1, -1],\n",
" [-1, 0],\n",
" [0, 0]\n",
" ]\n",
" \n",
" coordinates = [[[(((float(lons[j, i]) + 180) % 360) - 180), float(lats[j, i])] for j, i in indices]]\n",
" return {\"type\": \"Polygon\", \"coordinates\": coordinates}"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "a1a67a35-c55a-4c67-bd9f-fd02897a289c",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:24:05 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:24:05 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251008'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: eyz874\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:24:05 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:07 - INFO - Request accepted. Please poll ./b352b902-58b2-480d-b787-2e306fe38bec for status\n",
"2025-11-11 12:24:07 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:07 - INFO - Checking request status (b352b902-58b2-480d-b787-2e306fe38bec)...\n",
"2025-11-11 12:24:07 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:24:08 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:24:11 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a93732d6604541069f198ee34193c23b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"b352b902-58b2-480d-b787-2e306fe38bec.grib: 0%| | 0.00/2.28M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:24:13 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:24:13 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20250530'\\n\"\n",
" 'expver: ulfs\\n'\n",
" 'georef: ezjukc\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:24:13 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:14 - INFO - Request accepted. Please poll ./0c77f787-ff40-4adb-aecf-dc5c7d2da2ab for status\n",
"2025-11-11 12:24:14 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:14 - INFO - Checking request status (0c77f787-ff40-4adb-aecf-dc5c7d2da2ab)...\n",
"2025-11-11 12:24:14 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:24:16 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:24:19 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f00a8a3c4ed94358b3e97e7582bff20c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"0c77f787-ff40-4adb-aecf-dc5c7d2da2ab.grib: 0%| | 0.00/2.60M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:24:20 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:24:20 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20250926'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: gcgkrb\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:24:20 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:21 - INFO - Request accepted. Please poll ./2967ab38-8242-40db-bf2f-cfbae972fb0f for status\n",
"2025-11-11 12:24:21 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:21 - INFO - Checking request status (2967ab38-8242-40db-bf2f-cfbae972fb0f)...\n",
"2025-11-11 12:24:21 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:24:22 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:24:24 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2147debeec62421babd1b821532950bc",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"2967ab38-8242-40db-bf2f-cfbae972fb0f.grib: 0%| | 0.00/2.36M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:24:25 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:24:25 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251030'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: gfgp7n\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:24:25 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:26 - INFO - Request accepted. Please poll ./16064626-0efe-4efe-9b3e-71b2e3dea829 for status\n",
"2025-11-11 12:24:26 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:26 - INFO - Checking request status (16064626-0efe-4efe-9b3e-71b2e3dea829)...\n",
"2025-11-11 12:24:27 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:24:28 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:24:31 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6c7970bab5c7442c81ce11aa63ac400b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"16064626-0efe-4efe-9b3e-71b2e3dea829.grib: 0%| | 0.00/1.66M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:24:32 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:24:32 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20250929'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: sncjym\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:24:32 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:33 - INFO - Request accepted. Please poll ./06e8a703-e389-45fe-80ef-c1d7062e9757 for status\n",
"2025-11-11 12:24:33 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:33 - INFO - Checking request status (06e8a703-e389-45fe-80ef-c1d7062e9757)...\n",
"2025-11-11 12:24:33 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:24:35 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:24:37 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f4af4c668c954b93a0e808fc7c45fe49",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"06e8a703-e389-45fe-80ef-c1d7062e9757.grib: 0%| | 0.00/2.18M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:24:38 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:24:38 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251015'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: sqfrjj\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:24:38 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:39 - INFO - Request accepted. Please poll ./e5418fdd-64ee-4143-ae66-0be27b35a3e3 for status\n",
"2025-11-11 12:24:39 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:39 - INFO - Checking request status (e5418fdd-64ee-4143-ae66-0be27b35a3e3)...\n",
"2025-11-11 12:24:39 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:24:40 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:24:43 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "928b76eb09244b31a270ff9aab866062",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"e5418fdd-64ee-4143-ae66-0be27b35a3e3.grib: 0%| | 0.00/2.09M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:24:44 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:24:44 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251014'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: sr11n7\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:24:44 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:45 - INFO - Request accepted. Please poll ./69970cb5-7b50-4035-babb-4b3c00be1eb4 for status\n",
"2025-11-11 12:24:45 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:45 - INFO - Checking request status (69970cb5-7b50-4035-babb-4b3c00be1eb4)...\n",
"2025-11-11 12:24:45 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:24:47 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:24:49 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c9f70b1f1a3143a5ada723ad60ac1b3b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"69970cb5-7b50-4035-babb-4b3c00be1eb4.grib: 0%| | 0.00/2.17M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:24:50 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:24:50 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20250930'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: srexw2\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:24:50 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:51 - INFO - Request accepted. Please poll ./6974b812-b2df-44dc-a465-e63af1b31075 for status\n",
"2025-11-11 12:24:51 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:51 - INFO - Checking request status (6974b812-b2df-44dc-a465-e63af1b31075)...\n",
"2025-11-11 12:24:52 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:24:54 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:24:56 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "88f7fbb85fea4b5b9ef017f0396ef3cd",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"6974b812-b2df-44dc-a465-e63af1b31075.grib: 0%| | 0.00/1.49M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:24:57 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:24:57 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20250530'\\n\"\n",
" 'expver: ulfs\\n'\n",
" 'georef: sw3cby\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:24:57 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:58 - INFO - Request accepted. Please poll ./5952bfae-21ae-4da1-883e-8e7c84cd9dbc for status\n",
"2025-11-11 12:24:58 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:24:58 - INFO - Checking request status (5952bfae-21ae-4da1-883e-8e7c84cd9dbc)...\n",
"2025-11-11 12:24:58 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:24:59 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:25:02 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e41f749d23a54ea68cf10d10846fe1ba",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"5952bfae-21ae-4da1-883e-8e7c84cd9dbc.grib: 0%| | 0.00/2.08M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:25:03 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:25:03 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20250715'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: sxewen\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:25:03 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:04 - INFO - Request accepted. Please poll ./52604c26-e083-451d-a820-e0e8d8ce7108 for status\n",
"2025-11-11 12:25:04 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:04 - INFO - Checking request status (52604c26-e083-451d-a820-e0e8d8ce7108)...\n",
"2025-11-11 12:25:04 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:25:06 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:25:08 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "45e3b01d98c54e1f9f3ca0b4a426c27b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"52604c26-e083-451d-a820-e0e8d8ce7108.grib: 0%| | 0.00/1.47M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:25:09 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:25:09 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251022'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: u03239\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:25:09 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:10 - INFO - Request accepted. Please poll ./a9cd546b-c732-4413-bd4b-e5c72aae02ab for status\n",
"2025-11-11 12:25:10 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:10 - INFO - Checking request status (a9cd546b-c732-4413-bd4b-e5c72aae02ab)...\n",
"2025-11-11 12:25:11 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:25:12 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:25:15 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e4fcfd69832948988f9b3eccb4073bf4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"a9cd546b-c732-4413-bd4b-e5c72aae02ab.grib: 0%| | 0.00/2.44M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:25:15 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:25:16 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251028'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: u05czu\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:25:16 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:17 - INFO - Request accepted. Please poll ./4eebd3d3-d449-44eb-a93e-f786a73f3fd4 for status\n",
"2025-11-11 12:25:17 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:17 - INFO - Checking request status (4eebd3d3-d449-44eb-a93e-f786a73f3fd4)...\n",
"2025-11-11 12:25:17 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:25:18 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:25:21 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5acd2eae16bf4e83b821ce21fa925f29",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"4eebd3d3-d449-44eb-a93e-f786a73f3fd4.grib: 0%| | 0.00/2.37M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:25:22 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:25:22 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20230820'\\n\"\n",
" 'expver: aab0\\n'\n",
" 'georef: u09tvk\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:25:22 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:23 - INFO - Request accepted. Please poll ./9056082f-7d67-488e-ac57-57c21d839b73 for status\n",
"2025-11-11 12:25:23 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:23 - INFO - Checking request status (9056082f-7d67-488e-ac57-57c21d839b73)...\n",
"2025-11-11 12:25:23 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:25:24 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:25:27 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c1de6ddef3f447759c33876547306641",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"9056082f-7d67-488e-ac57-57c21d839b73.grib: 0%| | 0.00/1.12M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:25:28 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:25:28 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20250923'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: u0gbkc\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:25:28 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:29 - INFO - Request accepted. Please poll ./22124138-7fd3-44d2-aec4-16c70f9e2ca1 for status\n",
"2025-11-11 12:25:29 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:29 - INFO - Checking request status (22124138-7fd3-44d2-aec4-16c70f9e2ca1)...\n",
"2025-11-11 12:25:29 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:25:30 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:25:33 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "216b0461ea91471fa9bf804b3e0b3630",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"22124138-7fd3-44d2-aec4-16c70f9e2ca1.grib: 0%| | 0.00/2.86M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:25:34 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:25:34 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251022'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: u0r57p\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:25:34 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:35 - INFO - Request accepted. Please poll ./2953253e-50ec-4562-8a3a-88fda29eb6a7 for status\n",
"2025-11-11 12:25:35 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:35 - INFO - Checking request status (2953253e-50ec-4562-8a3a-88fda29eb6a7)...\n",
"2025-11-11 12:25:35 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:25:37 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:25:40 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7b79bdbb63444f26ac2970fc33b9543a",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"2953253e-50ec-4562-8a3a-88fda29eb6a7.grib: 0%| | 0.00/2.81M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:25:41 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:25:41 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20250601'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: u1516b\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:25:41 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:42 - INFO - Request accepted. Please poll ./43ee58b1-7909-4375-a9f8-aa1489b3d2ad for status\n",
"2025-11-11 12:25:42 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:42 - INFO - Checking request status (43ee58b1-7909-4375-a9f8-aa1489b3d2ad)...\n",
"2025-11-11 12:25:42 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:25:44 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:25:47 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "73c0985829ce4800abffe16753963c9f",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"43ee58b1-7909-4375-a9f8-aa1489b3d2ad.grib: 0%| | 0.00/1.52M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:25:47 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:25:47 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20240811'\\n\"\n",
" 'expver: aab0\\n'\n",
" 'georef: u1557h\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:25:47 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:49 - INFO - Request accepted. Please poll ./1059a461-06ff-42fc-831d-46f827c220d0 for status\n",
"2025-11-11 12:25:49 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:49 - INFO - Checking request status (1059a461-06ff-42fc-831d-46f827c220d0)...\n",
"2025-11-11 12:25:49 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:25:50 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:25:53 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2bc5dcd38cac47ccb3e808a140e8b79a",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"1059a461-06ff-42fc-831d-46f827c220d0.grib: 0%| | 0.00/2.61M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:25:54 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:25:54 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20250404'\\n\"\n",
" \"expver: '7777'\\n\"\n",
" 'georef: u15rxs\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:25:54 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:55 - INFO - Request accepted. Please poll ./4033c812-e1bf-4b4c-a122-114f176baf6e for status\n",
"2025-11-11 12:25:55 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:25:55 - INFO - Checking request status (4033c812-e1bf-4b4c-a122-114f176baf6e)...\n",
"2025-11-11 12:25:55 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:25:57 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:25:59 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "be18930007674b1ca2c47df5f4485268",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"4033c812-e1bf-4b4c-a122-114f176baf6e.grib: 0%| | 0.00/5.63k [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:26:00 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:26:00 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251003'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: u3fr3x\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:26:00 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:01 - INFO - Request accepted. Please poll ./055a9574-3d1b-43e8-a850-c51fd74f0b74 for status\n",
"2025-11-11 12:26:01 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:01 - INFO - Checking request status (055a9574-3d1b-43e8-a850-c51fd74f0b74)...\n",
"2025-11-11 12:26:01 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:26:03 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:26:05 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8bac00a933a94a548ce1b486da2b5e46",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"055a9574-3d1b-43e8-a850-c51fd74f0b74.grib: 0%| | 0.00/2.61M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:26:06 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:26:06 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20250616'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: u4usq2\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:26:06 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:07 - INFO - Request accepted. Please poll ./4b1cc8f3-0f0e-4bef-a78b-5b44304ec7a1 for status\n",
"2025-11-11 12:26:07 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:07 - INFO - Checking request status (4b1cc8f3-0f0e-4bef-a78b-5b44304ec7a1)...\n",
"2025-11-11 12:26:07 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:26:09 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:26:11 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "03f883e63a0b492293fd2de85e123079",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"4b1cc8f3-0f0e-4bef-a78b-5b44304ec7a1.grib: 0%| | 0.00/2.32M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:26:12 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:26:12 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251023'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: u4x4df\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: enfo\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: pf\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:26:12 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:13 - INFO - Request accepted. Please poll ./8ae16b80-41a0-4f47-b546-8ac1c0ec6cab for status\n",
"2025-11-11 12:26:13 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:13 - INFO - Checking request status (8ae16b80-41a0-4f47-b546-8ac1c0ec6cab)...\n",
"2025-11-11 12:26:14 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:26:15 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:26:17 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:26:17 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251024'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: u4xmug\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:26:17 - INFO - Polytope user key found in session cache for user jonassolvsteen\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Georef u4x4df failed: Polytope error\n",
"Situation: trying to download data\n",
"Description: HTTP CLIENT ERROR (400)\n",
"URL: https://polytope.lumi.apps.dte.destination-earth.eu:443/api/v1/requests/8ae16b80-41a0-4f47-b546-8ac1c0ec6cab\n",
"HTTP method: GET\n",
"Request header/body contents:\n",
"{'headers': {'Authorization': 'Bearer **********VO9Q'}, 'json': None}\n",
"Expected responses: 200, 202\n",
"Received response: CLIENT ERROR (400)\n",
"Details:\n",
"Request failed with error:\n",
"Matched datasource mars-on-demand-extremes\n",
"mars - EROR - 2025-11-11 11:26:16 Socket read failed (TCPClient[port=0,options=SocketOptions[bindAddr=, listenBacklog=4096, reusePort=0, reuseAddr=0, keepAlive=1, noLinger=0, ipLowDelay=1, tcpNoDelay=1, receiveBufferSize=0, sendBufferSize=0]\n",
"mars - EROR - 2025-11-11 11:26:16 TCPSocket[fd=6,remote[10.26.10.150:57445 (10.26.10.150)],local[worker-5bb7986595-wxb48:35567 (0.0.0.0)]]]) (Connection reset by peer)\n",
"mars - EROR - 2025-11-11 11:26:16 Exception: UserError: 0 message retrieved out of 1 expected\n",
"mars - EROR - 2025-11-11 11:26:16 ** UserError: 0 message retrieved out of 1 expected Caught in (/home/debian/git/mars-client-cpp/eckit/src/eckit/runtime/Tool.cc:31 start)\n",
"mars - EROR - 2025-11-11 11:26:16 ** Exception terminates mars-client\n",
"\n",
"MARS process exited before returning data..\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:26:18 - INFO - Request accepted. Please poll ./53e0fd86-c193-4771-a6c8-8b8e7070d29d for status\n",
"2025-11-11 12:26:18 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:18 - INFO - Checking request status (53e0fd86-c193-4771-a6c8-8b8e7070d29d)...\n",
"2025-11-11 12:26:18 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:26:19 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:26:22 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d420046fe9e843f390b8c52841c92160",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"53e0fd86-c193-4771-a6c8-8b8e7070d29d.grib: 0%| | 0.00/2.38M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:26:23 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:26:23 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20251009'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: u5ny9t\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:26:23 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:24 - INFO - Request accepted. Please poll ./cf6cf679-a5ec-4e5f-9871-c9c01d55fc04 for status\n",
"2025-11-11 12:26:24 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:24 - INFO - Checking request status (cf6cf679-a5ec-4e5f-9871-c9c01d55fc04)...\n",
"2025-11-11 12:26:25 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:26:26 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:26:29 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "dc7e0ad2111e4e58abcbfe64f227f991",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"cf6cf679-a5ec-4e5f-9871-c9c01d55fc04.grib: 0%| | 0.00/2.51M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-11 12:26:30 - INFO - Key read from /Users/jonassolvsteen/.polytopeapirc\n",
"2025-11-11 12:26:30 - INFO - Sending request...\n",
"{'request': 'class: d1\\n'\n",
" 'dataset: on-demand-extremes-dt\\n'\n",
" \"date: '20241119'\\n\"\n",
" 'expver: 0099\\n'\n",
" 'georef: ud3q9t\\n'\n",
" 'levtype: sfc\\n'\n",
" 'param: 167\\n'\n",
" \"step: '0'\\n\"\n",
" 'stream: oper\\n'\n",
" \"time: '0000'\\n\"\n",
" 'type: fc\\n',\n",
" 'verb': 'retrieve'}\n",
"2025-11-11 12:26:30 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:31 - INFO - Request accepted. Please poll ./c95ad262-4fea-4f46-9d4f-f37a0479fc4a for status\n",
"2025-11-11 12:26:31 - INFO - Polytope user key found in session cache for user jonassolvsteen\n",
"2025-11-11 12:26:31 - INFO - Checking request status (c95ad262-4fea-4f46-9d4f-f37a0479fc4a)...\n",
"2025-11-11 12:26:31 - INFO - The current status of the request is 'queued'\n",
"2025-11-11 12:26:32 - INFO - The current status of the request is 'processing'\n",
"2025-11-11 12:26:36 - INFO - The current status of the request is 'processed'\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5ee8b3eaeb7743e583e66d8ce68b997e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"c95ad262-4fea-4f46-9d4f-f37a0479fc4a.grib: 0%| | 0.00/2.48M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"geometries = {}\n",
"\n",
"n_items = 500\n",
"for georef in dt.span(\"georef\"):\n",
" if n_items < 1:\n",
" break\n",
" try:\n",
" dt_sub = dt.select({\"georef\": georef, \"param\": 167})\n",
" request = next(iter(dt_sub.leaves()))\n",
" request[\"date\"] = request[\"date\"].strftime(\"%Y%m%d\")\n",
" geometry = get_bbox_geometry(request)\n",
" geometries[georef] = geometry\n",
" except Exception as e:\n",
" print(f\"Georef {georef} failed: {e}.\")\n",
" continue\n",
" n_items -= 1"
]
},
{
"cell_type": "markdown",
"id": "33acc402-a9a7-4cd0-a14f-c3e695d7841d",
"metadata": {},
"source": [
"Convert to GeoJSON FeatureCollection"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "e2831309-c247-4129-92f9-f097ff2c42d5",
"metadata": {},
"outputs": [],
"source": [
"feature_collection = {\"type\": \"FeatureCollection\", \"features\": []}\n",
"\n",
"for georef, geometry in geometries.items():\n",
" feature = {\"type\": \"Feature\", \"geometry\": geometry, \"properties\": {\"georef\": georef}}\n",
" feature_collection[\"features\"].append(feature)\n",
" \n",
" feature = {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [float(v) for v in geohash.decode(georef)][::-1]}, \"properties\": {\"georef\": georef}}\n",
" feature_collection[\"features\"].append(feature)"
]
},
{
"cell_type": "markdown",
"id": "f29d0633-fa96-46a9-b8d6-c957020692b3",
"metadata": {},
"source": [
"Ready to copy-paste to https://geojson.io"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "5881a80e-3dd7-4c55-8681-8bf5312f30d4",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{\"type\": \"FeatureCollection\", \"features\": [{\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-4.621764999999982, 34.607849], [3.4956653444042445, 34.60784905949816], [3.8834482156274817, 41.28779448086914], [-5.0095480289430725, 41.28779441568372], [-4.621764999999982, 34.607849]]]}, \"properties\": {\"georef\": \"eyz874\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-0.6, 38.03]}, \"properties\": {\"georef\": \"eyz874\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-7.121251000000029, 36.71122399999999], [1.2132503156142889, 36.711224025739604], [1.6440175210097436, 43.39003728910994], [-7.5520182758994, 43.39003726070874], [-7.121251000000029, 36.71122399999999]]]}, \"properties\": {\"georef\": \"ezjukc\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-2.9, 40.13]}, \"properties\": {\"georef\": \"ezjukc\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-11.773101999999994, 52.120987], [-0.8844316563090615, 52.12098707989332], [0.12506498859562498, 58.78357080733648], [-12.782598948756004, 58.78357071265007], [-11.773101999999994, 52.120987]]]}, \"properties\": {\"georef\": \"gcgkrb\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-6.3, 55.59]}, \"properties\": {\"georef\": \"gcgkrb\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-13.251555999999937, 58.27356699999999], [-0.53100061998407, 58.27356517434166], [1.008256976251289, 64.92081248514012], [-14.790805186211173, 64.92081475123156], [-13.251555999999937, 58.27356699999999]]]}, \"properties\": {\"georef\": \"gfgp7n\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-6.9, 61.78]}, \"properties\": {\"georef\": \"gfgp7n\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-2.4209900000000744, 35.589339999999986], [5.794926250824886, 35.5893419004324], [6.202147338300335, 42.26877814038833], [-2.8282162013160814, 42.268776051487976], [-2.4209900000000744, 35.589339999999986]]]}, \"properties\": {\"georef\": \"sncjym\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [1.7, 39.01]}, \"properties\": {\"georef\": \"sncjym\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[10.521019999999993, 35.807636], [18.759497828640463, 35.80763600632272], [19.171188403265205, 42.48695446462369], [10.10932940830358, 42.48695445766881], [10.521019999999993, 35.807636]]]}, \"properties\": {\"georef\": \"sqfrjj\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [14.6, 39.23]}, \"properties\": {\"georef\": \"sqfrjj\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[8.799936000000002, 36.150169], [17.07431037698663, 36.15016906032497], [17.49311950536483, 42.829299484527844], [8.381126707859977, 42.82929941809387], [8.799936000000002, 36.150169]]]}, \"properties\": {\"georef\": \"sr11n7\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [12.9, 39.57]}, \"properties\": {\"georef\": \"sr11n7\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[12.086603999999994, 40.075335], [20.81897968025757, 40.07533501284743], [21.33021217783795, 46.75197905272953], [11.57537146514386, 46.75197903837762], [12.086603999999994, 40.075335]]]}, \"properties\": {\"georef\": \"srexw2\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [16.5, 43.51]}, \"properties\": {\"georef\": \"srexw2\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[21.057204000000013, 32.08978799999999], [28.942796610109838, 32.08978797933338], [29.28506937561872, 38.77090412050571], [20.714931287326607, 38.77090414296745], [21.057204000000013, 32.08978799999999]]]}, \"properties\": {\"georef\": \"sw3cby\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [25.0, 35.5]}, \"properties\": {\"georef\": \"sw3cby\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[23.205081000000007, 39.935172], [31.919512094159586, 39.935171956150334], [32.42705829129005, 46.611916509011714], [22.697534929773866, 46.61191655796982], [23.205081000000007, 39.935172]]]}, \"properties\": {\"georef\": \"sxewen\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [27.6, 43.37]}, \"properties\": {\"georef\": \"sxewen\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-2.7424009999999726, 43.01834899999998], [6.397660890295526, 43.01834824289021], [6.99436503771517, 49.69263854190338], [-3.339102824055317, 49.692639397855196], [-2.7424009999999726, 43.01834899999998]]]}, \"properties\": {\"georef\": \"u03239\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [1.8, 46.46]}, \"properties\": {\"georef\": \"u03239\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[1.135770000000008, 41.897293], [10.113311503750623, 41.89729293756843], [10.675531709032327, 48.572537768469985], [0.5735499821307144, 48.57253783872093], [1.135770000000008, 41.897293]]]}, \"properties\": {\"georef\": \"u05czu\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [5.6, 45.33]}, \"properties\": {\"georef\": \"u05czu\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-0.8802539999999226, 46.58218599999999], [5.580254701019442, 46.58218597953325], [5.879751355646505, 51.01919143875682], [-1.1797505898099416, 51.019191461120855], [-0.8802539999999226, 46.58218599999999]]]}, \"properties\": {\"georef\": \"u09tvk\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [2.3, 48.85]}, \"properties\": {\"georef\": \"u09tvk\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[0.6889329999999916, 45.820381000000005], [10.278891342279593, 45.820380984852065], [10.97418905197182, 52.491914325550006], [-0.006364660386907417, 52.491914342893566], [0.6889329999999916, 45.820381000000005]]]}, \"properties\": {\"georef\": \"u0gbkc\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [5.5, 49.27]}, \"properties\": {\"georef\": \"u0gbkc\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[5.371521000000001, 43.578822999999986], [14.596407375992953, 43.57882298393951], [15.211338457407635, 50.25260649934485], [4.756589968432252, 50.25260651754612], [5.371521000000001, 43.578822999999986]]]}, \"properties\": {\"georef\": \"u0r57p\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [10.0, 47.02]}, \"properties\": {\"georef\": \"u0r57p\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-0.5861499999999751, 47.391905], [9.286826032930094, 47.39190499850832], [10.046693026175944, 54.0616156229585], [-1.3460169882143873, 54.06161562467964], [-0.5861499999999751, 47.391905]]]}, \"properties\": {\"georef\": \"u1516b\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [4.3, 50.85]}, \"properties\": {\"georef\": \"u1516b\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-0.6117550000000165, 47.763512], [9.331719008165635, 47.76351354797655], [10.1079898321222, 54.43275944157026], [-1.3880310909528362, 54.43275765205952], [-0.6117550000000165, 47.763512]]]}, \"properties\": {\"georef\": \"u1557h\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [4.4, 51.22]}, \"properties\": {\"georef\": \"u1557h\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[4.0389590000000055, 51.19943299999999], [5.761040396218391, 51.19943300447852], [5.790918448549462, 52.72806862700816], [4.00908092672185, 52.72806862237422], [4.0389590000000055, 51.19943299999999]]]}, \"properties\": {\"georef\": \"u15rxs\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [4.9, 51.97]}, \"properties\": {\"georef\": \"u15rxs\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[8.969963000000007, 52.68069500000001], [19.99807185108321, 52.68069505579533], [21.04416269402671, 59.34222653161719], [7.923871941512914, 59.34222646525286], [8.969963000000007, 52.68069500000001]]]}, \"properties\": {\"georef\": \"u3fr3x\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [14.5, 56.16]}, \"properties\": {\"georef\": \"u3fr3x\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[0.3475379999999859, 57.714705], [12.870315213977335, 57.71470504033643], [14.347055778121813, 64.36377112132514], [-1.12920274638941, 64.36377107150344], [0.3475379999999859, 57.714705]]]}, \"properties\": {\"georef\": \"u4usq2\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [6.6, 61.22]}, \"properties\": {\"georef\": \"u4usq2\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[3.487098000000003, 55.60209300000001], [15.324592437745878, 55.602093078431366], [16.594934526162263, 62.257149253563966], [2.2167555810068222, 62.25714915833689], [3.487098000000003, 55.60209300000001]]]}, \"properties\": {\"georef\": \"u4xmug\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [10.4, 60.09]}, \"properties\": {\"georef\": \"u4xmug\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[2.965137999999996, 59.53064], [16.159035330073152, 59.53063993053661], [17.853432558177815, 66.17336713375234], [1.2707411067033831, 66.17336722099131], [2.965137999999996, 59.53064]]]}, \"properties\": {\"georef\": \"u5ny9t\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.6, 63.05]}, \"properties\": {\"georef\": \"u5ny9t\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[18.448735999999997, 55.338371000000016], [30.207025313651656, 55.33837103435909], [31.454508325158088, 61.994089061820084], [17.20125284486832, 61.994089020186344], [18.448735999999997, 55.338371000000016]]]}, \"properties\": {\"georef\": \"ud3q9t\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [24.3, 58.83]}, \"properties\": {\"georef\": \"ud3q9t\"}}]}\n"
]
}
],
"source": [
"print(json.dumps(feature_collection))"
]
}
],
"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.13.1"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment