Skip to content

This repository describes the process for accessing Destination Earth DT data via the Polytope web service hosted on the LUMI Databridge.

License

Notifications You must be signed in to change notification settings

destination-earth-digital-twins/polytope-examples

Repository files navigation


Polytope Examples for DT Data Access

This repository describes the process for accessing Destination Earth DT data via the Polytope web service hosted on the LUMI Databridge.

Access using your Destination Earth Service Platform credentials

  1. Install polytope-client from PyPI:
pip install --upgrade polytope-client
  1. Retrieve a token from the Destination Earth Service Platform (DESP) by running the script included in this repository:
python desp-authentication.py -u <username> -p <password>
# see --help for more options

Or you can run the script without arguments

python desp-authentication.py 
# see --help for more options

You will then be prompted to enter your username and password if no credentials are found in a config or through environment variables.

You will need some dependencies to run the script, which can be installed using pip:

pip install --upgrade lxml conflator

The script automatically places your token in ~/.polytopeapirc where the client will pick it up. The token is a long-lived ("offline_access") token.

  1. Run the example scripts in this repostory to download data, and customise them as you wish.

Access using your ECMWF credentials

  1. Install polytope-client from PyPI:
pip install --upgrade polytope-client
  1. Register for an ECMWF account at ecmwf.int and retrieve your API key from https://api.ecmwf.int/v1/key/

  2. Modify the example scripts in this repository to include your email address and API key. Or alternatively see the documentation at https://github.com/ecmwf/polytope-client to see how to set this globally.

Installation

To run the notebooks you can use the environment.yml file provided to create a conda environment that can run the notebooks. The following commands create the environment and also create an ipykernel called earthkit than can be used in notebooks if selected.

envname=earthkit
conda create -n $envname -c conda-forge -y python=3.10
conda env update -n $envname -f environment.yml
conda activate $envname

# set earthkit environment to the default used by ipykernels
python3 -m ipykernel install --user --name=$envname

Climate-DT Examples

Extremes-DT Examples

About

This repository describes the process for accessing Destination Earth DT data via the Polytope web service hosted on the LUMI Databridge.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published