Merge datacubes from multiple dates

Hello, I am looking for ways to combine satellite data from several specific (discontinuous) dates. Load_collection and Filter_temporal allows you to enter only one temporal interval. Merge_cubes, in turn, requires the reduction of bands with the same name. How can I obtain a datacube, containing Sentinel2 B3 and B8 bands from multiple dates, to compute NDVI? Subsequently, I want to reduce it to one value (e.g. variance), and use the resulting raster to support land cover classification. If it works, I would like to present this workflow to my students as well. Thank you.


if I understand correctly, you want something like “all observations from first week of august in each year” and you want to avoid loading all data upfront?

With load_collection and filter_temporal this is indeed not possible.

With merge_cubes it should be possible however: as you are using separate, non-overlapping time ranges, it will act as a concatenation along the temporal axis.

I made a Python notebook illustrating merge_cubes with a set of discontinuous date ranges here: openEO `merge_cubes` with discontinuous date ranges · GitHub

1 Like

Thank you for the quick reply! I was a bit lost on how to run processes from the Python client and how to save the resulting data. I tried the openEO web editor firstly, where the merge_cubes process required a reducer, and I didn’t know what to enter if I didn’t want to reduce the data. Your code helped me and I already have the results I needed.
In the meantime, I found out that the geotiff saves only one band from a multi-band result. However, for such cases I can use netcdf.
Thank you for your support.