Python client for ECMWF web services API.
Project description
ecmwf-api-client
Installation
Install via pip with:
$ pip install ecmwf-api-client
Configure
- If you don't have an ECMWF account, please self register at https://apps.ecmwf.int/registration/ and then go to the steps below.
- Login https://apps.ecmwf.int/auth/login/
- Retrieve you key at https://api.ecmwf.int/v1/key/
Note that the key expires in 1 year. You will receive an email to the registered email address 1 month before the expiration date with the renewal instructions. To check the expiry date of your current key log into www.ecmwf.int, and go to https://api.ecmwf.int/v1/key/.
- Copy the information in this page and paste it in the file $HOME/.ecmwfapirc (Unix/Linux) or %USERPROFILE%.ecmwfapirc (Windows: usually in C:\Users<USERNAME>.ecmwfapirc ; see how to create a file with a leading dot).
Your $HOME/.ecmwfapirc (Unix/Linux) or %USERPROFILE%.ecmwfapirc (Windows) should look something like this:
{
"url" : "https://api.ecmwf.int/v1",
"key" : "XXXXXXXXXXXXXXXXXXXXXX",
"email" : "john.smith@example.com"
}
- You can browse the ECMWF data catalogue at https://apps.ecmwf.int/mars-catalogue/
Test
You can test this small python script to retrieve TIGGE data:
#!/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()
server.retrieve({
'origin' : "ecmf",
'levtype' : "sfc",
'number' : "1",
'expver' : "prod",
'dataset' : "tigge",
'step' : "0/6/12/18",
'area' : "70/-130/30/-60",
'grid' : "2/2",
'param' : "167",
'time' : "00/12",
'date' : "2014-11-01",
'type' : "pf",
'class' : "ti",
'target' : "tigge_2014-11-01_0012.grib"
})
License
Copyright 2019 European Centre for Medium-Range Weather Forecasts (ECMWF) Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. In applying this licence, ECMWF does not waive the privileges and immunities granted to it by virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ecmwf-api-client-1.6.2.tar.gz
.
File metadata
- Download URL: ecmwf-api-client-1.6.2.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad52f07dbf132b1dcf710096a670447b821944ec969e683e40838eec6e0516b9 |
|
MD5 | 40826bfd79cedae79b42c5ab2b2948d6 |
|
BLAKE2b-256 | ed2d673c926541c9141078bc9d364bfb00f2032b6c882cd85c8c2f369f1b3647 |