From 49d04b2e50ad52caa9b5ee113c87244f67bf271b Mon Sep 17 00:00:00 2001 From: Sandor Kertesz Date: Tue, 17 Dec 2024 11:30:50 +0000 Subject: [PATCH] Fix polytope notebooks --- docs/examples/polytope_polygon_coverage.ipynb | 2 +- docs/examples/polytope_time_series.ipynb | 627 +++++++++++++++++- docs/examples/polytope_vertical_profile.ipynb | 72 +- 3 files changed, 631 insertions(+), 70 deletions(-) diff --git a/docs/examples/polytope_polygon_coverage.ipynb b/docs/examples/polytope_polygon_coverage.ipynb index 82f90d3a..9231755a 100644 --- a/docs/examples/polytope_polygon_coverage.ipynb +++ b/docs/examples/polytope_polygon_coverage.ipynb @@ -186,7 +186,7 @@ " \"class\": \"od\",\n", " \"stream\" : \"enfo\",\n", " \"type\" : \"pf\",\n", - " \"date\" : \"20241121\",\n", + " \"date\" : -1,\n", " \"time\" : \"1200\",\n", " \"levtype\" : \"sfc\",\n", " \"expver\" : 1,\n", diff --git a/docs/examples/polytope_time_series.ipynb b/docs/examples/polytope_time_series.ipynb index 2ffa0e7c..0ceb51fd 100644 --- a/docs/examples/polytope_time_series.ipynb +++ b/docs/examples/polytope_time_series.ipynb @@ -59,14 +59,14 @@ "name": "stderr", "output_type": "stream", "text": [ - "2024-11-22 13:59:53 - INFO - Key read from /Users/cgr/.polytopeapirc\n", - "2024-11-22 13:59:53 - INFO - Sending request...\n", + "2024-12-17 11:28:52 - INFO - Key read from /Users/cgr/.polytopeapirc\n", + "2024-12-17 11:28:52 - INFO - Sending request...\n", "{'request': 'class: od\\n'\n", - " \"date: '20241121'\\n\"\n", + " 'date: -1\\n'\n", " 'domain: g\\n'\n", " 'expver: 1\\n'\n", " 'feature:\\n'\n", - " ' axis: step\\n'\n", + " ' axes: step\\n'\n", " ' points:\\n'\n", " ' - - 46.5\\n'\n", " ' - 17\\n'\n", @@ -85,34 +85,28 @@ " 'time: 0\\n'\n", " 'type: pf\\n',\n", " 'verb': 'retrieve'}\n", - "2024-11-22 13:59:53 - INFO - Polytope user key found in session cache for user cgr\n", - "2024-11-22 13:59:53 - INFO - Request accepted. Please poll ./fb6a74bf-b5a4-4995-9343-959c98796ce1 for status\n", - "2024-11-22 13:59:53 - INFO - Polytope user key found in session cache for user cgr\n", - "2024-11-22 13:59:53 - INFO - Checking request status (./fb6a74bf-b5a4-4995-9343-959c98796ce1)...\n", - "2024-11-22 13:59:53 - INFO - The current status of the request is 'queued'\n", - "2024-11-22 13:59:54 - INFO - The current status of the request is 'processing'\n" + "2024-12-17 11:28:52 - INFO - Polytope user key found in session cache for user cgr\n", + "2024-12-17 11:28:52 - INFO - Request accepted. Please poll ./c33388db-f53c-4afa-bd41-aea600032f0f for status\n", + "2024-12-17 11:28:52 - INFO - Polytope user key found in session cache for user cgr\n", + "2024-12-17 11:28:52 - INFO - Checking request status (./c33388db-f53c-4afa-bd41-aea600032f0f)...\n", + "2024-12-17 11:28:52 - INFO - The current status of the request is 'queued'\n", + "2024-12-17 11:28:53 - INFO - The current status of the request is 'processing'\n", + "2024-12-17 11:29:01 - INFO - The current status of the request is 'processed'\n" ] }, { - "ename": "HTTPResponseError", - "evalue": "Polytope error\nSituation: trying to download data\nDescription: HTTP CLIENT ERROR (400)\nURL: https://polytope.ecmwf.int:443/api/v1/requests/./fb6a74bf-b5a4-4995-9343-959c98796ce1\nHTTP method: GET\nRequest header/body contents:\n{'headers': {'Authorization': 'EmailKey **********9648'}, 'json': None}\nExpected responses: 200, 202\nReceived response: CLIENT ERROR (400)\nDetails:\nRequest failed with error:\n\n\"The timeseries feature requires an 'axes' keyword\"", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mHTTPResponseError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[1], line 27\u001b[0m\n\u001b[1;32m 3\u001b[0m location \u001b[38;5;241m=\u001b[39m [\u001b[38;5;241m46.5\u001b[39m, \u001b[38;5;241m17\u001b[39m] \u001b[38;5;66;03m# lat, lon\u001b[39;00m\n\u001b[1;32m 5\u001b[0m request \u001b[38;5;241m=\u001b[39m { \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mclass\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mod\u001b[39m\u001b[38;5;124m\"\u001b[39m, \n\u001b[1;32m 6\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mstream\u001b[39m\u001b[38;5;124m\"\u001b[39m : \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124menfo\u001b[39m\u001b[38;5;124m\"\u001b[39m, \n\u001b[1;32m 7\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtype\u001b[39m\u001b[38;5;124m\"\u001b[39m : \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mpf\u001b[39m\u001b[38;5;124m\"\u001b[39m, \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mformat\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcovjson\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 25\u001b[0m }\n\u001b[0;32m---> 27\u001b[0m ds \u001b[38;5;241m=\u001b[39m \u001b[43mearthkit\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdata\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfrom_source\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mpolytope\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mecmwf-mars\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mrequest\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43maddress\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mpolytope.ecmwf.int\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/envs/dev_ecc/lib/python3.10/site-packages/earthkit/data/sources/__init__.py:153\u001b[0m, in \u001b[0;36mfrom_source\u001b[0;34m(name, lazily, *args, **kwargs)\u001b[0m\n\u001b[1;32m 151\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m src \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m prev:\n\u001b[1;32m 152\u001b[0m prev \u001b[38;5;241m=\u001b[39m src\n\u001b[0;32m--> 153\u001b[0m src \u001b[38;5;241m=\u001b[39m \u001b[43msrc\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmutate\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 154\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m src\n", - "File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/envs/dev_ecc/lib/python3.10/site-packages/earthkit/data/sources/polytope.py:91\u001b[0m, in \u001b[0;36mPolytope.mutate\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 90\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mmutate\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Source:\n\u001b[0;32m---> 91\u001b[0m pointers \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mclient\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 92\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrequest\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mdataset\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 93\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrequest\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrequest\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 94\u001b[0m \u001b[43m \u001b[49m\u001b[43mpointer\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 95\u001b[0m \u001b[43m \u001b[49m\u001b[43masynchronous\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 96\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 98\u001b[0m urls \u001b[38;5;241m=\u001b[39m [p[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlocation\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;28;01mfor\u001b[39;00m p \u001b[38;5;129;01min\u001b[39;00m pointers]\n\u001b[1;32m 99\u001b[0m LOG\u001b[38;5;241m.\u001b[39mdebug(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00murls\u001b[38;5;132;01m=}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n", - "File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/envs/dev_ecc/lib/python3.10/site-packages/polytope/api/helpers.py:197\u001b[0m, in \u001b[0;36mwraps..wrapper..decorated\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 196\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdecorated\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[0;32m--> 197\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfun\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/envs/dev_ecc/lib/python3.10/site-packages/polytope/api/helpers.py:229\u001b[0m, in \u001b[0;36mauthenticated..decorated\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 227\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m e\n\u001b[1;32m 228\u001b[0m \u001b[38;5;66;03m# try:\u001b[39;00m\n\u001b[0;32m--> 229\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mmethod\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/envs/dev_ecc/lib/python3.10/site-packages/polytope/api/helpers.py:197\u001b[0m, in \u001b[0;36mwraps..wrapper..decorated\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 196\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdecorated\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[0;32m--> 197\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfun\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/envs/dev_ecc/lib/python3.10/site-packages/polytope/api/Client.py:202\u001b[0m, in \u001b[0;36mClient.retrieve\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 199\u001b[0m \u001b[38;5;129m@authenticated\u001b[39m\n\u001b[1;32m 200\u001b[0m \u001b[38;5;129m@wraps\u001b[39m(RequestManager\u001b[38;5;241m.\u001b[39mretrieve)\n\u001b[1;32m 201\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mretrieve\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[0;32m--> 202\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrequest_manager\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/envs/dev_ecc/lib/python3.10/site-packages/polytope/api/RequestManager.py:450\u001b[0m, in \u001b[0;36mRequestManager.retrieve\u001b[0;34m(self, name, request, output_file, inline_request, asynchronous, max_attempts, attempt_period, append, pointer)\u001b[0m\n\u001b[1;32m 448\u001b[0m request_results[i] \u001b[38;5;241m=\u001b[39m Result(request_url, output_file, append, \u001b[38;5;28mself\u001b[39m)\n\u001b[1;32m 449\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 450\u001b[0m request_results[i] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdownload\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 451\u001b[0m \u001b[43m \u001b[49m\u001b[43mrequest_url\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43moutput_file\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43masynchronous\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmax_attempts\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mattempt_period\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mappend\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mpointer\u001b[49m\n\u001b[1;32m 452\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 454\u001b[0m append \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[1;32m 456\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m warning \u001b[38;5;129;01min\u001b[39;00m warnings:\n", - "File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/envs/dev_ecc/lib/python3.10/site-packages/polytope/api/RequestManager.py:692\u001b[0m, in \u001b[0;36mRequestManager.download\u001b[0;34m(self, request_id, output_file, asynchronous, max_attempts, attempt_period, append, pointer)\u001b[0m\n\u001b[1;32m 688\u001b[0m e \u001b[38;5;241m=\u001b[39m helpers\u001b[38;5;241m.\u001b[39mRetriesExceededError(\n\u001b[1;32m 689\u001b[0m attempts\u001b[38;5;241m=\u001b[39mdescribe_max_attempts, situation\u001b[38;5;241m=\u001b[39msituation, url\u001b[38;5;241m=\u001b[39murl, method\u001b[38;5;241m=\u001b[39mmethod, request_content\u001b[38;5;241m=\u001b[39mheaders\n\u001b[1;32m 690\u001b[0m )\n\u001b[1;32m 691\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m e\n\u001b[0;32m--> 692\u001b[0m response, response_messages \u001b[38;5;241m=\u001b[39m \u001b[43mhelpers\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtry_request\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 693\u001b[0m \u001b[43m \u001b[49m\u001b[43mmethod\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 694\u001b[0m \u001b[43m \u001b[49m\u001b[43msituation\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msituation\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 695\u001b[0m \u001b[43m \u001b[49m\u001b[43mexpected\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexpected_responses\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 696\u001b[0m \u001b[43m \u001b[49m\u001b[43mlogger\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_logger\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 697\u001b[0m \u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 698\u001b[0m \u001b[43m \u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 699\u001b[0m \u001b[43m \u001b[49m\u001b[43mheaders\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mheaders\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 700\u001b[0m \u001b[43m \u001b[49m\u001b[43mskip_tls\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mconfig\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mskip_tls\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 701\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 702\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m response\u001b[38;5;241m.\u001b[39mstatus_code \u001b[38;5;241m==\u001b[39m requests\u001b[38;5;241m.\u001b[39mcodes\u001b[38;5;241m.\u001b[39mok:\n\u001b[1;32m 703\u001b[0m last_status \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprocessed\u001b[39m\u001b[38;5;124m\"\u001b[39m\n", - "File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/envs/dev_ecc/lib/python3.10/site-packages/polytope/api/helpers.py:593\u001b[0m, in \u001b[0;36mtry_request\u001b[0;34m(method, situation, expected, logger, stream, skip_tls, **kwargs)\u001b[0m\n\u001b[1;32m 590\u001b[0m logger\u001b[38;5;241m.\u001b[39mwarning(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mMaximum HTTP request retries reached\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 591\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m e\n\u001b[0;32m--> 593\u001b[0m response_title, response_messages \u001b[38;5;241m=\u001b[39m \u001b[43mprocess_response\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 594\u001b[0m \u001b[43m \u001b[49m\u001b[43mresponse\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msituation\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmethod\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mrequest_content\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mexpected\u001b[49m\n\u001b[1;32m 595\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 597\u001b[0m logger\u001b[38;5;241m.\u001b[39mdebug(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mPolytope client received HTTP \u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m+\u001b[39m response_title)\n\u001b[1;32m 599\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m response, response_messages\n", - "File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/envs/dev_ecc/lib/python3.10/site-packages/polytope/api/helpers.py:523\u001b[0m, in \u001b[0;36mprocess_response\u001b[0;34m(response, situation, url, method, stream, request_content, expected)\u001b[0m\n\u001b[1;32m 521\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m response\u001b[38;5;241m.\u001b[39mstatus_code \u001b[38;5;241m==\u001b[39m \u001b[38;5;241m401\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mexpired\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m response_messages[\u001b[38;5;241m0\u001b[39m]:\n\u001b[1;32m 522\u001b[0m e\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__class__\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mExpiredCredentialsError\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m--> 523\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m e\n\u001b[1;32m 524\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m response\u001b[38;5;241m.\u001b[39mstatus_code \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m expected:\n\u001b[1;32m 525\u001b[0m e\u001b[38;5;241m.\u001b[39mdescription \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUnexpected HTTP response from the server.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n", - "\u001b[0;31mHTTPResponseError\u001b[0m: Polytope error\nSituation: trying to download data\nDescription: HTTP CLIENT ERROR (400)\nURL: https://polytope.ecmwf.int:443/api/v1/requests/./fb6a74bf-b5a4-4995-9343-959c98796ce1\nHTTP method: GET\nRequest header/body contents:\n{'headers': {'Authorization': 'EmailKey **********9648'}, 'json': None}\nExpected responses: 200, 202\nReceived response: CLIENT ERROR (400)\nDetails:\nRequest failed with error:\n\n\"The timeseries feature requires an 'axes' keyword\"" - ] + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "c33388db-f53c-4afa-bd41-aea600032f0f.covjson: 0%| | 0.00/521k [00:00\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
<xarray.Dataset> Size: 176kB\n",
+       "Dimensions:   (x: 1, y: 1, z: 1, number: 50, datetime: 1, t: 145)\n",
+       "Coordinates:\n",
+       "  * x         (x) float64 8B 46.5\n",
+       "  * y         (y) float64 8B 17.05\n",
+       "  * z         (z) int64 8B 0\n",
+       "  * number    (number) int64 400B 1 2 3 4 5 6 7 8 9 ... 43 44 45 46 47 48 49 50\n",
+       "  * datetime  (datetime) <U20 80B '2024-12-16T00:00:00Z'\n",
+       "  * t         (t) datetime64[ns] 1kB 2024-12-16 ... 2024-12-31\n",
+       "Data variables:\n",
+       "    tcc       (x, y, z, number, datetime, t) float64 58kB 1.0 1.0 ... 0.1881\n",
+       "    2t        (x, y, z, number, datetime, t) float64 58kB 273.7 273.8 ... 273.8\n",
+       "    ssrd      (x, y, z, number, datetime, t) float64 58kB 0.0 0.0 ... 6.075e+07\n",
+       "Attributes:\n",
+       "    class:          od\n",
+       "    Forecast date:  2024-12-16T00:00:00Z\n",
+       "    domain:         g\n",
+       "    expver:         0001\n",
+       "    levtype:        sfc\n",
+       "    number:         1\n",
+       "    stream:         enfo\n",
+       "    type:           pf
" + ], + "text/plain": [ + " Size: 176kB\n", + "Dimensions: (x: 1, y: 1, z: 1, number: 50, datetime: 1, t: 145)\n", + "Coordinates:\n", + " * x (x) float64 8B 46.5\n", + " * y (y) float64 8B 17.05\n", + " * z (z) int64 8B 0\n", + " * number (number) int64 400B 1 2 3 4 5 6 7 8 9 ... 43 44 45 46 47 48 49 50\n", + " * datetime (datetime)
  • class :
    od
    Forecast date :
    2024-12-16T00:00:00Z
    domain :
    g
    expver :
    0001
    levelist :
    1
    levtype :
    pl
    number :
    1
    stream :
    enfo
    type :
    pf
  • " ], "text/plain": [ " Size: 640B\n", @@ -576,15 +576,15 @@ " * x (x) float64 8B 38.91\n", " * y (y) float64 8B 350.9\n", " * number (number) int64 8B 1\n", - " * datetime (datetime)