Sentinel-3 OLCI L2 LFR Data Access
Demonstrate how to access Sentinel-3 OLCI L2 LFR data in EOPF Zarr format

Table of Contents¶
Run this notebook interactively with all dependencies pre-installed
This notebook contains the most common data access procedures for the Sentinel-3 OLCI L2 LFR EOPF Zarr data collection.
The Sentinel-3 OLCI L2 LFR product provides land and atmospheric geophysical parameters computed at full resolution (300m).
For more examples on how to use the data in different application scenarios, please refer to the EOPF Sample Notebooks available at: https://
Discover Products using STAC¶
Discover Sentinel-3 OLCI L2 LFR products using the EOPF STAC catalog at https://stac.core.eopf.eodc.eu.
The STAC Collection is https://stac.core.eopf.eodc.eu/collections/sentinel-3-olci-l2-lfr .
import pystac_client
import datetime
from datetime import timedelta
from xcube.core.store import new_data_store
import xarray as xr
xr.set_options(display_expand_attrs=False)<xarray.core.options.set_options at 0x7f7b8815e9c0>STAC_URL = "https://stac.core.eopf.eodc.eu"
catalog = pystac_client.Client.open(STAC_URL)
# Define area of interest
bbox = [11.2, 45.5, 11.3, 45.6]
# Temporal extent: today - 10 days to today
today = datetime.datetime.now(datetime.UTC).date()
start_date = today - timedelta(days=10)
temporal_extent = [str(start_date), str(today)]
print("Discovering Sentinel-3 OLCI L2 LFR products from STAC catalog...")
s3_items = list(
catalog.search(
collections=["sentinel-3-olci-l2-lfr"],
bbox=bbox,
datetime=temporal_extent,
).items()
)
print(f"Found {len(s3_items)} Sentinel-3 OLCI L2 LFR products")Discovering Sentinel-3 OLCI L2 LFR products from STAC catalog...
Found 26 Sentinel-3 OLCI L2 LFR products
Open a single product with xarray¶
This step will open a Sentinel-3 OLCI L2 LFR product as an Xarray.DataTree object.
stac_item = s3_items[-1]
zarr_url = stac_item.assets["product"].href
ds = xr.open_datatree(zarr_url, engine="zarr")
dsOpen a single product with xarray-eopf¶
This step will open a Sentinel-3 OLCI L2 LFR product as an Xarray.Dataset object.
For the package documentation please visit https://
ds = xr.open_dataset(zarr_url, engine="eopf-zarr")
dsOpen multiple products with xcube-eopf¶
This step will combine all the products into a datacube.
For the package documentation please visit https://
# Define area of interest
bbox = [11.2, 45.5, 11.3, 45.6]
# Temporal extent: today - 5 days to today
today = datetime.datetime.now(datetime.UTC).date()
start_date = today - timedelta(days=5)
temporal_extent = [str(start_date), str(today)]
store = new_data_store("eopf-zarr")
ds = store.open_data(
data_id="sentinel-3-olci-l2-lfr",
bbox=bbox,
spatial_res=0.0027, # ~300m in degrees for EPSG:4326
time_range=temporal_extent,
crs="EPSG:4326",
variables=["gifapar", "iwv", "otci"],
)
ds