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.

Ocean Datacube Hackathon

ESA

This repository contains information and guided notebooks about the Ocean Hackathon. The core aspects of the hackathon are:

  1. Marine datasets covering the Mediterranean Sea and the global ocean from ESA-funded science projects, hosted on object storage.

  2. A Mediterranean Sea datacube with a common spatial grid and separate stores for monthly, hourly, and daily data.

  3. Guided notebooks that show how to access the cloud-hosted datasets, convert data into cloud-native formats, combine them into analysis-ready datacubes, and use those collections in scientific workflows.

  4. Information about creating a local environment to work in, or using the provided cloud platform.

mediterranean_multi_variable_single_map.png

Repository Map

FolderPurposeBest starting point
0_Introduction/Brief introduction to the hackathon, goals, EarthCODE context, setup, and agenda.0_Introduction/intro.ipynb
1_Datasets/Dataset catalogue and information per source product.1_Datasets/datasets_sumary.ipynb
2_Datacube/ESA Mediterranean Sea Datacube and access examples.2_Datacube/0_intro.ipynb
3_File_formats_and_metadata/Format-conversion examples for Zarr, COG, and GeoParquet, plus the creation of STAC metadata.3_File_formats_and_metadata/0_intro.ipynb
5_Hackathon_Code/Folder for your code.5_Hackathon_Code/0_intro.md

Generated local data is expected in downloaded_data/, which is ignored by Git.

EarthCODE Context

The hackathon is supported by EarthCODE, and the data is available through EarthCODE’s Open Science Catalog.

1. Datasets prepared for the Ocean Hackathon

Each prepared dataset has an associated notebook, linked in the access notebook column, showing how to open its assets directly from object storage. More information about each dataset is available in its notebook and OSC entry. All notebooks reside in the 1_Datasets folder.

DatasetDescriptionPrepared formatCRS/gridTime coverageLicenceLinksAccess notebook
4DMED-SEA sea-surface salinityMediterranean salinity and density fieldsZarrEPSG:4326, 1/24° lat/lon gridDaily, 2016–2022CC-BY-4.0OSCNotebook
4DMED-SEA MIOST Lagrangian eddiesMediterranean current structures and eddiesZarrEPSG:4326, 1/24° lat/lon gridDaily, April 2016–July 2022CC-BY-4.0OSCNotebook
4DMED-SEA 4DVarNet 1/8°Sea-level and geostrophic velocity fieldsZarrEPSG:4326, 1/8° lat/lon gridDaily, January 2016–August 2022CC-BY-4.0OSCNotebook
4DMED-SEA 4DVarNet 1/20°Sea-surface height and derived variablesZarrEPSG:4326, 1/20° lat/lon gridDaily, January 2016–August 2022CC-BY-4.0OSCNotebook
4DMED-SEA PFT and KdPhytoplankton functional types and diffuse attenuationZarrEPSG:4326, 8 km lat/lon gridMonthly, 2019–2021CC-BY-4.0OSCNotebook
4DMED-SEA 3D physical fieldsTemperature, salinity, density, and geostrophic velocityZarrEPSG:4326, 1/24° grid with 20 depth levels to 153 mDaily, January 2016–July 2022CC-BY-4.0OSCNotebook
4DMED-SEA primary productionPrimary production from chlorophyll and temperatureZarrEPSG:4326, 1/24° grid with 148 depth levels to 150 mDaily, January 2016–August 2022CC-BY-4.0OSCNotebook
4DMED-SEA 3D biophysical fieldsChlorophyll-a plus physical and velocity variablesZarrEPSG:4326, 1/24° grid with 148 depth levels to 150 mDaily, January 2016–August 2022CC-BY-4.0OSCNotebook
WOC total surface currentHourly total ocean current at 15 mZarrEPSG:4326, 0.25° lat/lon grid at 15 mHourly, December 2014–December 2019CC-BY-4.0OSCNotebook
Atlantic Ocean heat contentAtlantic heat-content changeZarrEPSG:4326, global 1° lat/lon gridApril 2002–September 2023AVISO termsOSCNotebook
OceanSODA-ETHZSurface-ocean carbonate-system variablesZarrEPSG:4326, global 1° and 0.25° lat/lon gridsMonthly, 1982–2024; 8-day products, 1982–2022CC-BY-NC-SA-4.0OSCNotebook
WAPOSALWave and satellite-altimetry productsZarrEPSG:4326, along-track observationsMarch 2016–December 2022CC-BY-SA-4.0OSCNotebook
MITHOGlobal cumulative hazard indexesZarrEPSG:4326, global 1° lat/lon gridMonthly; varies by index, 1993–2022CC-BY-SA-4.0OSCNotebook
BICEPBiological pump and carbon exchange processesZarrEPSG:4326, global regular lat/lon gridsMonthly, 1997–2020UK Open Government LicenceOSCNotebook
CAREHeatMarine heat wavesZarrEPSG:4326, global 0.25° lat/lon gridDaily, 1980–2024CC-BY-4.0OSCNotebook
BoomsBiodiversity in the Open Ocean: Mapping, Monitoring and Modelling (BOOMS)ZarrEPSG:4326, global 0.04° lat/lon gridDaily, 1998–2024CC-BY-NC-4.0OSCNotebook
CoastDynESA COASTDynZarrEPSG:4326, Europe 0.0625° lat/lon gridDaily, 2023-2024CC-BY-4.0OSCNotebook

2. ESA Mediterranean Sea Datacube

The ESA Mediterranean Sea Datacube combines marine datasets on a common 1/24° EPSG:4326 grid. The data are available in four online GeoZarr stores with different time and depth coordinates:

StoreContentsCube coordinate coverage
ocean-med-monthly-cube.zarr4DMED PFT/Kd, ocean heat content, OceanSODA, BICEP, and MITHOMonthly, January 2016–December 2022
hourly_cube.zarrWOC and CMEMS current components at 15 mHourly, 30 December 2014–30 December 2019
ocean-med-biophysics.zarr4DMED primary production and 3D physical fields at 18 depths, 3–135 mDaily, 1 January 2016–31 July 2022
ocean-med-daily-surface-cube.zarr4DMED salinity/density, FSLE, both 4DVarNet reconstructions, and CAREHeat categoriesDaily, 1 January 2016–31 December 2022

The notebooks open these online stores directly over HTTPS using consolidated metadata. An internet connection is required; only the selected chunks are read. Group 0 is full resolution; groups 1 and 2 contain spatial summaries at 1/6° and 1/3°. Individual products may cover only part of a store’s time axis.

Start with cube access and example plots, then explore building a small local cube and time series at every depth. The overview lists source products, OSC links, variables, licences, and how the data were combined.

3. File Formats and Metadata

The format notebooks show 1) how datasets can be transformed in cloud-optimised formats, and 2) described with metadata.

Note: the examples we used for these notebooks come from Polar studies, since they came in different file formats.

Dataset Formats

FormatBest forWhy it matters in object storage
ZarrLabelled multidimensional arraysChunked reads allow an analysis to load only the required variables, regions, depths, and times.
Cloud Optimized GeoTIFF (COG)Individual rasters or raster stacksInternal tiling and overviews support efficient range reads and quicklooks.
GeoParquetVector geometries and tabular observationsColumnar storage enables efficient filtering and carries standard geospatial metadata.

See the notebooks in 3_File_formats_and_metadata/ and the Cloud-Native Geospatial Guide for more detail.

Metadata

Rich metadata makes each collection easier to find, interpret, cite, and reuse. Collection metadata should document provenance, licence, variables, units, spatial and temporal extent, processing history, and access assets.

EarthCODE collections use the SpatioTemporal Asset Catalog (STAC) specification to provide a consistent, machine-readable description of geospatial data.

4. Visualisation

Most of the datasets are part of one of the cubes, which in turn can be interactively visualised since they are in geozarr format. To open the visualisation click the “Explore Data” link in the ntoebooks, or go directly to the visualisation website . The site wraps a simple GeoZarr viewer and can be replaced with a compatible GeoZarr in any programming language or tool. Additionally, there are two notebooks if you are interested in converting your own data. They use a sample of the OceanSoda Dataset to demonstrate the conversions:

  1. Visualising COGs

  2. Converting Zarr to GeoZarr

Suggested Hackathon Workflow

  1. Pick a science question, user workflow, or define your own.

  2. Browse the dataset catalogue and open the relevant access notebooks.

  3. Use the existing collections to answer the question.

  4. Use the file-format notebooks as guidance when preparing a new dataset to add to the existing collections.

  5. Put your code in 5_Hackathon_Code/ and keep generated data out of Git.

  6. Submit your work as a pull request with a short description of the question, datasets, methods, and outputs.

Environment Notes

The notebooks assume a Python geospatial environment with common Pangeo tools. The repository’s pixi.toml provides packages including xarray, dask, geopandas, rasterio, rioxarray, pyproj, shapely, pandas, numpy, matplotlib, and pystac.

Install the environment and start JupyterLab with:

pixi install
pixi run jupyter lab

Network access is only needed for remote object-store reads or optional source downloads. The format tutorials write generated examples to downloaded_data/, which is ignored by Git.