Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various notebooks issues #6

Closed
clausmichele opened this issue Oct 17, 2023 · 4 comments
Closed

Various notebooks issues #6

clausmichele opened this issue Oct 17, 2023 · 4 comments

Comments

@clausmichele
Copy link
Collaborator

clausmichele commented Oct 17, 2023

@pl-marasco @acocac

In a new environment with Python 3.10 and latest xarray 2023.9.0 (probably something changed recently) I'm getting this kind of errors in various notebooks:

import xarray as xr

catalogue="https://object-store.cloud.muni.cz/swift/v1/foss4g-catalogue/c_gls_NDVI-LTS_1999-2019.json"
LTS = xr.open_mfdataset(
    "reference://", engine="zarr",
    backend_kwargs={
        "storage_options": {
            "fo":catalogue
                    },
        "consolidated": False
    }
)
LTS

Error:

File ~/anaconda3/envs/stac_310/lib/python3.10/site-packages/zarr/storage.py:1382, in FSStore.__init__(self, url, normalize_keys, key_separator, mode, exceptions, dimension_separator, fs, check, create, missing_exceptions, **storage_options)
   1380 else:
   1381     if storage_options:
-> 1382         raise ValueError("Cannot specify both fs and storage_options")
   1383     self.fs = fs
   1384     self.path = self.fs._strip_protocol(url)

ValueError: Cannot specify both fs and storage_options
@clausmichele
Copy link
Collaborator Author

clausmichele commented Oct 17, 2023

In the xarray_hands_on notebook, I'm getting this error:
DriverError: '/vsizip/vsicurl/https://mars.jrc.ec.europa.eu/asap/files/gaul1_asap.zip' does not exist in the file system, and is not recognized as a supported dataset name.

Not sure if it's due to my environment.

@clausmichele clausmichele changed the title Errors with latest xarray 2023.9.0 Various notebooks issues Oct 17, 2023
@clausmichele
Copy link
Collaborator Author

clausmichele commented Oct 17, 2023

In the wildfires notebook there's an issue with the used STAC 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"),

@pl-marasco
Copy link
Collaborator

In the xarray_hands_on notebook, I'm getting this error: DriverError: '/vsizip/vsicurl/https://mars.jrc.ec.europa.eu/asap/files/gaul1_asap.zip' does not exist in the file system, and is not recognized as a supported dataset name.

Not sure if it's due to my environment.

most probably it's related to a ban inside the ec. I'll find another source

@pl-marasco
Copy link
Collaborator

Splitted in multiple issues #7, #8 #9

the initial one has been fix through the #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants