Installation
The package requires Python 3.10, 3.11 or 3.12. Make sure your environment is using a compatible Python version before installation.
You can install copernicus-seasonal-forecast-tools in different ways, depending on your setup and preferences. Below we describe the installation using the package manager and environment management system Conda (similar installations are possible with the package managers Mamba or Pixi).
To install the package with the climate-risk assessment package CLIMADA:
conda create -c conda-forge -n copernicus_with python=3.11 pip climada
conda activate copernicus_with
pip install copernicus-seasonal-forecast-tools
To install the package without the climate-risk assessment package CLIMADA:
conda create -c conda-forge -n copernicus_without python=3.11 pip geopandas
conda activate copernicus_without
pip install copernicus-seasonal-forecast-tools
To install the package in developer (editable) mode, and run the documentation and tests:
conda create -c conda-forge -n copernicus-dev-mode python=3.11 pip geopandas climada
conda activate copernicus-dev-mode
git clone https://github.com/DahyannAraya/copernicus-seasonal-forecast-tools.git
cd copernicus-seasonal-forecast-tools
pip install -e .
CLIMADA Installation
CLIMADA is required to generate hazard layers. If you installed the package without CLIMADA you can install CLIMADA later on with
conda install climada
If you want to customize the CLIMADA installation, follow the Advanced Instructions of the CLIMADA installation guide.
How to Set Up the Copernicus API?
This page guides you through setting up the Copernicus Climate Data Store (CDS) API so you can access and download climate datasets directly from your Python scripts.
Note
Quick Tip for Successful Data Access
To ensure smooth access to the climate datasets:
Remember to accept the Terms and Conditions for each dataset you’re interested in
You’ll find these terms at the bottom of each dataset’s download page
This simple step enables your API requests to work correctly
For reference, the general data usage guidelines are available at: CDS Term of Use
Step-by-Step Instructions
1. Create a CDS Account
Register at the Copernicus Climate Data Store: https://cds.climate.copernicus.eu
2. Install the CDS API Client
In your terminal, run:
pip install cdsapi
3. Configure Your API Key
After registration, go to your CDS account page: https://cds.climate.copernicus.eu/how-to-api
Copy your personal API key and create a file named `.cdsapirc` in your home directory with the following format:
url: https://cds.climate.copernicus.eu/api key: <your-uid>:<your-api-key>
For full instructions, see: https://cds.climate.copernicus.eu/how-to-api#install-the-cds-api-client
4. Accept Dataset Terms and Conditions
Navigate to the dataset you want, for example: https://cds.climate.copernicus.eu/datasets/seasonal-original-single-levels?tab=download
Scroll to the bottom and accept the terms.