1. Install ECMWF KEYIf you do not have an account, please register yourself through https://apps.ecmwf.int/registration/and go to the following steps.
Login https://apps.ecmwf.int/auth/login/
Get Keys through https://api.ecmwf.int/v1/key/
Please note that the key expires within 1 years. You will receive an email with your registered e-mail address 1 months before the expiration date with a renewal note. To view the expiration date of the current key login, visit the Www.ecmwf.int
Copy the information from this page and paste it into a file $ home/. Ecmwfapirc(unix/linux) or %userprofile%\ Ecmwfapirc(Windows;
How to create a leading point file. Rename the Create file.txt. File., the last point will be deleted and you'll get. File here we need to create the. ecmwfapirc file and copy the following into the file below%userprofile% , here This path can be found in the user variable, I computer user name is cronous path for C:\Users\Cronous so will. Ecmwfapirc under the path above
$ home/. ECMWFAPIRC (Unix/linux) or%userprofile%\. ECMWFAPIRC (Windows) content {
"url": "Https://api.ecmwf.int/v1",
"Key": "Xxxxxxxxxxxxxxxxxx",
"Email": "example@123.com"
{ 2. Install client library
This version of the library provides support for Python 2.7.x and Python 3.
You can install the Python library Ecmwfapi by running on Unix/linux:
sudo pip install https://software. Ecmwf.int/wiki/download/attachments/56664858/ecmwf-api-client-python. tgz |
or on Windows:
Pip Install https://software.ecmwf.int/wiki/download/attachments/56664858/ecmwf-api-client-python.tgz |
If you cannot run the sudo or PIP commands, simply download the ecmwf-api-client-python.tgz. Extracts its contents and copies the module ECMWFAPI to the directory in which the environment variable points pythonpath. 3. Check the availability of data
To view the availability of ECMWF public datasets , visit the Web interface:
http://apps.ecmwf.int/datasets/
Using this interface, you can discover all the ECMWF common datasets that are available in our archive. We strongly recommend that you browse our public data sets to familiarize yourself with their availability. You can select a common dataset and start browsing its contents.
Consider some of the things you should be aware of: different ECMWF public datasets include different "parameters", "Time" and "steps" in each ECMWF public dataset, not all "parameters" are available from all "steps" in each ECMWF public dataset, not all "time" all provided " Steps
The Web interface above will help you examine and understand usability. For any type of selection, the system dynamically updates the properties to reflect current availability. (That is, if you change the step, some parameters will be added or deleted).
After the tip selection is complete, we encourage the user to use the "view Mars request" feature at the bottom of the page. With this Mars request, you can build your own Python script. Here's the point. Viewing the Mars request automatically generates a Python script sample file that we can learn from, like the following data source I chose:
The automatically generated Python script is as follows:
For more information on "How to" retrieve data programmatically, in Python, and go to Access ECMWF public datasets.
#!/usr/bin/env python from
ecmwfapi import ecmwfdataserver
server = Ecmwfdataserver ()
Server.retrieve ({
"class": "Ti",
"DataSet": "Tigge",
"date": "2017-10-01/to/2017-10-20",
"Expver": "prod",
" Grid ":" 0.5/0.5 ",
" Levtype ":" SFC ",
" origin ":" ECMF ",
" param ":" 134/167/228228 ",
" step ":" 0/6/12 /18/24/30/36/42/48/54/60/66/72/78/84/90/96/102/108/114/120/126/132/138/144/150/156/162/168/174/180/186/192/198 /204/210/216/222/228/234/240/246/252/258/264/270/276/282/288/294/300/306/312/318/324/330/336/342/348/354/360 ",
"Time": "00:00:00/12:00:00", "
type": "CF",
"target": "Output",
})
We can learn about it.
Here's an example of a Tigge data source
Go to the end of the metadata go to the beginning of the meta data
Prediction of Tigge surface perturbation prediction Tigge pressure level control by Tigge pressure level control
10m wind components, 10m V-wind components, from NCEP. All pressure levels.