Full Field Extraction
Introduction
Polytope allows users to download full field global data from a number of datasets, such as the DestinE Climate Digital Twin, Extremes Digital Twin, and On-Demand Digital Twin. The best way to access this data is via earthkit-data.
Datasets available
Full field requests return GRIB data. They use the same keys as MARS. A user can make a request specified by these keys and data will be returned by the Polytope service.
For full field extraction the Polytope service supports retrieval from the following datasets:
- ECMWF Operational Data from the last two days Further Details
- DestinE Climate Digital Twin Further Details
- DestinE Extremes Digital Twin Further Details
- DestinE On-Demand Extremes Digital Twin
- ECMWF Opendata for AI datasets Further Details
The DestinE catalogue can also be used to see what data is available and to generate requests for DestinE data.
Examples
Below, we give an example of a full field extraction from ECMWF's operational data via Polytope.
import earthkit.data
request = {
"class": "od",
"stream" : "enfo",
"type" : "pf",
"date" : -1, # Note: date must be within the last two days
"time" : "0000",
"levtype" : "sfc",
"expver" : "0001",
"domain" : "g",
"param" : "164/167/169",
"number" : "1/to/50",
"step": "0",
}
ds = earthkit.data.from_source("polytope", "ecmwf-mars", request, stream=False, address='polytope.ecmwf.int')
This request pulls three parameters from yesterdays forecast for all 50 ensemble members for step 0.
The following are other examples of full field extraction on other datasets.
More examples of DestinE data via Polytope can be found in the following examples repository.
Post Processing
Some server side post processing of the data before retrieval is available via Polytope. The following keys can be added to the requests.
Grid
The grid keyword can be used to interpolate from one grid to another on the server side.
import earthkit.data
request = {
"class": "od",
"stream" : "enfo",
"type" : "pf",
"date" : -1, # Note: date must be within the last two days
"time" : "0000",
"levtype" : "sfc",
"expver" : "0001",
"domain" : "g",
"param" : "164/167/169",
"number" : "1/to/50",
"step": "0",
"grid" : "0.25/0.25",
}
ds = earthkit.data.from_source("polytope", "ecmwf-mars", request, stream=False, address='polytope.ecmwf.int')
In the above example we interpolate from the native grid to an 0.25/0.25 degree grid.
Currently, only the Octahedral (O), Full (regular) Gaussian (F), HEALPix (H), original ECMWF reduced Gausian grid (N), and regular latitude-longitude grids are supported. You can read more about our grids here grid keyword.
If the letter denoting the type of Gaussian grid is omitted, e.g. grid=320, a full (or regular) Gaussian grid with 320 grid lines is returned.
A lat/lon grid can be requested with: grid = 0.1/0.2 where the first number is the longitude and the second the latitude.
An omitted grid keyword, or the selection grid=av (“archived value”), will retrieve data on the model grid.
For HEALPix (H) grids the default when using HXXX is to return the data in ring ordering. One can explicitly request either nested or ring ordering in the following way.
- Ring:
HRXXX - Nested:
HNXXX
The grids listed here should also be documented in earthkit-regrid https://earthkit-regrid.readthedocs.io/en/latest/inventory/index.html.
Interpolation
An additional keyword when using grid is interpolation. Using this key one can define the interpolation method used.
import earthkit.data
request = {
"class": "od",
"stream" : "enfo",
"type" : "pf",
"date" : -1, # Note: date must be within the last two days
"time" : "0000",
"levtype" : "sfc",
"expver" : "0001",
"domain" : "g",
"param" : "164/167/169",
"number" : "1/to/50",
"step": "0",
"grid" : "0.25/0.25",
"interpolation" : "linear",
}
ds = earthkit.data.from_source("polytope", "ecmwf-mars", request, stream=False, address='polytope.ecmwf.int')
The default interpolation is linear. The following options are available:
linearbilinearnearest neighbournearest lsmgrid-box-averageaverage
Further information on interpolation options can be found here.
Area
A user can also request an area subselection of the data using the area keyword as follows.
import earthkit.data
request = {
"class": "od",
"stream" : "enfo",
"type" : "pf",
"date" : -1, # Note: date must be within the last two days
"time" : "0000",
"levtype" : "sfc",
"expver" : "0001",
"domain" : "g",
"param" : "164/167/169",
"number" : "1/to/50",
"step": "0",
"area": "75/-15/30/42.5"
}
ds = earthkit.data.from_source("polytope", "ecmwf-mars", request, stream=False, address='polytope.ecmwf.int')
In this case only a subselection of Europe will be returned. The area coordinates are in the form North/West/South/East.
Further information on the area keyword can be found here.
Notes
Some important notes that hold for all features are that:
- The data has to exist in the fdb on the polytope server.
- Further details on the
from_sourcemethod can be found here.