Skip to content

Tools for accessing, processing, and analyzing Copernicus seasonal forecasts — compute heat-related indices and generate CLIMADA-compatible hazards.

License

Notifications You must be signed in to change notification settings

DahyannAraya/copernicus-seasonal-forecast-tools

Repository files navigation

Project Logos

Copernicus Seasonal Forecast Tools

GitHub repo License PyPI version Python Downloads Documentation Status

Repository QR Code

This repository hosts the copernicus-seasonal-forecast-tools, a Python package developed to manage seasonal forecast data from the Copernicus Climate Data Store (CDS) as part of the U-CLIMADAPT project.

It offers comprehensive tools for downloading, processing, computing climate indices, and generating hazard objects based on seasonal forecast datasets, particularly Seasonal forecast daily and subdaily data on single levels. The package is tailored to integrate seamlessly with the CLIMADA (CLIMate ADAptation) platform, supporting climate risk assessment and the development of effective adaptation strategies.

Users can:

  • Automatically download of high-resolution seasonal forecast data via the CDS API
  • Preprocess sub-daily fields into daily aggregates
  • Compute heat-related indices (e.g., heatwave days, tropical nights, TX30)
  • Generate CLIMADA hazard objects
  • Benefit from the modular design for extending to new indices or forecast products

Documentation

For full documentation of all features and functions, please refer to the Copernicus Seasonal Forecast Tools documentation on ReadTheDocs.

Getting Started

To use this package, you must first configure access to the Copernicus Climate Data Store (CDS), which provides the seasonal forecast datasets.

We've prepared a comprehensive CDS API setup guide to walk you through each step of the process. Once configured, you'll be ready to explore and analyze seasonal forecast data.

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.

Note: If you want to generate CLIMADA hazard objects, you must install the optional CLIMADA dependency.
For full installation instructions, see the online documentation.

1. 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

2. 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

3. 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.

Example of use

This section provides practical example to help users understand how to work with the copernicus-seasonal-forecast-tools package. The notebooks demonstrate key steps including downloading data, computing climate indices, and generating CLIMADA hazard objects.

  • DEMO_copernicus_forecast_seasonal.ipynb: This is the first notebook to run. It demonstrates how to install and use the seasonal_forecast_tools to download, process, and convert seasonal forecast data into a CLIMADA hazard object.

Notebooks

Notebook Open in Colab GitHub (Documentation)
DEMO Copernicus Seasonal Forecast Open In Colab View in Docs
Download and Process Data Open In Colab View in Docs
Calculate Climate Indices Open In Colab View in Docs
Calculate a Hazard Object Open In Colab View in Docs
Example for Reading and Plotting Hazard Open In Colab View in Docs

You can find further material in Open In Colab, where we provide an extended demonstration.

Community guidelines and contributions

This section summarizes how to contribute and where to find more information. We follow the CLIMADA contribution workflow and conventions. See details in CONTRIBUTING.md.

License

GPL-3.0 license

Resources