pangeo-data / pangeo-openeo-BiDS-2023

Pangeo & OpenEO Joint tutorial for BiDS23 - "Scaling Big Data Analysis with Pangeo and OpenEO: Unlocking the Power of Space Data"
https://pangeo-data.github.io/pangeo-openeo-BiDS-2023/
MIT License
10 stars 7 forks source link

In the `wildfires` notebook there's an issue with the used STAC Catalog from Element84, since the v0 is no more updated. #7

Closed pl-marasco closed 1 year ago

pl-marasco commented 1 year ago
          In the `wildfires` notebook there's an issue with the used SATC Catalog from Element84, since the v0 is no more updated.
# prefire data
time_range = "2021-08-10/2021-08-16"

query1 = catalog.search(
    collections=["sentinel-s2-l2a-cogs"], datetime=time_range, limit=100,
    bbox=bbox, query={"eo:cloud_cover": {"lt": 0.5}},
)

items = list(query1.get_items())
print(f"Found: {len(items):d} datasets")

items_pre = min(items, key=lambda item: item.properties["eo:cloud_cover"])

prefire_ds = stac_load(
    [items_pre],
    bands=("B08", "B12"),
    crs=crs,
    resolution=10 * zoom,
    chunks={},  # <-- use Dask
    groupby="datetime",
    bbox=bbox,
)

returns:

DoesNotConformTo: Server does not conform to ITEM_SEARCH, There is not fallback option available for search.

We need to switch to this one:

catalog = Client.open("https://earth-search.aws.element84.com/v1")

with this collection

query1 = catalog.search(
    collections=["sentinel-2-l2a"], datetime=time_range, limit=100,
    bbox=bbox, query={"eo:cloud_cover": {"lt": 0.5}},
)

band names are also different:

bands=("nir", "swir22"),

Originally posted by @clausmichele in https://github.com/pangeo-data/pangeo-openeo-BiDS-2023/issues/6#issuecomment-1766015910

clausmichele commented 1 year ago

Thanks @pl-marasco for splitting into a different issue.

acocac commented 1 year ago

@clausmichele may I ask which of the wildfire notebooks have you experienced the issue?

I've tried the wildfires_dask_local.ipynb and it works in the Pangeo-EOSC deployment.

clausmichele commented 1 year ago

@acocac in this notebook: https://github.com/pangeo-data/pangeo-openeo-BiDS-2023/blob/main/tutorial/examples/access/wildfires.ipynb

But I guess that you would get the same issue with an updated version of pystac_client for the other notebook. It is anyway good to deprecate the usage of the v0 Element84 Catalog and switch to the v1. I quote a message from a Element84 developer:

The new version (“v1”) of Earth Search with these updates is available at earth-search.aws.element84.com/v1. The old version (“v0”) of Earth Search is now considered deprecated. Specific per-Collection notes can all be found in the Earth Search GitHub repository, which is also used for issue tracking. There is no specific timeline for when v0 will be deleted, but it is no longer being updated.

We recently put out a blog that explains this change and the new datasets that are available.