Open-EO / openeo-geopyspark-driver

OpenEO driver for GeoPySpark (Geotrellis)
Apache License 2.0
26 stars 5 forks source link

default load_collection for sentinel1_grd causes not supported error on Creodias #311

Open JeroenVerstraelen opened 1 year ago

JeroenVerstraelen commented 1 year ago

Currently, when you do a simple load_collection for SENTINEL1_GRD on Creodias you will receive an error saying "Backscatter coefficient 'gamma0-terrain' is not supported". This is because the sar_backscatter process is added automatically with some default parameter that is not supported by Creodias. Perhaps we should remove this automatic addition to make this more transparent to the user?

Example client code:

import openeo

connection = openeo.connect("https://openeo-dev.creo.vito.be/openeo/1.1.0/").authenticate_oidc()
cube = connection.load_collection(
    "SENTINEL1_GRD",
    temporal_extent=["2020-07-29T00:00:00", "2020-07-29T23:59:59"],
    spatial_extent={
        'west': 5.5,
        'east': 5.65,
        'south': 50.13,
        'north': 50.23
    }
)

job_options = {
    "driver-memory": "1G",
    "driver-memoryOverhead": "1G",
    "driver-cores": "1",
    "executor-memory": "1G",
    "executor-cores": "1"
}
cube.execute_batch(outputfile="laroche-sentinel1grd.nc", out_format="NetCDF", job_options=job_options)

Output:

Your openEO batch job failed: OpenEOApiException(status_code=500, code='Internal', message="Backscatter coefficient 'gamma0-terrain' is not supported. Use one of ['beta0', 'sigma0-ellipsoid', 'gamma0-ellipsoid'].", id='no-reque...
Traceback (most recent call last):
  File "/opt/openeo/lib/python3.8/site-packages/openeogeotrellis/collections/s1backscatter_orfeo.py", line 209, in _get_sar_calibration_lut
    return S1BackscatterOrfeo._coefficient_mapping[coefficient]
KeyError: 'gamma0-terrain'
JeroenVerstraelen commented 1 year ago

@jdries I recently had this issue occur again for the CDSE benchmarks.

PaulH97 commented 12 months ago

I encountered the same problem when downloading the CDSE Sentinel1_GRD data

jdries commented 12 months ago

Note that this is mostly a usability issue with an easy workaround:


sentinel1 = c.load_collection(
    "SENTINEL1_GRD",
    temporal_extent = ["2022-06-04", "2022-08-04"],
    bands = ["VV","VH"]
)

  sentinel1 = sentinel1.sar_backscatter(
      coefficient='sigma0-ellipsoid',
      local_incidence_angle=False,
      elevation_model='COPERNICUS_30')

@Pratichhya we'll want to make Sentinel-1 processing more prominent in cdse documentation to highlight this better.