This research project analyzes drought impacts on Greek mountain ecosystems, focusing on fir forest (Abies cephalonica) die-off in regions such as Chelmos, Mainalo, Taygetos, Parnonas, and Epirus. The work includes environmental monitoring, GIS mapping, climate data analysis, and the development of strategies for resilience and restoration. [source: dasarxeio.com]
The methodology is based on lessons learned from our work with Copernicus Emergency Management Service (EMS), in activation EMSN217 - Fire risk assessment in East Sardinia, Italy.
Based on Open Data Cube. For the EODC, the following steps have been completed:
- Created a database and credentials
- Created a Python
environment.yaml
- Initialized the datacube schema
- Generated a tiling grid schema covering Natura sites
- Defined EO products
- Verified dataset storage, indexing, and retrieval from NAS using EO3 datasets and EODC
The study area is divided into 21 tiles, each measuring 48 × 48 km. Tile naming follows a x00y00
format without negative indices. In 20-m imagery this translates to time×variables×2400×2400
pixel time series. A 2400×2400 size was found appropriate for an effective processing in a 32GB - 8 CPU configuration, with an average product delivery time of 7 minutes.
The composite pipeline automates the creation of 20-m monthly median mosaics of Sentinel-2 L2A data using the Planetary Computer via the STAC catalog.
- Input: GeoJSON configuration files define the year–month and tile code to process.
- Data access: Imagery is retrieved from the STAC catalog using odc-stac, filtered by cloud cover (
≤70%
) and data quality (nodata < 33%
). - Native resolutions: Sentinel-2 provides bands both at 10 m and 20 m resolutions. Since 10 m bands are not natively available at 20 m, we apply the
rasterio.enums.Resampling.average
method to bin the resolution to 20m.- Implementation note: If it is applied on a subset the values may vary (due to starting pixel and shape of the raster), but if it applied on a whole granule the values are identical. Sen2Cor uses
skimage.measure.block_reduce
(and from docs), as it can be found in S2 MPC L2A ATBD, to perform 2×2 mean aggregation (binning), as it can be found in theL2A_Tables.py
module. This is also available inxarray
'scoarsen
function, which is a replica of this function as stated in this issue. This ensures consistency with ESA’s Sen2Cor processing chain.
- Implementation note: If it is applied on a subset the values may vary (due to starting pixel and shape of the raster), but if it applied on a whole granule the values are identical. Sen2Cor uses
- Baseline change: Working with S2-L2A time series from MS PC requires a baseline change to Sen2Cor
4.00
. For scenes after2022-01-05
(January 25th, 2022), an offset of-1000
is applied. - Masking: Cloud, shadow, cirrus, and snow/ice pixels are masked using the Scene Classification Layer (SCL).
- Spectral indices: NDVI, EVI, and PSRI2 are calculated per timestamp before median temporal reduction.
- Reprojection: Before reduction, the data cubes are aligned and reprojected in ETRS89-extended / LAEA Europe (EPSG:3035) with odc-geo, using
rasterio
's bilinear resampling. If more than two UTM zones are included, a mosaic is generated. - Compositing: A median temporal composite is produced per tile and month.
- Output: Results are stored as Cloud-Optimized GeoTIFFs (COGs), with metadata (dataset definitions) recorded in both EO3 YAML and STAC JSON formats for datacube indexing. The
assets
/measurements
of the bands are recorded in paths relevant to the metadata document location. To do so on a local machine, raster information were referenced by explicitly providing geo and pixel information to the metadata preparation module. To load the relevant paths of raster images from NAS intoxarray
, url patching is required.
To serve data indeced in the EODC as visualizations, datacube-ows provides the WMS web service endpoint to (in our case) a TerriaJS web map client, by configuring the OWS
- Styles: Styles and Layers are configured in the
ows
configuration module - Update: Periodically withing the EO pipelines, or at the end of each one, the OWS database is triggered automatically to be updated.
- Reading: The images are loaded from NAS by patching the URL to the mounted volume inside the Docker container.
- Vizualization: The WMS of the data indexed is provided to a TerriaJS client, and are available via a NGROK app (https://emt-datacube-viewer.ngrok.app/).
Implementation note:
- Dont' forget to allow fire sharing in Docker
- Initialization:
docker exec -it drought-ows-drought_ows-1 bash
datacube system check
-Valid connection: YES
datacube-ows-update --schema --write-role odc_phd --read-role odc_phd
datacube-ows-update --views
datacube-ows-update
Hislop, S., Stone, C., Gibson, R.K., Roff, A., Choat, B., Nolan, R.H., Nguyen, T.H. and Carnegie, A.J., 2023. Using dense Sentinel-2 time series to explore combined fire and drought impacts in eucalypt forests. Frontiers in Forests and Global Change, 6, p.1018936.