diff --git a/docs/Service/Data_Portfolio.md b/docs/Service/Data_Portfolio.md index d9f001d0..5607ee08 100644 --- a/docs/Service/Data_Portfolio.md +++ b/docs/Service/Data_Portfolio.md @@ -125,3 +125,26 @@ If `levtype` is `pl`, a `levelist` must be provided: For `sfc`, most `params` are available. Currently, only data for `dates` between `2020` and `2050` is available. + +## Open Data + +The following key value pairs are available via Polytope: + +* `class` : `ai` +* `stream` : `oper` +* `type` : `fc` +* `model` : `aifs-single` +* `levtype` : `sfc` `pl` `ml` +* `expver` : `0001` +* `domain` : `g` +* `step` : `0/to/360` (All steps may not be available between `0` and `360`) + +If `levtype` is `pl` or `ml`, a `levelist` must be provided: + +* `levelist` : `1/to/1000` + +Only data that is contained in the open data FDB can be requested via Polytope feature extraction. The FDB usually only contains the last three-five days of forecasts. + +We sometimes limit the size of requests for area features such as bounding box and polygon to maintain quality of service. + +Access to open data is limited by our release schedule. diff --git a/docs/Service/Examples/OpenData/od_boundingbox.ipynb b/docs/Service/Examples/OpenData/od_boundingbox.ipynb new file mode 100644 index 00000000..e203e1b2 --- /dev/null +++ b/docs/Service/Examples/OpenData/od_boundingbox.ipynb @@ -0,0 +1,703 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Bounding Box Open Data Example" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import earthkit.data\n", + "\n", + "request = {\n", + " \"class\": \"ai\",\n", + " \"stream\" : \"oper\",\n", + " \"type\" : \"fc\",\n", + " \"date\" : -1,\n", + " \"time\" : \"0000\",\n", + " \"levtype\" : \"sfc\",\n", + " \"expver\" : \"0001\", \n", + " \"model\": \"aifs-single\",\n", + " \"domain\" : \"g\",\n", + " \"param\" : \"166/167/169\",\n", + " \"step\" : \"0\",\n", + " \"feature\" : {\n", + " \"type\" : \"boundingbox\",\n", + " \"points\" : [[53.55, 2.76], [50.66, 7.86]],\n", + "\t},\n", + "}\n", + "\n", + "\n", + "ds = earthkit.data.from_source(\n", + " \"polytope\",\n", + " \"ecmwf-mars\",\n", + " request,\n", + " stream=False,\n", + " address='polytope.ecmwf.int',\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Convert to xarray" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
<xarray.Dataset> Size: 7kB\n", + "Dimensions: (datetimes: 1, number: 1, steps: 1, points: 126)\n", + "Coordinates:\n", + " * datetimes (datetimes) <U20 80B '2025-02-24T00:00:00Z'\n", + " * number (number) int64 8B 0\n", + " * steps (steps) int64 8B 0\n", + " * points (points) int64 1kB 0 1 2 3 4 5 6 ... 119 120 121 122 123 124 125\n", + " x (points) float64 1kB 50.73 50.73 50.73 ... 53.54 53.54 53.54\n", + " y (points) float64 1kB 2.917 3.333 3.75 4.167 ... 6.3 6.75 7.2 7.65\n", + " z (points) float64 1kB 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n", + "Data variables:\n", + " 10v (datetimes, number, steps, points) float64 1kB 6.599 ... 6.1\n", + " 2t (datetimes, number, steps, points) float64 1kB 284.2 ... 283.4\n", + " ssrd (datetimes, number, steps, points) float64 1kB 0.0 0.0 ... 0.0\n", + "Attributes:\n", + " class: ai\n", + " Forecast date: 2025-02-24T00:00:00Z\n", + " domain: g\n", + " expver: 0102\n", + " levtype: sfc\n", + " model: aifs-single\n", + " step: 0\n", + " stream: oper\n", + " type: fc\n", + " number: 0\n", + " date: 2025-02-24T00:00:00Z
<xarray.Dataset> Size: 81kB\n", + "Dimensions: (datetimes: 1, number: 1, steps: 1, points: 1444)\n", + "Coordinates:\n", + " * datetimes (datetimes) <U20 80B '2025-02-24T00:00:00Z'\n", + " * number (number) int64 8B 0\n", + " * steps (steps) int64 8B 0\n", + " * points (points) int64 12kB 0 1 2 3 4 5 ... 1438 1439 1440 1441 1442 1443\n", + " x (points) float64 12kB 27.68 27.96 28.24 ... 50.73 51.01 51.01\n", + " y (points) float64 12kB 342.0 344.4 343.4 345.9 ... 2.917 2.083 2.5\n", + " z (points) float64 12kB 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n", + "Data variables:\n", + " 10v (datetimes, number, steps, points) float64 12kB -3.243 ... 7.162\n", + " 2t (datetimes, number, steps, points) float64 12kB 289.4 ... 284.5\n", + " ssrd (datetimes, number, steps, points) float64 12kB 0.0 0.0 ... 0.0\n", + "Attributes:\n", + " class: ai\n", + " Forecast date: 2025-02-24T00:00:00Z\n", + " domain: g\n", + " expver: 0102\n", + " levtype: sfc\n", + " model: aifs-single\n", + " step: 0\n", + " stream: oper\n", + " type: fc\n", + " number: 0\n", + " date: 2025-02-24T00:00:00Z
<xarray.Dataset> Size: 5kB\n", + "Dimensions: (datetimes: 1, number: 1, steps: 1, points: 94)\n", + "Coordinates:\n", + " * datetimes (datetimes) <U20 80B '2025-02-24T00:00:00Z'\n", + " * number (number) int64 8B 0\n", + " * steps (steps) int64 8B 0\n", + " * points (points) int64 752B 0 1 2 3 4 5 6 7 8 ... 86 87 88 89 90 91 92 93\n", + " x (points) float64 752B 37.24 37.24 37.24 ... 41.73 41.73 42.01\n", + " y (points) float64 752B 351.3 351.7 352.0 ... 352.8 353.2 351.7\n", + " z (points) float64 752B 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n", + "Data variables:\n", + " 10v (datetimes, number, steps, points) float64 752B -1.994 ... 2.59\n", + " 2t (datetimes, number, steps, points) float64 752B 283.4 ... 280.7\n", + " ssrd (datetimes, number, steps, points) float64 752B 0.0 0.0 ... 0.0\n", + "Attributes:\n", + " class: ai\n", + " Forecast date: 2025-02-24T00:00:00Z\n", + " domain: g\n", + " expver: 0102\n", + " levtype: sfc\n", + " model: aifs-single\n", + " step: 0\n", + " stream: oper\n", + " type: fc\n", + " number: 0\n", + " date: 2025-02-24T00:00:00Z
chart.show(renderer=\"png\")
, which removes all interactivity and only shows a PNG image render.renderer=\"png\"
argument from each call to chart.show()
.\n",
+ "<xarray.Dataset> Size: 80kB\n", + "Dimensions: (datetimes: 1, number: 1, steps: 1, points: 1254)\n", + "Coordinates:\n", + " * datetimes (datetimes) <U20 80B '2025-02-24T00:00:00Z'\n", + " * number (number) int64 8B 0\n", + " * steps (steps) int64 8B 0\n", + " * points (points) int64 10kB 0 1 2 3 4 5 ... 1248 1249 1250 1251 1252 1253\n", + " x (points) float64 10kB -0.4215 -0.4215 -0.4215 ... 50.16 50.44\n", + " y (points) float64 10kB 0.0 0.2812 359.7 0.0 ... 10.0 10.42 10.0\n", + " level (points) float64 10kB 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0\n", + " time (points) int64 10kB 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0\n", + "Data variables:\n", + " 10v (datetimes, number, steps, points) float64 10kB 0.4052 ... 1.475\n", + " 2t (datetimes, number, steps, points) float64 10kB 298.6 ... 277.1\n", + " ssrd (datetimes, number, steps, points) float64 10kB 0.0 0.0 ... 0.0\n", + "Attributes:\n", + " class: ai\n", + " Forecast date: 2025-02-24T00:00:00Z\n", + " domain: g\n", + " expver: 0102\n", + " levtype: sfc\n", + " model: aifs-single\n", + " step: 0\n", + " stream: oper\n", + " type: fc\n", + " number: 0" + ], + "text/plain": [ + "
chart.show(renderer=\"png\")
, which removes all interactivity and only shows a PNG image render.renderer=\"png\"
argument from each call to chart.show()
.\n",
+ "