You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Background


Access via web-api


The data is downloaded via web-api using python scripts. You will need to download the appropriate python modules to run these scripts. For example, the python scripts will contain from commands like in this example,


#!/usr/bin/env python
#

from ecmwfapi import ECMWFDataServer

# To run this example, you need an API key
# available from https://api.ecmwf.int/v1/key/

server = ECMWFDataServer(verbose=1)

server.retrieve({
'dataset' : "rom_saf_3198",
'stream' : "moda",
'levtype' : "pl",
'levelist': "1000",
'date' : "20150301",
'type' : "an",
'param' : "131.128",
'grid' : "0.5/0.5",
'format' : "netcdf",
'target' : "rom_saf_3198.nc"
})




General information related to downloading the data via web-api, is described here:

https://confluence.ecmwf.int/display/WEBAPI/Web-API+Downloads

Specifically, follow the steps here to install the latest code version:

https://pypi.org/project/ecmwf-api-client/

Briefly, install this with the pip command:

  • pip install ecmwf-api-client

You will now have the modules needed in the python scripts. (I actually needed this command for the ECMWF system pip install --user ecmwf-api-client because of local permssions).

Login and retrieve your "key":

Login at:

Retrieve your key at:


Create and paste the "key" information in here:

  • $HOME/.ecmwfapirc

You will also need to accept the terms before you can access the data with web-api.







Accept terms and conditions.




  • No labels