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

Access using your Destination Earth Service Platform credentials

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

  1. Clone the repo locally or if using polytope via Insula cd into the polytope directory.
git clone git@github.com:destination-earth-digital-twins/polytope-examples.git
  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.

Installation

You can run the notebooks by setting up an appropriate environment using one of the following options:

  • Option 1: Use the environment.yml file to create a Conda environment, or

  • Option 2: Use the requirements.txt file to set up a Python virtual environment.

After creating the environment, the provided commands will also register an IPython kernel named earthkit, which you can select when working with the notebooks.

Option 1: Conda Instructions

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

Option 2: Python Virtual Environment (venv)

envname=earthkit

# Create a virtual environment
python3 -m venv $envname

# Activate it
source $envname/bin/activate      # macOS/Linux

# Install dependencies
pip install -r requirements.txt

# If using Jupyter notebooks, register your environment as a kernel for ipykernel
python3 -m ipykernel install --user --name=$envname

Data Locations

Data can be found on both LUMI and MN5, to access data on either change the address argument in earthkit.data.from_source() to either polytope.mn5.apps.dte.destination-earth.eu for MN5 or polytope.lumi.apps.dte.destination-earth.eu for LUMI.

Climate-DT Examples

Extremes-DT Examples

On-Demand Extremes-DT Examples

NextGEMS Examples

Polytope Quota Limits for DestinE

To ensure system stability and fair usage, the following operational limits are enforced:

  • API Rate Limit: Up to 50 requests per second. This limit may be adjusted based on system usage.
  • Concurrent Operations Limit: A maximum of 5 download requests can be active at the same time.

Please plan your usage accordingly to avoid interruptions.

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

Contributors 11