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:
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({
'dataset' : 'tigge',
'step' : '24',
'number' : 'all',
'levtype' : 'sl',
'date' : '20071001',
'time' : '00',
'origin' : 'all',
'type' : 'pf',
'param' : 'tp',
'area' : '70/-130/30/-60',
'grid' : '2/2',
'target' : 'data.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
Built Distribution
File details
Details for the file ecmwf-api-client-1.5.2.tar.gz
.
File metadata
- Download URL: ecmwf-api-client-1.5.2.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58987340b8aafb5754ce0d033cdeb6bed0bd4869a1d9bf05d9dbec099ab5e507 |
|
MD5 | c91e145d71d365e6eb82c9846ea03427 |
|
BLAKE2b-256 | 1c08ff8b824c44ad5518581077c9e4af1bd76a7dce073aa227e111f3788d6161 |
File details
Details for the file ecmwf_api_client-1.5.2-py3-none-any.whl
.
File metadata
- Download URL: ecmwf_api_client-1.5.2-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 391d2e77ebf74f191ff1afa3dd2984dd6f369c4f2c44040cfa0dfd41001ee931 |
|
MD5 | 8b0687a6cb86021b5565e81c6d791ebf |
|
BLAKE2b-256 | 188bda27d44b959f3c911e15f486b93f3b9d214f990d9d692f4568eca7746b35 |