Open-EO / openeo-processes-dask

Python implementations of many OpenEO processes, dask-friendly by default.
Apache License 2.0
19 stars 14 forks source link

Detecting Deep Moist Convection: some implementation issues #266

Open clausmichele opened 2 months ago

clausmichele commented 2 months ago

This process has been recently added to the repo. However, I would like to mention some concerns I have:

  1. In general, I don't see the need to add a new openEO process to cover this use case, since it uses basic openEO processes in it. It could be implemented as a UDP, or as a helper in the Python client (maybe as part of the awesome-spectral-indices https://github.com/Open-EO/openeo-python-client/blob/35b5fc7b0cc844bf5f02b0e437f683f501ffe5ff/openeo/extra/spectral_indices/resources/awesome-spectral-indices/spectral-indices-dict.json#L1292) The more processes we add, the more we have to maintain. Anyway, why not adding it to the experimental folder? So that it's not included implicitly in when installing the package.
  2. If we really need a new process, as I mentioned here, the processes that are modifying the datacube dimensionalities should go into either a reduce_dimension or an apply_dimension. For this case it should be used with apply_dimension.
  3. The current implementation has some errors to fix:

Test it with this code:

from openeo.local import LocalConnection
from openeo.rest.datacube import THIS

local_conn = LocalConnection("./")

url = "https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a"
spatial_extent =  {"east": 11.40, "north": 46.52, "south": 46.46, "west": 11.25}
temporal_extent = ["2022-06-01", "2022-06-30"]
bands = ["nir08","nir09","wvp","swir16","swir22"]
properties = {"eo:cloud_cover": dict(lt=80)}
s2_datacube = local_conn.load_stac(
    url=url,
    spatial_extent=spatial_extent,
    temporal_extent=temporal_extent,
    bands=bands,
    properties=properties,
)
s2_datacube.process(process_id="ddmc",cirrus="wvp",data=THIS).execute()

which returns:

ValueError: Type band is not understood

@ValentinaHutter @koenifra