You only need to go through this procedure once, before you can use the CDS API on Windows to programmatically download data from either the Climate Data Store (CDS) or the Atmosphere Data Store (ADS). |
You need to have Python (and pip) installed on your Windows environment.
|
Add the installation and Script folder path in PATH using set (temporary) or setx (permanent) in a Command Prompt window.
This is to make sure that your computer knows where to find the Python interpreter. To do this you will have to modify a setting called PATH, which is a list of directories where Windows will look for programs.
Further details and examples are available here.
You may choose also to set your environment variables into a batch file (e.g. set-env.bat which you will need to run from the Command Prompt.
@echo off set PY_HOME=C:\...\python37 set PATH=%PY_HOME%;%PY_HOME%\Scripts;%PATH% |
If you have Anaconda installed you can install the CDS API by
/<install_path>/conda/anaconda2/bin/conda config --add channels conda-forge /<install_path>/conda/anaconda2/bin/conda install cdsapi |
For instructions on how to create a dot file on Windows, please see here or check the instructions provided by one of users on the User Forum.
Install the CDS API client by running the following command in a Command Prompt window:
pip install cdsapi # for Python 2.7 pip3 install cdsapi # for Python 3 |
or try
pip install --user cdsapi # for Python 2.7 pip3 install --user cdsapi # for Python 3 |
If you are getting connection issues, we recommend that in the first instance you check your proxy settings with your local IT team. |
For those using Ubuntu on Windows, installing pyopenssl might help.
pip install pyopenssl # for Python 2.7 pip3 install pyopenssl # for Python 3 |
This document has been produced in the context of the Copernicus Climate Change Service (C3S). The activities leading to these results have been contracted by the European Centre for Medium-Range Weather Forecasts, operator of C3S on behalf of the European Union (Delegation Agreement signed on 11/11/2014 and Contribution Agreement signed on 22/07/2021). All information in this document is provided "as is" and no guarantee or warranty is given that the information is fit for any particular purpose. The users thereof use the information at their sole risk and liability. For the avoidance of all doubt , the European Commission and the European Centre for Medium - Range Weather Forecasts have no liability in respect of this document, which is merely representing the author's view. |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|