Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The current access method  WEB-API  will be changed to the analogical CDS-API.
  • For more details about the migration schedule, visit Decommissioning of ECMWF Public Datasets Service
  • Purpose of this page is to describe the current and future access tools to both datasets.

The current TIGGE and S2S users can easily adapt their retrieval requests following the new CDS-API, MARS like, syntax (see in the table below with the examples). 

  • this kind of requests is generated automatically using dedicated MARS catalogues

All users are encouraged to try the new, ECDS dedicated, version of the retrieval requests, which some may find more user friendly (see new CDS-API ("beautified") example).

  • this kind of requests is generated automatically using forms in ECDS portal
Overview of current and future tools

* these tools will be discontinued 

...

The example of dictionary used to translate MARS like to CDS beautified requests for S2S dataset is s2s.commonecds-tigge.yaml

Registration

All users must register with ECDS to get the access to datasets using CDS-API. Although the new ECDS portal shares similar infrastructure as the Copernicus Climate Data Store, the existing user tokens (API keys) cannot be reused in ECDS.

...

Examples of the current and future retrieval requests

exampleMARS languagecurrent  WEB-API new CDS-API (MARS like)new CDS-API ("beautified" - generated by ECDS) *
request
retrieve,
class=ti,
date=2024-02-01/to/2024-02-03,
expver=prod,
grid=0.5/0.5,
levtype=sfc,
origin=ecmf,
param=121/122,
step=6/to/24/by/6,
time=00:00:00,
type=cf,
target="output"
#!/usr/bin/env python
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()

server.retrieve({
    "dataset": "tigge",
    "date": "2024-02-01/to/2024-02-03",
    "expver": "prod",
    "grid": "0.5/0.5",
    "levtype": "sfc",
    "origin": "ecmf",
    "param": "121/122",
    "step": "6/to/24/by/6",
    "time": "00:00:00",
    "type": "cf",
    "target": "output"
})
#!/usr/bin/env python
import cdsapi
client = cdsapi.Client()

dataset = "tigge-forecasts"
request = { "class": "ti", "date": "2024-02-01/2024-02-03", "expver": "prod", "grid": "0.5/0.5", "levtype": "sfc", "origin": "ecmf", "param": "121/122", "step": "6/to/24/by/6", "time": "00:00:00", "type": "cf" }
target = "output" client.retrieve(dataset, request, target)
#!/usr/bin/env python
import cdsapi
client = cdsapi.Client()

dataset = "tigge-forecasts"

request = {
  "year": ["2024"],
  "month": ["02"],
  "day": ["01", "02", "03"],
  "grid": "0.5/0.5",
  "level_type": "single_level",
  "origin": "ecmf",
  "variable": ["maximum_2m_temperature_last_6_hours",
     "minimum_2m_temperature_last_6_hours"],
  "leadtime_hour": "6/to/24/by/6",
  "time": "00:00:00",
  "forecast_type": "control_forecast",
  "data_format": "grib"
}

target = "output"
client.retrieve(dataset, request, target)
API key

Direct access to MARS database needed

(not publicly available)


--> cat ~/.ecmwfapirc
{
    "url"   : "https://api.ecmwf.int/v1",
    "key"   : "<personal token>",
    "email" : "<personal email>"
}

--> cat $HOME/.cdsapirc
url: https://ecds.ecmwf.int/api
key: <personal token>
--> cat $HOME/.cdsapirc
url: https://ecds.ecmwf.int/api
key: <personal token>
Alternatively the url and token can be part of the Python client definition:
client = cdsapi.Client(url="https://ecds.ecmwf.int/api", 
key="<personal token>")
Alternatively the url and token can be part of the Python client definition:
client = cdsapi.Client(url="https://ecds.ecmwf.int/api", 
key="<personal token>")

(*) The example of dictionary used to translate MARS like to CDS beautified requests for S2S dataset is s2s.commonTIGGE dataset is ecds-tigge.yaml