Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

earth and related environmental sciences

EOPF zarr Performance Comparison - xcube

Compare the performance of the Sentinel EOPF zarr format to the SAFE format using the xcube readers.

Authors
Affiliations
German Aerospace Center
Eurac Research
Brockmann Consult GmbH
ESA EOPF Zarr Logo

🚀 Launch in JupyterHub

Run this notebook interactively with all dependencies pre-installed

Introduction

This notebook provides a configurable framework for performance tests on the new EOPF zarr format.

Note: In addition to the chosen format, the influence of the underlying STAC API (EOPF vs CDSE) and the implementation of the used software (xcube-stac vs xcube-eopf) also affects the performance.

Setup

Start importing the necessary libraries

Functions

These are the functions that are needed for performance tests and some convenience.

Create an area of interest from the original bounding box reduced by a given factor beteween 0 (centroid pixel) and 1 (full scene).

Dataclass for carrying the defined inputs for data access like bounding box, time range, etc.

Function to access data in the EOPF Zarr format via xcube-eopf.

Function to access data in the SAFE format via xcube-stac.

Function to track the benchmarking KPIs like duration, number of pixels, etc.

Define Scenarios

Here we define scenarios for the performance tests.

First we define the dataset to be used.

Here we get the original bbox of the data set. And the native CRS.

[10.290484068727272, 45.93349650488509, 11.755584916064224, 46.94616825397537]
EPSG:32632

Now we’ll define the parameters for the performance test. Options can be added and adjusted to different use case scenarios.

Note: The function benchmark_data_access() allows to loop through different configs. But after the first iteration the results will be cached and subsequent runtimes are drastically reduced.

Tip: Execute one setting. Then restart the kernel of the jupyter notebook.

Create all combinations of parameters specified above

Number of configs: 1
Example config: BenchmarkConfig(data_id='sentinel-2-l2a', bbox=[10.839896886478629, 46.313248410793946, 11.206172098312868, 46.56641634806651], time_range=['2025-05-01', '2025-05-07'], spatial_res=10, crs='EPSG:32632', variables=['b02'])

Performance EOPF

We’ll carry out the performance tests on the EOPF zarr format by accessing the data via the given parameters and tracking their performance.

First we create a data store using the xcube library and its eopf extension.

Then we run the different scenarios.

Running: BenchmarkConfig(data_id='sentinel-2-l2a', bbox=[10.839896886478629, 46.313248410793946, 11.206172098312868, 46.56641634806651], time_range=['2025-05-01', '2025-05-07'], spatial_res=10, crs='EPSG:32632', variables=['b02'])

Round the bbox for nicer plotting.

And report the results.

Loading...

Performance SAFE

We’ll carry out the performance tests on the SAFE format by accessing the data via the given parameters and tracking their performance.

First we need CDSE credentials to access the data. Get them here: CDSE S3 Access Credentials.

Then we create a data store using the xcube library and its SAFE extension.

Then we run the perfomance tests.

Running: BenchmarkConfig(data_id='sentinel-2-l2a', bbox=[10.839896886478629, 46.313248410793946, 11.206172098312868, 46.56641634806651], time_range=['2025-05-01', '2025-05-07'], spatial_res=10, crs='EPSG:32632', variables=['b02'])

And report the results.

Loading...